Class AttributeableEntity
- java.lang.Object
-
- org.apache.sling.feature.extension.apiregions.api.config.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 Summary
Constructors Constructor Description AttributeableEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the object and reset to defaultsvoid
fromJSONObject(javax.json.JsonObject jsonObj)
Extract the metadata from the JSON object.Map<String,javax.json.JsonValue>
getAttributes()
Get the attributesjavax.json.JsonObject
toJSONObject()
Convert this object into JSON
-
-
-
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 callsclear()
- Parameters:
jsonObj
- The JSON Object- Throws:
IOException
- If JSON parsing fails
-
-