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
FieldsModifier and TypeFieldDescriptionprotected ServiceManagerThe service managerstatic final StringThe name of the param to get the catalogstatic final StringThe name of the param to get the role of the CDM-fr importerstatic final StringThe name of the param to validate after importstatic final StringThe name of the param to get the shared with typeFields inherited from class org.ametys.plugins.odfsync.cdmfr.AbstractCDMFrSynchronizableContentsCollection
_importCDMFrComponentFields inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_contentWorkflowHelper, _currentUserProvider, _hasGlobalError, _i18nUtils, _nbCreatedContents, _nbDeletedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, SCC_UNIQUE_IDFields 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, _workflowNameFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureStaticParams(Configuration configuration) Called inAbstractStaticSynchronizableContentsCollection.configure(Configuration)for first configurations needed.protected StringGet the catalogprotected StringGet the role of the CDM-fr importerprotected StringGet the defined way to detect shared programImport a content from remote values.voidservice(ServiceManager manager) Methods inherited from class org.ametys.plugins.odfsync.cdmfr.AbstractCDMFrSynchronizableContentsCollection
_getContentsToRemove, _internalPopulate, additionalCommonOperations, configureDataSource, configureSearchModel, getContent, getIdField, getLocalAndExternalFields, getTotalCount, search, synchronizeContent, updateSyncInformationsMethods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_deleteContents, _getAdditionalInputsForContentCreation, _getContentPathQuery, _getExpressionsList, _hasSomethingChanged, _isParamNotEmpty, _logSynchronizationResult, _removeEmptyParameters, createContentAction, deleteUnexistingContents, empty, getSynchronizationResult, populate, sendErrorMail, validateContentMethods 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, validateAfterImportMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
servicein interfaceServiceable- Overrides:
servicein classAbstractCDMFrSynchronizableContentsCollection- Throws:
ServiceException
-
configureStaticParams
Description copied from class:AbstractStaticSynchronizableContentsCollectionCalled inAbstractStaticSynchronizableContentsCollection.configure(Configuration)for first configurations needed.- Overrides:
configureStaticParamsin 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:SynchronizableContentsCollectionImport 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
-