public class SitePopulator extends AbstractLogEnabled implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
private LiveAccessManager |
_liveAccessManager |
private Repository |
_repository |
private SynchronizeComponent |
_synchronizeComponent |
static String |
ROLE
Avalon role.
|
Constructor and Description |
---|
SitePopulator() |
Modifier and Type | Method and Description |
---|---|
private void |
_cloneContents(Session liveSession,
Site site,
Node siteNode,
Node clonedSiteNode) |
private void |
_cloneProperties(Node siteNode,
Node clonedSiteNode)
Copy all properties from a site node to another.
|
private void |
_cloneSitemaps(Session liveSession,
Site site,
Skin skin,
Node siteNode,
Node clonedSiteNode) |
private Node |
_cloneSiteNode(Session liveSession,
Site site,
Node siteNode,
String siteNodePath,
Node liveRootNode)
Clone a site node in the live workspace.
|
protected void |
_populate(Session liveSession,
Node clonedSitemapsNode,
Sitemap sitemap,
Skin skin)
Populates a sitemap.
|
protected void |
_populate(Session liveSession,
Site site,
Skin skin)
Populates a site
|
void |
populate(Site site,
Skin skin)
Populates the live workspace.
|
void |
service(ServiceManager manager) |
getLogger, setLogger
private Repository _repository
private LiveAccessManager _liveAccessManager
private SynchronizeComponent _synchronizeComponent
public SitePopulator()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void populate(Site site, Skin skin) throws Exception
site
- the site to populate.skin
- the site skin modelException
- if an error occurs.protected void _populate(Session liveSession, Site site, Skin skin) throws RepositoryException
liveSession
- the live workspace session.site
- the site to populate.skin
- the site skin modelRepositoryException
- if an error occurs.private Node _cloneSiteNode(Session liveSession, Site site, Node siteNode, String siteNodePath, Node liveRootNode) throws RepositoryException
liveSession
- the live session.site
- the source site.siteNode
- the site node to clone.siteNodePath
- the site node path.liveRootNode
- the live root node.RepositoryException
- if an error occurs.private void _cloneProperties(Node siteNode, Node clonedSiteNode) throws RepositoryException
siteNode
- the site JCR nodeclonedSiteNode
- the JCR node of site to copyRepositoryException
- if an error occurred during copyprivate void _cloneContents(Session liveSession, Site site, Node siteNode, Node clonedSiteNode) throws RepositoryException
RepositoryException
private void _cloneSitemaps(Session liveSession, Site site, Skin skin, Node siteNode, Node clonedSiteNode) throws PathNotFoundException, RepositoryException
protected void _populate(Session liveSession, Node clonedSitemapsNode, Sitemap sitemap, Skin skin) throws RepositoryException
liveSession
- The live sessionclonedSitemapsNode
- the cloned sitemaps node.sitemap
- the sitemap to populate.skin
- the site skin modelRepositoryException
- if an error occurs.