Class ApogeeSynchronizableContentsCollectionHelper
java.lang.Object
org.ametys.plugins.odfsync.apogee.scc.ApogeeSynchronizableContentsCollectionHelper
- All Implemented Interfaces:
Initializable
,Component
,Contextualizable
,Serviceable
public class ApogeeSynchronizableContentsCollectionHelper
extends Object
implements Serviceable, Component, Contextualizable, Initializable
Helper for Apogee Synchronizable Contents Collections.
-
Field Summary
Modifier and TypeFieldDescriptionprotected CatalogsManager
The catalogs managerprotected ContentDAO
Content DAOprotected Context
Contextprotected ODFHelper
The ODF Helperprotected String
Default language configured for ODFprotected SynchronizableContentsCollectionDAO
SCC DAOprotected SynchronizableContentsCollectionHelper
SCC DAOstatic final String
Request attribute name to store catalog during import or synchronization.static final String
Request attribute name to store handled contents during import or synchronization.static final String
Request attribute name to store language during import or synchronization.static final String
The Avalon Role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addToHandleContents
(String contentId) Add the content ID to the handle contents list.void
contextualize
(Context context) getContentSCC
(Content content, Logger logger) Get the Apogee SCC for the content if it existsGet the synchronization catalog, can be the one defined by the synchronized content or the default catalog.Get the synchronization language, can be the one defined by the synchronized content or the ODF language.void
void
service
(ServiceManager smanager) void
synchronizeContent
(ModifiableContent content, Logger logger) Synchronize the content or its children if the content has no Apogee SCC
-
Field Details
-
ROLE
The Avalon Role -
HANDLED_CONTENTS
Request attribute name to store handled contents during import or synchronization. -
CATALOG
Request attribute name to store catalog during import or synchronization. -
LANG
Request attribute name to store language during import or synchronization. -
_sccHelper
SCC DAO -
_odfHelper
The ODF Helper -
_sccDAO
SCC DAO -
_contentDAO
Content DAO -
_catalogsManager
The catalogs manager -
_context
Context -
_odfLang
Default language configured for ODF
-
-
Constructor Details
-
ApogeeSynchronizableContentsCollectionHelper
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
synchronizeContent
Synchronize the content or its children if the content has no Apogee SCC- Parameters:
content
- the contentlogger
- the logger
-
getContentSCC
public Optional<AbstractApogeeSynchronizableContentsCollection> getContentSCC(Content content, Logger logger) Get the Apogee SCC for the content if it exists- Parameters:
content
- The content to search onlogger
- the logger- Returns:
- the Apogee SCC
-
addToHandleContents
Add the content ID to the handle contents list.- Parameters:
contentId
- Content ID- Returns:
true
if the content ID have been added,false
is returned if the content ID already exists in the handle contents list.
-
getSynchronizationCatalog
Get the synchronization catalog, can be the one defined by the synchronized content or the default catalog.- Returns:
- the synchronization catalog, can be null
-
getSynchronizationLang
Get the synchronization language, can be the one defined by the synchronized content or the ODF language.- Returns:
- the synchronization language
-