org.opends.server.admin.client.spi
Class AbstractManagedObject<T extends ConfigurationClient>

java.lang.Object
  extended by org.opends.server.admin.client.spi.AbstractManagedObject<T>
Type Parameters:
T - The type of client configuration represented by the client managed object.
All Implemented Interfaces:
ManagedObject<T>, PropertyProvider

public abstract class AbstractManagedObject<T extends ConfigurationClient>
extends java.lang.Object
implements ManagedObject<T>

An abstract managed object implementation.


Field Summary
 
Fields inherited from interface org.opends.server.admin.PropertyProvider
DEFAULT_PROVIDER
 
Constructor Summary
protected AbstractManagedObject(ManagedObjectDefinition<T,? extends Configuration> d, ManagedObjectPath<T,? extends Configuration> path, PropertySet properties, boolean existsOnServer, PropertyDefinition<?> namingPropertyDefinition)
          Creates a new abstract managed object.
 
Method Summary
protected abstract  void addNewManagedObject()
          Adds this new managed object.
 void commit()
          Adds this managed object to the server or commits any changes made to it depending on whether or not the managed object already exists on the server.
<C extends ConfigurationClient,S extends Configuration,CC extends C>
ManagedObject<CC>
createChild(InstantiableRelationDefinition<C,S> r, ManagedObjectDefinition<CC,? extends S> d, java.lang.String name, java.util.Collection<DefaultBehaviorException> exceptions)
          Creates a new child managed object bound to the specified instantiable relation.
<C extends ConfigurationClient,S extends Configuration,CC extends C>
ManagedObject<CC>
createChild(OptionalRelationDefinition<C,S> r, ManagedObjectDefinition<CC,? extends S> d, java.util.Collection<DefaultBehaviorException> exceptions)
          Creates a new child managed object bound to the specified optional relation.
<C extends ConfigurationClient,S extends Configuration>
ManagedObject<? extends C>
getChild(InstantiableRelationDefinition<C,S> r, java.lang.String name)
          Retrieves an instantiable child managed object.
<C extends ConfigurationClient,S extends Configuration>
ManagedObject<? extends C>
getChild(OptionalRelationDefinition<C,S> r)
          Retrieves an optional child managed object.
<C extends ConfigurationClient,S extends Configuration>
ManagedObject<? extends C>
getChild(SingletonRelationDefinition<C,S> r)
          Retrieves a singleton child managed object.
 T getConfiguration()
          Creates a client configuration view of this managed object.
protected abstract  Driver getDriver()
          Gets the management context driver associated with this managed object.
 ManagedObjectDefinition<T,? extends Configuration> getManagedObjectDefinition()
          Gets the definition associated with this managed object.
 ManagedObjectPath<T,? extends Configuration> getManagedObjectPath()
          Gets the path of this managed object.
protected  PropertyDefinition<?> getNamingPropertyDefinition()
          Gets the naming property definition associated with this managed object.
protected
<PD> Property<PD>
getProperty(PropertyDefinition<PD> pd)
          Gets the property associated with the specified property definition.
<PD> java.util.SortedSet<PD>
getPropertyDefaultValues(PropertyDefinition<PD> pd)
          Gets a mutable copy of the set of default values for the specified property.
<PD> PD
getPropertyValue(PropertyDefinition<PD> pd)
          Gets the effective value of the specified property.
<PD> java.util.SortedSet<PD>
getPropertyValues(PropertyDefinition<PD> pd)
          Gets a mutable copy of the set of effective values for the specified property.
<C extends ConfigurationClient,S extends Configuration>
boolean
hasChild(OptionalRelationDefinition<C,S> r)
          Determines whether or not the optional managed object associated with the specified optional relations exists.
 boolean isPropertyPresent(PropertyDefinition<?> pd)
          Determines whether or not the specified property is set.
<C extends ConfigurationClient,S extends Configuration>
java.lang.String[]
listChildren(InstantiableRelationDefinition<C,S> r)
          Lists the child managed objects associated with the specified instantiable relation.
