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
_contentTypeEP, _currentUserProvider, _hasGlobalError, _i18nUtils, _nbCreatedContents, _nbDeletedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, _synchroComponent, SCC_UNIQUE_ID
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_contentDAO, _contentPrefix, _contentType, _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_PROPERTY
-
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, configureDataSource, configureSearchModel, getContent, getExternalOnlyFields, getIdField, getLocalAndExternalFields, getTotalCount, search, synchronizeContent, updateSyncInformations
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_deleteContents, _getContentPathQuery, _getExpressionsList, _getMetadataHolder, _isParamNotEmpty, _removeEmptyParameters, _removeMetadataIfExists, _synchronizeMetadata, _updateRelation, _updateRelation, applyChanges, applyChanges, createContentAction, deleteUnexistingContents, empty, populate, sendErrorMail, updateSCCProperty, validateContent
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_parseLanguages, _parseParameters, 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
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<ModifiableDefaultContent> 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
-