Class AbstractStaticSynchronizableContentsCollection
- java.lang.Object
-
- org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
-
- All Implemented Interfaces:
SynchronizableContentsCollection
,Configurable
- Direct Known Subclasses:
AbstractSynchronizableContentsCollection
public abstract class AbstractStaticSynchronizableContentsCollection extends Object implements SynchronizableContentsCollection, Configurable
Configuration is separated fromAbstractSynchronizableContentsCollection
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_contentPrefix
The prefix of the contentsprotected String
_contentType
The handled content typeprotected String
_id
The idprotected int
_initialActionId
The id of the initial action of the workflowprotected I18nizableText
_label
The labelprotected List<String>
_languages
The handled languagesprotected String
_modelId
The id of controllerprotected Map<String,Object>
_modelParamValues
The untyped values of controller's parametersprotected boolean
_removalSync
True if removal syncprotected String
_reportMails
The report mailsprotected String
_restrictedField
The path to the metadata holding the 'restricted' propertyprotected SCCSearchModelConfiguration
_searchModelConfiguration
Search model configuration for search toolprotected int
_synchronizeActionId
The id of the synchronize action of the workflowprotected boolean
_synchronizeExistingContentsOnly
The id of the content operator to useprotected String
_synchronizingContentOperator
The id of the content operator to useprotected int
_validateActionId
The id of the validate action of the workflowprotected boolean
_validateAfterImport
True to validate contents after importprotected String
_workflowName
The name of the workflow-
Fields inherited from interface org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollection
COLLECTION_ID_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description AbstractStaticSynchronizableContentsCollection()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected List<String>
_parseLanguages(Configuration configuration)
Parse languages configurationprotected Map<String,Object>
_parseParameters(Configuration configuration)
Parse parameters' valuesvoid
configure(Configuration configuration)
protected abstract void
configureDataSource(Configuration configuration)
Configure the data source parameters.protected abstract void
configureSearchModel()
Configure the search model used by SCCSearchTool.protected void
configureStaticParams(Configuration configuration)
Called inconfigure(Configuration)
for first configurations needed.String
getContentPrefix()
Get the prefix to use for the creation of contentsString
getContentType()
Get the type of content handled by this collectionString
getId()
Get the id of synchronizable collection.int
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 collectionMap<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
getValidateActionId()
Get the id of the validate action of the workflowString
getWorkflowName()
Get the name of the workflow to use for the synchronized 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.boolean
synchronizeExistingContentsOnly()
True to synchronize only existing contentsboolean
validateAfterImport()
True to validate the contents after import-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollection
getContent, getExternalOnlyFields, getIdField, getLocalAndExternalFields, getTotalCount, handleRightAssignmentContext, importContent, populate, search, synchronizeContent, updateSyncInformations
-
-
-
-
Field Detail
-
_label
protected I18nizableText _label
The label
-
_restrictedField
protected String _restrictedField
The path to the metadata holding the 'restricted' property
-
_contentType
protected String _contentType
The handled content type
-
_languages
protected List<String> _languages
The handled languages
-
_modelParamValues
protected Map<String,Object> _modelParamValues
The untyped values of controller's parameters
-
_removalSync
protected boolean _removalSync
True if removal sync
-
_workflowName
protected String _workflowName
The name of the workflow
-
_initialActionId
protected int _initialActionId
The id of the initial action of the workflow
-
_synchronizeActionId
protected int _synchronizeActionId
The id of the synchronize action of the workflow
-
_validateActionId
protected int _validateActionId
The id of the validate action of the workflow
-
_contentPrefix
protected String _contentPrefix
The prefix of the contents
-
_validateAfterImport
protected boolean _validateAfterImport
True to validate contents after import
-
_reportMails
protected String _reportMails
The report mails
-
_synchronizingContentOperator
protected String _synchronizingContentOperator
The id of the content operator to use
-
_synchronizeExistingContentsOnly
protected boolean _synchronizeExistingContentsOnly
The id of the content operator to use
-
_searchModelConfiguration
protected SCCSearchModelConfiguration _searchModelConfiguration
Search model configuration for search tool
-
-
Constructor Detail
-
AbstractStaticSynchronizableContentsCollection
public AbstractStaticSynchronizableContentsCollection()
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
configureStaticParams
protected void configureStaticParams(Configuration configuration) throws ConfigurationException
Called inconfigure(Configuration)
for first configurations needed.- Parameters:
configuration
- Configuration to read- Throws:
ConfigurationException
- If an error occurs
-
configureDataSource
protected abstract void configureDataSource(Configuration configuration) throws ConfigurationException
Configure the data source parameters.- Parameters:
configuration
- Configuration to read- Throws:
ConfigurationException
- If an error occurs
-
configureSearchModel
protected abstract void configureSearchModel()
Configure the search model used by SCCSearchTool.
-
getId
public String getId()
Description copied from interface:SynchronizableContentsCollection
Get the id of synchronizable collection.- Specified by:
getId
in interfaceSynchronizableContentsCollection
- Returns:
- the id
-
getLabel
public I18nizableText getLabel()
Description copied from interface:SynchronizableContentsCollection
Get the label of synchronizable collection- Specified by:
getLabel
in interfaceSynchronizableContentsCollection
- Returns:
- the label
-
getContentType
public String getContentType()
Description copied from interface:SynchronizableContentsCollection
Get the type of content handled by this collection- Specified by:
getContentType
in interfaceSynchronizableContentsCollection
- Returns:
- the type of content
-
getLanguages
public List<String> getLanguages()
Description copied from interface:SynchronizableContentsCollection
Get the languages handled by this collection- Specified by:
getLanguages
in interfaceSynchronizableContentsCollection
- Returns:
- the list of language
-
getRestrictedField
public String getRestrictedField()
Description copied from interface:SynchronizableContentsCollection
Get the path of boolean metadata for restricted content. If true, the content will be visible only for connected users.- Specified by:
getRestrictedField
in interfaceSynchronizableContentsCollection
- Returns:
- the path to the metadata. Can be null.
-
getSynchronizeCollectionModelId
public String getSynchronizeCollectionModelId()
Description copied from interface:SynchronizableContentsCollection
Get the id of controller responsible of synchronization of this collection- Specified by:
getSynchronizeCollectionModelId
in interfaceSynchronizableContentsCollection
- Returns:
- The id of controller
-
getParameterValues
public Map<String,Object> getParameterValues()
Description copied from interface:SynchronizableContentsCollection
Get the untyped values of parameters for controller- Specified by:
getParameterValues
in interfaceSynchronizableContentsCollection
- Returns:
- the untyped values
-
removalSync
public boolean removalSync()
Description copied from interface:SynchronizableContentsCollection
When returns true, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.- Specified by:
removalSync
in interfaceSynchronizableContentsCollection
- 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
public String getWorkflowName()
Description copied from interface:SynchronizableContentsCollection
Get the name of the workflow to use for the synchronized contents- Specified by:
getWorkflowName
in interfaceSynchronizableContentsCollection
- Returns:
- the name of the workflow to use for the synchronized contents
-
getInitialActionId
public int getInitialActionId()
Description copied from interface:SynchronizableContentsCollection
Get the id of the initial action of the workflow- Specified by:
getInitialActionId
in interfaceSynchronizableContentsCollection
- Returns:
- The id of the initial action of the workflow
-
getSynchronizeActionId
public int getSynchronizeActionId()
Description copied from interface:SynchronizableContentsCollection
Get the id of the synchronize action of the workflow- Specified by:
getSynchronizeActionId
in interfaceSynchronizableContentsCollection
- Returns:
- The id of the synchronize action of the workflow
-
getValidateActionId
public int getValidateActionId()
Description copied from interface:SynchronizableContentsCollection
Get the id of the validate action of the workflow- Specified by:
getValidateActionId
in interfaceSynchronizableContentsCollection
- Returns:
- The id of the validate action of the workflow
-
getContentPrefix
public String getContentPrefix()
Description copied from interface:SynchronizableContentsCollection
Get the prefix to use for the creation of contents- Specified by:
getContentPrefix
in interfaceSynchronizableContentsCollection
- Returns:
- The prefix to use for the creation of contents
-
validateAfterImport
public boolean validateAfterImport()
Description copied from interface:SynchronizableContentsCollection
True to validate the contents after import- Specified by:
validateAfterImport
in interfaceSynchronizableContentsCollection
- Returns:
- True to validate the contents after import
-
getReportMails
public String getReportMails()
Description copied from interface:SynchronizableContentsCollection
If an exception occurs during synchronization, an error report mail will be sent to those email addresses (separated by new lines)- Specified by:
getReportMails
in interfaceSynchronizableContentsCollection
- Returns:
- The email addresses to send an error report if an exception occurs during synchronization (separated by new lines)
-
getSynchronizingContentOperator
public String getSynchronizingContentOperator()
Description copied from interface:SynchronizableContentsCollection
Gets the id of theSynchronizingContentOperator
extension to use during synchronization- Specified by:
getSynchronizingContentOperator
in interfaceSynchronizableContentsCollection
- Returns:
- the id of the
SynchronizingContentOperator
extension to use during synchronization
-
synchronizeExistingContentsOnly
public boolean synchronizeExistingContentsOnly()
Description copied from interface:SynchronizableContentsCollection
True to synchronize only existing contents- Specified by:
synchronizeExistingContentsOnly
in interfaceSynchronizableContentsCollection
- Returns:
- True to synchronize only existing contents
-
getSearchModelConfiguration
public SCCSearchModelConfiguration getSearchModelConfiguration()
Description copied from interface:SynchronizableContentsCollection
Get the search UI model for search tool (columns, criterias, url for buttons, etc.)- Specified by:
getSearchModelConfiguration
in interfaceSynchronizableContentsCollection
- Returns:
- A
SCCSearchModelConfiguration
-
_parseParameters
protected Map<String,Object> _parseParameters(Configuration configuration) throws ConfigurationException
Parse parameters' values- Parameters:
configuration
- The root configuration- Returns:
- The parameters
- Throws:
ConfigurationException
- if an error occurred
-
_parseLanguages
protected List<String> _parseLanguages(Configuration configuration) throws ConfigurationException
Parse languages configuration- Parameters:
configuration
- the configuration- Returns:
- the list of handled languages
- Throws:
ConfigurationException
- if an error occurred
-
-