public abstract class ConfigurableEntity extends DescribableEntity
Constructor and Description |
---|
ConfigurableEntity() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the object and reset to defaults
|
protected javax.json.JsonObjectBuilder |
createJson()
Convert this object into JSON
|
void |
fromJSONObject(javax.json.JsonObject jsonObj)
Extract the metadata from the JSON object.
|
List<String> |
getInternalPropertyNames()
Get the list of internal property names.
|
Mode |
getMode()
Get the validation mode.
|
Map<String,PropertyDescription> |
getPropertyDescriptions()
Get the properties
|
Region |
getRegion()
Which region does this entity apply to?
|
boolean |
isAllowAdditionalProperties()
Are additional properties allowed?
|
void |
setAllowAdditionalProperties(boolean flag)
Set whether additional properties are allowed
|
protected void |
setDefaults()
Apply the non-null default values.
|
void |
setMode(Mode value)
Set the validation mode
|
void |
setRegion(Region region)
Set the region of this entity.
|
getDeprecated, getDescription, getEnforceOn, getSince, getTitle, setDeprecated, setDescription, setEnforceOn, setSince, setTitle
getAttributes, getBoolean, getInteger, getNumber, getString, getString, getStringArray, setString, setStringArray, toJSONObject
protected void setDefaults()
AttributeableEntity
setDefaults
in class AttributeableEntity
public void clear()
clear
in class DescribableEntity
public void fromJSONObject(javax.json.JsonObject jsonObj) throws IOException
clear()
fromJSONObject
in class DescribableEntity
jsonObj
- The JSON ObjectIOException
- If JSON parsing failspublic Map<String,PropertyDescription> getPropertyDescriptions()
public Mode getMode()
null
public void setMode(Mode value)
value
- The validation modepublic boolean isAllowAdditionalProperties()
true
if additional properties are allowedpublic void setAllowAdditionalProperties(boolean flag)
flag
- Set to true
to allow additional propertiespublic Region getRegion()
public void setRegion(Region region)
region
- The regionpublic List<String> getInternalPropertyNames()
protected javax.json.JsonObjectBuilder createJson() throws IOException
createJson
in class DescribableEntity
IOException
- If generating the JSON failsCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.