Class ServerManagedObject<S extends Configuration>

  • Type Parameters:
    S - The type of server configuration represented by the server managed object.

    public final class ServerManagedObject<S extends Configuration>
    extends Object
    A server-side managed object.
    • Method Detail

      • deregisterAddListener

        public <M extends Configuration> void deregisterAddListener​(InstantiableRelationDefinition<?,​M> d,
                                                                    ConfigurationAddListener<M> listener)
        Deregisters an existing configuration add listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The instantiable relation definition.
        listener - The configuration add listener.
        Throws:
        IllegalArgumentException - If the instantiable relation definition is not associated with this managed object's definition.
      • deregisterAddListener

        public <M extends Configuration> void deregisterAddListener​(InstantiableRelationDefinition<?,​M> d,
                                                                    ServerManagedObjectAddListener<M> listener)
        Deregisters an existing server managed object add listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The instantiable relation definition.
        listener - The server managed object add listener.
        Throws:
        IllegalArgumentException - If the instantiable relation definition is not associated with this managed object's definition.
      • deregisterAddListener

        public <M extends Configuration> void deregisterAddListener​(OptionalRelationDefinition<?,​M> d,
                                                                    ConfigurationAddListener<M> listener)
        Deregisters an existing configuration add listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The optional relation definition.
        listener - The configuration add listener.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
      • deregisterAddListener

        public <M extends Configuration> void deregisterAddListener​(OptionalRelationDefinition<?,​M> d,
                                                                    ServerManagedObjectAddListener<M> listener)
        Deregisters an existing server managed object add listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The optional relation definition.
        listener - The server managed object add listener.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
      • deregisterAddListener

        public <M extends Configuration> void deregisterAddListener​(SetRelationDefinition<?,​M> d,
                                                                    ConfigurationAddListener<M> listener)
        Deregisters an existing configuration add listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The set relation definition.
        listener - The configuration add listener.
        Throws:
        IllegalArgumentException - If the set relation definition is not associated with this managed object's definition.
      • deregisterAddListener

        public <M extends Configuration> void deregisterAddListener​(SetRelationDefinition<?,​M> d,
                                                                    ServerManagedObjectAddListener<M> listener)
        Deregisters an existing server managed object add listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The set relation definition.
        listener - The server managed object add listener.
        Throws:
        IllegalArgumentException - If the set relation definition is not associated with this managed object's definition.
      • deregisterChangeListener

        public void deregisterChangeListener​(ConfigurationChangeListener<? super S> listener)
        Deregisters an existing configuration change listener.
        Parameters:
        listener - The configuration change listener.
      • deregisterChangeListener

        public void deregisterChangeListener​(ServerManagedObjectChangeListener<? super S> listener)
        Deregisters an existing server managed object change listener.
        Parameters:
        listener - The server managed object change listener.
      • deregisterDeleteListener

        public <M extends Configuration> void deregisterDeleteListener​(InstantiableRelationDefinition<?,​M> d,
                                                                       ConfigurationDeleteListener<M> listener)
        Deregisters an existing configuration delete listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The instantiable relation definition.
        listener - The configuration delete listener.
        Throws:
        IllegalArgumentException - If the instantiable relation definition is not associated with this managed object's definition.
      • deregisterDeleteListener

        public <M extends Configuration> void deregisterDeleteListener​(InstantiableRelationDefinition<?,​M> d,
                                                                       ServerManagedObjectDeleteListener<M> listener)
        Deregisters an existing server managed object delete listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The instantiable relation definition.
        listener - The server managed object delete listener.
        Throws:
        IllegalArgumentException - If the instantiable relation definition is not associated with this managed object's definition.
      • deregisterDeleteListener

        public <M extends Configuration> void deregisterDeleteListener​(OptionalRelationDefinition<?,​M> d,
                                                                       ConfigurationDeleteListener<M> listener)
        Deregisters an existing configuration delete listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The optional relation definition.
        listener - The configuration delete listener.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
      • deregisterDeleteListener

        public <M extends Configuration> void deregisterDeleteListener​(OptionalRelationDefinition<?,​M> d,
                                                                       ServerManagedObjectDeleteListener<M> listener)
        Deregisters an existing server managed object delete listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The optional relation definition.
        listener - The server managed object delete listener.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
      • deregisterDeleteListener

        public <M extends Configuration> void deregisterDeleteListener​(SetRelationDefinition<?,​M> d,
                                                                       ConfigurationDeleteListener<M> listener)
        Deregisters an existing configuration delete listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The set relation definition.
        listener - The configuration delete listener.
        Throws:
        IllegalArgumentException - If the set relation definition is not associated with this managed object's definition.
      • deregisterDeleteListener

        public <M extends Configuration> void deregisterDeleteListener​(SetRelationDefinition<?,​M> d,
                                                                       ServerManagedObjectDeleteListener<M> listener)
        Deregisters an existing server managed object delete listener.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The set relation definition.
        listener - The server managed object delete listener.
        Throws:
        IllegalArgumentException - If the set relation definition is not associated with this managed object's definition.
      • getChild

        public <M extends ConfigurationServerManagedObject<? extends M> getChild​(InstantiableRelationDefinition<?,​M> d,
                                                                                   String name)
                                                                            throws ConfigException
        Retrieve an instantiable child managed object.
        Type Parameters:
        M - The requested type of the child server managed object configuration.
        Parameters:
        d - The instantiable relation definition.
        name - The name of the child managed object.
        Returns:
        Returns the instantiable child managed object.
        Throws:
        IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
        ConfigException - If the child managed object could not be found or if it could not be decoded.
      • getChild

        public <M extends ConfigurationServerManagedObject<? extends M> getChild​(OptionalRelationDefinition<?,​M> d)
                                                                            throws ConfigException
        Retrieve an optional child managed object.
        Type Parameters:
        M - The requested type of the child server managed object configuration.
        Parameters:
        d - The optional relation definition.
        Returns:
        Returns the optional child managed object.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
        ConfigException - If the child managed object could not be found or if it could not be decoded.
      • getChild

        public <M extends ConfigurationServerManagedObject<? extends M> getChild​(SetRelationDefinition<?,​M> d,
                                                                                   String name)
                                                                            throws ConfigException
        Retrieve a set child managed object.
        Type Parameters:
        M - The requested type of the child server managed object configuration.
        Parameters:
        d - The set relation definition.
        name - The name of the child managed object.
        Returns:
        Returns the set child managed object.
        Throws:
        IllegalArgumentException - If the relation definition is not associated with this managed object's definition or if name specifies a managed object definition which is not a sub-type of the relation's child definition.
        ConfigException - If the child managed object could not be found or if it could not be decoded.
      • getChild

        public <M extends ConfigurationServerManagedObject<? extends M> getChild​(SingletonRelationDefinition<?,​M> d)
                                                                            throws ConfigException
        Retrieve a singleton child managed object.
        Type Parameters:
        M - The requested type of the child server managed object configuration.
        Parameters:
        d - The singleton relation definition.
        Returns:
        Returns the singleton child managed object.
        Throws:
        IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
        ConfigException - If the child managed object could not be found or if it could not be decoded.
      • getServerContext

        public ServerManagementContext getServerContext()
        Returns the server management context used by this object.
        Returns:
        the context
      • getConfiguration

        public S getConfiguration()
        Creates a server configuration view of this managed object.
        Returns:
        Returns the server configuration view of this managed object.
      • getDn

        public Dn getDn()
        Get the DN of the LDAP entry associated with this server managed object.
        Returns:
        The DN of the LDAP entry associated with this server managed object, or the empty DN if this is the root managed object.
      • getName

        public String getName()
        Returns the RDN value of the LDAP entry associated with this server managed object.
        Returns:
        The RDN value of the LDAP entry associated with this server managed object, or an empty string if this is the root managed object.
      • getManagedObjectDefinition

        public ManagedObjectDefinition<?,​S> getManagedObjectDefinition()
        Get the definition associated with this server managed object.
        Returns:
        Returns the definition associated with this server managed object.
      • getManagedObjectPath

        public ManagedObjectPath<?,​S> getManagedObjectPath()
        Get the path of this server managed object.
        Returns:
        Returns the path of this server managed object.
      • getPropertyValue

        public <T> T getPropertyValue​(PropertyDefinition<T> d)
        Get the effective value of the specified property. If the property is multi-valued then just the first value is returned. If the property does not have a value then its default value is returned if it has one, or null indicating that any default behavior is applicable.
        Type Parameters:
        T - The type of the property to be retrieved.
        Parameters:
        d - The property to be retrieved.
        Returns:
        Returns the property's effective value, or null indicating that any default behavior is applicable.
        Throws:
        IllegalArgumentException - If the property definition is not associated with this managed object's definition.
      • getPropertyValues

        public <T> SortedSet<T> getPropertyValues​(PropertyDefinition<T> d)
        Get the effective values of the specified property. If the property does not have any values then its default values are returned if it has any, or an empty set indicating that any default behavior is applicable.
        Type Parameters:
        T - The type of the property to be retrieved.
        Parameters:
        d - The property to be retrieved.
        Returns:
        Returns an unmodifiable set containing the property's effective values. An empty set indicates that the property has no default values defined and any default behavior is applicable.
        Throws:
        IllegalArgumentException - If the property definition is not associated with this managed object's definition.
      • hasChild

        public boolean hasChild​(OptionalRelationDefinition<?,​?> d)
        Determines whether the optional managed object associated with the specified optional relations exists.
        Parameters:
        d - The optional relation definition.
        Returns:
        Returns true if the optional managed object exists, false otherwise.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
      • listChildren

        public String[] listChildren​(InstantiableRelationDefinition<?,​?> d)
        Lists the child managed objects associated with the specified instantiable relation.
        Parameters:
        d - The instantiable relation definition.
        Returns:
        Returns the names of the child managed objects.
        Throws:
        IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
      • listChildren

        public String[] listChildren​(SetRelationDefinition<?,​?> d)
        Lists the child managed objects associated with the specified set relation.
        Parameters:
        d - The set relation definition.
        Returns:
        Returns the names of the child managed objects.
        Throws:
        IllegalArgumentException - If the relation definition is not associated with this managed object's definition.
      • registerAddListener

        public <M extends Configuration> void registerAddListener​(InstantiableRelationDefinition<?,​M> d,
                                                                  ConfigurationAddListener<M> listener)
                                                           throws ConfigException
        Register to be notified when new child configurations are added beneath an instantiable relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The instantiable relation definition.
        listener - The configuration add listener.
        Throws:
        IllegalArgumentException - If the instantiable relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the instantiable relation could not be retrieved.
      • registerAddListener

        public <M extends Configuration> void registerAddListener​(InstantiableRelationDefinition<?,​M> d,
                                                                  ServerManagedObjectAddListener<M> listener)
                                                           throws ConfigException
        Register to be notified when new child server managed object are added beneath an instantiable relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The instantiable relation definition.
        listener - The server managed object add listener.
        Throws:
        IllegalArgumentException - If the instantiable relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the instantiable relation could not be retrieved.
      • registerAddListener

        public <M extends Configuration> void registerAddListener​(OptionalRelationDefinition<?,​M> d,
                                                                  ConfigurationAddListener<M> listener)
                                                           throws ConfigException
        Register to be notified when a new child configurations is added beneath an optional relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The optional relation definition.
        listener - The configuration add listener.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the optional relation could not be retrieved.
      • registerAddListener

        public <M extends Configuration> void registerAddListener​(OptionalRelationDefinition<?,​M> d,
                                                                  ServerManagedObjectAddListener<M> listener)
                                                           throws ConfigException
        Register to be notified when a new child server managed object is added beneath an optional relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The optional relation definition.
        listener - The server managed object add listener.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the optional relation could not be retrieved.
      • registerAddListener

        public <M extends Configuration> void registerAddListener​(SetRelationDefinition<?,​M> d,
                                                                  ConfigurationAddListener<M> listener)
                                                           throws ConfigException
        Register to be notified when new child configurations are added beneath a set relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The set relation definition.
        listener - The configuration add listener.
        Throws:
        IllegalArgumentException - If the set relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the set relation could not be retrieved.
      • registerAddListener

        public <M extends Configuration> void registerAddListener​(SetRelationDefinition<?,​M> d,
                                                                  ServerManagedObjectAddListener<M> listener)
                                                           throws ConfigException
        Register to be notified when new child server managed object are added beneath a set relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The set relation definition.
        listener - The server managed object add listener.
        Throws:
        IllegalArgumentException - If the set relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the set relation could not be retrieved.
      • registerChangeListener

        public void registerChangeListener​(ConfigurationChangeListener<? super S> listener)
        Register to be notified when this server managed object is changed.
        Parameters:
        listener - The configuration change listener.
      • registerChangeListener

        public void registerChangeListener​(ServerManagedObjectChangeListener<? super S> listener)
        Register to be notified when this server managed object is changed.
        Parameters:
        listener - The server managed object change listener.
      • registerDeleteListener

        public <M extends Configuration> void registerDeleteListener​(InstantiableRelationDefinition<?,​M> d,
                                                                     ConfigurationDeleteListener<M> listener)
                                                              throws ConfigException
        Register to be notified when existing child configurations are deleted beneath an instantiable relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The instantiable relation definition.
        listener - The configuration delete listener.
        Throws:
        IllegalArgumentException - If the instantiable relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the instantiable relation could not be retrieved.
      • registerDeleteListener

        public <M extends Configuration> void registerDeleteListener​(InstantiableRelationDefinition<?,​M> d,
                                                                     ServerManagedObjectDeleteListener<M> listener)
                                                              throws ConfigException
        Register to be notified when existing child server managed objects are deleted beneath an instantiable relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The instantiable relation definition.
        listener - The server managed objects delete listener.
        Throws:
        IllegalArgumentException - If the instantiable relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the instantiable relation could not be retrieved.
      • registerDeleteListener

        public <M extends Configuration> void registerDeleteListener​(OptionalRelationDefinition<?,​M> d,
                                                                     ConfigurationDeleteListener<M> listener)
                                                              throws ConfigException
        Register to be notified when an existing child configuration is deleted beneath an optional relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The optional relation definition.
        listener - The configuration delete listener.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the optional relation could not be retrieved.
      • registerDeleteListener

        public <M extends Configuration> void registerDeleteListener​(OptionalRelationDefinition<?,​M> d,
                                                                     ServerManagedObjectDeleteListener<M> listener)
                                                              throws ConfigException
        Register to be notified when an existing child server managed object is deleted beneath an optional relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The optional relation definition.
        listener - The server managed object delete listener.
        Throws:
        IllegalArgumentException - If the optional relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the optional relation could not be retrieved.
      • registerDeleteListener

        public <M extends Configuration> void registerDeleteListener​(SetRelationDefinition<?,​M> d,
                                                                     ConfigurationDeleteListener<M> listener)
                                                              throws ConfigException
        Register to be notified when existing child configurations are deleted beneath a set relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The set relation definition.
        listener - The configuration delete listener.
        Throws:
        IllegalArgumentException - If the set relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the set relation could not be retrieved.
      • registerDeleteListener

        public <M extends Configuration> void registerDeleteListener​(SetRelationDefinition<?,​M> d,
                                                                     ServerManagedObjectDeleteListener<M> listener)
                                                              throws ConfigException
        Register to be notified when existing child server managed objects are deleted beneath a set relation.
        Type Parameters:
        M - The type of the child server configuration object.
        Parameters:
        d - The set relation definition.
        listener - The server managed objects delete listener.
        Throws:
        IllegalArgumentException - If the set relation definition is not associated with this managed object's definition.
        ConfigException - If the configuration entry associated with the set relation could not be retrieved.