public class SiteGenerator extends Object implements Serviceable
Modifier and Type | Field and Description |
---|---|
protected Logger |
_logger
Logger available to subclasses.
|
private RenderingContextHandler |
_renderingContextHandler |
Constructor and Description |
---|
SiteGenerator() |
Modifier and Type | Method and Description |
---|---|
private void |
_copyFolder(File tempOutputDir,
String resourcesContext,
Folder folder) |
private void |
_copyResource(File tempOutputDir,
String pageContext,
String fileName,
Resource resource) |
private void |
_copySkin(Context context,
File tempOutputDir) |
private void |
_generatePage(SourceResolver resolver,
File tempOutputDir,
String siteName,
String sitemapName,
Page page) |
private void |
_generateResources(SourceResolver resolver,
File tempOutputDir,
String pageContext,
CompositeMetadata compositeMetadata) |
private void |
_generateSite(ServiceManager manager,
Map objectModel,
Site site,
File tempOutputDir) |
private void |
_generateURI(SourceResolver resolver,
File tempOutputDir,
String uri,
String destPath) |
private void |
_generationAdditionalResources(ServiceManager manager,
Site site,
File tempOutputDir) |
private void |
_pushChanges(Site site) |
void |
generate(ServiceManager manager,
Map objectModel,
Site site,
File tempOutputDir)
Generates site's content.
|
void |
service(ServiceManager manager) |
private RenderingContextHandler _renderingContextHandler
public SiteGenerator()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void generate(ServiceManager manager, Map objectModel, Site site, File tempOutputDir) throws Exception
manager
- the service manager.objectModel
- the objectModel.site
- the site to populate.tempOutputDir
- the output directory.Exception
- if an error occurs.private void _generateSite(ServiceManager manager, Map objectModel, Site site, File tempOutputDir) throws Exception
Exception
private void _generatePage(SourceResolver resolver, File tempOutputDir, String siteName, String sitemapName, Page page) throws AmetysRepositoryException, IOException, RepositoryException
private void _copySkin(Context context, File tempOutputDir) throws IOException
IOException
private void _generationAdditionalResources(ServiceManager manager, Site site, File tempOutputDir) throws Exception
Exception
private void _pushChanges(Site site) throws Exception
Exception
private void _generateResources(SourceResolver resolver, File tempOutputDir, String pageContext, CompositeMetadata compositeMetadata) throws IOException, RepositoryException
IOException
RepositoryException
private void _copyFolder(File tempOutputDir, String resourcesContext, Folder folder) throws AmetysRepositoryException, IOException, RepositoryException
private void _copyResource(File tempOutputDir, String pageContext, String fileName, Resource resource) throws IOException, RepositoryException
IOException
RepositoryException
private void _generateURI(SourceResolver resolver, File tempOutputDir, String uri, String destPath) throws IOException
IOException