Class ODFSynchronizingContentOperatorHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.odfsync.generic.scc.AbstractMappingHelper
org.ametys.plugins.odfsync.scc.operator.ODFSynchronizingContentOperatorHelper
- All Implemented Interfaces:
FileReloader,LogEnabled,PluginAware,Initializable,Component,Configurable,Serviceable
Get mapped values from a given connector to Ametys.
-
Field Summary
FieldsFields inherited from class org.ametys.plugins.odfsync.generic.scc.AbstractMappingHelper
_cacheManager, _fileReloaderUtils, _implementationName, _srcResolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String_getConvertedCode(String connectorCode, String contentTypeId) Get the converter code of the connector code from the mapped values.protected Optional<OdfReferenceTableEntry> _getReferenceTableEntry(String contentTypeId, String connectorCode) Get the reference table entry from the connector codeprotected Optional<OdfReferenceTableEntry> _getReferenceTableEntryFromMapping(String connectorCode, String contentTypeId) Get the reference table entry from the connector code in the mapped values.voidconfigure(Configuration configuration) protected I18nizableTextGet the cache description.protected I18nizableTextGet the cache label.getReferenceTableEntryId(String contentTypeId, String connectorCode) Get the id of content associated with this connector codevoidservice(ServiceManager manager) Methods inherited from class org.ametys.plugins.odfsync.generic.scc.AbstractMappingHelper
_readMapping, getId, initialize, setPluginInfo, updateFileMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_odfRefTableHelper
The ODF TableRef Helper
-
-
Constructor Details
-
ODFSynchronizingContentOperatorHelper
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractMappingHelper- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractMappingHelper- Throws:
ConfigurationException
-
getReferenceTableEntryId
Get the id of content associated with this connector code- Parameters:
contentTypeId- The content type idconnectorCode- The code into the connector- Returns:
- The id of content or null if no match found
-
_getReferenceTableEntry
protected Optional<OdfReferenceTableEntry> _getReferenceTableEntry(String contentTypeId, String connectorCode) Get the reference table entry from the connector code- Parameters:
contentTypeId- The content type identifierconnectorCode- The connector code- Returns:
- the table entry corresponding to the given connector code
-
_getReferenceTableEntryFromMapping
protected Optional<OdfReferenceTableEntry> _getReferenceTableEntryFromMapping(String connectorCode, String contentTypeId) Get the reference table entry from the connector code in the mapped values.- Parameters:
connectorCode- The initial connector codecontentTypeId- The content type identifier- Returns:
- the table entry corresponding to the given connector code
-
_getConvertedCode
Get the converter code of the connector code from the mapped values. It the code does not correspond to any entry, the code itself is returned.- Parameters:
connectorCode- The initial connector codecontentTypeId- The content type identifier- Returns:
- The converted code or the connector code itself
-
getCacheLabel
Description copied from class:AbstractMappingHelperGet the cache label.- Specified by:
getCacheLabelin classAbstractMappingHelper- Returns:
- the cache label
-
getCacheDescription
Description copied from class:AbstractMappingHelperGet the cache description.- Specified by:
getCacheDescriptionin classAbstractMappingHelper- Returns:
- the cache description
-