public class PlatformProcessor extends AbstractRequestProcessor
RequestProcessor
-implementation, using an XSLT based template.contentLength, contentType, env, INDEX_HTML, marshallService, navigationBuilder, outputFormat, outputType, pathInfo, PLATFORM_XML, redirect, servletRequest, servletResponse, STACKTRACE_TXT, templatePath
Constructor and Description |
---|
PlatformProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addTemplates(List<Template> templates) |
Platform |
getPlatform(MarshallService marshallService,
Path path)
Returns the
Platform -object unmarshalled from the template's
"conf/platform.xml"-file. |
PlatformTransformer |
getPlatformTransformer() |
void |
init(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
PathInfo pathInfo,
String templateDir)
Initializes the
RequestProcessor . |
String |
processWithTemplate(Site applicationSite,
File debugRootFolder)
Processes the request, including the processing of the template.
|
void |
setPlatformTransformer(PlatformTransformer platformTransformer) |
protected void |
writeTemplateToErrorPage(Properties platformProperties,
File debugFolder,
Exception templateException,
Object executionContext,
StringWriter errorPage) |
determineActiveAuthentication, determineFormatAndType, getApplicationProvider, getContentLength, getContentType, getDebugFilePrefix, getMarshallService, getOutputFormat, getOutputType, getTemplatePath, initPlatform, isRedirect, processPlatform, setMarshallService, setRedirect, setTemplatePath, writeDebugFile, writeErrorPage
public void init(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, PathInfo pathInfo, String templateDir)
RequestProcessor
RequestProcessor
.init
in interface RequestProcessor
init
in class AbstractRequestProcessor
servletRequest
- the current HttpServletRequest
servletResponse
- the current HttpServletResponse
pathInfo
- the current PathInfo
templateDir
- the absolute path to the directory where the active template of the Site
residespublic Platform getPlatform(MarshallService marshallService, Path path) throws InvalidConfigurationException
AbstractRequestProcessor
Platform
-object unmarshalled from the template's
"conf/platform.xml"-file. Also determines the OutputType
and
OutputFormat
for the upcoming transformation.getPlatform
in class AbstractRequestProcessor
marshallService
- the MarshallService
to use for unmarshallingpath
- the current Path
-objectPlatform
-objectInvalidConfigurationException
- if the "conf/platform.xml"-file could net be found or
unmarshalled.AbstractRequestProcessor.getOutputFormat()
,
AbstractRequestProcessor.getOutputType()
public String processWithTemplate(Site applicationSite, File debugRootFolder) throws InvalidConfigurationException
RequestProcessor
RequestProcessor.init(HttpServletRequest, HttpServletResponse, PathInfo, String)
must have been called before.applicationSite
- the Site
for which the process the requestdebugRootFolder
- the folder to write debug files toApplication
and applying the Template
. This should then be
written to the HttpServletResponse
InvalidConfigurationException
- if something goes wrong while processing the requestRequestProcessor.processPlatform(Site)
protected void writeTemplateToErrorPage(Properties platformProperties, File debugFolder, Exception templateException, Object executionContext, StringWriter errorPage)
public PlatformTransformer getPlatformTransformer()
public void setPlatformTransformer(PlatformTransformer platformTransformer)
protected void addTemplates(List<Template> templates)
addTemplates
in class AbstractRequestProcessor
Copyright © 2011–2021 aiticon GmbH. All rights reserved.