<C extends ConfigurationClient,S extends Configuration>
java.lang.String[]
listChildren(InstantiableRelationDefinition<C,S> r, AbstractManagedObjectDefinition<? extends C,? extends S> d)
          Lists the child managed objects associated with the specified instantiable relation which are a sub-type of the specified managed object definition.
protected abstract  void modifyExistingManagedObject()
          Applies changes made to this managed object.
protected abstract
<M extends ConfigurationClient>
ManagedObject<M>
newInstance(ManagedObjectDefinition<M,?> d, ManagedObjectPath<M,?> path, PropertySet properties, boolean existsOnServer, PropertyDefinition<?> namingPropertyDefinition)
          Creates a new managed object.
<C extends ConfigurationClient,S extends Configuration>
void
removeChild(InstantiableRelationDefinition<C,S> r, java.lang.String name)
          Removes the named instantiable child managed object.
<C extends ConfigurationClient,S extends Configuration>
void
removeChild(OptionalRelationDefinition<C,S> r)
          Removes an optional child managed object.
<PD> void
setPropertyValue(PropertyDefinition<PD> pd, PD value)
          Sets a new pending value for the specified property.
<PD> void
setPropertyValues(PropertyDefinition<PD> pd, java.util.Collection<PD> values)
          Sets a new pending values for the specified property.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opends.server.admin.client.ManagedObject
isModified
 

Constructor Detail

AbstractManagedObject

protected AbstractManagedObject(ManagedObjectDefinition<T,? extends Configuration> d,
                                ManagedObjectPath<T,? extends Configuration> path,
                                PropertySet properties,
                                boolean existsOnServer,
                                PropertyDefinition<?> namingPropertyDefinition)
Creates a new abstract managed object.

Parameters:
d - The managed object's definition.
path - The managed object's path.
properties - The managed object's properties.
existsOnServer - Indicates whether or not the managed object exists on the server (false means the managed object is new and has not been committed).
namingPropertyDefinition - Optional naming property definition.
Method Detail

commit

public final void commit()
                  throws ManagedObjectAlreadyExistsException,
                         MissingMandatoryPropertiesException,
                         ConcurrentModificationException,
                         OperationRejectedException,
                         AuthorizationException,
                         CommunicationException
Adds this managed object to the server or commits any changes made to it depending on whether or not the managed object already exists on the server. Pending property values will be committed to the managed object. If successful, the pending values will become active values.

See the class description for more information regarding pending and active values.

Specified by:
commit in interface ManagedObject<T extends ConfigurationClient>
Throws:
ManagedObjectAlreadyExistsException - If the managed object cannot be added to the server because it already exists.
MissingMandatoryPropertiesException - If the managed object contains some mandatory properties which have been left undefined.
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.
OperationRejectedException - If this managed object cannot be added or modified due to some client-side or server-side constraint which cannot be satisfied.
AuthorizationException - If the server refuses to add or modify this managed object because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

createChild

public final <C extends ConfigurationClient,S extends Configuration,CC extends C> ManagedObject<CC> createChild(InstantiableRelationDefinition<C,S> r,
                                                                                                                ManagedObjectDefinition<CC,? extends S> d,
                                                                                                                java.lang.String name,
                                                                                                                java.util.Collection<DefaultBehaviorException> exceptions)
                                              throws IllegalManagedObjectNameException,
                                                     java.lang.IllegalArgumentException
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 ManagedObject.commit() method.

Specified by:
createChild in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The expected type of the child managed object configuration client.
S - The expected type of the child managed object server configuration.
CC - The actual type of the added managed object configuration client.
Parameters:
r - The instantiable relation definition.
d - The definition of the managed object to be created.
name - The name of the child managed object.
exceptions - A collection in which to place any DefaultBehaviorExceptions that occurred whilst attempting to determine the managed object's default values.
Returns:
Returns a new child managed object bound to the specified instantiable relation.
Throws:
IllegalManagedObjectNameException - If the name of the child managed object is invalid.
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.

createChild

