Class AbstractManagedObject<T extends ConfigurationClient>
java.lang.Object
org.forgerock.opendj.config.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 Object
implements ManagedObject<T>
An abstract managed object implementation.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractManagedObject(ManagedObjectDefinition<T, ? extends Configuration> d, ManagedObjectPath<T, ? extends Configuration> path, PropertySet properties, boolean existsOnServer, PropertyDefinition<?> namingPropertyDefinition) Creates a new abstract managed object. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidAdds this new managed object.final voidcommit()Adds this managed object to the server or commits any changes made to it depending on whether the managed object already exists on the server.final <C extends ConfigurationClient,S extends Configuration, C1 extends C>
ManagedObject<C1>createChild(InstantiableRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, String name, Collection<PropertyException> exceptions) Creates a new child managed object bound to the specified instantiable relation.final <C extends ConfigurationClient,S extends Configuration, C1 extends C>
ManagedObject<C1>createChild(OptionalRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, Collection<PropertyException> exceptions) Creates a new child managed object bound to the specified optional relation.final <C extends ConfigurationClient,S extends Configuration, C1 extends C>
ManagedObject<C1>createChild(SetRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, Collection<PropertyException> exceptions) Creates a new child managed object bound to the specified set relation.final <C extends ConfigurationClient,S extends Configuration>
ManagedObject<? extends C>getChild(InstantiableRelationDefinition<C, S> r, String name) Retrieves an instantiable child managed object.final <C extends ConfigurationClient,S extends Configuration>
ManagedObject<? extends C>getChild(OptionalRelationDefinition<C, S> r) Retrieves an optional child managed object.final <C extends ConfigurationClient,S extends Configuration>
ManagedObject<? extends C>getChild(SetRelationDefinition<C, S> r, String name) Retrieves a set child managed object.final <C extends ConfigurationClient,S extends Configuration>
ManagedObject<? extends C>getChild(SingletonRelationDefinition<C, S> r) Retrieves a singleton child managed object.final TCreates a client configuration view of this managed object.protected abstract DriverGets the management context driver associated with this managed object.final ManagedObjectDefinition<T,? extends Configuration> Gets the definition associated with this managed object.final ManagedObjectPath<T,? extends Configuration> Gets the path of this managed object.protected final PropertyDefinition<?>Gets the naming property definition associated with this managed object.protected final <P> Property<P>getProperty(PropertyDefinition<P> pd) Gets the property associated with the specified property definition.final <P> SortedSet<ValueOrExpression<P>>Gets a mutable copy of the set of default values for the specified property.final <P> ValueOrExpression<P>Gets the effective value of the specified property.final <P> SortedSet<ValueOrExpression<P>>Gets a mutable copy of the set of effective values for the specified property.final <C extends ConfigurationClient,S extends Configuration>
booleanhasChild(OptionalRelationDefinition<C, S> r) Determines whether the optional managed object associated with the specified optional relations exists.booleanisModified(PropertyDefinition<?> pd) Determines whether the provided property has been modified since this managed object was constructed.final booleanDetermines whether the specified property is set.final <C extends ConfigurationClient,S extends Configuration>
String[]Lists the child managed objects associated with the specified instantiable relation.final <C extends ConfigurationClient,S extends Configuration>
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.final <C extends ConfigurationClient,S extends Configuration>
String[]listChildren(SetRelationDefinition<C, S> r) Lists the child managed objects associated with the specified set relation.final <C extends ConfigurationClient,S extends Configuration>
String[]listChildren(SetRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, ? extends S> d) Lists the child managed objects associated with the specified set relation which are a sub-type of the specified managed object definition.protected abstract voidApplies changes made to this managed object.protected abstract <M extends ConfigurationClient>
ManagedObject<M>newInstance(ManagedObjectDefinition<M, ?> d, ManagedObjectPath<M, ?> path, PropertySet properties, PropertyDefinition<?> namingPropertyDefinition) Creates a new managed object.final <C extends ConfigurationClient,S extends Configuration>
voidremoveChild(InstantiableRelationDefinition<C, S> r, String name) Removes the named instantiable child managed object.final <C extends ConfigurationClient,S extends Configuration>
voidRemoves an optional child managed object.final <C extends ConfigurationClient,S extends Configuration>
voidremoveChild(SetRelationDefinition<C, S> r, String name) Removes s set child managed object.final <P> voidsetPropertyValue(PropertyDefinition<P> pd, ValueOrExpression<P> value) Sets a new pending value for the specified property.final <P> voidsetPropertyValues(PropertyDefinition<P> pd, Collection<ValueOrExpression<P>> values) Sets a new pending values for the specified property.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.forgerock.opendj.config.client.ManagedObject
isModified
-
Constructor Details
-
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 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 Details
-
commit
public final void commit() throws ManagedObjectAlreadyExistsException, MissingMandatoryPropertiesException, ConcurrentModificationException, OperationRejectedException, LdapExceptionDescription copied from interface:ManagedObjectAdds this managed object to the server or commits any changes made to it depending on whether 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:
commitin interfaceManagedObject<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.LdapException- If any other error occurs.
-
isModified
Description copied from interface:ManagedObjectDetermines whether the provided property has been modified since this managed object was constructed. In other words, whether the set of pending values differs from the set of active values for the given property.- Specified by:
isModifiedin interfaceManagedObject<T extends ConfigurationClient>- Parameters:
pd- The property definition.- Returns:
- Returns
trueif the provided property has been modified since this managed object was constructed.
-
createChild
public final <C extends ConfigurationClient,S extends Configuration, ManagedObject<C1> createChildC1 extends C> (InstantiableRelationDefinition<C, S> r, ManagedObjectDefinition<C1, throws IllegalManagedObjectNameException? extends S> d, String name, Collection<PropertyException> exceptions) Description copied from interface:ManagedObjectCreates 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 theManagedObject.commit()method.- Specified by:
createChildin interfaceManagedObject<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.C1- 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 anyPropertyExceptions 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.
-
createChild
public final <C extends ConfigurationClient,S extends Configuration, ManagedObject<C1> createChildC1 extends C> (OptionalRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, Collection<PropertyException> exceptions) Description copied from interface:ManagedObjectCreates 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 theManagedObject.commit()method.- Specified by:
createChildin interfaceManagedObject<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.C1- 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 anyPropertyExceptions 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.
-
createChild
public final <C extends ConfigurationClient,S extends Configuration, ManagedObject<C1> createChildC1 extends C> (SetRelationDefinition<C, S> r, ManagedObjectDefinition<C1, ? extends S> d, Collection<PropertyException> exceptions) Description copied from interface:ManagedObjectCreates a new child managed object bound to the specified set 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 theManagedObject.commit()method.- Specified by:
createChildin interfaceManagedObject<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.C1- The actual type of the added managed object configuration client.- Parameters:
r- The set relation definition.d- The definition of the managed object to be created.exceptions- A collection in which to place anyPropertyExceptions that occurred whilst attempting to determine the managed object's default values.- Returns:
- Returns a new child managed object bound to the specified set relation.
-
getChild
public final <C extends ConfigurationClient,S extends Configuration> ManagedObject<? extends C> getChild(InstantiableRelationDefinition<C, S> r, String name) throws DefinitionDecodingException, ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectRetrieves an instantiable child managed object.- Specified by:
getChildin interfaceManagedObject<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:
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.LdapException- If any other error occurs.
-
getChild
public final <C extends ConfigurationClient,S extends Configuration> ManagedObject<? extends C> getChild(OptionalRelationDefinition<C, S> r) throws DefinitionDecodingException, ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectRetrieves an optional child managed object.- Specified by:
getChildin interfaceManagedObject<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:
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.LdapException- If any other error occurs.
-
getChild
public final <C extends ConfigurationClient,S extends Configuration> ManagedObject<? extends C> getChild(SingletonRelationDefinition<C, S> r) throws DefinitionDecodingException, ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectRetrieves a singleton child managed object.- Specified by:
getChildin interfaceManagedObject<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:
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.LdapException- If any other error occurs.
-
getChild
public final <C extends ConfigurationClient,S extends Configuration> ManagedObject<? extends C> getChild(SetRelationDefinition<C, S> r, String name) throws DefinitionDecodingException, ManagedObjectDecodingException, ManagedObjectNotFoundException, ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectRetrieves a set child managed object.- Specified by:
getChildin interfaceManagedObject<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 set relation definition.name- The name of the child managed object.- Returns:
- Returns the set child managed object.
- Throws:
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.LdapException- If any other error occurs.
-
getConfiguration
Description copied from interface:ManagedObjectCreates 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:
getConfigurationin interfaceManagedObject<T extends ConfigurationClient>- Returns:
- Returns a client configuration view of this managed object.
-
getManagedObjectDefinition
Description copied from interface:ManagedObjectGets the definition associated with this managed object.- Specified by:
getManagedObjectDefinitionin interfaceManagedObject<T extends ConfigurationClient>- Returns:
- Returns the definition associated with this managed object.
-
getManagedObjectPath
Description copied from interface:ManagedObjectGets the path of this managed object.- Specified by:
getManagedObjectPathin interfaceManagedObject<T extends ConfigurationClient>- Returns:
- Returns the path of this managed object.
-
getPropertyDefaultValues
Description copied from interface:ManagedObjectGets a mutable copy of the set of default values for the specified property.- Specified by:
getPropertyDefaultValuesin interfaceManagedObject<T extends ConfigurationClient>- Type Parameters:
P- 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.
-
getPropertyValue
Description copied from interface:ManagedObjectGets the effective value of the specified property.See the class description for more information about how the effective property value is derived.
- Specified by:
getPropertyValuein interfaceManagedObject<T extends ConfigurationClient>- Type Parameters:
P- The type of the property to be retrieved.- Parameters:
pd- The property to be retrieved.- Returns:
- Returns the property's effective value, or
nullif there is no effective value defined.
-
getPropertyValues
Description copied from interface:ManagedObjectGets 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:
getPropertyValuesin interfaceManagedObject<T extends ConfigurationClient>- Specified by:
getPropertyValuesin interfacePropertyProvider- Type Parameters:
P- 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.
-
hasChild
public final <C extends ConfigurationClient,S extends Configuration> boolean hasChild(OptionalRelationDefinition<C, S> r) throws ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectDetermines whether the optional managed object associated with the specified optional relations exists.- Specified by:
hasChildin interfaceManagedObject<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
trueif the optional managed object exists,falseotherwise. - Throws:
ConcurrentModificationException- If this managed object has been removed from the server by another client.LdapException- If there is any other error.
-
isPropertyPresent
Description copied from interface:ManagedObjectDetermines whether the specified property is set. If the property is unset, then any default behavior associated with the property applies.- Specified by:
isPropertyPresentin interfaceManagedObject<T extends ConfigurationClient>- Parameters:
pd- The property definition.- Returns:
- Returns
trueif the property has been set, orfalseif it is unset and any default behavior associated with the property applies.
-
listChildren
public final <C extends ConfigurationClient,S extends Configuration> String[] listChildren(InstantiableRelationDefinition<C, S> r) throws ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectLists the child managed objects associated with the specified instantiable relation.- Specified by:
listChildrenin interfaceManagedObject<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:
ConcurrentModificationException- If this managed object has been removed from the server by another client.LdapException- If any other error occurs.
-
listChildren
public final <C extends ConfigurationClient,S extends Configuration> String[] listChildren(InstantiableRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, throws ConcurrentModificationException, LdapException? extends S> d) Description copied from interface:ManagedObjectLists the child managed objects associated with the specified instantiable relation which are a sub-type of the specified managed object definition.- Specified by:
listChildrenin interfaceManagedObject<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:
ConcurrentModificationException- If this managed object has been removed from the server by another client.LdapException- If any other error occurs.
-
listChildren
public final <C extends ConfigurationClient,S extends Configuration> String[] listChildren(SetRelationDefinition<C, S> r) throws ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectLists the child managed objects associated with the specified set relation.- Specified by:
listChildrenin interfaceManagedObject<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 set relation definition.- Returns:
- Returns the names of the child managed objects which for set relations are the definition names of each managed object.
- Throws:
ConcurrentModificationException- If this managed object has been removed from the server by another client.LdapException- If any other error occurs.
-
listChildren
public final <C extends ConfigurationClient,S extends Configuration> String[] listChildren(SetRelationDefinition<C, S> r, AbstractManagedObjectDefinition<? extends C, throws ConcurrentModificationException, LdapException? extends S> d) Description copied from interface:ManagedObjectLists the child managed objects associated with the specified set relation which are a sub-type of the specified managed object definition.- Specified by:
listChildrenin interfaceManagedObject<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 set relation definition.d- The managed object definition.- Returns:
- Returns the names of the child managed objects which for set relations are the definition names of each managed object.
- Throws:
ConcurrentModificationException- If this managed object has been removed from the server by another client.LdapException- If any other error occurs.
-
removeChild
public final <C extends ConfigurationClient,S extends Configuration> void removeChild(InstantiableRelationDefinition<C, S> r, String name) throws ManagedObjectNotFoundException, OperationRejectedException, ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectRemoves the named instantiable child managed object.- Specified by:
removeChildin interfaceManagedObject<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:
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.LdapException- If any other error occurs.
-
removeChild
public final <C extends ConfigurationClient,S extends Configuration> void removeChild(OptionalRelationDefinition<C, S> r) throws ManagedObjectNotFoundException, OperationRejectedException, ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectRemoves an optional child managed object.- Specified by:
removeChildin interfaceManagedObject<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:
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.LdapException- If any other error occurs.
-
removeChild
public final <C extends ConfigurationClient,S extends Configuration> void removeChild(SetRelationDefinition<C, S> r, String name) throws ManagedObjectNotFoundException, OperationRejectedException, ConcurrentModificationException, LdapExceptionDescription copied from interface:ManagedObjectRemoves s set child managed object.- Specified by:
removeChildin interfaceManagedObject<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 set relation definition.name- The name of the child managed object to be removed.- Throws:
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.LdapException- If any other error occurs.
-
setPropertyValue
Description copied from interface:ManagedObjectSets a new pending value for the specified property.See the class description for more information regarding pending values.
- Specified by:
setPropertyValuein interfaceManagedObject<T extends ConfigurationClient>- Type Parameters:
P- The type of the property to be modified.- Parameters:
pd- The property to be modified.value- The new pending value for the property, ornullif the property should be reset to its default behavior.
-
setPropertyValues
public final <P> void setPropertyValues(PropertyDefinition<P> pd, Collection<ValueOrExpression<P>> values) Description copied from interface:ManagedObjectSets a new pending values for the specified property.See the class description for more information regarding pending values.
- Specified by:
setPropertyValuesin interfaceManagedObject<T extends ConfigurationClient>- Type Parameters:
P- The type of the property to be modified.- Parameters:
pd- The property to be modified.values- A non-nullset 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.
-
toString
-
addNewManagedObject
protected abstract void addNewManagedObject() throws LdapException, OperationRejectedException, ConcurrentModificationException, ManagedObjectAlreadyExistsExceptionAdds 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.LdapException- If any other error occurs.
-
getDriver
Gets the management context driver associated with this managed object.- Returns:
- Returns the management context driver associated with this managed object.
-
getNamingPropertyDefinition
Gets the naming property definition associated with this managed object.- Returns:
- Returns the naming property definition associated with this
managed object, or
nullif this managed object does not have a naming property.
-
getProperty
Gets the property associated with the specified property definition.- Type Parameters:
P- The underlying type of the property.- Parameters:
pd- The Property definition.- Returns:
- Returns the property associated with the specified property definition.
- Throws:
IllegalArgumentException- If this property provider does not recognize the requested property definition.
-
modifyExistingManagedObject
protected abstract void modifyExistingManagedObject() throws ConcurrentModificationException, OperationRejectedException, LdapExceptionApplies 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.LdapException- If any other error occurs.
-
newInstance
protected abstract <M extends ConfigurationClient> ManagedObject<M> newInstance(ManagedObjectDefinition<M, ?> d, ManagedObjectPath<M, ?> path, PropertySet properties, 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.namingPropertyDefinition- Optional naming property definition.- Returns:
- Returns the new managed object.
-