Package org.ametys.web.live
Class ContentsLivePopulator
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.live.ContentsLivePopulator
- All Implemented Interfaces:
LogEnabled
,LivePopulator
,Serviceable
- Direct Known Subclasses:
PluginsLivePopulator
LivePopulator
for synchronizing '/ametys:root/ametys:contents'.-
Field Summary
Modifier and TypeFieldDescriptionprotected I18nUtils
The utils for i18nprotected AmetysObjectResolver
The Ametys resolverprotected SynchronizeComponent
The synchronize helper -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_cloneContents
(javax.jcr.Node contentsNode, javax.jcr.Session liveSession, SimpleProgressionTracker progressionTracker) Clone contents in live workspaceprotected AmetysObjectIterable<Content>
_getContents
(javax.jcr.Node contentsNode) Get the contents of root contents nodegetLabel()
A readable label of the populatorReturn a logger for the progression trackerpopulate
(javax.jcr.Session session, javax.jcr.Session liveSession, ContainerProgressionTracker progressionTracker) Populates the live workspace.void
service
(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.web.live.LivePopulator
populate
-
Field Details
-
_synchronizeHelper
The synchronize helper -
_resolver
The Ametys resolver -
_i18nUtils
The utils for i18n
-
-
Constructor Details
-
ContentsLivePopulator
public ContentsLivePopulator()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getLabel
Description copied from interface:LivePopulator
A readable label of the populator- Specified by:
getLabel
in interfaceLivePopulator
- Returns:
- A non null value
-
getProgressionTrackerLogger
Description copied from interface:LivePopulator
Return a logger for the progression tracker- Specified by:
getProgressionTrackerLogger
in interfaceLivePopulator
- Returns:
- The logger
-
populate
public List<String> populate(javax.jcr.Session session, javax.jcr.Session liveSession, ContainerProgressionTracker progressionTracker) throws Exception Description copied from interface:LivePopulator
Populates the live workspace.- Specified by:
populate
in interfaceLivePopulator
- Parameters:
session
- the session on the default workspace.liveSession
- the session on the live workspace.progressionTracker
- The static progression tracker- Returns:
- A list of error technical messages. A message can use \n for carriage return.
- Throws:
Exception
- if an error occurs.
-
_cloneContents
protected void _cloneContents(javax.jcr.Node contentsNode, javax.jcr.Session liveSession, SimpleProgressionTracker progressionTracker) throws javax.jcr.RepositoryException Clone contents in live workspace- Parameters:
contentsNode
- The root contents nodeliveSession
- The live sessionprogressionTracker
- The progression tracker- Throws:
javax.jcr.RepositoryException
- if failed to clone contents in live
-
_getContents
protected AmetysObjectIterable<Content> _getContents(javax.jcr.Node contentsNode) throws javax.jcr.RepositoryException Get the contents of root contents node- Parameters:
contentsNode
- The root contents node- Returns:
- The child contents
- Throws:
javax.jcr.RepositoryException
- if failed to get the child contents
-