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
Modifier and TypeFieldDescriptionprotected ServiceManager
The service managerstatic final String
The name of the param to get the catalogstatic final String
The name of the param to get the role of the CDM-fr importerstatic final String
The name of the param to validate after importstatic final String
The name of the param to get the shared with typeFields 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, _ignoreRestrictions, _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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureStaticParams
(Configuration configuration) Called inAbstractStaticSynchronizableContentsCollection.configure(Configuration)
for first configurations needed.protected String
Get the catalogprotected String
Get the role of the CDM-fr importerprotected String
Get the defined way to detect shared programImport 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, ignoreRestrictions, 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 Details
-
PARAM_SHARED_WITH_TYPE
The name of the param to get the shared with type- See Also:
-
PARAM_CDMFR_IMPORTER_ROLE
The name of the param to get the role of the CDM-fr importer- See Also:
-
PARAM_CDMFR_CATALOG
The name of the param to get the catalog- See Also:
-
PARAM_CDMFR_VALIDATE_AFTER_IMPORT
The name of the param to validate after import- See Also:
-
_manager
The service manager
-
-
Constructor Details
-
RemoteCDMFrSynchronizableContentsCollection
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractCDMFrSynchronizableContentsCollection
- Throws:
ServiceException
-
configureStaticParams
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, Logger logger) throws ExceptionDescription 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.
-
getImportCDMFrRole
Get the role of the CDM-fr importer- Returns:
- the role of the CDM-fr importer
-
getCatalog
Get the catalog- Returns:
- the catalog
-