Class ServerManagementContext

java.lang.Object
org.forgerock.opendj.config.server.ServerManagementContext

public final class ServerManagementContext extends Object
Server management connection context.
  • 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 ConfigException
      Gets 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

      public RootCfg getRootConfiguration()
      Get the root configuration manager associated with this management context.
      Returns:
      the root configuration manager associated with this management context.
    • getRootConfigurationManagedObject

      public ServerManagedObject<RootCfg> 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

      public boolean managedObjectExists(ManagedObjectPath<?,?> path)
      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

      public ConfigurationRepository getConfigRepository()
      Returns the repository containing all configuration entries.
      Returns:
      the repository