@Transactional public class TemplateService extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PLATFORM_XML |
protected TemplateRepository |
templateRepository |
protected TemplateResourceRepository |
templateResourceRepository |
Constructor and Description |
---|
TemplateService() |
Modifier and Type | Method and Description |
---|---|
static void |
copyTemplate(Properties platformConfig,
Properties siteProps,
String templateRealPath)
The active template for the given
Site is being copied to |
Integer |
deleteTemplate(Template template,
Properties platformConfig) |
protected static void |
deleteTemplateFolder(File templateTargetDir) |
List<Identifier> |
getInstalledTemplates()
Returns a list of all installed templates.
|
Template |
getTemplate(String templateDir) |
Template |
getTemplateByDisplayName(String name) |
Template |
getTemplateByName(String name) |
ZipFileProcessor<Template> |
getTemplateExtractor()
|
static ZipFileProcessor<Template> |
getTemplateInfo(String originalFilename)
|
static File |
getTemplateRepoFolder(Properties platformConfig,
Properties siteProps) |
Template |
installTemplate(PackageArchive packageArchive) |
static void |
materializeTemplate(Template template,
Properties platformConfig,
Properties siteProps)
Materializes the given template into the filesystem.
|
public static final String PLATFORM_XML
@Autowired protected TemplateRepository templateRepository
@Autowired protected TemplateResourceRepository templateResourceRepository
public ZipFileProcessor<Template> getTemplateExtractor()
ZipFileProcessor
public static ZipFileProcessor<Template> getTemplateInfo(String originalFilename)
originalFilename
- the original file name of the ZipFile
ZipFileProcessor
public List<Identifier> getInstalledTemplates()
Identifier
s of all installed templatespublic static void materializeTemplate(Template template, Properties platformConfig, Properties siteProps)
template
- the Template
to materializeplatformConfig
- the platform configurationsiteProps
- the Site
's Properties
public static void copyTemplate(Properties platformConfig, Properties siteProps, String templateRealPath)
Site
is being copied to
"siteRootDir"/"wwwDir"/"templatePrefix"
platformConfig
- the platform configurationsiteProps
- the Site
's Properties
templateRealPath
- the root path to the platform's template directorypublic Template installTemplate(PackageArchive packageArchive) throws BusinessException
BusinessException
public Integer deleteTemplate(Template template, Properties platformConfig)
public static File getTemplateRepoFolder(Properties platformConfig, Properties siteProps)
protected static void deleteTemplateFolder(File templateTargetDir)
public Template getTemplate(String templateDir) throws IOException, JAXBException
IOException
JAXBException
Copyright © 2011–2017 aiticon GmbH. All rights reserved.