|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.admin.client.spi.Driver
public abstract class Driver
An abstract management connection context driver which should form the basis of driver implementations.
Constructor Summary | |
---|---|
protected |
Driver()
Creates a new abstract management context. |
Method Summary | ||
---|---|---|
void |
close()
Closes any context associated with this management context driver. |
|
|
deleteManagedObject(ManagedObjectPath<?,?> parent,
InstantiableRelationDefinition<C,S> rd,
java.lang.String name)
Deletes the named instantiable child managed object from the named parent managed object. |
|
|
deleteManagedObject(ManagedObjectPath<?,?> parent,
OptionalRelationDefinition<C,S> rd)
Deletes the optional child managed object from the named parent managed object. |
|
protected abstract
|
deleteManagedObject(ManagedObjectPath<C,S> path)
Deletes the named managed object. |
|
protected
|
findDefaultValues(ManagedObjectPath<?,?> p,
PropertyDefinition<PD> pd,
boolean isCreate)
Gets the default values for the specified property. |
|
abstract
|
getManagedObject(ManagedObjectPath<C,S> path)
Gets the named managed object. |
|
protected abstract ManagementContext |
getManagementContext()
Gets the management context associated with this driver. |
|
|
getPropertyValue(ManagedObjectPath<C,S> path,
PropertyDefinition<PD> pd)
Gets the effective value of a property in the named managed object. |
|
abstract
|
getPropertyValues(ManagedObjectPath<C,S> path,
PropertyDefinition<PD> pd)
Gets the effective values of a property in the named managed object. |
|
abstract ManagedObject<RootCfgClient> |
getRootConfigurationManagedObject()
Gets the root configuration managed object associated with this management context driver. |
|
|
listManagedObjects(ManagedObjectPath<?,?> parent,
InstantiableRelationDefinition<C,S> rd)
Lists the child managed objects of the named parent managed object. |
|
abstract
|
listManagedObjects(ManagedObjectPath<?,?> parent,
InstantiableRelationDefinition<C,S> rd,
AbstractManagedObjectDefinition<? extends C,? extends S> d)
Lists the child managed objects of the named parent managed object which are a sub-type of the specified managed object definition. |
|
abstract boolean |
managedObjectExists(ManagedObjectPath<?,?> path)
Determines whether or not the named managed object exists. |
|
protected void |
validateRelationDefinition(ManagedObjectPath<?,?> path,
RelationDefinition<?,?> rd)
Validate that a relation definition belongs to the managed object referenced by the provided path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Driver()
Method Detail |
---|
public void close()
public final <C extends ConfigurationClient,S extends Configuration> boolean deleteManagedObject(ManagedObjectPath<?,?> parent, InstantiableRelationDefinition<C,S> rd, java.lang.String name) throws java.lang.IllegalArgumentException, ManagedObjectNotFoundException, OperationRejectedException, AuthorizationException, CommunicationException
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.parent
- The path of the parent managed object.rd
- The instantiable relation definition.name
- The name of the child managed object to be removed.
true
if the named instantiable
child managed object was found, or false
if it was not found.
java.lang.IllegalArgumentException
- If the relation definition is not associated with the
parent managed object's definition.
ManagedObjectNotFoundException
- If the parent managed object could not be found.
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).
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.public final <C extends ConfigurationClient,S extends Configuration> boolean deleteManagedObject(ManagedObjectPath<?,?> parent, OptionalRelationDefinition<C,S> rd) throws java.lang.IllegalArgumentException, ManagedObjectNotFoundException, OperationRejectedException, AuthorizationException, CommunicationException
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.parent
- The path of the parent managed object.rd
- The optional relation definition.
true
if the optional child managed
object was found, or false
if it was not
found.
java.lang.IllegalArgumentException
- If the relation definition is not associated with the
parent managed object's definition.
ManagedObjectNotFoundException
- If the parent managed object could not be found.
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).
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.public abstract <C extends ConfigurationClient,S extends Configuration> ManagedObject<? extends C> getManagedObject(ManagedObjectPath<C,S> path) throws DefinitionDecodingException, ManagedObjectDecodingException, ManagedObjectNotFoundException, AuthorizationException, CommunicationException
C
- The type of client managed object configuration that the
path definition refers to.S
- The type of server managed object configuration that the
path definition refers to.path
- The non-empty path of the managed object.
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.
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.public final <C extends ConfigurationClient,S extends Configuration,PD> PD getPropertyValue(ManagedObjectPath<C,S> path, PropertyDefinition<PD> pd) throws java.lang.IllegalArgumentException, DefinitionDecodingException, AuthorizationException, ManagedObjectNotFoundException, CommunicationException, PropertyException
C
- The type of client managed object configuration that the
path definition refers to.S
- The type of server managed object configuration that the
path definition refers to.PD
- The type of the property to be retrieved.path
- The path of the managed object containing the property.pd
- The property to be retrieved.
null
if there are no values defined.
java.lang.IllegalArgumentException
- If the property definition is not associated with the
referenced managed object's definition.
DefinitionDecodingException
- If the managed object was found but its type could not
be determined.
PropertyException
- If the managed object was found but the requested
property could not be decoded.
ManagedObjectNotFoundException
- If the requested managed object could not be found on
the server.
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.public abstract <C extends ConfigurationClient,S extends Configuration,PD> java.util.SortedSet<PD> getPropertyValues(ManagedObjectPath<C,S> path, PropertyDefinition<PD> pd) throws java.lang.IllegalArgumentException, DefinitionDecodingException, AuthorizationException, ManagedObjectNotFoundException, CommunicationException, PropertyException
Implementations MUST NOT not use
getManagedObject(ManagedObjectPath)
to read the
referenced managed object in its entirety. Specifically,
implementations MUST only attempt to resolve the default values
for the requested property and its dependencies (if it uses
inherited defaults). This is to avoid infinite recursion where a
managed object contains a property which inherits default values
from another property in the same managed object.
C
- The type of client managed object configuration that the
path definition refers to.S
- The type of server managed object configuration that the
path definition refers to.PD
- The type of the property to be retrieved.path
- The path of the managed object containing the property.pd
- The property to be retrieved.
java.lang.IllegalArgumentException
- If the property definition is not associated with the
referenced managed object's definition.
DefinitionDecodingException
- If the managed object was found but its type could not
be determined.
PropertyException
- If the managed object was found but the requested
property could not be decoded.
ManagedObjectNotFoundException
- If the requested managed object could not be found on
the server.
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.public abstract ManagedObject<RootCfgClient> getRootConfigurationManagedObject()
public final <C extends ConfigurationClient,S extends Configuration> java.lang.String[] listManagedObjects(ManagedObjectPath<?,?> parent, InstantiableRelationDefinition<C,S> rd) throws java.lang.IllegalArgumentException, ManagedObjectNotFoundException, AuthorizationException, CommunicationException
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.parent
- The path of the parent managed object.rd
- The instantiable relation definition.
java.lang.IllegalArgumentException
- If the relation definition is not associated with the
parent managed object's definition.
ManagedObjectNotFoundException
- If the parent managed object could not be found.
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.public abstract <C extends ConfigurationClient,S extends Configuration> java.lang.String[] listManagedObjects(ManagedObjectPath<?,?> parent, InstantiableRelationDefinition<C,S> rd, AbstractManagedObjectDefinition<? extends C,? extends S> d) throws java.lang.IllegalArgumentException, ManagedObjectNotFoundException, AuthorizationException, CommunicationException
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.parent
- The path of the parent managed object.rd
- The instantiable relation definition.d
- The managed object definition.
java.lang.IllegalArgumentException
- If the relation definition is not associated with the
parent managed object's definition.
ManagedObjectNotFoundException
- If the parent managed object could not be found.
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.public abstract boolean managedObjectExists(ManagedObjectPath<?,?> path) throws ManagedObjectNotFoundException, AuthorizationException, CommunicationException
Implementations should always return true
when the
provided path is empty.
path
- The path of the named managed object.
true
if the named managed object
exists, false
otherwise.
ManagedObjectNotFoundException
- If the parent managed object could not be found.
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.protected abstract <C extends ConfigurationClient,S extends Configuration> void deleteManagedObject(ManagedObjectPath<C,S> path) throws OperationRejectedException, AuthorizationException, CommunicationException
Implementations do not need check whether the named managed object exists, nor do they need to enforce client constraints.
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.path
- The path of the managed object to be deleted.
OperationRejectedException
- If the managed object cannot be removed due to some
server-side constraint which cannot be satisfied (for
example, if it is referenced by another managed
object).
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.protected final <PD> java.util.Collection<PD> findDefaultValues(ManagedObjectPath<?,?> p, PropertyDefinition<PD> pd, boolean isCreate) throws DefaultBehaviorException
PD
- The type of the property.p
- The managed object path of the current managed object.pd
- The property definition.isCreate
- Indicates whether the managed object has been created
yet.
DefaultBehaviorException
- If the default values could not be retrieved or decoded
properly.protected abstract ManagementContext getManagementContext()
protected final void validateRelationDefinition(ManagedObjectPath<?,?> path, RelationDefinition<?,?> rd) throws java.lang.IllegalArgumentException
path
- The parent managed object path.rd
- The relation definition.
java.lang.IllegalArgumentException
- If the relation definition does not belong to the
managed object definition.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |