Package org.appng.core.model
Interface RequestProcessor
-
- All Known Implementing Classes:
AbstractRequestProcessor
,PlatformProcessor
,ThymeleafProcessor
public interface RequestProcessor
Processes a request to the appNG GUI.
This includes:- checking whether or not the user is logged in (and redirect to the login if this is not the case)
- calling the right
Application
of the requestedSite
- building the
Platform
-object - applying the
Template
of theSite
to that object
- Author:
- Matthias Müller
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Integer
getContentLength()
Returns the content-length of the responseString
getContentType()
Returns the content-type of the responsevoid
init(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, PathInfo pathInfo, String templateDir)
Initializes theRequestProcessor
.boolean
isRedirect()
Returnstrue
if a redirect has been send while processing the request,false
otherwise.Platform
processPlatform(Site site)
Processes the request, but without applying the template.String
processWithTemplate(Site site, File debugRootFolder)
Processes the request, including the processing of the template.
-
-
-
Method Detail
-
processPlatform
Platform processPlatform(Site site) throws InvalidConfigurationException
Processes the request, but without applying the template. Note thatinit(HttpServletRequest, HttpServletResponse, PathInfo, String)
must have been called before.- Parameters:
site
- theSite
for which the process the request- Returns:
- the
Platform
representing the result of calling theSite
'sApplication
- Throws:
InvalidConfigurationException
- if something goes wrong while processing the request- See Also:
processWithTemplate(Site, File)
-
processWithTemplate
String processWithTemplate(Site site, File debugRootFolder) throws InvalidConfigurationException
Processes the request, including the processing of the template. Note thatinit(HttpServletRequest, HttpServletResponse, PathInfo, String)
must have been called before.- Parameters:
site
- theSite
for which the process the requestdebugRootFolder
- the folder to write debug files to- Returns:
- the result of calling the
Application
and applying theTemplate
. This should then be written to theHttpServletResponse
- Throws:
InvalidConfigurationException
- if something goes wrong while processing the request- See Also:
processPlatform(Site)
-
getContentType
String getContentType()
Returns the content-type of the response
-
getContentLength
Integer getContentLength()
Returns the content-length of the response
-
init
void init(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, PathInfo pathInfo, String templateDir)
Initializes theRequestProcessor
.
-
isRedirect
boolean isRedirect()
Returnstrue
if a redirect has been send while processing the request,false
otherwise.
-
-