Class AttributeableEntity

  • Direct Known Subclasses:
    ConfigurationApi, DescribableEntity, Range

    public abstract class AttributeableEntity
    extends Object
    Abstract class used by all entities which allow additional attributes to be stored. This class is not thread safe.
    • Constructor Detail

      • AttributeableEntity

        public AttributeableEntity()
    • Method Detail

      • clear

        public void clear()
        Clear the object and reset to defaults
      • toJSONObject

        public javax.json.JsonObject toJSONObject()
                                           throws IOException
        Convert this object into JSON
        Returns:
        The json object
        Throws:
        IOException - If generating the JSON fails
      • fromJSONObject

        public void fromJSONObject​(javax.json.JsonObject jsonObj)
                            throws IOException
        Extract the metadata from the JSON object. This method first calls clear()
        Parameters:
        jsonObj - The JSON Object
        Throws:
        IOException - If JSON parsing fails
      • getAttributes

        public Map<String,​javax.json.JsonValue> getAttributes()
        Get the attributes
        Returns:
        Mutable map of attributes, by attribute name