Interface SynchronizableContentsCollection
-
- All Known Implementing Classes:
AbstractApogeeSynchronizableContentsCollection
,AbstractApogeeSynchronizableContentsWithCatalogCollection
,AbstractCDMFrSynchronizableContentsCollection
,AbstractDataSourceSynchronizableContentsCollection
,AbstractSimpleSynchronizableContentsCollection
,AbstractStaticSynchronizableContentsCollection
,AbstractSynchronizableContentsCollection
,CDMFrSynchronizableContentsCollection
,ContainerSynchronizableContentsCollection
,CourseListSynchronizableContentsCollection
,CourseSynchronizableContentsCollection
,LDAPSynchronizableContentsCollection
,LDAPSynchronizableUsersCollection
,OrgUnitSynchronizableContentsCollection
,PersonSynchronizableContentsCollection
,ProgramSynchronizableContentsCollection
,RemoteCDMFrSynchronizableContentsCollection
,SQLSynchronizableContentsCollection
,SQLSynchronizableUDOrgunitCollection
,SQLSynchronizableUsersCollection
,SubProgramSynchronizableContentsCollection
,UserPopulationSynchronizableContentsCollection
public interface SynchronizableContentsCollection
This interface represents a synchronizable collection of contents
-
-
Field Summary
Fields Modifier and Type Field Description static String
COLLECTION_ID_PROPERTY
The name for the metadata indicating the ids of the collections
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ModifiableDefaultContent
getContent(String lang, String idValue)
Gets the content in the repositoryString
getContentPrefix()
Get the prefix to use for the creation of contentsString
getContentType()
Get the type of content handled by this collectionSet<String>
getExternalOnlyFields(Map<String,Object> additionalParameters)
Get the path of field that are valued externally only.String
getId()
Get the id of synchronizable collection.String
getIdField()
Get the path of metadata holding the unique identifierint
getInitialActionId()
Get the id of the initial action of the workflowI18nizableText
getLabel()
Get the label of synchronizable collectionList<String>
getLanguages()
Get the languages handled by this collectionSet<String>
getLocalAndExternalFields(Map<String,Object> additionalParameters)
Get the path of tri-state fields (with local and external values)Map<String,Object>
getParameterValues()
Get the untyped values of parameters for controllerString
getReportMails()
If an exception occurs during synchronization, an error report mail will be sent to those email addresses (separated by new lines)String
getRestrictedField()
Get the path of boolean metadata for restricted content.SCCSearchModelConfiguration
getSearchModelConfiguration()
Get the search UI model for search tool (columns, criterias, url for buttons, etc.)int
getSynchronizeActionId()
Get the id of the synchronize action of the workflowString
getSynchronizeCollectionModelId()
Get the id of controller responsible of synchronization of this collectionString
getSynchronizingContentOperator()
Gets the id of theSynchronizingContentOperator
extension to use during synchronizationint
getTotalCount(Map<String,Object> parameters, org.slf4j.Logger logger)
Return the total number of results for the search.int
getValidateActionId()
Get the id of the validate action of the workflowString
getWorkflowName()
Get the name of the workflow to use for the synchronized contentsdefault boolean
handleRightAssignmentContext()
Return true if aRightAssignmentContext
should be automatically generated for the contents of this SCCList<ModifiableDefaultContent>
importContent(String idValue, Map<String,Object> additionalParameters, org.slf4j.Logger logger)
Import a content from remote values.List<ModifiableDefaultContent>
populate(org.slf4j.Logger logger)
Populates contentsboolean
removalSync()
When returns true, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.Map<String,Map<String,Object>>
search(Map<String,Object> parameters, int offset, int limit, List<Object> sort, org.slf4j.Logger logger)
Search the data to import from parameters.void
synchronizeContent(ModifiableDefaultContent content, org.slf4j.Logger logger)
Synchronize a content with remove values.boolean
synchronizeExistingContentsOnly()
True to synchronize only existing contentsvoid
updateSyncInformations(ModifiableDefaultContent content, String syncCode, org.slf4j.Logger logger)
Method to update the synchronisation informations (collection and value of the ID field).boolean
validateAfterImport()
True to validate the contents after import
-
-
-
Field Detail
-
COLLECTION_ID_PROPERTY
static final String COLLECTION_ID_PROPERTY
The name for the metadata indicating the ids of the collections- See Also:
- Constant Field Values
-
-
Method Detail
-
getLabel
I18nizableText getLabel()
Get the label of synchronizable collection- Returns:
- the label
-
getContentType
String getContentType()
Get the type of content handled by this collection- Returns:
- the type of content
-
getLanguages
List<String> getLanguages()
Get the languages handled by this collection- Returns:
- the list of language
-
getSynchronizeCollectionModelId
String getSynchronizeCollectionModelId()
Get the id of controller responsible of synchronization of this collection- Returns:
- The id of controller
-
getParameterValues
Map<String,Object> getParameterValues()
Get the untyped values of parameters for controller- Returns:
- the untyped values
-
removalSync
boolean removalSync()
When returns true, 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.
-
getWorkflowName
String 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
String 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
String 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
String getSynchronizingContentOperator()
Gets the id of theSynchronizingContentOperator
extension to use during synchronization- Returns:
- the id of the
SynchronizingContentOperator
extension to use during synchronization
-
getRestrictedField
String 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
String getIdField()
Get the path of metadata holding the unique identifier- Returns:
- the path to the metadata. Can be null.
-
getLocalAndExternalFields
Set<String> getLocalAndExternalFields(Map<String,Object> additionalParameters)
Get the path of tri-state fields (with local and external values)- Parameters:
additionalParameters
- Additional parameters- Returns:
- the synchronized fields
-
getExternalOnlyFields
Set<String> getExternalOnlyFields(Map<String,Object> additionalParameters)
Get the path of field that are valued externally only.- Parameters:
additionalParameters
- Additional parameters- Returns:
- the external fields
-
getSearchModelConfiguration
SCCSearchModelConfiguration 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
-
populate
List<ModifiableDefaultContent> populate(org.slf4j.Logger logger)
Populates contents- Parameters:
logger
- The logger- Returns:
- Return the populated contents (imported or synchronized)
-
importContent
List<ModifiableDefaultContent> importContent(String idValue, Map<String,Object> additionalParameters, org.slf4j.Logger logger) throws Exception
Import 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
void synchronizeContent(ModifiableDefaultContent content, org.slf4j.Logger logger) throws Exception
Synchronize a content with remove values.- Parameters:
content
- The content to synchronizelogger
- The logger- Throws:
Exception
- if an error occurs.
-
getContent
ModifiableDefaultContent getContent(String lang, String idValue)
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,Object>> search(Map<String,Object> parameters, int offset, int limit, List<Object> sort, org.slf4j.Logger logger)
Search the data to import from parameters.- Parameters:
parameters
- 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(ModifiableDefaultContent content, String syncCode, org.slf4j.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
int getTotalCount(Map<String,Object> parameters, org.slf4j.Logger logger)
Return the total number of results for the search.- Parameters:
parameters
- Parameters for the searchlogger
- The logger- Returns:
- The total count
-
handleRightAssignmentContext
default boolean 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
-
-