Interface Context

    • Field Detail

      • CHILDREN_PROPERTY

        static final String CHILDREN_PROPERTY
        The property name for the children relationships.
        See Also:
        Constant Field Values
      • STATE

        static final String STATE
        The property name for the state of the context.

        The resource-registry manages the following states:

        • created: A newly created context.
        • active: An operational context.
        • deleted: A context marked for deletion.
        Other states can be defined and managed by a Manager.
        See Also:
        Constant Field Values
    • Method Detail

      • setName

        void setName​(String name)
        Sets the name of the context.
        Parameters:
        name - The name to set.
      • setState

        void setState​(String state)
        Sets the state of the context.
        Parameters:
        state - The state to set.
      • getParent

        IsParentOf getParent()
        Returns the parent of this context.
        Returns:
        The IsParentOf relation to the parent, or null if this is a root context.
      • setParent

        void setParent​(UUID uuid)
        Sets the parent of this context by its UUID.
        Parameters:
        uuid - The UUID of the parent context.
      • setParent

        void setParent​(Context context)
        Sets the parent of this context.
        Parameters:
        context - The parent context.
      • setParent

        void setParent​(IsParentOf isParentOf)
        Sets the parent of this context via an IsParentOf relation.
        Parameters:
        isParentOf - The relation to the parent.
      • getChildren

        List<IsParentOf> getChildren()
        Returns the children of this context.
        Returns:
        A list of IsParentOf relations to the children.
      • addChild

        void addChild​(UUID uuid)
        Adds a child to this context by its UUID.
        Parameters:
        uuid - The UUID of the child context.
      • addChild

        void addChild​(Context child)
        Adds a child to this context.
        Parameters:
        child - The child context.
      • addChild

        void addChild​(IsParentOf isParentOf)
        Adds a child to this context via an IsParentOf relation.
        Parameters:
        isParentOf - The relation to the child.
      • getAdditionalProperties

        Map<String,​Object> getAdditionalProperties()
        Returns a map of all additional properties not defined in the schema.
        Specified by:
        getAdditionalProperties in interface SchemaMixedElement
        Returns:
        A Map containing the additional properties, where the key is the property name and the value is the property value.
      • setAdditionalProperties

        void setAdditionalProperties​(Map<String,​Object> additionalProperties)
        Sets the map of additional properties for the element.
        Specified by:
        setAdditionalProperties in interface SchemaMixedElement
        Parameters:
        additionalProperties - A Map of additional properties.
      • getAdditionalProperty

        Object getAdditionalProperty​(String key)
        Retrieves a single additional property by its key.
        Specified by:
        getAdditionalProperty in interface SchemaMixedElement
        Parameters:
        key - The name of the additional property to retrieve.
        Returns:
        The value of the property, or null if the key is not found.
      • setAdditionalProperty

        void setAdditionalProperty​(String key,
                                   Object value)
        Sets a single additional property.
        Specified by:
        setAdditionalProperty in interface SchemaMixedElement
        Parameters:
        key - The name of the additional property.
        value - The value of the additional property.