Interface ConfiguredObject<X extends ConfiguredObject<X>>

    • Method Detail

      • getId

        java.util.UUID getId()
        Get the universally unique identifier for the object
        Returns:
        the objects id
      • getName

        java.lang.String getName()
        Get the name of the object
        Specified by:
        getName in interface PermissionedObject
        Returns:
        the name of the object
      • getDescription

        java.lang.String getDescription()
      • getType

        java.lang.String getType()
      • getContext

        java.util.Map<java.lang.String,​java.lang.String> getContext()
      • getLastUpdatedBy

        java.lang.String getLastUpdatedBy()
      • getLastUpdatedTime

        java.util.Date getLastUpdatedTime()
      • getCreatedBy

        java.lang.String getCreatedBy()
      • getCreatedTime

        java.util.Date getCreatedTime()
      • getDesiredState

        State getDesiredState()
        Get the desired state of the object. This is the state set at the object itself, however the object may not be able attain this state if one of its ancestors is in a different state (in particular a descendant object may not be ACTIVE if all of its ancestors are not also ACTIVE).
        Returns:
        the desired state of the object
      • getState

        State getState()
        Get the actual state of the object. This state is derived from the desired state of the object itself and the actual state of its parents. If an object "desires" to be ACTIVE, but one of its parents is STOPPED, then the actual state of the object will be STOPPED
        Returns:
        the actual state of the object
      • getLastOpenedTime

        java.util.Date getLastOpenedTime()
      • addChangeListener

        void addChangeListener​(ConfigurationChangeListener listener)
        Add a listener which will be informed of all changes to this configuration object
        Parameters:
        listener - the listener to add
      • removeChangeListener

        boolean removeChangeListener​(ConfigurationChangeListener listener)
        Remove a change listener
        Parameters:
        listener - the listener to remove
        Returns:
        true iff a listener was removed
      • getParent

        ConfiguredObject<?> getParent()
        Get the parent of the given type for this object
        Returns:
        the objects parent
      • isDurable

        boolean isDurable()
        Returns whether the the object configuration is durably stored
        Returns:
        the durability
      • getLifetimePolicy

        LifetimePolicy getLifetimePolicy()
        Return the lifetime policy for the object
        Returns:
        the lifetime policy
      • getStatistics

        java.util.Map<java.lang.String,​java.lang.Object> getStatistics​(java.util.List<java.lang.String> statistics)
      • setContextVariable

        java.lang.String setContextVariable​(java.lang.String name,
                                            java.lang.String value)
      • removeContextVariable

        java.lang.String removeContextVariable​(java.lang.String name)
      • getAttributeNames

        java.util.Collection<java.lang.String> getAttributeNames()
        Get the names of attributes that are set on this object Note that the returned collection is correct at the time the method is called, but will not reflect future additions or removals when they occur
        Returns:
        the collection of attribute names
      • getAttribute

        java.lang.Object getAttribute​(java.lang.String name)
        Return the value for the given attribute name. The actual attribute value is returned if the configured object has such attribute set. If not, the value is looked default attributes.
        Parameters:
        name - the name of the attribute
        Returns:
        the value of the attribute at the object (or null if the attribute value is set neither on object itself no in defaults)
      • getActualAttributes

        java.util.Map<java.lang.String,​java.lang.Object> getActualAttributes()
        Return the map containing only explicitly set attributes
        Returns:
        the map with the attributes
      • getStatistics

        java.util.Map<java.lang.String,​java.lang.Object> getStatistics()
        Return the statistics for the ConfiguredObject
        Returns:
        the current statistics for the ConfiguredObject
      • getChildren

        <C extends ConfiguredObject> java.util.Collection<C> getChildren​(java.lang.Class<C> clazz)
        Return children of the ConfiguredObject of the given class
        Parameters:
        clazz - the class of the children to return
        Returns:
        the children
        Throws:
        java.lang.NullPointerException - if the supplied class null
      • getChildById

        <C extends ConfiguredObject> C getChildById​(java.lang.Class<C> clazz,
                                                    java.util.UUID id)
      • getChildByName

        <C extends ConfiguredObject> C getChildByName​(java.lang.Class<C> clazz,
                                                      java.lang.String name)
      • createChild

        <C extends ConfiguredObject> C createChild​(java.lang.Class<C> childClass,
                                                   java.util.Map<java.lang.String,​java.lang.Object> attributes)
      • getAttainedChildById

        <C extends ConfiguredObject> com.google.common.util.concurrent.ListenableFuture<C> getAttainedChildById​(java.lang.Class<C> childClass,
                                                                                                                java.util.UUID id)
      • getAttainedChildByName

        <C extends ConfiguredObject> com.google.common.util.concurrent.ListenableFuture<C> getAttainedChildByName​(java.lang.Class<C> childClass,
                                                                                                                  java.lang.String name)
      • createChildAsync

        <C extends ConfiguredObject> com.google.common.util.concurrent.ListenableFuture<C> createChildAsync​(java.lang.Class<C> childClass,
                                                                                                            java.util.Map<java.lang.String,​java.lang.Object> attributes)
      • setAttributes

        void setAttributes​(java.util.Map<java.lang.String,​java.lang.Object> attributes)
                    throws java.lang.IllegalStateException,
                           java.security.AccessControlException,
                           java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalStateException
        java.security.AccessControlException
        java.lang.IllegalArgumentException
      • setAttributesAsync

        com.google.common.util.concurrent.ListenableFuture<java.lang.Void> setAttributesAsync​(java.util.Map<java.lang.String,​java.lang.Object> attributes)
                                                                                       throws java.lang.IllegalStateException,
                                                                                              java.security.AccessControlException,
                                                                                              java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalStateException
        java.security.AccessControlException
        java.lang.IllegalArgumentException
      • managesChildStorage

        boolean managesChildStorage()
      • findConfiguredObject

        <C extends ConfiguredObject<C>> C findConfiguredObject​(java.lang.Class<C> clazz,
                                                               java.lang.String name)
      • open

        void open()
      • openAsync

        com.google.common.util.concurrent.ListenableFuture<java.lang.Void> openAsync()
      • close

        void close()
      • closeAsync

        com.google.common.util.concurrent.ListenableFuture<java.lang.Void> closeAsync()
      • deleteAsync

        com.google.common.util.concurrent.ListenableFuture<java.lang.Void> deleteAsync()
      • getModel

        Model getModel()
      • delete

        void delete()
      • hasEncrypter

        boolean hasEncrypter()
      • decryptSecrets

        void decryptSecrets()
      • setUserPreferences

        void setUserPreferences​(UserPreferences userPreferences)
      • authorise

        void authorise​(Operation operation)
                throws java.security.AccessControlException
        Throws:
        java.security.AccessControlException
      • authorise

        void authorise​(Operation operation,
                       java.util.Map<java.lang.String,​java.lang.Object> arguments)
                throws java.security.AccessControlException
        Throws:
        java.security.AccessControlException
      • authorise

        void authorise​(SecurityToken token,
                       Operation operation,
                       java.util.Map<java.lang.String,​java.lang.Object> arguments)
                throws java.security.AccessControlException
        Throws:
        java.security.AccessControlException
      • newToken

        SecurityToken newToken​(javax.security.auth.Subject subject)