Class AbstractDataSourceSynchronizableContentsCollection
java.lang.Object
org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
org.ametys.plugins.contentio.synchronize.impl.AbstractDataSourceSynchronizableContentsCollection
- All Implemented Interfaces:
SynchronizableContentsCollection,Configurable,Serviceable
- Direct Known Subclasses:
LDAPSynchronizableContentsCollection,SQLSynchronizableContentsCollection
public abstract class AbstractDataSourceSynchronizableContentsCollection
extends AbstractSimpleSynchronizableContentsCollection
Abstract implementation of
SynchronizableContentsCollection to be synchronized with a data source-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringName of parameter holding the data source idprotected static final StringName of parameter holding the data source idprotected static final StringName of parameter holding the fields mappingprotected static final StringName of parameter into mapping holding the remote attributeprotected static final StringName of parameter into mapping holding the path of metadataprotected static final StringName of parameter into mapping holding the synchronized propertyColumns and criteria for searchprotected JSONUtilsThe JSON UtilsMapping of the metadata with source dataSynchronized fieldsFields inherited from class org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
_contentHelper, _synchronizingContentOperatorEPFields inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_contentWorkflowHelper, _currentUserProvider, _hasGlobalError, _i18nUtils, _nbCreatedContents, _nbDeletedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, _userLanguagesManager, SCC_UNIQUE_IDFields inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_checkCollection, _compatibleSCC, _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, LAST_SYNCHRONIZATION_DATA_NAME, LAST_SYNCHRONIZATION_USER_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 voidconfigureDataSource(Configuration configuration) Configure the data source parameters.protected voidConfigure the search model used by SCCSearchTool.Get the id of data sourceGet the path of metadata holding the unique identifiergetLocalAndExternalFields(Map<String, Object> additionalParameters) Get the path of tri-state fields (with local and external values)Get the field mappinggetRemoteValues(Map<String, Object> searchParameters, org.slf4j.Logger logger) Search values and return the result organized by attributesputIdParameter(String idValue) Set search parameters for the ID value.voidservice(ServiceManager smanager) Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
_addEditInputsForSCC, _editContent, _fillContent, _getContentsToRemove, _getEditInputs, _getEditInputsContextParameters, _handleContent, _importContent, _importOrSynchronizeContent, _importOrSynchronizeContent, _importOrSynchronizeContents, _importOrSynchronizeContents, _internalPopulate, _isHandled, _synchronizeContent, _transformRemoteValues, configure, createContentAction, ensureTitleIsPresent, getAdditionalAttributeValues, getContent, getNotSynchronizedRelatedContentIds, getTotalCount, getTransformedRemoteValues, importContent, internalSearch, populate, search, synchronizeContent, updateSyncInformations, validateContentMethods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_deleteContents, _getAdditionalInputsForContentCreation, _getContentPathQuery, _getExpressionsList, _hasSomethingChanged, _internalPopulate, _isParamNotEmpty, _logSynchronizationResult, _removeEmptyParameters, _removeSCCOrDeleteContents, createContentAction, deleteUnexistingContents, empty, getSynchronizationResult, sendErrorMail, validateContentMethods inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_parseMultipleValuesConf, _parseParameters, _transformRemoteValuesCardinality, checkCollection, configureStaticParams, getCompatibleSCC, 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
additionalCommonOperations, additionalImportOperations, additionalSynchronizeOperations, handleRightAssignmentContext
-
Field Details
-
__PARAM_DATASOURCE_ID
Name of parameter holding the data source id- See Also:
-
__PARAM_FIELD_ID
Name of parameter holding the data source id- See Also:
-
__PARAM_MAPPING
Name of parameter holding the fields mapping- See Also:
-
__PARAM_MAPPING_SYNCHRO
Name of parameter into mapping holding the synchronized property- See Also:
-
__PARAM_MAPPING_METADATA_REF
Name of parameter into mapping holding the path of metadata- See Also:
-
__PARAM_MAPPING_ATTRIBUTE
Name of parameter into mapping holding the remote attribute- See Also:
-
_jsonUtils
The JSON Utils -
_mapping
Mapping of the metadata with source data -
_columnsAndCriteria
Columns and criteria for search -
_syncFields
Synchronized fields
-
-
Constructor Details
-
AbstractDataSourceSynchronizableContentsCollection
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractSimpleSynchronizableContentsCollection- Throws:
ServiceException
-
getIdField
Description copied from interface:SynchronizableContentsCollectionGet the path of metadata holding the unique identifier- Returns:
- the path to the metadata. Can be null.
-
getDataSourceId
Get the id of data source- Returns:
- The id of data source
-
configureDataSource
Description copied from class:AbstractStaticSynchronizableContentsCollectionConfigure the data source parameters.- Specified by:
configureDataSourcein classAbstractStaticSynchronizableContentsCollection- Parameters:
configuration- Configuration to read- Throws:
ConfigurationException- If an error occurs
-
configureSearchModel
Description copied from class:AbstractStaticSynchronizableContentsCollectionConfigure the search model used by SCCSearchTool.- Specified by:
configureSearchModelin classAbstractStaticSynchronizableContentsCollection
-
getLocalAndExternalFields
Description copied from interface:SynchronizableContentsCollectionGet the path of tri-state fields (with local and external values)- Parameters:
additionalParameters- Additional parameters- Returns:
- the synchronized fields
-
getMapping
Get the field mapping- Returns:
- The mapping
-
putIdParameter
Description copied from class:AbstractSimpleSynchronizableContentsCollectionSet search parameters for the ID value.- Specified by:
putIdParameterin classAbstractSimpleSynchronizableContentsCollection- Parameters:
idValue- Value to search- Returns:
- Map with the search parameters
-
getRemoteValues
protected Map<String,Map<String, getRemoteValuesList<Object>>> (Map<String, Object> searchParameters, org.slf4j.Logger logger) Description copied from class:AbstractSimpleSynchronizableContentsCollectionSearch values and return the result organized by attributes- Specified by:
getRemoteValuesin classAbstractSimpleSynchronizableContentsCollection- Parameters:
searchParameters- Search parameters to restrict the searchlogger- The logger- Returns:
- Map of results organized by attributes.
-