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
,Initializable
,Component
,Configurable
,Serviceable
- Direct Known Subclasses:
LDAPSynchronizableUsersCollection
,PersonSynchronizableContentsCollection
public class LDAPSynchronizableContentsCollection extends AbstractDataSourceSynchronizableContentsCollection implements Component, Initializable
Implementation ofSynchronizableContentsCollection
to be synchronized with a LDAP data source
-
-
Field Summary
Fields Modifier and Type Field Description private static int
__DEFAULT_PAGE_SIZE
private static String
__PARAM_LDAP_FILTER
private static String
__PARAM_LDAP_RELATIVE_DN
private static String
__PARAM_LDAP_SCOPE
protected LDAPCollectionHelper
_ldapHelper
The helper for LDAP connectionprotected int
_pageSize
The page size-
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, _sccHelper, _synchronizingContentOperatorEP
-
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection
_contentDAO, _contentTypeEP, _currentUserProvider, _hasGlobalError, _i18nUtils, _nbCreatedContents, _nbDeletedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, _resolver, _synchroComponent, SCC_UNIQUE_ID
-
Fields inherited from class org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
_contentPrefix, _contentType, _id, _initialActionId, _label, _languages, _modelId, _modelParamValues, _removalSync, _reportMails, _restrictedField, _searchModelConfiguration, _synchronizeActionId, _synchronizeExistingContentsOnly, _synchronizingContentOperator, _validateActionId, _validateAfterImport, _workflowName
-
Fields inherited from interface org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollection
COLLECTION_ID_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description LDAPSynchronizableContentsCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureDataSource(Configuration configuration)
Configure the data source parameters.protected void
configureSearchModel()
Configure the search model used by SCCSearchTool.protected String
getFilter()
Get the LDAP filterprotected String
getRelativeDN()
Get the LDAP relative DNprotected String
getSearchScope()
Get the scope for LDAP searchvoid
initialize()
protected Map<String,Map<String,Object>>
internalSearch(Map<String,Object> parameters, int offset, int limit, List<Object> sort, org.slf4j.Logger logger)
Search values and return the result without any treatment.void
service(ServiceManager serviceManager)
-
Methods inherited from class org.ametys.plugins.contentio.synchronize.impl.AbstractDataSourceSynchronizableContentsCollection
getDataSourceId, getExternalOnlyFields, getIdField, getLocalAndExternalFields, getMapping, getRemoteValues, putIdParameter
-
Methods inherited from class org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection
_fillContent, _getContentsToRemove, _getIdFieldValue, _handleContent, _importContent, _importOrSynchronizeContent, _importOrSynchronizeContent, _importOrSynchronizeContents, _internalPopulate, _isHandled, _synchronizeContent, additionalCommonOperations, additionalImportOperations, additionalSynchronizeOperations, configure, createContentAction, getContent, getTotalCount, 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, 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
-
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 Detail
-
__PARAM_LDAP_SCOPE
private static final String __PARAM_LDAP_SCOPE
- See Also:
- Constant Field Values
-
__PARAM_LDAP_RELATIVE_DN
private static final String __PARAM_LDAP_RELATIVE_DN
- See Also:
- Constant Field Values
-
__PARAM_LDAP_FILTER
private static final String __PARAM_LDAP_FILTER
- See Also:
- Constant Field Values
-
__DEFAULT_PAGE_SIZE
private static final int __DEFAULT_PAGE_SIZE
- See Also:
- Constant Field Values
-
_pageSize
protected int _pageSize
The page size
-
_ldapHelper
protected LDAPCollectionHelper _ldapHelper
The helper for LDAP connection
-
-
Constructor Detail
-
LDAPSynchronizableContentsCollection
public LDAPSynchronizableContentsCollection()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractDataSourceSynchronizableContentsCollection
- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
configureDataSource
protected void configureDataSource(Configuration configuration) throws ConfigurationException
Description copied from class:AbstractStaticSynchronizableContentsCollection
Configure the data source parameters.- Overrides:
configureDataSource
in classAbstractDataSourceSynchronizableContentsCollection
- Parameters:
configuration
- Configuration to read- Throws:
ConfigurationException
- If an error occurs
-
internalSearch
protected Map<String,Map<String,Object>> internalSearch(Map<String,Object> parameters, int offset, int limit, List<Object> sort, org.slf4j.Logger logger)
Description copied from class:AbstractSimpleSynchronizableContentsCollection
Search values and return the result without any treatment.- Specified by:
internalSearch
in classAbstractSimpleSynchronizableContentsCollection
- Parameters:
parameters
- 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.
-
getSearchScope
protected String getSearchScope()
Get the scope for LDAP search- Returns:
- The scope
-
getRelativeDN
protected String getRelativeDN()
Get the LDAP relative DN- Returns:
- the relative DN
-
configureSearchModel
protected void configureSearchModel()
Description copied from class:AbstractStaticSynchronizableContentsCollection
Configure the search model used by SCCSearchTool.- Overrides:
configureSearchModel
in classAbstractDataSourceSynchronizableContentsCollection
-
-