public abstract class ExtensibleData extends Object implements SupportsExtensionElements, HasTransientProperties
| Modifier and Type | Field and Description |
|---|---|
protected List<Object> |
extensionElements |
protected Map<String,Object> |
transientProperties |
| Constructor and Description |
|---|
ExtensibleData() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtensionElement(Object element)
Add an extension element.
|
protected void |
embed(ExtensibleData data) |
ExtensibleData |
extensionElement(Object element) |
<E> E |
findExtensionOfType(Class<E> clazz)
Finds the first extension of a specified type.
|
<E> E |
findExtensionOfType(Class<E> clazz,
String name,
String namespace)
Finds the first extension of a specified type in the given name and namespace.
|
<E> List<E> |
findExtensionsOfType(Class<E> clazz)
Find the extensions of a specified type.
|
<E> List<E> |
findExtensionsOfType(Class<E> clazz,
String name,
String namespace)
Find the extension elements of a specified type in the given name and namespace.
|
List<Object> |
getExtensionElements()
Custom extension elements for a conclusion.
|
String |
getId()
A local, context-specific id for the data.
|
Map<String,Object> |
getTransientProperties()
Get the transient properties.
|
Object |
getTransientProperty(String name)
Get a transient (non-serialized) property.
|
ExtensibleData |
id(String id)
Build up this object with an id.
|
<E> List<E> |
removeExtensionElements(Class<E> clazz)
Remove extension elements of a given type.
|
void |
setExtensionElement(Object element)
Sets an extension element by first removing all previous elements of the same type, then adding it to the list.
|
void |
setExtensionElements(List<Object> extensionElements)
Custom extension elements for a conclusion.
|
void |
setId(String id)
A local, context-specific id for the data.
|
void |
setTransientProperty(String name,
Object value)
Set a transient (non-serialized) property.
|
String |
toString()
Provide a simple toString() method.
|
public String getId()
public void setId(String id)
id - A local, context-specific id for the data.public ExtensibleData id(String id)
id - The id.public List<Object> getExtensionElements()
getExtensionElements in interface SupportsExtensionElementspublic void setExtensionElements(List<Object> extensionElements)
extensionElements - Custom extension elements for a conclusion.public void addExtensionElement(Object element)
addExtensionElement in interface SupportsExtensionElementselement - The extension element to add.public ExtensibleData extensionElement(Object element)
public <E> List<E> removeExtensionElements(Class<E> clazz)
E - The type of extension elements.clazz - The type of extension element to remove.public void setExtensionElement(Object element)
element - The element to set.public <E> E findExtensionOfType(Class<E> clazz)
findExtensionOfType in interface SupportsExtensionElementsE - The type of extension elements.clazz - The type.public <E> List<E> findExtensionsOfType(Class<E> clazz)
findExtensionsOfType in interface SupportsExtensionElementsE - The type.clazz - The type.public <E> E findExtensionOfType(Class<E> clazz, String name, String namespace)
clazz - The type.name - The name of the extension element.namespace - The namespace of the extension element.public <E> List<E> findExtensionsOfType(Class<E> clazz, String name, String namespace)
clazz - The type of the extension element.name - The name of the extension element.namespace - The namespace of the extension element.public Map<String,Object> getTransientProperties()
getTransientProperties in interface HasTransientPropertiespublic Object getTransientProperty(String name)
getTransientProperty in interface HasTransientPropertiesname - The name of the property.public void setTransientProperty(String name, Object value)
setTransientProperty in interface HasTransientPropertiesname - the name of the property.value - the property value.protected void embed(ExtensibleData data)
Copyright © 2016. All rights reserved.