/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at * trunk/opends/resource/legal-notices/OpenDS.LICENSE * or https://OpenDS.dev.java.net/OpenDS.LICENSE. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, * add the following below this CDDL HEADER, with the fields enclosed * by brackets "[]" replaced with your own identifying information: * Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END * * * Portions Copyright 2007 Sun Microsystems, Inc. */ package org.opends.server.admin.client; import java.util.Collection; import java.util.SortedSet; import org.opends.server.admin.IllegalPropertyValueException; import org.opends.server.admin.InstantiableRelationDefinition; import org.opends.server.admin.ManagedObjectDefinition; import org.opends.server.admin.ConfigurationClient; import org.opends.server.admin.ManagedObjectPath; import org.opends.server.admin.OperationsException; import org.opends.server.admin.OptionalRelationDefinition; import org.opends.server.admin.PropertyDefinition; import org.opends.server.admin.PropertyIsMandatoryException; import org.opends.server.admin.PropertyIsReadOnlyException; import org.opends.server.admin.PropertyIsSingleValuedException; import org.opends.server.admin.PropertyProvider; import org.opends.server.admin.SingletonRelationDefinition; /** * A generic interface for accessing client-side managed objects. *
* A managed object comprises of zero or more properties. A property * has associated with it three sets of property value(s). These are: *
* See the class description for more information about how the
* effective property value is derived.
*
* @param
* See the class description for more information about how the
* effective property values are derived.
*
* @param
* See the class description for more information regarding pending
* values.
*
* @param
* See the class description for more information regarding pending
* values.
*
* @param
* See the class description for more information regarding pending
* and active values.
*
* @throws OperationsException
* If the changes to this managed object could not be
* committed due to some underlying communication problem.
*/
void commit() throws OperationsException;
/**
* Creates a new child managed object bound to the specified
* instantiable relation. The new managed object instance will be
* created with values taken from a property provider. The caller
* must make sure that the property provider provides values for
* mandatory properties.
*
* @param null if there is no effective value
* defined.
* @throws IllegalArgumentException
* If the property definition is not associated with this
* managed object's definition.
*/
public null if the property should be reset to
* its default behavior.
* @throws IllegalPropertyValueException
* If the new pending value is deemed to be invalid
* according to the property definition.
* @throws PropertyIsReadOnlyException
* If an attempt was made to modify a read-only property.
* @throws PropertyIsMandatoryException
* If an attempt was made to remove a mandatory property.
* @throws IllegalArgumentException
* If the specified property definition is not associated
* with this managed object, or if the property is
* read-only.
*/
public null set of new pending values for
* the property (an empty set indicates that the property
* should be reset to its default behavior). The set will
* not be referenced by this managed object.
* @throws IllegalPropertyValueException
* If a new pending value is deemed to be invalid
* according to the property definition.
* @throws PropertyIsSingleValuedException
* If an attempt was made to add multiple pending values
* to a single-valued property.
* @throws PropertyIsReadOnlyException
* If an attempt was made to modify a read-only property.
* @throws PropertyIsMandatoryException
* If an attempt was made to remove a mandatory property.
* @throws IllegalArgumentException
* If the specified property definition is not associated
* with this managed object, or if the property is
* read-only.
*/
public true if the optional managed
* object exists, false otherwise.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws OperationsException
* If the existance of the optional managed object could
* not be determined due to some underlying communication
* problem.
*/
boolean hasChild(OptionalRelationDefinition, ?> d)
throws IllegalArgumentException, OperationsException;
/**
* Lists the child managed objects associated with the specified
* instantiable relation.
*
* @param d
* The instantiable relation definition.
* @return Returns the names of the child managed objects.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws OperationsException
* If the managed objects could not be listed due to some
* underlying communication problem.
*/
String[] listChildren(InstantiableRelationDefinition, ?> d)
throws IllegalArgumentException, OperationsException;
/**
* Removes the named instantiable child managed object.
*
* @param