Constructor and Description |
---|
PlatformTransformer() |
Modifier and Type | Method and Description |
---|---|
void |
addTemplates(List<Template> templates)
Adds the given
Template s to the upcoming transformation. |
static void |
clearCache()
Clears the internal template-cache, which must be done if a
Site is being reloaded. |
String |
getContentType()
Returns the content-type of the transformation result.
|
protected String |
getDebugFilePrefix(TransformerException te,
String platformXML) |
Environment |
getEnvironment() |
OutputFormat |
getOutputFormat()
Returns the
OutputFormat used during transformation |
OutputType |
getOutputType()
Returns the
OutputType used during transformation |
Platform |
getPlatform(MarshallService marshallService,
Path path)
Returns the
Platform -object unmarshalled from the template's
"conf/platform.xml"-file. |
StyleSheetProvider |
getStyleSheetProvider() |
void |
setEnvironment(Environment environment) |
void |
setOutputFormat(OutputFormat outputFormat) |
void |
setOutputType(OutputType outputType) |
void |
setStyleSheetProvider(StyleSheetProvider styleSheetProvider) |
void |
setTemplatePath(String templatePath)
Sets the path to the active template of the current
Site . |
String |
transform(ApplicationProvider applicationProvider,
Properties platformProperties,
String platformXML,
String charSet)
Performs the transformation.
|
protected void |
writeDebugFiles(String rootPath,
String platformXML,
org.appng.core.model.PlatformTransformer.SourceAwareTemplate sourceAwareTemplate,
TransformerException te) |
public String transform(ApplicationProvider applicationProvider, Properties platformProperties, String platformXML, String charSet) throws FileNotFoundException, TransformerException
Template
s
of the used OutputType
and those previously added via addTemplates(List)
(assumed the
OutputType
matches).applicationProvider
- the current ApplicationProvider
platformProperties
- the platform-Properties
platformXML
- an XML-string retrieved from a Platform
-objectcharSet
- the character-set to used in the returned content-type (see getContentType()
)FileNotFoundException
- if a template XSL-file could not be foundTransformerException
- when parsing or applying the XSLT template failsprotected void writeDebugFiles(String rootPath, String platformXML, org.appng.core.model.PlatformTransformer.SourceAwareTemplate sourceAwareTemplate, TransformerException te)
protected String getDebugFilePrefix(TransformerException te, String platformXML)
public StyleSheetProvider getStyleSheetProvider()
public void setStyleSheetProvider(StyleSheetProvider styleSheetProvider)
public void addTemplates(List<Template> templates)
Template
s to the upcoming transformation.templates
- a list of Template
spublic Environment getEnvironment()
public void setEnvironment(Environment environment)
public Platform getPlatform(MarshallService marshallService, Path path) throws InvalidConfigurationException
Platform
-object unmarshalled from the template's
"conf/platform.xml"-file. Also determines the OutputType
and
OutputFormat
for the upcoming transformation.marshallService
- the MarshallService
to use for unmarshallingpath
- the current Path
-objectPlatform
-objectInvalidConfigurationException
- if the "conf/platform.xml"-file could net be found or
unmarshalled.getOutputFormat()
,
getOutputType()
public String getContentType()
public void setTemplatePath(String templatePath)
Site
.templatePath
- the absolute path to the directory where template of the Site
residespublic static void clearCache()
Site
is being reloaded.public OutputFormat getOutputFormat()
OutputFormat
used during transformationOutputFormat
public void setOutputFormat(OutputFormat outputFormat)
public OutputType getOutputType()
OutputType
used during transformationOutputType
public void setOutputType(OutputType outputType)
Copyright © 2011–2017 aiticon GmbH. All rights reserved.