Class ServerManagementContext
java.lang.Object
org.forgerock.opendj.config.server.ServerManagementContext
Server management connection context.
-
Constructor Summary
ConstructorDescriptionServerManagementContext
(ConfigurationRepository repository, SubstitutionService substitutionService) Creates a context from the provided configuration repository. -
Method Summary
Modifier and TypeMethodDescriptionReturns the repository containing all configuration entries.<C extends ConfigurationClient,
S extends Configuration>
ServerManagedObject<? extends S>getManagedObject
(ManagedObjectPath<C, S> path) Gets the named managed object.Get the root configuration manager associated with this management context.Get the root configuration server managed object associated with this management context.<C extends ConfigurationClient,
S extends Configuration>
String[]listManagedObjects
(ManagedObjectPath<?, ?> parent, RelationDefinition<C, S> relationDef) Lists the child managed objects of the named parent managed object.boolean
managedObjectExists
(ManagedObjectPath<?, ?> path) Determines whether the named managed object exists.
-
Constructor Details
-
ServerManagementContext
public ServerManagementContext(ConfigurationRepository repository, SubstitutionService substitutionService) Creates a context from the provided configuration repository.- Parameters:
repository
- The repository of configuration entries.substitutionService
- The service to substitute commons-config expressions in configuration entries.
-
-
Method Details
-
getManagedObject
public <C extends ConfigurationClient,S extends Configuration> ServerManagedObject<? extends S> getManagedObject(ManagedObjectPath<C, S> path) throws ConfigExceptionGets the named managed object.- Type Parameters:
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.- Parameters:
path
- The path of the managed object.- Returns:
- Returns the named managed object.
- Throws:
ConfigException
- If the named managed object could not be found or if it could not be decoded.
-
getRootConfiguration
Get the root configuration manager associated with this management context.- Returns:
- the root configuration manager associated with this management context.
-
getRootConfigurationManagedObject
Get the root configuration server managed object associated with this management context.- Returns:
- the root configuration server managed object
-
listManagedObjects
public <C extends ConfigurationClient,S extends Configuration> String[] listManagedObjects(ManagedObjectPath<?, ?> parent, RelationDefinition<C, S> relationDef) Lists the child managed objects of the named parent managed object.- 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:
parent
- The path of the parent managed object.relationDef
- The relation definition.- Returns:
- Returns the names of the child managed objects.
- Throws:
IllegalArgumentException
- If the relation definition is not associated with the parent managed object's definition.
-
managedObjectExists
Determines whether the named managed object exists.- Parameters:
path
- The path of the named managed object.- Returns:
- Returns
true
if the named managed object exists,false
otherwise.
-
getConfigRepository
Returns the repository containing all configuration entries.- Returns:
- the repository
-