Class AbstractODFSynchronizingContentOperator
java.lang.Object
org.ametys.plugins.contentio.synchronize.impl.DefaultSynchronizingContentOperator
org.ametys.plugins.odfsync.scc.operator.AbstractODFSynchronizingContentOperator
- All Implemented Interfaces:
SynchronizingContentOperator
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
ApogeeSynchronizingContentOperator
,PegaseSynchronizingContentOperator
public abstract class AbstractODFSynchronizingContentOperator
extends DefaultSynchronizingContentOperator
implements Serviceable
The abstract ODF synchronizing content operator. Each implementation can override this to add its helper role and specific mappings.
-
Field Summary
Modifier and TypeFieldDescriptionprotected ContentTypeExtensionPoint
The content type extension pointprotected ODFSynchronizingContentOperatorHelper
The connector conversion helperFields inherited from class org.ametys.plugins.contentio.synchronize.impl.DefaultSynchronizingContentOperator
_label, _pluginName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getFirstValueAsString
(List<Object> values) Get the first value as a string.protected String
_getReferenceTableEntryId
(ContentAttributeDefinition definition, String value, Logger logger) Get the id of content associated with the given attribute value_transformAttributeValues
(ModelItem definition, List<Object> values, Logger logger) Transform the given attribute values_transformContentAttributeValues
(ContentAttributeDefinition definition, List<Object> values, Logger logger) Transform the given values to content IDs, using Apogée conversion if needed._transformRichTextAttributeValues
(ElementDefinition definition, List<Object> values, Logger logger) Transform the given values to concatenate them and get the final rich text valueprotected abstract String
Get the SCC operator helper for the current implementation.void
service
(ServiceManager manager) Transforms the remote values of aSynchronizableContentsCollection
before synchronizing attributes.Methods inherited from class org.ametys.plugins.contentio.synchronize.impl.DefaultSynchronizingContentOperator
additionalOperation, configure, getLabel, setPluginInfo
-
Field Details
-
_odfSCCOperatorHelper
The connector conversion helper -
_contentTypeEP
The content type extension point
-
-
Constructor Details
-
AbstractODFSynchronizingContentOperator
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getHelperRole
Get the SCC operator helper for the current implementation.- Returns:
- a SCC operator helper role
-
transform
public Map<String,List<Object>> transform(ContentType contentType, Map<String, List<Object>> remoteValues, Logger logger) Description copied from interface:SynchronizingContentOperator
Transforms the remote values of aSynchronizableContentsCollection
before synchronizing attributes.- Specified by:
transform
in interfaceSynchronizingContentOperator
- Overrides:
transform
in classDefaultSynchronizingContentOperator
- Parameters:
contentType
- The content typeremoteValues
- The remote values to transformlogger
- The logger- Returns:
- The transformed remote values
-
_transformAttributeValues
protected List<Object> _transformAttributeValues(ModelItem definition, List<Object> values, Logger logger) Transform the given attribute values- Parameters:
definition
- The definition of the attributevalues
- The values to transformlogger
- The logger- Returns:
- The transformed values
-
_transformContentAttributeValues
protected List<Object> _transformContentAttributeValues(ContentAttributeDefinition definition, List<Object> values, Logger logger) Transform the given values to content IDs, using Apogée conversion if needed.- Parameters:
definition
- The definition of the attributevalues
- The values to transformlogger
- The logger- Returns:
- The corresponding content IDs of the values
-
_getReferenceTableEntryId
protected String _getReferenceTableEntryId(ContentAttributeDefinition definition, String value, Logger logger) Get the id of content associated with the given attribute value- Parameters:
definition
- The definition of the attributevalue
- The attribute valuelogger
- The logger- Returns:
- The id of content or null if no match found
-
_transformRichTextAttributeValues
protected List<Object> _transformRichTextAttributeValues(ElementDefinition definition, List<Object> values, Logger logger) Transform the given values to concatenate them and get the final rich text value- Parameters:
definition
- The definition of the attributevalues
- The values to transformlogger
- The logger- Returns:
- The concatenated values
-
_getFirstValueAsString
Get the first value as a string.- Parameters:
values
- The list of values to iterate on- Returns:
- The first value as a string or null
-