public final <C extends ConfigurationClient,S extends Configuration,CC extends C> ManagedObject<CC> createChild(OptionalRelationDefinition<C,S> r,
                                                                                                                ManagedObjectDefinition<CC,? extends S> d,
                                                                                                                java.util.Collection<DefaultBehaviorException> exceptions)
                                              throws java.lang.IllegalArgumentException
Creates a new child managed object bound to the specified optional 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 ManagedObject.commit() method.

Specified by:
createChild in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The expected type of the child managed object configuration client.
S - The expected type of the child managed object server configuration.
CC - The actual type of the added managed object configuration client.
Parameters:
r - The optional relation definition.
d - The definition of the managed object to be created.
exceptions - A collection in which to place any DefaultBehaviorExceptions that occurred whilst attempting to determine the managed object's default values.
Returns:
Returns a new child managed object bound to the specified optional relation.
Throws:
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.

getChild

public final <C extends ConfigurationClient,S extends Configuration> ManagedObject<? extends C> getChild(InstantiableRelationDefinition<C,S> r,
                                                                                                         java.lang.String name)
                                                                      throws java.lang.IllegalArgumentException,
                                                                             DefinitionDecodingException,
                                                                             ManagedObjectDecodingException,
                                                                             ManagedObjectNotFoundException,
                                                                             ConcurrentModificationException,
                                                                             AuthorizationException,
                                                                             CommunicationException
Retrieves an instantiable child managed object.

Specified by:
getChild in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The requested type of the child managed object configuration client.
S - The type of server managed object configuration that the relation definition refers to.
Parameters:
r - The instantiable relation definition.
name - The name of the child managed object.
Returns:
Returns the instantiable child managed object.
Throws:
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
DefinitionDecodingException - If the managed object was found but its type could not be determined.
ManagedObjectDecodingException - If the managed object was found but one or more of its properties could not be decoded.
ManagedObjectNotFoundException - If the requested managed object could not be found on the server.
ConcurrentModificationException - If this managed object has been removed from the server by another client.
AuthorizationException - If the server refuses to retrieve the managed object because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

getChild

public final <C extends ConfigurationClient,S extends Configuration> ManagedObject<? extends C> getChild(OptionalRelationDefinition<C,S> r)
                                                                      throws java.lang.IllegalArgumentException,
                                                                             DefinitionDecodingException,
                                                                             ManagedObjectDecodingException,
                                                                             ManagedObjectNotFoundException,
                                                                             ConcurrentModificationException,
                                                                             AuthorizationException,
                                                                             CommunicationException
Retrieves an optional child managed object.

Specified by:
getChild in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The requested type of the child managed object configuration client.
S - The type of server managed object configuration that the relation definition refers to.
Parameters:
r - The optional relation definition.
Returns:
Returns the optional child managed object.
Throws:
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
DefinitionDecodingException - If the managed object was found but its type could not be determined.
ManagedObjectDecodingException - If the managed object was found but one or more of its properties could not be decoded.
ManagedObjectNotFoundException - If the requested managed object could not be found on the server.
ConcurrentModificationException - If this managed object has been removed from the server by another client.
AuthorizationException - If the server refuses to retrieve the managed object because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

getChild

public final <C extends ConfigurationClient,S extends Configuration> ManagedObject<? extends C> getChild(SingletonRelationDefinition<C,S> r)
                                                                      throws java.lang.IllegalArgumentException,
                                                                             DefinitionDecodingException,
                                                                             ManagedObjectDecodingException,
                                                                             ManagedObjectNotFoundException,
                                                                             ConcurrentModificationException,
                                                                             AuthorizationException,
                                                                             CommunicationException
Retrieves a singleton child managed object.

Specified by:
getChild in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The requested type of the child managed object configuration client.
S - The type of server managed object configuration that the relation definition refers to.
Parameters:
r - The singleton relation definition.
Returns:
Returns the singleton child managed object.
Throws:
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
DefinitionDecodingException - If the managed object was found but its type could not be determined.
ManagedObjectDecodingException - If the managed object was found but one or more of its properties could not be decoded.
ManagedObjectNotFoundException - If the requested managed object could not be found on the server.
ConcurrentModificationException - If this managed object has been removed from the server by another client.
AuthorizationException - If the server refuses to retrieve the managed object because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

