Interface SynchronizableContentsCollection
- All Known Implementing Classes:
AbstractApogeeSynchronizableContentsCollection
,AbstractApogeeSynchronizableContentsWithCatalogCollection
,AbstractCDMFrSynchronizableContentsCollection
,AbstractDataSourceSynchronizableContentsCollection
,AbstractSimpleSynchronizableContentsCollection
,AbstractStaticSynchronizableContentsCollection
,AbstractSynchronizableContentsCollection
,CDMFrSynchronizableContentsCollection
,ContainerSynchronizableContentsCollection
,CourseListSynchronizableContentsCollection
,CoursePartSynchronizableContentsCollection
,CourseSynchronizableContentsCollection
,LDAPSynchronizableContentsCollection
,LDAPSynchronizableUsersCollection
,OrgUnitSynchronizableContentsCollection
,PegaseSynchronizableContentsCollection
,PersonSynchronizableContentsCollection
,ProgramSynchronizableContentsCollection
,RemoteCDMFrSynchronizableContentsCollection
,SQLSynchronizableContentsCollection
,SQLSynchronizableUDOrgunitCollection
,SQLSynchronizableUsersCollection
,SubProgramSynchronizableContentsCollection
,UserPopulationSynchronizableContentsCollection
public interface SynchronizableContentsCollection
This interface represents a synchronizable collection of contents
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name for the metadata indicating the ids of the collectionsstatic final String
The name of the metadata indicating the date of the last synchronizationstatic final String
The name of the metadata indicating the user that launched the last synchronizationstatic final String
The result map key for number of created contentsstatic final String
The result map key for number of deleted contentsstatic final String
The result map key for number of synchronized contentsstatic final String
The result map key for number of synchronized contents -
Method Summary
Modifier and TypeMethodDescriptiondefault ContentSynchronizationResult
additionalCommonOperations
(ModifiableContent content, Map<String, Object> additionalParameters, Logger logger) Add specific fields to the content during import or synchronization.default ContentSynchronizationResult
additionalImportOperations
(ModifiableContent content, Map<String, Object> additionalParameters, Logger logger) Add specific fields to the content.default ContentSynchronizationResult
additionalSynchronizeOperations
(ModifiableContent content, Map<String, Object> additionalParameters, Logger logger) Add specific fields to the content.void
Empty the collection of its synchronized contentsgetContent
(String lang, String idValue) Gets the content in the repositoryGet the prefix to use for the creation of contentsGet the type of content handled by this collectiongetId()
Get the id of synchronizable collection.Get the path of metadata holding the unique identifierint
Get the id of the initial action of the workflowgetLabel()
Get the label of synchronizable collectionGet the languages handled by this collectiongetLocalAndExternalFields
(Map<String, Object> additionalParameters) Get the path of tri-state fields (with local and external values)Get the untyped values of parameters for controllerIf an exception occurs during synchronization, an error report mail will be sent to those email addresses (separated by new lines)Get the path of boolean metadata for restricted content.Get the search UI model for search tool (columns, criterias, url for buttons, etc.)Retrieves the result of the synchronization as a map of key / content count containing The number of created contents The number of synchronized contents The number of unchanged contents The number of deleted contentsint
Get the id of the synchronize action of the workflowGet the id of controller responsible of synchronization of this collectionGets the id of theSynchronizingContentOperator
extension to use during synchronizationint
getTotalCount
(Map<String, Object> searchParameters, Logger logger) Return the total number of results for the search.int
Get the id of the validate action of the workflowGet the name of the workflow to use for the synchronized contentsdefault boolean
Return true if aRightAssignmentContext
should be automatically generated for the contents of this SCCboolean
When returnstrue
, the process ignore restrictions on attributes to synchronize it.Import a content from remote values.populate
(Logger logger, ContainerProgressionTracker progressionTracker) Populates contentsboolean
When returnstrue
, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.search
(Map<String, Object> searchParameters, int offset, int limit, List<Object> sort, Logger logger) Search the data to import from parameters.void
synchronizeContent
(ModifiableContent content, Logger logger) Synchronize a content with remove values.boolean
True to synchronize only existing contentsvoid
updateSyncInformations
(ModifiableContent content, String syncCode, Logger logger) Method to update the synchronisation informations (collection and value of the ID field).boolean
True to validate the contents after import
-
Field Details
-
COLLECTION_ID_DATA_NAME
The name for the metadata indicating the ids of the collections- See Also:
-
LAST_SYNCHRONIZATION_DATA_NAME
The name of the metadata indicating the date of the last synchronization- See Also:
-
LAST_SYNCHRONIZATION_USER_DATA_NAME
The name of the metadata indicating the user that launched the last synchronization- See Also:
-
RESULT_NB_CREATED_CONTENTS
The result map key for number of created contents- See Also:
-
RESULT_NB_SYNCHRONIZED_CONTENTS
The result map key for number of synchronized contents- See Also:
-
RESULT_NB_NOT_CHANGED_CONTENTS
The result map key for number of synchronized contents- See Also:
-
RESULT_NB_DELETED_CONTENTS
The result map key for number of deleted contents- See Also:
-
-
Method Details
-
getId
Get the id of synchronizable collection.- Returns:
- the id
-
getLabel
Get the label of synchronizable collection- Returns:
- the label
-
getContentType
Get the type of content handled by this collection- Returns:
- the type of content
-
getLanguages
Get the languages handled by this collection- Returns:
- the list of language
-
getSynchronizeCollectionModelId
Get the id of controller responsible of synchronization of this collection- Returns:
- The id of controller
-
getParameterValues
Get the untyped values of parameters for controller- Returns:
- the untyped values
-
removalSync
boolean removalSync()When returnstrue
, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.- Returns:
true
if a content created by a previous synchro has to be removed if it does not exist anymore during the current synchro.
-
ignoreRestrictions
boolean ignoreRestrictions()When returnstrue
, the process ignore restrictions on attributes to synchronize it.- Returns:
true
to ignore restrictions on synchronization
-
getWorkflowName
Get the name of the workflow to use for the synchronized contents- Returns:
- the name of the workflow to use for the synchronized contents
-
getInitialActionId
int getInitialActionId()Get the id of the initial action of the workflow- Returns:
- The id of the initial action of the workflow
-
getSynchronizeActionId
int getSynchronizeActionId()Get the id of the synchronize action of the workflow- Returns:
- The id of the synchronize action of the workflow
-
getValidateActionId
int getValidateActionId()Get the id of the validate action of the workflow- Returns:
- The id of the validate action of the workflow
-
getContentPrefix
Get the prefix to use for the creation of contents- Returns:
- The prefix to use for the creation of contents
-
validateAfterImport
boolean validateAfterImport()True to validate the contents after import- Returns:
- True to validate the contents after import
-
getReportMails
If an exception occurs during synchronization, an error report mail will be sent to those email addresses (separated by new lines)- Returns:
- The email addresses to send an error report if an exception occurs during synchronization (separated by new lines)
-
getSynchronizingContentOperator
Gets the id of theSynchronizingContentOperator
extension to use during synchronization- Returns:
- the id of the
SynchronizingContentOperator
extension to use during synchronization
-
getRestrictedField
Get the path of boolean metadata for restricted content. If true, the content will be visible only for connected users.- Returns:
- the path to the metadata. Can be null.
-
getIdField
Get the path of metadata holding the unique identifier- Returns:
- the path to the metadata. Can be null.
-
getLocalAndExternalFields
Get the path of tri-state fields (with local and external values)- Parameters:
additionalParameters
- Additional parameters- Returns:
- the synchronized fields
-
getSearchModelConfiguration
Get the search UI model for search tool (columns, criterias, url for buttons, etc.)- Returns:
- A
SCCSearchModelConfiguration
-
synchronizeExistingContentsOnly
boolean synchronizeExistingContentsOnly()True to synchronize only existing contents- Returns:
- True to synchronize only existing contents
-
empty
Empty the collection of its synchronized contents- Parameters:
logger
- The logger
-
populate
Populates contents- Parameters:
logger
- The loggerprogressionTracker
- A progression tracker- Returns:
- Return the populated contents (imported or synchronized)
-
importContent
List<ModifiableContent> importContent(String idValue, Map<String, Object> additionalParameters, Logger logger) throws ExceptionImport a content from remote values.- Parameters:
idValue
- Id (for import/synchronization) of the content to importadditionalParameters
- Additional parameterslogger
- The logger- Returns:
- A list of created contents
- Throws:
Exception
- if an error occurs.
-
synchronizeContent
Synchronize a content with remove values.- Parameters:
content
- The content to synchronizelogger
- The logger- Throws:
Exception
- if an error occurs.
-
additionalImportOperations
default ContentSynchronizationResult additionalImportOperations(ModifiableContent content, Map<String, Object> additionalParameters, Logger logger) Add specific fields to the content.- Parameters:
content
- Content to updateadditionalParameters
- Additional parameterslogger
- The logger- Returns:
- The synchronization result of the import additional operations
-
additionalSynchronizeOperations
default ContentSynchronizationResult additionalSynchronizeOperations(ModifiableContent content, Map<String, Object> additionalParameters, Logger logger) Add specific fields to the content.- Parameters:
content
- Content to updateadditionalParameters
- Additional parameterslogger
- The logger- Returns:
- The synchronization result of the synchronize additional operations
-
additionalCommonOperations
default ContentSynchronizationResult additionalCommonOperations(ModifiableContent content, Map<String, Object> additionalParameters, Logger logger) Add specific fields to the content during import or synchronization.- Parameters:
content
- Content to updateadditionalParameters
- Additional parameterslogger
- The logger- Returns:
- The synchronization result of the additional operations
-
getContent
Gets the content in the repository- Parameters:
lang
- the languageidValue
- the content name- Returns:
- the content in the repository, or null if does not exist
-
search
Map<String,Map<String, searchObject>> (Map<String, Object> searchParameters, int offset, int limit, List<Object> sort, Logger logger) Search the data to import from parameters.- Parameters:
searchParameters
- Parameters for the searchoffset
- Begin of the searchlimit
- Number of resultssort
- Sort of results (ignored for LDAP results)logger
- The logger- Returns:
- A map of remote values by content
-
updateSyncInformations
void updateSyncInformations(ModifiableContent content, String syncCode, Logger logger) throws Exception Method to update the synchronisation informations (collection and value of the ID field).- Parameters:
content
- Content to updatesyncCode
- New synchronization codelogger
- The logger- Throws:
Exception
- if an error occurs.
-
getTotalCount
Return the total number of results for the search.- Parameters:
searchParameters
- Parameters for the searchlogger
- The logger- Returns:
- The total count
-
getSynchronizationResult
Retrieves the result of the synchronization as a map of key / content count containing- The number of created contents
- The number of synchronized contents
- The number of unchanged contents
- The number of deleted contents
- Returns:
- the result of the synchronization
-
handleRightAssignmentContext
Return true if aRightAssignmentContext
should be automatically generated for the contents of this SCC- Returns:
- true to automatically generate a
RightAssignmentContext
. Return false if the rights of contents of this SCC are handle by its ownRightAssignmentContext
-