/* * 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 legal-notices/CDDLv1_0.txt * or http://forgerock.org/license/CDDLv1.0.html. * 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 legal-notices/CDDLv1_0.txt. * 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 * * * Copyright 2007-2009 Sun Microsystems, Inc. */ package org.opends.server.admin.client; import java.util.Collection; import java.util.SortedSet; import org.opends.server.admin.AbstractManagedObjectDefinition; import org.opends.server.admin.Configuration; import org.opends.server.admin.PropertyException; import org.opends.server.admin.DefinitionDecodingException; import org.opends.server.admin.InstantiableRelationDefinition; import org.opends.server.admin.ManagedObjectAlreadyExistsException; import org.opends.server.admin.ManagedObjectDefinition; import org.opends.server.admin.ConfigurationClient; import org.opends.server.admin.ManagedObjectNotFoundException; import org.opends.server.admin.ManagedObjectPath; import org.opends.server.admin.OptionalRelationDefinition; import org.opends.server.admin.PropertyDefinition; import org.opends.server.admin.PropertyProvider; import org.opends.server.admin.SetRelationDefinition; 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 regarding pending
* and active values.
*
* @throws ManagedObjectAlreadyExistsException
* If the managed object cannot be added to the server
* because it already exists.
* @throws MissingMandatoryPropertiesException
* If the managed object contains some mandatory
* properties which have been left undefined.
* @throws ConcurrentModificationException
* If the managed object is being added to the server but
* its parent has been removed by another client, or if
* this managed object is being modified but it has been
* removed from the server by another client.
* @throws OperationRejectedException
* If this managed object cannot be added or modified due
* to some client-side or server-side constraint which
* cannot be satisfied.
* @throws AuthorizationException
* If the server refuses to add or modify this managed
* object because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
void commit() throws ManagedObjectAlreadyExistsException,
MissingMandatoryPropertiesException, ConcurrentModificationException,
OperationRejectedException, AuthorizationException,
CommunicationException;
/**
* Determines whether or not this managed object has been modified since it
* was constructed.
* In other words, whether or not the set of pending values differs from
* the set of active values.
*
* @return Returns
* 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 true
if this managed object has been
* modified since it was constructed.
*/
boolean isModified();
/**
* Creates a new child managed object bound to the specified
* instantiable relation. The new managed object will initially not
* contain any property values (including mandatory properties).
* Once the managed object has been configured it can be added to
* the server using the {@link #commit()} method.
*
* @param
* The expected type of the child managed object
* server configuration.
* @param
* The expected type of the child managed object
* server configuration.
* @param
* The expected type of the child managed object
* server configuration.
* @param
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The instantiable relation definition.
* @param name
* The name of the child managed object.
* @return Returns the instantiable child managed object.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws DefinitionDecodingException
* If the managed object was found but its type could not
* be determined.
* @throws ManagedObjectDecodingException
* If the managed object was found but one or more of its
* properties could not be decoded.
* @throws ManagedObjectNotFoundException
* If the requested managed object could not be found on
* the server.
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to retrieve the managed object
* because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The optional relation definition.
* @return Returns the optional child managed object.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws DefinitionDecodingException
* If the managed object was found but its type could not
* be determined.
* @throws ManagedObjectDecodingException
* If the managed object was found but one or more of its
* properties could not be decoded.
* @throws ManagedObjectNotFoundException
* If the requested managed object could not be found on
* the server.
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to retrieve the managed object
* because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The singleton relation definition.
* @return Returns the singleton child managed object.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws DefinitionDecodingException
* If the managed object was found but its type could not
* be determined.
* @throws ManagedObjectDecodingException
* If the managed object was found but one or more of its
* properties could not be decoded.
* @throws ManagedObjectNotFoundException
* If the requested managed object could not be found on
* the server.
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to retrieve the managed object
* because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The set relation definition.
* @param name
* The name of the child managed object.
* @return Returns the set child managed object.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws DefinitionDecodingException
* If the managed object was found but its type could not
* be determined.
* @throws ManagedObjectDecodingException
* If the managed object was found but one or more of its
* properties could not be decoded.
* @throws ManagedObjectNotFoundException
* If the requested managed object could not be found on
* the server.
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to retrieve the managed object
* because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
null
if there is no effective value
* defined.
* @throws IllegalArgumentException
* If the property definition is not associated with this
* managed object's definition.
*/
true
if the property has been set,
* or false
if it is unset and any default
* behavior associated with the property applies.
* @throws IllegalArgumentException
* If the property definition is not associated with this
* managed object's definition.
*/
boolean isPropertyPresent(PropertyDefinition> pd)
throws IllegalArgumentException;
/**
* Determines whether or not the optional managed object associated
* with the specified optional relations exists.
*
* @param
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The optional relation definition.
* @return Returns 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 ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to make the determination because
* the client does not have the correct privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* 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 ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to list the managed objects
* because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The instantiable relation definition.
* @param d
* The managed object definition.
* @return Returns the names of the child managed objects which are
* a sub-type of the specified managed object definition.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to list the managed objects
* because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The set relation definition.
* @return Returns the names of the child managed objects which for
* set relations are the definition names of each managed
* object.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to list the managed objects because
* the client does not have the correct privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The set relation definition.
* @param d
* The managed object definition.
* @return Returns the names of the child managed objects which for
* set relations are the definition names of each managed
* object.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to list the managed objects because
* the client does not have the correct privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The instantiable relation definition.
* @param name
* The name of the child managed object to be removed.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws ManagedObjectNotFoundException
* If the managed object could not be removed because it
* could not found on the server.
* @throws OperationRejectedException
* If the managed object cannot be removed due to some
* client-side or server-side constraint which cannot be
* satisfied (for example, if it is referenced by another
* managed object).
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to remove the managed objects
* because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The optional relation definition.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws ManagedObjectNotFoundException
* If the managed object could not be removed because it
* could not found on the server.
* @throws OperationRejectedException
* If the managed object cannot be removed due to some
* client-side or server-side constraint which cannot be
* satisfied (for example, if it is referenced by another
* managed object).
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to remove the managed objects
* because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
* The type of server managed object configuration that the
* relation definition refers to.
* @param r
* The set relation definition.
* @param name
* The name of the child managed object to be removed.
* @throws IllegalArgumentException
* If the relation definition is not associated with this
* managed object's definition.
* @throws ManagedObjectNotFoundException
* If the managed object could not be removed because it
* could not found on the server.
* @throws OperationRejectedException
* If the managed object cannot be removed due to some
* client-side or server-side constraint which cannot be
* satisfied (for example, if it is referenced by another
* managed object).
* @throws ConcurrentModificationException
* If this managed object has been removed from the server
* by another client.
* @throws AuthorizationException
* If the server refuses to remove the managed objects
* because the client does not have the correct
* privileges.
* @throws CommunicationException
* If the client cannot contact the server due to an
* underlying communication problem.
*/
null
if
* the property should be reset to its default behavior.
* @throws PropertyException
* If the new pending value is deemed to be invalid according to the
* property definition, or if this is not a new managed object and
* the property is read-only or for monitoring purposes, or if an
* attempt was made to remove a mandatory property.
* @throws IllegalArgumentException
* If the specified property definition is not associated with this
* managed object.
*/
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 PropertyException
* If a new pending value is deemed to be invalid according to the
* property definition, or if an attempt was made to add multiple
* pending values to a single-valued property, or if this is not a
* new managed object and the property is read-only or for
* monitoring purposes, or if an attempt was made to remove a
* mandatory property.
* @throws IllegalArgumentException
* If the specified property definition is not associated with this
* managed object.
*/