public class BinaryRepositoryElementType extends AbstractBinaryElementType implements ComplexRepositoryElementType<Binary>
_binaryType
TYPE_ID_DATA_NAME
Constructor and Description |
---|
BinaryRepositoryElementType() |
Modifier and Type | Method and Description |
---|---|
protected Object |
_singleValueToJSON(Binary value)
Convert the single value into a JSON object
|
protected void |
_singleValueToSAX(ContentHandler contentHandler,
String tagName,
Binary binary,
Locale locale)
Generates SAX events for the given single value
|
String |
getNodeType()
Retrieves the type of node used for this type
|
Binary |
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,
Binary 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, configure, 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
public BinaryRepositoryElementType()
public Binary readSingleValue(RepositoryData singleValueData)
ComplexRepositoryElementType
readSingleValue
in interface ComplexRepositoryElementType<Binary>
singleValueData
- repository data containing the valuepublic void writeSingleValue(ModifiableRepositoryData parentData, String name, Binary value)
ComplexRepositoryElementType
ComplexRepositoryElementType.write(ModifiableRepositoryData, String, Object)
method, once for each value if the value is an arraywriteSingleValue
in interface ComplexRepositoryElementType<Binary>
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 createdpublic boolean removeValueBeforeWritingIt()
ComplexRepositoryElementType
removeValueBeforeWritingIt
in interface ComplexRepositoryElementType<Binary>
true
if the previous value has to be removed, false
otherwisepublic String getNodeType()
ComplexRepositoryElementType
getNodeType
in interface ComplexRepositoryElementType<Binary>
protected void _singleValueToSAX(ContentHandler contentHandler, String tagName, Binary binary, Locale locale) throws SAXException
AbstractElementType
_singleValueToSAX
in class AbstractElementType<Binary>
contentHandler
- the ContentHandler
that will receive the SAX eventstagName
- the tag name of the SAX event to generate.binary
- 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(Binary value)
AbstractElementType
_singleValueToJSON
in class AbstractElementType<Binary>
value
- the value to convert