getConfiguration

public final T getConfiguration()
Creates a client configuration view of this managed object. Modifications made to this managed object will be reflected in the client configuration view and vice versa.

Specified by:
getConfiguration in interface ManagedObject<T extends ConfigurationClient>
Returns:
Returns a client configuration view of this managed object.

getManagedObjectDefinition

public final ManagedObjectDefinition<T,? extends Configuration> getManagedObjectDefinition()
Gets the definition associated with this managed object.

Specified by:
getManagedObjectDefinition in interface ManagedObject<T extends ConfigurationClient>
Returns:
Returns the definition associated with this managed object.

getManagedObjectPath

public final ManagedObjectPath<T,? extends Configuration> getManagedObjectPath()
Gets the path of this managed object.

Specified by:
getManagedObjectPath in interface ManagedObject<T extends ConfigurationClient>
Returns:
Returns the path of this managed object.

getPropertyDefaultValues

public final <PD> java.util.SortedSet<PD> getPropertyDefaultValues(PropertyDefinition<PD> pd)
                                                       throws java.lang.IllegalArgumentException
Gets a mutable copy of the set of default values for the specified property.

Specified by:
getPropertyDefaultValues in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
PD - The type of the property to be retrieved.
Parameters:
pd - The property to be retrieved.
Returns:
Returns the property's default values, or an empty set if there are no default values defined.
Throws:
java.lang.IllegalArgumentException - If the property definition is not associated with this managed object's definition.

getPropertyValue

public final <PD> PD getPropertyValue(PropertyDefinition<PD> pd)
                          throws java.lang.IllegalArgumentException
Gets the effective value of the specified property.

See the class description for more information about how the effective property value is derived.

Specified by:
getPropertyValue in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
PD - The type of the property to be retrieved.
Parameters:
pd - The property to be retrieved.
Returns:
Returns the property's effective value, or null if there is no effective value defined.
Throws:
java.lang.IllegalArgumentException - If the property definition is not associated with this managed object's definition.

getPropertyValues

public final <PD> java.util.SortedSet<PD> getPropertyValues(PropertyDefinition<PD> pd)
                                                throws java.lang.IllegalArgumentException
Gets a mutable copy of the set of effective values for the specified property.

See the class description for more information about how the effective property values are derived.

Specified by:
getPropertyValues in interface ManagedObject<T extends ConfigurationClient>
Specified by:
getPropertyValues in interface PropertyProvider
Type Parameters:
PD - The type of the property to be retrieved.
Parameters:
pd - The property to be retrieved.
Returns:
Returns the property's effective values, or an empty set if there are no effective values defined.
Throws:
java.lang.IllegalArgumentException - If the property definition is not associated with this managed object's definition.

hasChild

public final <C extends ConfigurationClient,S extends Configuration> boolean hasChild(OptionalRelationDefinition<C,S> r)
                       throws java.lang.IllegalArgumentException,
                              ConcurrentModificationException,
                              AuthorizationException,
                              CommunicationException
Determines whether or not the optional managed object associated with the specified optional relations exists.

Specified by:
hasChild in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The type of client managed object configuration that the relation definition refers to.
S - The type of server managed object configuration that the relation definition refers to.
Parameters:
r - The optional relation definition.
Returns:
Returns true if the optional managed object exists, false otherwise.
Throws:
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
ConcurrentModificationException - If this managed object has been removed from the server by another client.
AuthorizationException - If the server refuses to make the determination because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

isPropertyPresent

public final boolean isPropertyPresent(PropertyDefinition<?> pd)
                                throws java.lang.IllegalArgumentException
Determines whether or not the specified property is set. If the property is unset, then any default behavior associated with the property applies.

Specified by:
isPropertyPresent in interface ManagedObject<T extends ConfigurationClient>
Parameters:
pd - The property definition.
Returns:
Returns true if the property has been set, or false if it is unset and any default behavior associated with the property applies.
Throws:
java.lang.IllegalArgumentException - If the property definition is not associated with this managed object's definition.

