public class RichTextRepositoryElementType extends AbstractRichTextElementType implements ComplexRepositoryElementType<RichText>
Modifier and Type | Field and Description |
---|---|
private static String |
__ANNOTATIONS_IDENTIFIER |
private static String |
__FILE_CONTENT_IDENTIFIER |
private static String |
__FOLDER_IDENTIFIER |
TYPE_ID_DATA_NAME
Constructor and Description |
---|
RichTextRepositoryElementType() |
Modifier and Type | Method and Description |
---|---|
private ModifiableRepositoryData |
_getFileResourceRepositoryData(ModifiableRepositoryData folderData,
String filename) |
protected Object |
_singleValueToJSON(RichText value)
Convert the single value into a JSON object
|
protected void |
_singleValueToSAX(ContentHandler contentHandler,
String tagName,
RichText richText,
Locale locale)
Generates SAX events for the given single value
|
private void |
_writeAnnotations(ModifiableRepositoryData richTextData,
Map<String,List<String>> annotations) |
private void |
_writeAttachments(ModifiableRepositoryData richTextData,
RichText richText) |
String |
getNodeType()
Retrieves the type of node used for this type
|
RichText |
readSingleValue(RepositoryData singleValueData)
Read the single value in the given repository data
|
boolean |
removeValueBeforeWritingIt()
Determines if the existing value has to be removed before writing the new one
|
void |
writeSingleValue(ModifiableRepositoryData parentData,
String name,
RichText value)
Write the single value into the given repository data
This method is called by the
ComplexRepositoryElementType.write(ModifiableRepositoryData, String, Object) method, once for each value if the value is an array |
castValue, fromJSONForClient, isSimple, parseConfiguration, toString
getManagedClass, getManagedClassArray, isCompatible, valueToJSONForClient, valueToSAX
getId, setPluginInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isCompatible, read, write
castValue, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueToJSONForClient
getId, valueToSAX
setPluginInfo
private static final String __ANNOTATIONS_IDENTIFIER
private static final String __FOLDER_IDENTIFIER
private static final String __FILE_CONTENT_IDENTIFIER
public RichTextRepositoryElementType()
public RichText readSingleValue(RepositoryData singleValueData)
ComplexRepositoryElementType
readSingleValue
in interface ComplexRepositoryElementType<RichText>
singleValueData
- repository data containing the valuepublic void writeSingleValue(ModifiableRepositoryData parentData, String name, RichText value)
ComplexRepositoryElementType
ComplexRepositoryElementType.write(ModifiableRepositoryData, String, Object)
method, once for each value if the value is an arraywriteSingleValue
in interface ComplexRepositoryElementType<RichText>
parentData
- repository where to store the single value.name
- the name of the element to writevalue
- the single value to write. Can be null. In this case, an empty data must be createdprivate void _writeAnnotations(ModifiableRepositoryData richTextData, Map<String,List<String>> annotations)
private void _writeAttachments(ModifiableRepositoryData richTextData, RichText richText)
private ModifiableRepositoryData _getFileResourceRepositoryData(ModifiableRepositoryData folderData, String filename)
public boolean removeValueBeforeWritingIt()
ComplexRepositoryElementType
removeValueBeforeWritingIt
in interface ComplexRepositoryElementType<RichText>
true
if the previous value has to be removed, false
otherwisepublic String getNodeType()
ComplexRepositoryElementType
getNodeType
in interface ComplexRepositoryElementType<RichText>
protected void _singleValueToSAX(ContentHandler contentHandler, String tagName, RichText richText, Locale locale) throws SAXException
AbstractElementType
_singleValueToSAX
in class AbstractElementType<RichText>
contentHandler
- the ContentHandler
that will receive the SAX eventstagName
- the tag name of the SAX event to generate.richText
- the single value to SAXlocale
- The locale to use for localized data. Can be null
to generate SAX events for all existing Locale
s.SAXException
- if an error occurs during the SAX events generationprotected Object _singleValueToJSON(RichText value)
AbstractElementType
_singleValueToJSON
in class AbstractElementType<RichText>
value
- the value to convert