public class SQLSynchronizableContentsCollection extends AbstractDataSourceSynchronizableContentsCollection implements Component
SynchronizableContentsCollection to be synchronized with a LDAP data source| Modifier and Type | Field and Description | 
|---|---|
| private static String | __PARAM_SQL_TABLE | 
| protected SQLCollectionDAO | _sqlCollectionDAOThe SQL collection DAO | 
__PARAM_DATASOURCE_ID, __PARAM_FIELD_ID, __PARAM_MAPPING, __PARAM_MAPPING_ATTRIBUTE, __PARAM_MAPPING_METADATA_REF, __PARAM_MAPPING_SYNCHRO, _columnsAndCriteria, _extFields, _jsonUtils, _mapping, _syncFields_contentHelper, _sccHelper, _synchronizingContentOperatorEP_contentDAO, _contentTypeEP, _currentUserProvider, _hasGlobalError, _i18nUtils, _nbCreatedContents, _nbDeletedContents, _nbError, _nbNotChangedContents, _nbSynchronizedContents, _observationManager, _resolver, _synchroComponent, SCC_UNIQUE_ID_contentPrefix, _contentType, _id, _initialActionId, _label, _languages, _modelId, _modelParamValues, _removalSync, _reportMails, _restrictedField, _searchModelConfiguration, _synchronizeActionId, _synchronizeExistingContentsOnly, _synchronizingContentOperator, _validateActionId, _validateAfterImport, _workflowNameCOLLECTION_ID_PROPERTY| Constructor and Description | 
|---|
| SQLSynchronizableContentsCollection() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | _checkIdObjectValue(String remoteKey,
                   Object idObjectValue,
                   Logger logger)Check if the id object value is correct | 
| protected Map<String,Object> | _getNormalizedSearchResult(List<String> columns,
                          Map<String,Object> searchResult)Get normalized search result
 Indeed we need to normalize the search result for each database type
 For example, with Oracle, the returned SQL column names are uppercased
 so we need to retrieve for each returned column its real name for the mapping, | 
| protected Map<String,Object> | _getSearchParameters(Map<String,Object> parameters,
                    int offset,
                    int limit,
                    List<Object> sort,
                    List<String> columns)Get the parameters map for mybatis search | 
| protected Map<String,Object> | _getTotalCounParameters(Map<String,Object> parameters)Get the parameters map for mybatis total count | 
| protected Map<String,Map<String,Object>> | _normalizeSearchResult(String remoteKey,
                      List<String> columns,
                      List<Map<String,Object>> searchResults,
                      Logger logger)We need to normalize the search result for each database type
 For example, with Oracle, the returned SQL column names are uppercased
 so we need to retrieve for each returned column its real name for the mapping, | 
| String | getTableName()Get the name of SQL table | 
| int | getTotalCount(Map<String,Object> parameters,
             Logger logger)Return the total number of results for the search. | 
| 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. | 
| void | service(ServiceManager smanager) | 
configureDataSource, configureSearchModel, getDataSourceId, getExternalOnlyFields, getIdField, getLocalAndExternalFields, getMapping, getRemoteValues, putIdParameter_fillContent, _getContentsToRemove, _getIdFieldValue, _handleContent, _importContent, _importOrSynchronizeContent, _importOrSynchronizeContent, _importOrSynchronizeContents, _internalPopulate, _isHandled, _synchronizeContent, additionalCommonOperations, additionalImportOperations, additionalSynchronizeOperations, configure, createContentAction, getContent, getTransformedRemoteValues, importContent, populate, search, synchronizeContent, updateSyncInformations, validateContent_getContentPathQuery, _getExpressionsList, _getMetadataHolder, _isParamNotEmpty, _removeEmptyParameters, _removeMetadataIfExists, _synchronizeMetadata, _updateRelation, _updateRelation, applyChanges, applyChanges, createContentAction, deleteUnexistingContents, sendErrorMail, updateSCCProperty, validateContent_parseLanguages, _parseParameters, configureStaticParams, getContentPrefix, getContentType, getId, getInitialActionId, getLabel, getLanguages, getParameterValues, getReportMails, getRestrictedField, getSearchModelConfiguration, getSynchronizeActionId, getSynchronizeCollectionModelId, getSynchronizingContentOperator, getValidateActionId, getWorkflowName, removalSync, synchronizeExistingContentsOnly, validateAfterImportclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleRightAssignmentContextprivate static final String __PARAM_SQL_TABLE
protected SQLCollectionDAO _sqlCollectionDAO
public SQLSynchronizableContentsCollection()
public void service(ServiceManager smanager) throws ServiceException
service in interface Serviceableservice in class AbstractDataSourceSynchronizableContentsCollectionServiceExceptionpublic String getTableName()
protected 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 loggerprotected Map<String,Object> _getSearchParameters(Map<String,Object> parameters, int offset, int limit, List<Object> sort, List<String> columns)
parameters - the filter parameteroffset - the offsetlimit - the limitsort - the sort mapcolumns - the list of columnsprotected Map<String,Map<String,Object>> _normalizeSearchResult(String remoteKey, List<String> columns, List<Map<String,Object>> searchResults, Logger logger)
remoteKey - the remote key handling the idcolumns - the list of columnssearchResults - the search result maplogger - the loggerprotected boolean _checkIdObjectValue(String remoteKey, Object idObjectValue, Logger logger)
remoteKey - the remove keyidObjectValue - the id object valuelogger - the loggerprotected Map<String,Object> _getNormalizedSearchResult(List<String> columns, Map<String,Object> searchResult)
columns - the columns listsearchResult - the search resultpublic int getTotalCount(Map<String,Object> parameters, Logger logger)
SynchronizableContentsCollectiongetTotalCount in interface SynchronizableContentsCollectiongetTotalCount in class AbstractSimpleSynchronizableContentsCollectionparameters - Parameters for the searchlogger - The logger