public abstract class AbstractCDMFrSynchronizableContentsCollection extends AbstractSynchronizableContentsCollection
Modifier and Type | Field and Description |
---|---|
protected ImportCDMFrComponent |
_importCDMFrComponent
The import CDMFr component
|
_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, _workflowName
COLLECTION_ID_PROPERTY
Constructor and Description |
---|
AbstractCDMFrSynchronizableContentsCollection() |
Modifier and Type | Method and Description |
---|---|
protected List<Content> |
_getContentsToRemove(AmetysObjectIterable<ModifiableDefaultContent> contents)
Filter the contents to remove.
|
protected List<ModifiableDefaultContent> |
_internalPopulate(Logger logger)
Internal implementation of
AbstractSynchronizableContentsCollection.populate(Logger) |
protected void |
configureDataSource(Configuration configuration)
Configure the data source parameters.
|
protected void |
configureSearchModel()
Configure the search model used by SCCSearchTool.
|
ModifiableDefaultContent |
getContent(String lang,
String idValue)
Gets the content in the repository
|
Set<String> |
getExternalOnlyFields(Map<String,Object> additionalParameters)
Get the path of field that are valued externally only.
|
String |
getIdField()
Get the path of metadata holding the unique identifier
|
Set<String> |
getLocalAndExternalFields(Map<String,Object> additionalParameters)
Get the path of tri-state fields (with local and external values)
|
int |
getTotalCount(Map<String,Object> parameters,
Logger logger)
Return the total number of results for the search.
|
Map<String,Map<String,Object>> |
search(Map<String,Object> parameters,
int offset,
int limit,
List<Object> sort,
Logger logger)
Search the data to import from parameters.
|
void |
service(ServiceManager manager) |
void |
synchronizeContent(ModifiableDefaultContent content,
Logger logger)
Synchronize a content with remove values.
|
void |
updateSyncInformations(ModifiableDefaultContent content,
String syncCode,
Logger logger)
Method to update the synchronisation informations (collection and value of the ID field).
|
_getContentPathQuery, _getExpressionsList, _getMetadataHolder, _isParamNotEmpty, _removeEmptyParameters, _removeMetadataIfExists, _synchronizeMetadata, _updateRelation, _updateRelation, applyChanges, applyChanges, createContentAction, deleteUnexistingContents, populate, sendErrorMail, updateSCCProperty, validateContent
_parseLanguages, _parseParameters, configure, configureStaticParams, getContentPrefix, getContentType, getId, getInitialActionId, getLabel, getLanguages, getParameterValues, getReportMails, getRestrictedField, getSearchModelConfiguration, getSynchronizeActionId, getSynchronizeCollectionModelId, getSynchronizingContentOperator, getValidateActionId, getWorkflowName, removalSync, synchronizeExistingContentsOnly, validateAfterImport
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleRightAssignmentContext, importContent
protected ImportCDMFrComponent _importCDMFrComponent
public AbstractCDMFrSynchronizableContentsCollection()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractSynchronizableContentsCollection
ServiceException
public String getIdField()
SynchronizableContentsCollection
public Set<String> getLocalAndExternalFields(Map<String,Object> additionalParameters)
SynchronizableContentsCollection
additionalParameters
- Additional parameterspublic Set<String> getExternalOnlyFields(Map<String,Object> additionalParameters)
SynchronizableContentsCollection
additionalParameters
- Additional parametersprotected void configureDataSource(Configuration configuration) throws ConfigurationException
AbstractStaticSynchronizableContentsCollection
configureDataSource
in class AbstractStaticSynchronizableContentsCollection
configuration
- Configuration to readConfigurationException
- If an error occursprotected void configureSearchModel()
AbstractStaticSynchronizableContentsCollection
configureSearchModel
in class AbstractStaticSynchronizableContentsCollection
public void synchronizeContent(ModifiableDefaultContent content, Logger logger) throws Exception
SynchronizableContentsCollection
content
- The content to synchronizelogger
- The loggerException
- if an error occurs.public ModifiableDefaultContent getContent(String lang, String idValue)
SynchronizableContentsCollection
lang
- the languageidValue
- the content namepublic Map<String,Map<String,Object>> search(Map<String,Object> parameters, int offset, int limit, List<Object> sort, Logger logger)
SynchronizableContentsCollection
parameters
- Parameters for the searchoffset
- Begin of the searchlimit
- Number of resultssort
- Sort of results (ignored for LDAP results)logger
- The loggerpublic void updateSyncInformations(ModifiableDefaultContent content, String syncCode, Logger logger) throws Exception
SynchronizableContentsCollection
content
- Content to updatesyncCode
- New synchronization codelogger
- The loggerException
- if an error occurs.public int getTotalCount(Map<String,Object> parameters, Logger logger)
SynchronizableContentsCollection
parameters
- Parameters for the searchlogger
- The loggerprotected List<Content> _getContentsToRemove(AmetysObjectIterable<ModifiableDefaultContent> contents)
AbstractSynchronizableContentsCollection
_getContentsToRemove
in class AbstractSynchronizableContentsCollection
contents
- The list of all the available contentsList
of Content
to remove.protected List<ModifiableDefaultContent> _internalPopulate(Logger logger)
AbstractSynchronizableContentsCollection
AbstractSynchronizableContentsCollection.populate(Logger)
_internalPopulate
in class AbstractSynchronizableContentsCollection
logger
- The logger