listChildren

public final <C extends ConfigurationClient,S extends Configuration> java.lang.String[] listChildren(InstantiableRelationDefinition<C,S> r)
                                      throws java.lang.IllegalArgumentException,
                                             ConcurrentModificationException,
                                             AuthorizationException,
                                             CommunicationException
Lists the child managed objects associated with the specified instantiable relation.

Specified by:
listChildren in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The type of client managed object configuration that the relation definition refers to.
S - The type of server managed object configuration that the relation definition refers to.
Parameters:
r - The instantiable relation definition.
Returns:
Returns the names of the child managed objects.
Throws:
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
ConcurrentModificationException - If this managed object has been removed from the server by another client.
AuthorizationException - If the server refuses to list the managed objects because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

listChildren

public final <C extends ConfigurationClient,S extends Configuration> java.lang.String[] listChildren(InstantiableRelationDefinition<C,S> r,
                                                                                                     AbstractManagedObjectDefinition<? extends C,? extends S> d)
                                      throws java.lang.IllegalArgumentException,
                                             ConcurrentModificationException,
                                             AuthorizationException,
                                             CommunicationException
Lists the child managed objects associated with the specified instantiable relation which are a sub-type of the specified managed object definition.

Specified by:
listChildren in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The type of client managed object configuration that the relation definition refers to.
S - The type of server managed object configuration that the relation definition refers to.
Parameters:
r - The instantiable relation definition.
d - The managed object definition.
Returns:
Returns the names of the child managed objects which are a sub-type of the specified managed object definition.
Throws:
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
ConcurrentModificationException - If this managed object has been removed from the server by another client.
AuthorizationException - If the server refuses to list the managed objects because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

removeChild

public final <C extends ConfigurationClient,S extends Configuration> void removeChild(InstantiableRelationDefinition<C,S> r,
                                                                                      java.lang.String name)
                       throws java.lang.IllegalArgumentException,
                              ManagedObjectNotFoundException,
                              OperationRejectedException,
                              ConcurrentModificationException,
                              AuthorizationException,
                              CommunicationException
Removes the named instantiable child managed object.

Specified by:
removeChild in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The type of client managed object configuration that the relation definition refers to.
S - The type of server managed object configuration that the relation definition refers to.
Parameters:
r - The instantiable relation definition.
name - The name of the child managed object to be removed.
Throws:
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
ManagedObjectNotFoundException - If the managed object could not be removed because it could not found on the server.
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).
ConcurrentModificationException - If this managed object has been removed from the server by another client.
AuthorizationException - If the server refuses to remove the managed objects because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

removeChild

public final <C extends ConfigurationClient,S extends Configuration> void removeChild(OptionalRelationDefinition<C,S> r)
                       throws java.lang.IllegalArgumentException,
                              ManagedObjectNotFoundException,
                              OperationRejectedException,
                              ConcurrentModificationException,
                              AuthorizationException,
                              CommunicationException
Removes an optional child managed object.

Specified by:
removeChild in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
C - The type of client managed object configuration that the relation definition refers to.
S - The type of server managed object configuration that the relation definition refers to.
Parameters:
r - The optional relation definition.
Throws:
java.lang.IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
ManagedObjectNotFoundException - If the managed object could not be removed because it could not found on the server.
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).
ConcurrentModificationException - If this managed object has been removed from the server by another client.
AuthorizationException - If the server refuses to remove the managed objects because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

setPropertyValue

public final <PD> void setPropertyValue(PropertyDefinition<PD> pd,
                                        PD value)
                            throws IllegalPropertyValueException,
                                   PropertyIsReadOnlyException,
                                   PropertyIsMandatoryException,
                                   java.lang.IllegalArgumentException
Sets a new pending value for the specified property.

See the class description for more information regarding pending values.

