Class ConfigurableEntity

    • Constructor Detail

      • ConfigurableEntity

        public ConfigurableEntity()
    • Method Detail

      • clear

        public void clear()
        Clear the object and reset to defaults
        Overrides:
        clear in class DescribableEntity
      • fromJSONObject

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

        public Map<String,​PropertyDescription> getPropertyDescriptions()
        Get the properties
        Returns:
        Mutable map of properties by property name
      • getMode

        public Mode getMode()
        Get the validation mode.
        Returns:
        The mode or null
        Since:
        1.2
      • setMode

        public void setMode​(Mode value)
        Set the validation mode
        Parameters:
        value - The validation mode
        Since:
        1.2
      • isAllowAdditionalProperties

        public boolean isAllowAdditionalProperties()
        Are additional properties allowed?
        Returns:
        true if additional properties are allowed
        Since:
        1.4
      • setAllowAdditionalProperties

        public void setAllowAdditionalProperties​(boolean flag)
        Set whether additional properties are allowed
        Parameters:
        flag - Set to true to allow additional properties
        Since:
        1.4
      • getRegion

        public Region getRegion()
        Which region does this entity apply to?
        Returns:
        the region
        Since:
        1.4
      • setRegion

        public void setRegion​(Region region)
        Set the region of this entity.
        Parameters:
        region - The region
        Since:
        1.4
      • getInternalPropertyNames

        public List<String> getInternalPropertyNames()
        Get the list of internal property names.
        Returns:
        the mutable list of internal property names
        Since:
        1.4
      • createJson

        protected javax.json.JsonObjectBuilder createJson()
                                                   throws IOException
        Convert this object into JSON
        Overrides:
        createJson in class DescribableEntity
        Returns:
        The json object builder
        Throws:
        IOException - If generating the JSON fails