Class SQLSynchronizableUsersCollection
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
org.ametys.plugins.contentio.synchronize.impl.SQLSynchronizableContentsCollection
org.ametys.plugins.userdirectory.synchronize.SQLSynchronizableUsersCollection
- All Implemented Interfaces:
SynchronizableContentsCollection
,Component
,Configurable
,Serviceable
SQL synchronizable collection for users
-
Field Summary
Modifier and TypeFieldDescriptionprotected DeleteUserComponent
The delete user componentprotected UserManager
The user managerprotected UserSCCHelper
The user SCC helperFields inherited from class org.ametys.plugins.contentio.synchronize.impl.SQLSynchronizableContentsCollection
_sqlCollectionDAO
Fields inherited from class org.ametys.plugins.contentio.synchronize.impl.AbstractDataSourceSynchronizableContentsCollection
__PARAM_DATASOURCE_ID, __PARAM_FIELD_ID, __PARAM_MAPPING, __PARAM_MAPPING_ATTRIBUTE, __PARAM_MAPPING_METADATA_REF, __PARAM_MAPPING_SYNCHRO, _columnsAndCriteria, _extFields, _jsonUtils, _mapping, _syncFields
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
_contentHelper, _synchronizingContentOperatorEP
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 boolean
_checkIdObjectValue
(String remoteKey, Object idObjectValue, Logger logger) Check if the id object value is correctprotected int
_deleteContents
(List<Content> contentsToRemove, Logger logger) Delete contents.protected boolean
_fillContent
(Map<String, List<Object>> remoteValues, ModifiableDefaultContent content, boolean create, Logger logger) Fill the content with remote values._getSearchParameters
(Map<String, Object> parameters, int offset, int limit, List<Object> sort, List<String> columns) Get the parameters map for mybatis searchGet the path of metadata holding the unique identifierGet the login column name of user SQL tableGet the field mappingGet population Idboolean
Return true if aRightAssignmentContext
should be automatically generated for the contents of this SCCvoid
service
(ServiceManager smanager) Methods inherited from class org.ametys.plugins.contentio.synchronize.impl.SQLSynchronizableContentsCollection
_getNormalizedSearchResult, _getTotalCounParameters, _normalizeSearchResult, getTableName, getTotalCount, internalSearch
Methods inherited from class org.ametys.plugins.contentio.synchronize.impl.AbstractDataSourceSynchronizableContentsCollection
configureDataSource, configureSearchModel, getDataSourceId, getExternalOnlyFields, getLocalAndExternalFields, getRemoteValues, putIdParameter
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
_getContentsToRemove, _getIdFieldValue, _handleContent, _importContent, _importOrSynchronizeContent, _importOrSynchronizeContent, _importOrSynchronizeContents, _internalPopulate, _isHandled, _synchronizeContent, additionalCommonOperations, additionalImportOperations, additionalSynchronizeOperations, configure, createContentAction, getContent, getTransformedRemoteValues, importContent, populate, search, synchronizeContent, updateSyncInformations, validateContent
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_getContentPathQuery, _getExpressionsList, _getMetadataHolder, _isParamNotEmpty, _removeEmptyParameters, _removeMetadataIfExists, _synchronizeMetadata, _updateRelation, _updateRelation, applyChanges, applyChanges, createContentAction, deleteUnexistingContents, empty, sendErrorMail, updateSCCProperty, validateContent
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_parseLanguages, _parseParameters, configureStaticParams, getContentPrefix, getContentType, getId, getInitialActionId, getLabel, getLanguages, getParameterValues, getReportMails, getRestrictedField, getSearchModelConfiguration, getSynchronizeActionId, getSynchronizeCollectionModelId, getSynchronizingContentOperator, getValidateActionId, getWorkflowName, removalSync, synchronizeExistingContentsOnly, validateAfterImport
-
Field Details
-
_userSCCHelper
The user SCC helper -
_userManager
The user manager -
_deleteUserComponent
The delete user component
-
-
Constructor Details
-
SQLSynchronizableUsersCollection
public SQLSynchronizableUsersCollection()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classSQLSynchronizableContentsCollection
- Throws:
ServiceException
-
handleRightAssignmentContext
Description copied from interface:SynchronizableContentsCollection
Return true if aRightAssignmentContext
should be automatically generated for the contents of this SCC- Returns:
- true to automatically generate a
RightAssignmentContext
. Return false if the rights of contents of this SCC are handle by its ownRightAssignmentContext
-
getIdField
Description copied from interface:SynchronizableContentsCollection
Get the path of metadata holding the unique identifier- Specified by:
getIdField
in interfaceSynchronizableContentsCollection
- Overrides:
getIdField
in classAbstractDataSourceSynchronizableContentsCollection
- Returns:
- the path to the metadata. Can be null.
-
getMapping
Description copied from class:AbstractDataSourceSynchronizableContentsCollection
Get the field mapping- Overrides:
getMapping
in classAbstractDataSourceSynchronizableContentsCollection
- Returns:
- The mapping
-
getLoginSQLColumnName
Get the login column name of user SQL table- Returns:
- The login column name of user SQL table
-
getPopulationId
Get population Id- Returns:
- The population Id
-
_getSearchParameters
protected Map<String,Object> _getSearchParameters(Map<String, Object> parameters, int offset, int limit, List<Object> sort, List<String> columns) Description copied from class:SQLSynchronizableContentsCollection
Get the parameters map for mybatis search- Overrides:
_getSearchParameters
in classSQLSynchronizableContentsCollection
- Parameters:
parameters
- the filter parameteroffset
- the offsetlimit
- the limitsort
- the sort mapcolumns
- the list of columns- Returns:
- the parameter map
-
_fillContent
protected boolean _fillContent(Map<String, List<Object>> remoteValues, ModifiableDefaultContent content, boolean create, Logger logger) Description copied from class:AbstractSimpleSynchronizableContentsCollection
Fill the content with remote values.- Overrides:
_fillContent
in classAbstractSimpleSynchronizableContentsCollection
- Parameters:
remoteValues
- The remote valuescontent
- The content to synchronizecreate
-true
if content is creating, false if it is updatedlogger
- The logger- Returns:
true
if changes were made
-
_checkIdObjectValue
Description copied from class:SQLSynchronizableContentsCollection
Check if the id object value is correct- Overrides:
_checkIdObjectValue
in classSQLSynchronizableContentsCollection
- Parameters:
remoteKey
- the remove keyidObjectValue
- the id object valuelogger
- the logger- Returns:
- true if the id object value is correct
-
_deleteContents
Description copied from class:AbstractSynchronizableContentsCollection
Delete contents.- Overrides:
_deleteContents
in classAbstractSynchronizableContentsCollection
- Parameters:
contentsToRemove
- List of contents to removelogger
- The logger- Returns:
- the number of deleted contents
-