Specified by:
setPropertyValue in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
PD - The type of the property to be modified.
Parameters:
pd - The property to be modified.
value - The new pending value for the property, or 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.
PropertyIsReadOnlyException - If this is not a new managed object and the property is read-only or for monitoring purposes.
PropertyIsMandatoryException - If an attempt was made to remove a mandatory property.
java.lang.IllegalArgumentException - If the specified property definition is not associated with this managed object.

setPropertyValues

public final <PD> void setPropertyValues(PropertyDefinition<PD> pd,
                                         java.util.Collection<PD> values)
                             throws IllegalPropertyValueException,
                                    PropertyIsSingleValuedException,
                                    PropertyIsReadOnlyException,
                                    PropertyIsMandatoryException,
                                    java.lang.IllegalArgumentException
Sets a new pending values for the specified property.

See the class description for more information regarding pending values.

Specified by:
setPropertyValues in interface ManagedObject<T extends ConfigurationClient>
Type Parameters:
PD - The type of the property to be modified.
Parameters:
pd - The property to be modified.
values - A non-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.
PropertyIsSingleValuedException - If an attempt was made to add multiple pending values to a single-valued property.
PropertyIsReadOnlyException - If this is not a new managed object and the property is read-only or for monitoring purposes.
PropertyIsMandatoryException - If an attempt was made to remove a mandatory property.
java.lang.IllegalArgumentException - If the specified property definition is not associated with this managed object.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

addNewManagedObject

protected abstract void addNewManagedObject()
                                     throws AuthorizationException,
                                            CommunicationException,
                                            OperationRejectedException,
                                            ConcurrentModificationException,
                                            ManagedObjectAlreadyExistsException
Adds this new managed object.

Throws:
ManagedObjectAlreadyExistsException - If the managed object cannot be added to the server because it already exists.
ConcurrentModificationException - If the managed object's parent has been removed by another client.
OperationRejectedException - If the managed object cannot be added due to some client-side or server-side constraint which cannot be satisfied.
AuthorizationException - If the server refuses to add this managed object because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

getDriver

protected abstract Driver getDriver()
Gets the management context driver associated with this managed object.

Returns:
Returns the management context driver associated with this managed object.

getNamingPropertyDefinition

protected final PropertyDefinition<?> getNamingPropertyDefinition()
Gets the naming property definition associated with this managed object.

Returns:
Returns the naming property definition associated with this managed object, or null if this managed object does not have a naming property.

getProperty

protected final <PD> Property<PD> getProperty(PropertyDefinition<PD> pd)
                                  throws java.lang.IllegalArgumentException
Gets the property associated with the specified property definition.

Type Parameters:
PD - The underlying type of the property.
Parameters:
pd - The Property definition.
Returns:
Returns the property associated with the specified property definition.
Throws:
java.lang.IllegalArgumentException - If this property provider does not recognize the requested property definition.

modifyExistingManagedObject

protected abstract void modifyExistingManagedObject()
                                             throws ConcurrentModificationException,
                                                    OperationRejectedException,
                                                    AuthorizationException,
                                                    CommunicationException
Applies changes made to this managed object.

Throws:
ConcurrentModificationException - If this managed object has been removed from the server by another client.
OperationRejectedException - If the managed object cannot be added due to some client-side or server-side constraint which cannot be satisfied.
AuthorizationException - If the server refuses to modify this managed object because the client does not have the correct privileges.
CommunicationException - If the client cannot contact the server due to an underlying communication problem.

newInstance

protected abstract <M extends ConfigurationClient> ManagedObject<M> newInstance(ManagedObjectDefinition<M,?> d,
                                                                                ManagedObjectPath<M,?> path,
                                                                                PropertySet properties,
                                                                                boolean existsOnServer,
                                                                                PropertyDefinition<?> namingPropertyDefinition)
Creates a new managed object.

Type Parameters:
M - The type of client configuration represented by the client managed object.
Parameters:
d - The managed object's definition.
path - The managed object's path.
properties - The managed object's properties.
existsOnServer - Indicates whether or not the managed object exists on the server (false means the managed object is new and has not been committed).
namingPropertyDefinition - Optional naming property definition.
Returns:
Returns the new managed object.