Class AbstractStaticSynchronizableContentsCollection
java.lang.Object
org.ametys.plugins.contentio.synchronize.AbstractStaticSynchronizableContentsCollection
- All Implemented Interfaces:
SynchronizableContentsCollection,Configurable,Serviceable
- Direct Known Subclasses:
AbstractSynchronizableContentsCollection
public abstract class AbstractStaticSynchronizableContentsCollection
extends Object
implements SynchronizableContentsCollection, Configurable, Serviceable
Configuration is separated from
AbstractSynchronizableContentsCollection-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentDAOThe content DAOprotected StringThe prefix of the contentsprotected StringThe handled content typeprotected ContentTypeExtensionPointThe content type extension pointprotected StringThe idprotected booleanTrue to ignore restrictions on attributes while synchronizationprotected intThe id of the initial action of the workflowprotected I18nizableTextThe labelThe handled languagesprotected StringThe id of controllerThe untyped values of controller's parametersprotected booleanTrue if removal syncprotected StringThe report mailsprotected AmetysObjectResolverThe Ametys object resolverprotected StringThe path to the metadata holding the 'restricted' propertyprotected SynchronizableContentsCollectionHelperThe SCC helperprotected SCCSearchModelConfigurationSearch model configuration for search toolprotected intThe id of the synchronize action of the workflowprotected booleanThe id of the content operator to useprotected StringThe id of the content operator to useprotected intThe id of the validate action of the workflowprotected booleanTrue to validate contents after importprotected StringThe name of the workflowFields inherited from interface org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollection
COLLECTION_ID_DATA_NAME, LAST_SYNCHRONIZATION_DATA_NAME, LAST_SYNCHRONIZATION_USER_DATA_NAME, RESULT_NB_CREATED_CONTENTS, RESULT_NB_DELETED_CONTENTS, RESULT_NB_NOT_CHANGED_CONTENTS, RESULT_NB_SYNCHRONIZED_CONTENTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_parseLanguages(Configuration configuration) Parse languages configuration_parseParameters(Configuration configuration) Parse parameters' valuesTransform the remote values to take each attribute cardinality into accountvoidconfigure(Configuration configuration) protected abstract voidconfigureDataSource(Configuration configuration) Configure the data source parameters.protected abstract voidConfigure the search model used by SCCSearchTool.protected voidconfigureStaticParams(Configuration configuration) Called inconfigure(Configuration)for first configurations needed.Get the prefix to use for the creation of contentsGet the type of content handled by this collectiongetId()Get the id of synchronizable collection.intGet the id of the initial action of the workflowgetLabel()Get the label of synchronizable collectionGet the languages handled by this collectionGet 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.)intGet the id of the synchronize action of the workflowGet the id of controller responsible of synchronization of this collectionGets the id of theSynchronizingContentOperatorextension to use during synchronizationintGet the id of the validate action of the workflowGet the name of the workflow to use for the synchronized contentsbooleanWhen returnstrue, the process ignore restrictions on attributes to synchronize it.booleanWhen returnstrue, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.voidservice(ServiceManager manager) booleanTrue to synchronize only existing contentsbooleanTrue to validate the contents after importMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.plugins.contentio.synchronize.SynchronizableContentsCollection
additionalCommonOperations, additionalImportOperations, additionalSynchronizeOperations, empty, getContent, getIdField, getLocalAndExternalFields, getSynchronizationResult, getTotalCount, handleRightAssignmentContext, importContent, populate, search, synchronizeContent, updateSyncInformations
-
Field Details
-
_resolver
The Ametys object resolver -
_sccHelper
The SCC helper -
_contentDAO
The content DAO -
_contentTypeEP
The content type extension point -
_id
The id -
_label
The label -
_restrictedField
The path to the metadata holding the 'restricted' property -
_contentType
The handled content type -
_languages
The handled languages -
_modelId
The id of controller -
_modelParamValues
The untyped values of controller's parameters -
_removalSync
True if removal sync -
_ignoreRestrictions
True to ignore restrictions on attributes while synchronization -
_workflowName
The name of the workflow -
_initialActionId
The id of the initial action of the workflow -
_synchronizeActionId
The id of the synchronize action of the workflow -
_validateActionId
The id of the validate action of the workflow -
_contentPrefix
The prefix of the contents -
_validateAfterImport
True to validate contents after import -
_reportMails
The report mails -
_synchronizingContentOperator
The id of the content operator to use -
_synchronizeExistingContentsOnly
The id of the content operator to use -
_searchModelConfiguration
Search model configuration for search tool
-
-
Constructor Details
-
AbstractStaticSynchronizableContentsCollection
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
configureStaticParams
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
Configure the search model used by SCCSearchTool. -
getId
Description copied from interface:SynchronizableContentsCollectionGet the id of synchronizable collection.- Specified by:
getIdin interfaceSynchronizableContentsCollection- Returns:
- the id
-
getLabel
Description copied from interface:SynchronizableContentsCollectionGet the label of synchronizable collection- Specified by:
getLabelin interfaceSynchronizableContentsCollection- Returns:
- the label
-
getContentType
Description copied from interface:SynchronizableContentsCollectionGet the type of content handled by this collection- Specified by:
getContentTypein interfaceSynchronizableContentsCollection- Returns:
- the type of content
-
getLanguages
Description copied from interface:SynchronizableContentsCollectionGet the languages handled by this collection- Specified by:
getLanguagesin interfaceSynchronizableContentsCollection- Returns:
- the list of language
-
getRestrictedField
Description copied from interface:SynchronizableContentsCollectionGet the path of boolean metadata for restricted content. If true, the content will be visible only for connected users.- Specified by:
getRestrictedFieldin interfaceSynchronizableContentsCollection- Returns:
- the path to the metadata. Can be null.
-
getSynchronizeCollectionModelId
Description copied from interface:SynchronizableContentsCollectionGet the id of controller responsible of synchronization of this collection- Specified by:
getSynchronizeCollectionModelIdin interfaceSynchronizableContentsCollection- Returns:
- The id of controller
-
getParameterValues
Description copied from interface:SynchronizableContentsCollectionGet the untyped values of parameters for controller- Specified by:
getParameterValuesin interfaceSynchronizableContentsCollection- Returns:
- the untyped values
-
removalSync
Description copied from interface:SynchronizableContentsCollectionWhen returnstrue, a content created by a previous synchro will be removed if it does not exist anymore during the current synchro.- Specified by:
removalSyncin interfaceSynchronizableContentsCollection- Returns:
trueif a content created by a previous synchro has to be removed if it does not exist anymore during the current synchro.
-
ignoreRestrictions
Description copied from interface:SynchronizableContentsCollectionWhen returnstrue, the process ignore restrictions on attributes to synchronize it.- Specified by:
ignoreRestrictionsin interfaceSynchronizableContentsCollection- Returns:
trueto ignore restrictions on synchronization
-
getWorkflowName
Description copied from interface:SynchronizableContentsCollectionGet the name of the workflow to use for the synchronized contents- Specified by:
getWorkflowNamein interfaceSynchronizableContentsCollection- Returns:
- the name of the workflow to use for the synchronized contents
-
getInitialActionId
Description copied from interface:SynchronizableContentsCollectionGet the id of the initial action of the workflow- Specified by:
getInitialActionIdin interfaceSynchronizableContentsCollection- Returns:
- The id of the initial action of the workflow
-
getSynchronizeActionId
Description copied from interface:SynchronizableContentsCollectionGet the id of the synchronize action of the workflow- Specified by:
getSynchronizeActionIdin interfaceSynchronizableContentsCollection- Returns:
- The id of the synchronize action of the workflow
-
getValidateActionId
Description copied from interface:SynchronizableContentsCollectionGet the id of the validate action of the workflow- Specified by:
getValidateActionIdin interfaceSynchronizableContentsCollection- Returns:
- The id of the validate action of the workflow
-
getContentPrefix
Description copied from interface:SynchronizableContentsCollectionGet the prefix to use for the creation of contents- Specified by:
getContentPrefixin interfaceSynchronizableContentsCollection- Returns:
- The prefix to use for the creation of contents
-
validateAfterImport
Description copied from interface:SynchronizableContentsCollectionTrue to validate the contents after import- Specified by:
validateAfterImportin interfaceSynchronizableContentsCollection- Returns:
- True to validate the contents after import
-
getReportMails
Description copied from interface:SynchronizableContentsCollectionIf an exception occurs during synchronization, an error report mail will be sent to those email addresses (separated by new lines)- Specified by:
getReportMailsin interfaceSynchronizableContentsCollection- Returns:
- The email addresses to send an error report if an exception occurs during synchronization (separated by new lines)
-
getSynchronizingContentOperator
Description copied from interface:SynchronizableContentsCollectionGets the id of theSynchronizingContentOperatorextension to use during synchronization- Specified by:
getSynchronizingContentOperatorin interfaceSynchronizableContentsCollection- Returns:
- the id of the
SynchronizingContentOperatorextension to use during synchronization
-
synchronizeExistingContentsOnly
Description copied from interface:SynchronizableContentsCollectionTrue to synchronize only existing contents- Specified by:
synchronizeExistingContentsOnlyin interfaceSynchronizableContentsCollection- Returns:
- True to synchronize only existing contents
-
getSearchModelConfiguration
Description copied from interface:SynchronizableContentsCollectionGet the search UI model for search tool (columns, criterias, url for buttons, etc.)- Specified by:
getSearchModelConfigurationin 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
Parse languages configuration- Parameters:
configuration- the configuration- Returns:
- the list of handled languages
- Throws:
ConfigurationException- if an error occurred
-
_transformRemoteValuesCardinality
protected Map<String,Object> _transformRemoteValuesCardinality(Map<String, List<Object>> remoteValues, String contentTypeId) Transform the remote values to take each attribute cardinality into account- Parameters:
remoteValues- the remote valuescontentTypeId- the content type ID from which attributes come from- Returns:
- the transformed values
-