public abstract class AbstractRequestProcessor extends Object implements RequestProcessor
| Modifier and Type | Field and Description |
|---|---|
protected int |
contentLength |
protected String |
contentType |
protected DefaultEnvironment |
env |
protected static String |
INDEX_HTML |
protected MarshallService |
marshallService |
protected org.appng.core.model.NavigationBuilder |
navigationBuilder |
protected OutputFormat |
outputFormat |
protected OutputType |
outputType |
protected PathInfo |
pathInfo |
protected static String |
PLATFORM_XML |
protected boolean |
redirect |
protected javax.servlet.http.HttpServletRequest |
servletRequest |
protected javax.servlet.http.HttpServletResponse |
servletResponse |
protected static String |
STACKTRACE_TXT |
protected String |
templatePath |
| Constructor and Description |
|---|
AbstractRequestProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addTemplates(List<Template> templates) |
protected Authentication |
determineActiveAuthentication(Site site,
Authentications authentications) |
protected void |
determineFormatAndType(PlatformConfig config,
Path pathInfo) |
protected ApplicationProvider |
getApplicationProvider(Site site) |
Integer |
getContentLength()
Returns the content-length of the response
|
String |
getContentType()
Returns the content-type of the response
|
protected static String |
getDebugFilePrefix(Date timestamp) |
MarshallService |
getMarshallService() |
OutputFormat |
getOutputFormat() |
OutputType |
getOutputType() |
Platform |
getPlatform(MarshallService marshallService,
Path path)
Returns the
Platform-object unmarshalled from the template's
"conf/platform.xml"-file. |
String |
getTemplatePath() |
void |
init(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
PathInfo pathInfo,
String templateDir)
Initializes the
RequestProcessor. |
static void |
initPlatform(Platform platform,
Environment env,
Path path) |
boolean |
isRedirect()
Returns
true if a redirect has been send while processing the request, false otherwise. |
Platform |
processPlatform(Site applicationSite)
Processes the request, but without applying the template.
|
void |
setMarshallService(MarshallService marshallService) |
protected void |
setRedirect(boolean redirect) |
void |
setTemplatePath(String templatePath) |
protected static void |
writeDebugFile(org.slf4j.Logger logger,
File outFolder,
String name,
String content) |
protected String |
writeErrorPage(Properties platformProperties,
File debugFolder,
String platformXml,
String templateName,
Exception e,
Object executionContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessWithTemplateprotected static final String PLATFORM_XML
protected static final String STACKTRACE_TXT
protected static final String INDEX_HTML
protected PathInfo pathInfo
protected javax.servlet.http.HttpServletRequest servletRequest
protected javax.servlet.http.HttpServletResponse servletResponse
protected MarshallService marshallService
protected DefaultEnvironment env
protected boolean redirect
protected String contentType
protected int contentLength
protected org.appng.core.model.NavigationBuilder navigationBuilder
protected String templatePath
protected OutputFormat outputFormat
protected OutputType outputType
public static void initPlatform(Platform platform, Environment env, Path path)
public Platform processPlatform(Site applicationSite) throws InvalidConfigurationException
RequestProcessorRequestProcessor.init(HttpServletRequest, HttpServletResponse, PathInfo, String) must have been called before.processPlatform in interface RequestProcessorapplicationSite - the Site for which the process the requestPlatform representing the result of calling the Site's ApplicationInvalidConfigurationException - if something goes wrong while processing the requestRequestProcessor.processWithTemplate(Site, File)protected Authentication determineActiveAuthentication(Site site, Authentications authentications)
public void init(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
PathInfo pathInfo,
String templateDir)
RequestProcessorRequestProcessor.init in interface RequestProcessorservletRequest - the current HttpServletRequestservletResponse - the current HttpServletResponsepathInfo - the current PathInfotemplateDir - the absolute path to the directory where the active template of the Site residespublic boolean isRedirect()
RequestProcessortrue if a redirect has been send while processing the request, false otherwise.isRedirect in interface RequestProcessorprotected void setRedirect(boolean redirect)
protected ApplicationProvider getApplicationProvider(Site site) throws InvalidConfigurationException
InvalidConfigurationExceptionpublic Integer getContentLength()
RequestProcessorgetContentLength in interface RequestProcessorpublic String getContentType()
RequestProcessorgetContentType in interface RequestProcessorpublic MarshallService getMarshallService()
public void setMarshallService(MarshallService marshallService)
protected void determineFormatAndType(PlatformConfig config, Path pathInfo)
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()protected String writeErrorPage(Properties platformProperties, File debugFolder, String platformXml, String templateName, Exception e, Object executionContext)
protected static void writeDebugFile(org.slf4j.Logger logger,
File outFolder,
String name,
String content)
throws IOException
IOExceptionpublic OutputFormat getOutputFormat()
public OutputType getOutputType()
public String getTemplatePath()
public void setTemplatePath(String templatePath)
Copyright © 2011–2023 aiticon GmbH. All rights reserved.