public class FileRepositoryElementType extends AbstractFileElementType implements RepositoryElementType<File>
__EXPLORER_FILE_TYPE, _binaryType, _resolver
Constructor and Description |
---|
FileRepositoryElementType() |
Modifier and Type | Method and Description |
---|---|
private Object |
_readFileFromBinaryData(RepositoryData parentData,
String name) |
private Object |
_readFileFromStringData(RepositoryData parentData,
String name) |
private void |
_writeMultipleBinaryValue(ModifiableRepositoryData parentData,
String name,
Object value) |
boolean |
isCompatible(RepositoryData parentData,
String name)
Checks if the value in the given repository data is compatible with the item type
|
Object |
read(RepositoryData parentData,
String name)
Read the value in the given repository data
|
void |
write(ModifiableRepositoryData parentData,
String name,
Object value)
Write the value into the given repository data
|
_hasAmetysObjectsForIdentifiers, castValue, configure, fromJSONForClient, isSimple, parseConfiguration, service, toString, valueToJSONForClient, valueToSAX
_singleValueToJSON, _singleValueToSAX, getManagedClass, getManagedClassArray, isCompatible
getId, setPluginInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
castValue, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueToJSONForClient
getId, valueToSAX
setPluginInfo
public FileRepositoryElementType()
public boolean isCompatible(RepositoryData parentData, String name) throws UnknownDataException
RepositoryModelItemType
isCompatible
in interface RepositoryModelItemType
parentData
- repository data containing the data to checkname
- the name of the data to checktrue
if the data type matches the current type, false
otherwiseUnknownDataException
- if there is no data in the parent repository data with this namepublic Object read(RepositoryData parentData, String name) throws BadItemTypeException, AmetysRepositoryException
RepositoryElementType
read
in interface RepositoryElementType<File>
parentData
- repository data containing the valuename
- the name of the element to readBadItemTypeException
- if the reading value doesn't match this element typeAmetysRepositoryException
private Object _readFileFromStringData(RepositoryData parentData, String name)
private Object _readFileFromBinaryData(RepositoryData parentData, String name)
public void write(ModifiableRepositoryData parentData, String name, Object value) throws BadItemTypeException
RepositoryElementType
write
in interface RepositoryElementType<File>
parentData
- repository where to store the value.name
- the name of the element to writevalue
- the value to write. Can be a T or a T[]. That's why it is an ObjectBadItemTypeException
- If the given value doesn't match this element typeprivate void _writeMultipleBinaryValue(ModifiableRepositoryData parentData, String name, Object value)