@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) |
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()
ZipFileProcessorpublic static ZipFileProcessor<Template> getTemplateInfo(String originalFilename)
originalFilename - the original file name of the ZipFileZipFileProcessorpublic List<Identifier> getInstalledTemplates()
Identifiers of all installed templatespublic static void materializeTemplate(Template template, Properties platformConfig, Properties siteProps)
template - the Template to materializeplatformConfig - the platform configurationsiteProps - the Site's Propertiespublic static void copyTemplate(Properties platformConfig, Properties siteProps, String templateRealPath)
Site is being copied to
"siteRootDir"/"wwwDir"/"templatePrefix"
platformConfig - the platform configurationsiteProps - the Site's PropertiestemplateRealPath - the root path to the platform's template directorypublic Template installTemplate(PackageArchive packageArchive) throws BusinessException
BusinessExceptionpublic static File getTemplateRepoFolder(Properties platformConfig, Properties siteProps)
protected static void deleteTemplateFolder(File templateTargetDir)
public Template getTemplate(String templateDir) throws IOException, JAXBException
IOExceptionJAXBExceptionCopyright © 2011–2020 aiticon GmbH. All rights reserved.