Class ApogeeSynchronizableContentsCollectionHelper
- java.lang.Object
-
- org.ametys.plugins.odfsync.apogee.scc.ApogeeSynchronizableContentsCollectionHelper
-
- All Implemented Interfaces:
Component
,Contextualizable
,Serviceable
public class ApogeeSynchronizableContentsCollectionHelper extends Object implements Serviceable, Component, Contextualizable
Helper for Apogee Synchronizable Contents Collections.
-
-
Field Summary
Fields Modifier and Type Field Description protected Context
_context
Contextprotected ODFHelper
_odfHelper
The ODF Helperprotected SynchronizableContentsCollectionDAO
_sccDAO
SCC DAOprotected SynchronizableContentsCollectionHelper
_sccHelper
SCC DAOstatic String
HANDLE_CONTENTS
Request attribute name to store handle contents during import or synchronization.static String
ROLE
The Avalon Role
-
Constructor Summary
Constructors Constructor Description ApogeeSynchronizableContentsCollectionHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addToHandleContents(String contentId)
Add the content ID to the handle contents list.void
contextualize(Context context)
Optional<AbstractApogeeSynchronizableContentsCollection>
getContentSCC(Content content, org.slf4j.Logger logger)
Get the Apogee SCC for the content if it existsvoid
service(ServiceManager smanager)
void
synchronizeContent(ModifiableContent content, org.slf4j.Logger logger)
Synchronize the content or its children if the content has no Apogee SCC
-
-
-
Field Detail
-
HANDLE_CONTENTS
public static final String HANDLE_CONTENTS
Request attribute name to store handle contents during import or synchronization.
-
_sccHelper
protected SynchronizableContentsCollectionHelper _sccHelper
SCC DAO
-
_odfHelper
protected ODFHelper _odfHelper
The ODF Helper
-
_sccDAO
protected SynchronizableContentsCollectionDAO _sccDAO
SCC DAO
-
-
Constructor Detail
-
ApogeeSynchronizableContentsCollectionHelper
public ApogeeSynchronizableContentsCollectionHelper()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
synchronizeContent
public void synchronizeContent(ModifiableContent content, org.slf4j.Logger logger)
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, org.slf4j.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
public boolean addToHandleContents(String contentId)
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.
-
-