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
FieldsModifier and TypeFieldDescriptionprotected AmetysObjectResolverThe Ametys resolverprotected SynchronizeComponentThe synchronize helper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_cloneContents(javax.jcr.Node contentsNode, javax.jcr.Session liveSession) Clone contents in live workspaceprotected AmetysObjectIterable<Content>_getContents(javax.jcr.Node contentsNode) Get the contents of root contents nodepopulate(javax.jcr.Session session, javax.jcr.Session liveSession) Populates the live workspace.voidservice(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_synchronizeHelper
The synchronize helper -
_resolver
The Ametys resolver
-
-
Constructor Details
-
ContentsLivePopulator
public ContentsLivePopulator()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
populate
public List<String> populate(javax.jcr.Session session, javax.jcr.Session liveSession) throws Exception Description copied from interface:LivePopulatorPopulates the live workspace.- Specified by:
populatein 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(javax.jcr.Node contentsNode, javax.jcr.Session liveSession) throws javax.jcr.RepositoryException Clone contents in live workspace- Parameters:
contentsNode- The root contents nodeliveSession- The live session- 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
-