public class UserPopulationSynchronizableContentsCollection extends AbstractSimpleSynchronizableContentsCollection
SynchronizableContentsCollection to be synchronized with a UserPopulation of the CMS.| Modifier and Type | Field and Description | 
|---|---|
private static int | 
__LDAP_DEFAULT_PAGE_SIZE  | 
protected static String | 
__PARAM_ADDITIONAL_SEARCH_FILTER
Name of parameter holding the additional search filter 
 | 
protected static String | 
__PARAM_EMAIL_METADATA_NAME
Name of parameter for the email metadata 
 | 
protected static String | 
__PARAM_FIRSTNAME_METADATA_NAME
Name of parameter for the firstname metadata 
 | 
protected static String | 
__PARAM_LASTNAME_METADATA_NAME
Name of parameter for the lastname metadata 
 | 
protected static String | 
__PARAM_LOGIN_METADATA_NAME
Name of parameter for the login metadata 
 | 
protected static String | 
__PARAM_MAPPING
Name of parameter holding the fields mapping 
 | 
protected static String | 
__PARAM_MAPPING_ATTRIBUTE_PREFIX
Name of parameter into mapping holding the remote attribute 
 | 
protected static String | 
__PARAM_MAPPING_METADATA_REF
Name of parameter into mapping holding the path of metadata 
 | 
protected static String | 
__PARAM_MAPPING_SYNCHRO
Name of parameter into mapping holding the synchronized property 
 | 
protected static String | 
__PARAM_POPULATION_ID
Name of parameter holding the id of population 
 | 
protected Set<String> | 
_extFields
External fields 
 | 
protected JSONUtils | 
_jsonUtils
The JSON utils 
 | 
protected static Logger | 
_LOGGER
The logger 
 | 
protected ServiceManager | 
_manager
The service manager 
 | 
protected Map<String,Map<String,List<String>>> | 
_mapping
Mapping of the metadata with source data 
 | 
protected Set<String> | 
_syncFields
Synchronized fields 
 | 
protected UserPopulationDAO | 
_userPopulationDAO
The DAO for user populations 
 | 
_contentHelper, _languagesManager, _sccHelper, _synchronizingContentOperatorEP_contentDAO, _contentTypeEP, _currentUserProvider, _hasGlobalError, _i18nUtils, _nbCreatedContents, _nbDeletedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, _resolver, _synchroComponent, SCC_UNIQUE_ID_contentPrefix, _contentType, _id, _initialActionId, _label, _modelId, _modelParamValues, _removalSync, _reportMails, _restrictedField, _searchModelConfiguration, _synchronizeExistingContentsOnly, _synchronizingContentOperator, _validateActionId, _validateAfterImport, _workflowNameCOLLECTION_ID_PROPERTY| Constructor and Description | 
|---|
UserPopulationSynchronizableContentsCollection()  | 
| Modifier and Type | Method and Description | 
|---|---|
private Set<String> | 
_getUserDirectoryKeys(Map<String,Object> field,
                     String prefix)  | 
protected List<ModifiableDefaultContent> | 
_internalPopulate(Logger logger)
Internal implementation of  
AbstractSynchronizableContentsCollection.populate(Logger) | 
private Map<String,Map<String,Object>> | 
_internalSearch(Map<String,Object> parameters,
               int offset,
               int limit,
               List<Object> sort,
               Logger logger,
               boolean getRemoteValues)
Internal search 
 | 
protected void | 
configureDataSource(Configuration configuration)
Configure the data source parameters. 
 | 
protected void | 
configureSearchModel()
Configure the search model used by SCCSearchTool. 
 | 
String | 
getAdditionalSearchFilter()
Get the additional filter for searching 
 | 
String | 
getEmailMetadata()
Get the metadata name for the email 
 | 
Set<String> | 
getExternalOnlyFields(Map<String,Object> additionalParameters)
Get the path of field that are valued externally only. 
 | 
String | 
getFirstNameMetadata()
Get the metadata name for the first name 
 | 
String | 
getIdField()
Get the path of metadata holding the unique identifier 
 | 
String | 
getLastNameMetadata()
Get the metadata name for the last name 
 | 
Set<String> | 
getLocalAndExternalFields(Map<String,Object> additionalParameters)
Get the path of tri-state fields (with local and external values) 
 | 
String | 
getLoginMetadata()
Get the metadata name for the login 
 | 
String | 
getPopulationId()
Get the id of the user population 
 | 
protected Map<String,Map<String,List<Object>>> | 
getRemoteValues(Map<String,Object> parameters,
               Logger logger)
Search values and return the result organized by metadata 
 | 
protected Map<String,Map<String,Object>> | 
internalSearch(Map<String,Object> parameters,
              int offset,
              int limit,
              List<Object> sort,
              Logger logger)
Search values and return the result without any treatment. 
 | 
protected Map<String,Object> | 
putIdParameter(String idValue)
Set search parameters for the ID value. 
 | 
protected Map<String,Map<String,Object>> | 
searchLDAP(LdapUserDirectory userDirectory,
          Map<String,Object> parameters,
          int offset,
          int limit,
          Logger logger,
          boolean getRemoteValues)
Search contents from a LDAP user directory of the population. 
 | 
