Package org.ametys.plugins.odfsync.cdmfr
Class RemoteCDMFrSynchronizableContentsCollection
- java.lang.Object
-
- org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
-
- org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
-
- org.ametys.plugins.odfsync.cdmfr.AbstractCDMFrSynchronizableContentsCollection
-
- org.ametys.plugins.odfsync.cdmfr.RemoteCDMFrSynchronizableContentsCollection
-
- All Implemented Interfaces:
SynchronizableContentsCollection
,Configurable
,Serviceable
public class RemoteCDMFrSynchronizableContentsCollection extends AbstractCDMFrSynchronizableContentsCollection
Class to import remote CDMFr contents
-
-
Field Summary
Fields Modifier and Type Field Description protected ServiceManager
_manager
The service managerstatic String
PARAM_CDMFR_CATALOG
The name of the param to get the catalogstatic String
PARAM_CDMFR_IMPORTER_ROLE
The name of the param to get the role of the CDM-fr importerstatic String
PARAM_CDMFR_VALIDATE_AFTER_IMPORT
The name of the param to validate after importstatic String
PARAM_SHARED_WITH_TYPE
The name of the param to get the shared with type-
Fields inherited from class org.ametys.plugins.odfsync.cdmfr.AbstractCDMFrSynchronizableContentsCollection
_importCDMFrComponent
-
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_contentWorkflowHelper, _currentUserProvider, _hasGlobalError, _i18nUtils, _nbCreatedContents, _nbDeletedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, SCC_UNIQUE_ID
-
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_contentDAO, _contentPrefix, _contentType, _contentTypeEP, _id, _initialActionId, _label, _languages, _modelId, _modelParamValues, _removalSync, _reportMails, _resolver, _restrictedField, _sccHelper, _searchModelConfiguration, _synchronizeActionId, _synchronizeExistingContentsOnly, _synchronizingContentOperator, _validateActionId, _validateAfterImport, _workflowName
-
Fields inherited from interface org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollection
COLLECTION_ID_DATA_NAME, RESULT_NB_CREATED_CONTENTS, RESULT_NB_DELETED_CONTENTS, RESULT_NB_NOT_CHANGED_CONTENTS, RESULT_NB_SYNCHRONIZED_CONTENTS
-
-
Constructor Summary
Constructors Constructor Description RemoteCDMFrSynchronizableContentsCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureStaticParams(Configuration configuration)
Called inAbstractStaticSynchronizableContentsCollection.configure(Configuration)
for first configurations needed.protected String
getCatalog()
Get the catalogprotected String
getImportCDMFrRole()
Get the role of the CDM-fr importerprotected String
getSharedWithType()
Get the defined way to detect shared programList<ModifiableContent>
importContent(String idValue, Map<String,Object> additionalParameters, org.slf4j.Logger logger)
Import a content from remote values.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.plugins.odfsync.cdmfr.AbstractCDMFrSynchronizableContentsCollection
_getContentsToRemove, _internalPopulate, additionalCommonOperations, configureDataSource, configureSearchModel, getContent, getIdField, getLocalAndExternalFields, getTotalCount, search, synchronizeContent, updateSyncInformations
-
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_deleteContents, _getAdditionalInputsForContentCreation, _getContentPathQuery, _getExpressionsList, _hasSomethingChanged, _isParamNotEmpty, _logSynchronizationResult, _removeEmptyParameters, createContentAction, deleteUnexistingContents, empty, getSynchronizationResult, populate, sendErrorMail, validateContent
-
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_parseLanguages, _parseParameters, _transformRemoteValuesCardinality, configure, getContentPrefix, getContentType, getId, getInitialActionId, getLabel, getLanguages, getParameterValues, getReportMails, getRestrictedField, getSearchModelConfiguration, getSynchronizeActionId, getSynchronizeCollectionModelId, getSynchronizingContentOperator, getValidateActionId, getWorkflowName, removalSync, synchronizeExistingContentsOnly, validateAfterImport
-
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.contentio.synchronize.SynchronizableContentsCollection
additionalImportOperations, additionalSynchronizeOperations, handleRightAssignmentContext
-
-
-
-
Field Detail
-
PARAM_SHARED_WITH_TYPE
public static final String PARAM_SHARED_WITH_TYPE
The name of the param to get the shared with type- See Also:
- Constant Field Values
-
PARAM_CDMFR_IMPORTER_ROLE
public static final String PARAM_CDMFR_IMPORTER_ROLE
The name of the param to get the role of the CDM-fr importer- See Also:
- Constant Field Values
-
PARAM_CDMFR_CATALOG
public static final String PARAM_CDMFR_CATALOG
The name of the param to get the catalog- See Also:
- Constant Field Values
-
PARAM_CDMFR_VALIDATE_AFTER_IMPORT
public static final String PARAM_CDMFR_VALIDATE_AFTER_IMPORT
The name of the param to validate after import- See Also:
- Constant Field Values
-
_manager
protected ServiceManager _manager
The service manager
-
-
Constructor Detail
-
RemoteCDMFrSynchronizableContentsCollection
public RemoteCDMFrSynchronizableContentsCollection()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractCDMFrSynchronizableContentsCollection
- Throws:
ServiceException
-
configureStaticParams
protected void configureStaticParams(Configuration configuration) throws ConfigurationException
Description copied from class:AbstractStaticSynchronizableContentsCollection
Called inAbstractStaticSynchronizableContentsCollection.configure(Configuration)
for first configurations needed.- Overrides:
configureStaticParams
in classAbstractStaticSynchronizableContentsCollection
- Parameters:
configuration
- Configuration to read- Throws:
ConfigurationException
- If an error occurs
-
importContent
public List<ModifiableContent> importContent(String idValue, Map<String,Object> additionalParameters, org.slf4j.Logger logger) throws Exception
Description copied from interface:SynchronizableContentsCollection
Import a content from remote values.- Parameters:
idValue
- Id (for import/synchronization) of the content to importadditionalParameters
- Additional parameterslogger
- The logger- Returns:
- A list of created contents
- Throws:
Exception
- if an error occurs.
-
getSharedWithType
protected String getSharedWithType()
Get the defined way to detect shared program- Returns:
- The defined way to detect shared program
-
getImportCDMFrRole
protected String getImportCDMFrRole()
Get the role of the CDM-fr importer- Returns:
- the role of the CDM-fr importer
-
getCatalog
protected String getCatalog()
Get the catalog- Returns:
- the catalog
-
-