Package org.apache.sling.feature.extension.apiregions.api.config

# Class DescribableEntity

java.lang.Object
org.apache.sling.feature.extension.apiregions.api.config.AttributeableEntity
org.apache.sling.feature.extension.apiregions.api.config.DescribableEntity

Direct Known Subclasses:
  `ConfigurableEntity`, `Option`, `PropertyDescription`

public abstract class DescribableEntity extends AttributeableEntity
Abstract class for all describable entities, having an optional title, description and deprecation info. This class is not thread safe.

## Constructor Summary

Constructors
Constructor
Description
`DescribableEntity()`

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
Clear the object and reset to defaults
`protected jakarta.json.JsonObjectBuilder`
`createJson()`
Convert this object into JSON
`void`
`fromJSONObject(jakarta.json.JsonObject jsonObj)`
Extract the metadata from the JSON object.
`String`
`getDeprecated()`
Get the deprecation text
`String`
`getDescription()`
Get the description
`String`
`getEnforceOn()`
Get the optional since information
`String`
`getSince()`
Get the optional since information
`String`
`getTitle()`
Get the title
`void`
`setDeprecated(String deprecated)`
Set the deprecation text
`void`
`setDescription(String description)`
Set the description
`void`
`setEnforceOn(String enforceOn)`
Set the enforce on information.
`void`
`setSince(String since)`
Set the since information.
`void`
`setTitle(String title)`
Set the title

### Methods inherited from class org.apache.sling.feature.extension.apiregions.api.config.AttributeableEntity

`getAttributes, getBoolean, getInteger, getNumber, getString, getString, getStringArray, setDefaults, setString, setStringArray, toJSONObject`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DescribableEntity

public DescribableEntity()

## Method Details

### clear

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

Overrides:
  `clear` in class `AttributeableEntity`

### fromJSONObject

public void fromJSONObject(jakarta.json.JsonObject jsonObj) throws IOException
Extract the metadata from the JSON object. This method first calls `clear()`

Overrides:
  `fromJSONObject` in class `AttributeableEntity`
Parameters:
  `jsonObj` - The JSON Object
Throws:
  `IOException` - If JSON parsing fails

### getTitle

public String getTitle()
Get the title

Returns:
  The title or `null`

### setTitle

public void setTitle(String title)
Set the title

Parameters:
  `title` - the title to set

### getDescription

public String getDescription()
Get the description

Returns:
  the description or `null`

### setDescription

public void setDescription(String description)
Set the description

Parameters:
  `description` - the description to set

### getDeprecated

public String getDeprecated()
Get the deprecation text

Returns:
  the deprecation text or `null`

### setDeprecated

public void setDeprecated(String deprecated)
Set the deprecation text

Parameters:
  `deprecated` - the deprecation text to set

### getSince

public String getSince()
Get the optional since information

Returns:
  The since information or `null`

### setSince

public void setSince(String since)
Set the since information. This should a date in the format 'YYYY-MM-DD'.

Parameters:
  `since` - The new info

### getEnforceOn

public String getEnforceOn()
Get the optional since information

Returns:
  The since information or `null`

### setEnforceOn

public void setEnforceOn(String enforceOn)
Set the enforce on information.

Parameters:
  `enforceOn` - The new info

### createJson

protected jakarta.json.JsonObjectBuilder createJson() throws IOException
Convert this object into JSON

Overrides:
  `createJson` in class `AttributeableEntity`
Returns:
  The json object builder
Throws:
  `IOException` - If generating the JSON fails