Class ApogeeSynchronizingContentOperatorHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.odfsync.apogee.scc.operator.ApogeeSynchronizingContentOperatorHelper
-
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Serviceable
public class ApogeeSynchronizingContentOperatorHelper extends AbstractLogEnabled implements Component, Serviceable, Initializable
Get mapped values from Apogée to Ametys.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,Map<String,String>>
_codeMappings
Mappings Apogee code - Ametys codeprotected OdfReferenceTableHelper
_odfRefTableHelper
The ODF TableRef Helperprotected SourceResolver
_srcResolver
The source resolverstatic String
ROLE
The Avalon Role
-
Constructor Summary
Constructors Constructor Description ApogeeSynchronizingContentOperatorHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String
_getConvertedCode(String apogeeCode, String contentTypeId)
private Optional<OdfReferenceTableEntry>
_getReferenceTableEntryFromMapping(String apogeeCode, String contentTypeId)
private Map<String,String>
_readMapping(String contentTypeId)
String
getReferenceTableEntryId(String contentTypeId, String apogeeCode)
Get the id of content associated with this Apogee codevoid
initialize()
void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_srcResolver
protected SourceResolver _srcResolver
The source resolver
-
_odfRefTableHelper
protected OdfReferenceTableHelper _odfRefTableHelper
The ODF TableRef Helper
-
-
Constructor Detail
-
ApogeeSynchronizingContentOperatorHelper
public ApogeeSynchronizingContentOperatorHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
getReferenceTableEntryId
public String getReferenceTableEntryId(String contentTypeId, String apogeeCode)
Get the id of content associated with this Apogee code- Parameters:
contentTypeId
- The content type idapogeeCode
- The code into Apogee- Returns:
- The id of content or null if no match found
-
_getReferenceTableEntryFromMapping
private Optional<OdfReferenceTableEntry> _getReferenceTableEntryFromMapping(String apogeeCode, String contentTypeId)
-
_getConvertedCode
private String _getConvertedCode(String apogeeCode, String contentTypeId)
-
_readMapping
private Map<String,String> _readMapping(String contentTypeId)
-
-