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
public class ContentsLivePopulator extends AbstractLogEnabled implements LivePopulator, Serviceable
LivePopulator
for synchronizing '/ametys:root/ametys:contents'.
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver
_resolver
The Ametys resolverprotected SynchronizeComponent
_synchronizeHelper
The synchronize helper
-
Constructor Summary
Constructors Constructor Description ContentsLivePopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_cloneContents(Node contentsNode, Session liveSession)
Clone contents in live workspaceprotected AmetysObjectIterable<Content>
_getContents(Node contentsNode)
Get the contents of root contents nodeList<String>
populate(Session session, Session liveSession)
Populates the live workspace.void
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_synchronizeHelper
protected SynchronizeComponent _synchronizeHelper
The synchronize helper
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys resolver
-
-
Constructor Detail
-
ContentsLivePopulator
public ContentsLivePopulator()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
populate
public List<String> populate(Session session, Session liveSession) 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.- 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(Node contentsNode, Session liveSession) throws RepositoryException
Clone contents in live workspace- Parameters:
contentsNode
- The root contents nodeliveSession
- The live session- Throws:
RepositoryException
- if failed to clone contents in live
-
_getContents
protected AmetysObjectIterable<Content> _getContents(Node contentsNode) throws RepositoryException
Get the contents of root contents node- Parameters:
contentsNode
- The root contents node- Returns:
- The child contents
- Throws:
RepositoryException
- if failed to get the child contents
-
-