public class Content
extends Any
Constructor and Description |
---|
Content()
Creates an instance of the default Content type with ID 0.
|
Content(int id)
Creates an instance of the Content type specified by its ID.
|
Content(String id)
Creates an instance of the Content type specified by its ID.
|
Modifier and Type | Method and Description |
---|---|
List<Integer> |
compatibility()
Retrieve the list of all compatible Content IDs in the form of an array.
|
boolean |
compatible(int id)
Gets the compatibility with another type.
|
boolean |
compatible(int id,
boolean value)
Sets the compatibility with another type.
|
boolean |
compatible(String id)
Gets the compatibility with another type.
|
boolean |
compatible(String id,
boolean value)
Sets the compatibility with another type.
|
String |
htmlFormat()
Gets the html format template for this Content.
|
String |
htmlFormat(String format)
Sets the html format template for this Content.
|
int |
id()
Gets the ID of the content type represented by this Content.
|
int |
id(int id)
Sets the ID of the content type represented by this Content.
|
Any |
jsonSerialize()
JSON serialization.
|
Content |
jsonUnserialize(Any json)
JSON unserialization.
|
Content |
jsonUnserialize(String json)
JSON unserialization.
|
Content |
merge(Content content)
Merges another content into this one.
|
String |
textFormat()
Gets the text format template for this Content.
|
String |
textFormat(String format)
Sets the text format template for this Content.
|
String |
toHtml()
Transform this Content into html.
|
String |
toHtml(String format)
Transform this Content into html.
|
String |
toText()
Transform this Content into text.
|
String |
toText(String format)
Transform this Content into text.
|
add, add, add, addAll, addAll, addAll, as, as, as, as, asBool, asBool, asBool, asBool, asDouble, asDouble, asDouble, asDouble, asInt, asInt, asInt, asInt, asLong, asLong, asLong, asLong, asNumber, asNumber, asNumber, asNumber, asString, asString, asString, asString, clear, contains, containsAll, containsKey, containsValue, empty, emptyList, emptyMap, entrySet, equals, exists, exists, fromJson, get, get, getCaseSensitiveKey, hashCode, indexOf, is, is, is, is, isBool, isBool, isBool, isBool, isDouble, isDouble, isDouble, isDouble, isEmpty, isEmpty, isEmpty, isInt, isInt, isInt, isInt, isList, isList, isList, isList, isLong, isLong, isLong, isLong, isMap, isMap, isMap, isMap, isNull, isNull, isNull, isNull, isNumber, isNumber, isNumber, isNumber, isString, isString, isString, isString, isValue, isValue, isValue, isValue, iterator, keys, keySet, lastIndexOf, list, listIterator, listIterator, map, pipe, pipe, put, put, put, put, putAll, putAll, remove, removeAll, retainAll, set, set, size, subList, toArray, toArray, toJson, toJson, toJson, toJson, toJson, toJson, toString, unwrap, unwrap, unwrap, values, wrap
public Content(int id)
id
- the Content type IDpublic Content(String id)
id
- the Content type IDpublic Content()
public Content merge(Content content)
content
- the content to merge into this onepublic boolean compatible(int id)
id
- the other Content IDpublic boolean compatible(String id)
id
- the other Content IDpublic boolean compatible(int id, boolean value)
id
- the other Content IDvalue
- whether or not the current Content is compatible with the one specifiedpublic boolean compatible(String id, boolean value)
id
- the other Content IDvalue
- whether or not the current Content is compatible with the one specifiedpublic List<Integer> compatibility()
public int id(int id)
id
- the content type IDpublic int id()
public String textFormat(String format)
format
- the text format templatepublic String textFormat()
public String htmlFormat(String format)
format
- the html format templatepublic String htmlFormat()
public String toText()
public String toHtml()
public String toText(String format)
format
- the text format templatepublic String toHtml(String format)
format
- the html format templatepublic Any jsonSerialize()
public Content jsonUnserialize(String json)
public Content jsonUnserialize(Any json)