Class ResourceReferenceRepositoryElementType
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.model.type.AbstractModelItemType
org.ametys.core.model.type.AbstractElementType<AbstractResourceReferenceElementType.ResourceReference>
org.ametys.plugins.workspaces.activities.documents.AbstractResourceReferenceElementType
org.ametys.plugins.workspaces.activities.documents.ResourceReferenceRepositoryElementType
- All Implemented Interfaces:
ComplexRepositoryElementType<AbstractResourceReferenceElementType.ResourceReference>
,RepositoryElementType<AbstractResourceReferenceElementType.ResourceReference>
,RepositoryModelItemType
,ElementType<AbstractResourceReferenceElementType.ResourceReference>
,ModelItemType
,LogEnabled
,PluginAware
,Component
,Serviceable
public class ResourceReferenceRepositoryElementType
extends AbstractResourceReferenceElementType
implements ComplexRepositoryElementType<AbstractResourceReferenceElementType.ResourceReference>
Implementation for storing ResourceReference in the repository
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.workspaces.activities.documents.AbstractResourceReferenceElementType
AbstractResourceReferenceElementType.ResourceReference
-
Field Summary
Fields inherited from class org.ametys.core.model.type.AbstractElementType
_jsonUtils
Fields inherited from interface org.ametys.plugins.repository.data.type.ComplexRepositoryElementType
TYPE_ID_DATA_NAME
Fields inherited from interface org.ametys.plugins.repository.data.type.RepositoryModelItemType
EMPTY_METADATA_SUFFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the type of repository data used for this typeboolean
isSingleValueEmpty
(RepositoryData singleValueData) Checks if the single value is emptyreadSingleValue
(RepositoryData singleValueData) Read the single value in the given repository datavoid
writeSingleValue
(ModifiableRepositoryData parentData, String name, AbstractResourceReferenceElementType.ResourceReference value) Write the single value into the given repository data This method is called by theComplexRepositoryElementType.write(ModifiableRepositoryData, String, Object)
method, once for each value if the value is an arrayMethods inherited from class org.ametys.plugins.workspaces.activities.documents.AbstractResourceReferenceElementType
_singleValueFromXML, _singleValueToJSON, _singleValueToSAX, _useJSONForEdition, convertValue, fromJSONForClient, isSimple, toString
Methods inherited from class org.ametys.core.model.type.AbstractElementType
_compareMultipleValues, _compareSingleValues, _getValueAttributes, _isMultiple, _isSingle, _isValueFromXMLMultiple, _singleValueToJSONForEdition, _valueToJSON, _valueToSAX, _valueToSAX, _valueToSAXForEdition, castValue, compareValues, getManagedClass, getManagedClassArray, isCompatible, parseConfiguration, service, valueFromXML, valueToJSONForClient, valueToJSONForEdition, valueToSAX, valueToSAXForEdition
Methods inherited from class org.ametys.core.model.type.AbstractModelItemType
getId, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.data.type.ComplexRepositoryElementType
emptySingleValue, hasNonEmptyValue, isCompatible, read, removeValueBeforeWritingIt, write
Methods inherited from interface org.ametys.runtime.model.type.ElementType
castValue, compareValues, fromJSONForClient, getManagedClass, getManagedClassArray, isCompatible, isSimple, parseConfiguration, toString, valueFromXML
Methods inherited from interface org.ametys.runtime.model.type.ModelItemType
getId, valueToJSONForClient, valueToJSONForClient, valueToJSONForEdition, valueToSAX, valueToSAX, valueToSAXForEdition
Methods inherited from interface org.ametys.runtime.plugin.component.PluginAware
setPluginInfo
Methods inherited from interface org.ametys.plugins.repository.data.type.RepositoryElementType
externalizableValueToJSON
Methods inherited from interface org.ametys.plugins.repository.data.type.RepositoryModelItemType
hasValue, isMultiple, remove
-
Constructor Details
-
ResourceReferenceRepositoryElementType
-
-
Method Details
-
getRepositoryDataType
Description copied from interface:RepositoryModelItemType
Retrieves the type of repository data used for this type- Specified by:
getRepositoryDataType
in interfaceRepositoryModelItemType
- Returns:
- the type of repository data used for this type
-
isSingleValueEmpty
Description copied from interface:ComplexRepositoryElementType
Checks if the single value is empty- Specified by:
isSingleValueEmpty
in interfaceComplexRepositoryElementType<AbstractResourceReferenceElementType.ResourceReference>
- Parameters:
singleValueData
- repository data containing the value to check- Returns:
true
if the value is empty,false
otherwise
-
readSingleValue
public AbstractResourceReferenceElementType.ResourceReference readSingleValue(RepositoryData singleValueData) Description copied from interface:ComplexRepositoryElementType
Read the single value in the given repository data- Specified by:
readSingleValue
in interfaceComplexRepositoryElementType<AbstractResourceReferenceElementType.ResourceReference>
- Parameters:
singleValueData
- repository data containing the value- Returns:
- the value. Can return null if the given data does not contain the necessary elements
-
writeSingleValue
public void writeSingleValue(ModifiableRepositoryData parentData, String name, AbstractResourceReferenceElementType.ResourceReference value) Description copied from interface:ComplexRepositoryElementType
Write the single value into the given repository data This method is called by theComplexRepositoryElementType.write(ModifiableRepositoryData, String, Object)
method, once for each value if the value is an array- Specified by:
writeSingleValue
in interfaceComplexRepositoryElementType<AbstractResourceReferenceElementType.ResourceReference>
- Parameters:
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 created
-