Class LDAPSynchronizableContentsCollection
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.LDAPSynchronizableContentsCollection
- All Implemented Interfaces:
SynchronizableContentsCollection,Component,Configurable,Serviceable
- Direct Known Subclasses:
LDAPSynchronizableUsersCollection,PersonSynchronizableContentsCollection
public class LDAPSynchronizableContentsCollection
extends AbstractDataSourceSynchronizableContentsCollection
implements Component
Implementation of
SynchronizableContentsCollection to be synchronized with a LDAP data source-
Field Summary
FieldsFields 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, _jsonUtils, _mapping, _syncFieldsFields 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 StringcheckAndTransformIdObjectValue(String remoteKey, Object idObjectValue, org.slf4j.Logger logger) Check if the id object value is correct and transform it if neededprotected voidConfigure the search model used by SCCSearchTool.protected StringGet the LDAP filterprotected StringGet the LDAP relative DNgetRemoteValues(Map<String, Object> searchParameters, org.slf4j.Logger logger) Search values and return the result organized by attributesprotected StringGet the scope for LDAP searchinternalSearch(Map<String, Object> searchParameters, int offset, int limit, List<Object> sort, org.slf4j.Logger logger) Search values and return the result without any treatment.voidservice(ServiceManager serviceManager) Methods inherited from class org.ametys.plugins.contentio.synchronize.impl.AbstractDataSourceSynchronizableContentsCollection
configureDataSource, getDataSourceId, getIdField, getLocalAndExternalFields, getMapping, putIdParameterMethods 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, 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
-
_ldapHelper
The helper for LDAP connection
-
-
Constructor Details
-
LDAPSynchronizableContentsCollection
public LDAPSynchronizableContentsCollection()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractDataSourceSynchronizableContentsCollection- Throws:
ServiceException
-
internalSearch
protected Map<String,Map<String, internalSearchObject>> (Map<String, Object> searchParameters, int offset, int limit, List<Object> sort, org.slf4j.Logger logger) Description copied from class:AbstractSimpleSynchronizableContentsCollectionSearch values and return the result without any treatment.- Specified by:
internalSearchin classAbstractSimpleSynchronizableContentsCollection- Parameters:
searchParameters- Search parameters to restrict the searchoffset- Begin of the searchlimit- Number of resultssort- Sort of results (ignored for LDAP results)logger- The logger- Returns:
- Map of results without any treatment.
-
checkAndTransformIdObjectValue
protected String checkAndTransformIdObjectValue(String remoteKey, Object idObjectValue, org.slf4j.Logger logger) Check if the id object value is correct and transform it if needed- Parameters:
remoteKey- the remote keyidObjectValue- the id object valuelogger- the logger- Returns:
- The transformed id if the value is correct, null otherwise
-
getSearchScope
Get the scope for LDAP search- Returns:
- The scope
-
getFilter
Get the LDAP filter- Returns:
- the filter
-
getRelativeDN
Get the LDAP relative DN- Returns:
- the relative DN
-
configureSearchModel
Description copied from class:AbstractStaticSynchronizableContentsCollectionConfigure the search model used by SCCSearchTool.- Overrides:
configureSearchModelin classAbstractDataSourceSynchronizableContentsCollection
-
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- Overrides:
getRemoteValuesin classAbstractDataSourceSynchronizableContentsCollection- Parameters:
searchParameters- Search parameters to restrict the searchlogger- The logger- Returns:
- Map of results organized by attributes.
-