void | 
service(ServiceManager manager)  | 
_fillContent, _getContentsToRemove, _getIdFieldValue, _handleContent, _importContent, _importOrSynchronizeContent, _importOrSynchronizeContent, _importOrSynchronizeContents, _isHandled, _synchronizeContent, additionalImportOperations, additionalSynchronizeOperations, configure, createContentAction, getContent, getTotalCount, getTransformedRemoteValues, importContent, populate, search, synchronizeContent, updateSyncInformations, validateContent_getContentPathQuery, _getExpressionsList, _getMetadataHolder, _isParamNotEmpty, _removeEmptyParameters, _removeMetadataIfExists, _synchronizeMetadata, _updateRelation, _updateRelation, applyChanges, applyChanges, createContentAction, deleteUnexistingContents, sendErrorMail, updateSCCProperty, validateContent_parseParameters, configureStaticParams, getContentPrefix, getContentType, getId, getInitialActionId, getLabel, getParameterValues, getReportMails, getRestrictedField, getSearchModelConfiguration, getSynchronizeCollectionModelId, getSynchronizingContentOperator, getValidateActionId, getWorkflowName, removalSync, synchronizeExistingContentsOnly, validateAfterImportclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleRightAssignmentContextprotected static final String __PARAM_POPULATION_ID
protected static final String __PARAM_LOGIN_METADATA_NAME
protected static final String __PARAM_FIRSTNAME_METADATA_NAME
protected static final String __PARAM_LASTNAME_METADATA_NAME
protected static final String __PARAM_EMAIL_METADATA_NAME
protected static final String __PARAM_MAPPING
protected static final String __PARAM_ADDITIONAL_SEARCH_FILTER
protected static final String __PARAM_MAPPING_SYNCHRO
protected static final String __PARAM_MAPPING_METADATA_REF
protected static final String __PARAM_MAPPING_ATTRIBUTE_PREFIX
private static final int __LDAP_DEFAULT_PAGE_SIZE
protected UserPopulationDAO _userPopulationDAO
protected ServiceManager _manager
protected JSONUtils _jsonUtils
protected Map<String,Map<String,List<String>>> _mapping
protected Set<String> _syncFields
protected Set<String> _extFields
public UserPopulationSynchronizableContentsCollection()
public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class AbstractSimpleSynchronizableContentsCollectionServiceExceptionprotected void configureDataSource(Configuration configuration) throws ConfigurationException
AbstractStaticSynchronizableContentsCollectionconfigureDataSource in class AbstractStaticSynchronizableContentsCollectionconfiguration - Configuration to readConfigurationException - If an error occursprotected void configureSearchModel()
AbstractStaticSynchronizableContentsCollectionconfigureSearchModel in class AbstractStaticSynchronizableContentsCollectionprotected List<ModifiableDefaultContent> _internalPopulate(Logger logger)
AbstractSynchronizableContentsCollectionAbstractSynchronizableContentsCollection.populate(Logger)_internalPopulate in class AbstractSimpleSynchronizableContentsCollectionlogger - The loggerprotected Map<String,Map<String,Object>> searchLDAP(LdapUserDirectory userDirectory, Map<String,Object> parameters, int offset, int limit, Logger logger, boolean getRemoteValues)
Map<String, Map<String, Object>> 
 if getRemoteValues is set to false and Map<String, Map<String, List<Object>>> 
 if remoteValues is true.
 Without this operation, we have to duplicate the code of searchLDAP and _internalSearch methods.userDirectory - The LDAP user directoryparameters - Parameters for the searchoffset - Begin of the searchlimit - Number of resultslogger - The loggergetRemoteValues - if true, values are organized by the metadata mappingprotected Map<String,Map<String,Object>> internalSearch(Map<String,Object> parameters, int offset, int limit, List<Object> sort, Logger logger)
AbstractSimpleSynchronizableContentsCollectioninternalSearch in class AbstractSimpleSynchronizableContentsCollectionparameters - Search parameters to restrict the searchoffset - Begin of the searchlimit - Number of resultssort - Sort of results (ignored for LDAP results)logger - The loggerprivate Map<String,Map<String,Object>> _internalSearch(Map<String,Object> parameters, int offset, int limit, List<Object> sort, Logger logger, boolean getRemoteValues)
parameters - the search parametersoffset - starting indexlimit - max number of resultssort - not usedlogger - the loggergetRemoteValues - to get remote values or notprotected Map<String,Map<String,List<Object>>> getRemoteValues(Map<String,Object> parameters, Logger logger)
AbstractSimpleSynchronizableContentsCollectiongetRemoteValues in class AbstractSimpleSynchronizableContentsCollectionparameters - Search parameters to restrict the searchlogger - The loggerpublic String getPopulationId()
public String getIdField()
SynchronizableContentsCollectionpublic String getLoginMetadata()
public String getFirstNameMetadata()
public String getLastNameMetadata()
public String getEmailMetadata()
public String getAdditionalSearchFilter()
public Set<String> getExternalOnlyFields(Map<String,Object> additionalParameters)
SynchronizableContentsCollectionadditionalParameters - Additional parameterspublic Set<String> getLocalAndExternalFields(Map<String,Object> additionalParameters)
SynchronizableContentsCollectionadditionalParameters - Additional parametersprivate Set<String> _getUserDirectoryKeys(Map<String,Object> field, String prefix)
protected Map<String,Object> putIdParameter(String idValue)
AbstractSimpleSynchronizableContentsCollectionputIdParameter in class AbstractSimpleSynchronizableContentsCollectionidValue - Value to search