public class WGPDispatcher
extends javax.servlet.http.HttpServlet
Modifier and Type | Class and Description |
---|---|
static class |
WGPDispatcher.PathDispatchingOccasion |
class |
WGPDispatcher.TemporaryDownload |
static class |
WGPDispatcher.TemporaryDownloadsMap |
static class |
WGPDispatcher.URLID |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COOKIE_LASTREDIRECT |
static java.lang.String |
DEFAULT_LANGUAGE_TOKEN |
static java.lang.String |
REQUESTTYPE_STATICTML |
static java.lang.String |
REQUESTTYPE_TML |
static java.lang.String |
SESSION_AJAX_GENERAL_FAILURE_MESSAGE_SHOWN |
static java.lang.String |
SESSION_LOGINS |
static java.lang.String |
SESSION_TEMPORARYDOWNLOADS |
static java.lang.String |
SESSION_VARS |
static java.lang.String |
URLPARAM_ACTION |
static java.lang.String |
URLPARAM_DERIVATE |
static java.lang.String |
URLPARAM_MAXHEIGHT |
static java.lang.String |
URLPARAM_MAXWIDTH |
static java.lang.String |
URLPARAM_VARS |
Constructor and Description |
---|
WGPDispatcher() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addTemporaryDownload(javax.servlet.http.HttpSession session,
java.io.File file) |
java.lang.String |
addTemporaryDownload(javax.servlet.http.HttpSession session,
de.innovationgate.utils.TemporaryFile file) |
boolean |
browserCacheIsValid(javax.servlet.http.HttpServletRequest request,
java.lang.Long lastModified,
java.lang.String currentETag) |
static java.lang.String |
buildContentURLID(de.innovationgate.webgate.api.WGContent content,
java.lang.String mediaKey,
boolean isBI) |
static java.lang.String |
buildLayoutURLID(de.innovationgate.webgate.api.WGDatabase db,
java.lang.String layoutKey,
java.lang.String language,
java.lang.String mediaKey) |
static java.lang.String |
buildVirtualLink(WGA wga,
de.innovationgate.webgate.api.WGContent content,
java.lang.String mediaKey,
java.lang.String layoutKey) |
void |
destroy() |
de.innovationgate.webgate.api.WGTMLModule |
determineErrorModule(de.innovationgate.webgate.api.WGDatabase errorDatabase,
WGA wga,
WGAError error) |
java.lang.String |
determineFavicon(javax.servlet.http.HttpServletRequest request) |
boolean |
dispatchErrorTmlRequest(WGAError error,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
dispatchToRenderer(WGA wga,
Design layout,
TMLContext context,
java.lang.String mediaKey) |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
java.util.Map<java.lang.String,Cookie> |
fetchHttpCookies(javax.servlet.http.HttpServletRequest request) |
java.lang.String |
getAdminLoginURL(javax.servlet.http.HttpServletRequest req,
java.lang.String sourceURL) |
int |
getBrowsingSecurity(de.innovationgate.webgate.api.WGDatabase db) |
static java.lang.String |
getCompleteRequestURL(javax.servlet.http.HttpServletRequest request) |
static java.lang.String |
getCompleteRequestURL(java.lang.StringBuffer requestURL,
java.lang.String queryString) |
static de.innovationgate.webgate.api.WGContent |
getContentByAnyKey(java.lang.String contentKey,
de.innovationgate.webgate.api.WGDatabase database,
javax.servlet.http.HttpServletRequest req) |
static de.innovationgate.webgate.api.WGContent |
getContentByAnyKey(java.lang.String contentKey,
de.innovationgate.webgate.api.WGDatabase database,
de.innovationgate.webgate.api.WGLanguageChooser languageChooser,
boolean isBI) |
static de.innovationgate.webgate.api.WGContent |
getContentByAnyKey(WGPDispatcher.URLID id,
de.innovationgate.webgate.api.WGDatabase database,
de.innovationgate.webgate.api.WGLanguageChooser languageChooser,
boolean isBI) |
java.lang.String |
getContextPath()
Gets the contextPath
|
WGACore |
getCore() |
int |
getListenPort()
Gets the listenPort
|
java.lang.String |
getLoginURL(javax.servlet.http.HttpServletRequest req,
de.innovationgate.webgate.api.WGDatabase database,
java.lang.String sourceURL) |
static java.lang.String |
getPublisherURL(javax.servlet.http.HttpServletRequest request) |
static java.lang.String |
getPublisherURL(javax.servlet.http.HttpServletRequest request,
boolean absolute) |
java.lang.String |
getServletInfo() |
void |
init(javax.servlet.ServletConfig config) |
boolean |
isAdminLoggedIn(javax.servlet.http.HttpServletRequest request) |
static boolean |
isAuthoringMode(java.lang.String dbReference,
javax.servlet.http.HttpSession session) |
boolean |
isBinary(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static boolean |
isBrowserInterface(javax.servlet.http.HttpSession session)
Method isBrowserInterface.
|
boolean |
isRedirectable(javax.servlet.http.HttpServletRequest request,
java.lang.String redirectPath,
javax.servlet.http.Cookie lastRedirectCookie) |
boolean |
isServePages()
Returns the servePages.
|
PostProcessResult |
postProcessDesignResource(de.innovationgate.webgate.api.WGCSSJSModule lib,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
PostProcessResult |
postProcessDesignResource(de.innovationgate.webgate.api.WGCSSJSModule lib,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Boolean compress) |
static java.lang.StringBuffer |
qualifyWGAURL(java.lang.String url,
javax.servlet.http.HttpServletRequest req,
de.innovationgate.webgate.api.WGDatabase database,
boolean qualifyWithoutDBKey)
Takes a URL, and qualifies it to be a complete path, given the following
schema: - If the url contains double slashes "//" it is considered to be
a complete path already and returned unmodified - If the url starts with
a slash "/" (and param qualifyWithoutDBKey is true) it is considered to be starting with a database key and it
is only completed by the OpenWGA context path - If the url does not
start with a slash (or qualifyWithoutDBKey is false) it is considered to be a relative path for the given
database.
|
void |
rootDispatch(WGA wga,
Design outerLayout,
TMLContext mainContext,
java.lang.String mediaKey) |
static void |
saveUserProfile(WGACore core,
TMLUserProfile tmlUserProfile,
javax.servlet.http.HttpServletRequest request) |
void |
sendError(int code,
java.lang.String message)
Deprecated.
instead throw HttpErrorException directly
|
void |
sendError(int code,
java.lang.String message,
java.lang.String dbHint)
Deprecated.
instead throw HttpErrorException directly
|
void |
setContextPath(java.lang.String contextPath)
Sets the contextPath
|
void |
setServePages(boolean servePages)
Sets the servePages.
|
void |
shutdown() |
public static final java.lang.String SESSION_AJAX_GENERAL_FAILURE_MESSAGE_SHOWN
public static final java.lang.String COOKIE_LASTREDIRECT
public static final java.lang.String URLPARAM_MAXWIDTH
public static final java.lang.String URLPARAM_MAXHEIGHT
public static final java.lang.String URLPARAM_DERIVATE
public static final java.lang.String REQUESTTYPE_TML
public static final java.lang.String REQUESTTYPE_STATICTML
public static final java.lang.String SESSION_VARS
public static final java.lang.String SESSION_LOGINS
public static final java.lang.String SESSION_TEMPORARYDOWNLOADS
public static final java.lang.String URLPARAM_VARS
public static final java.lang.String URLPARAM_ACTION
public static final java.lang.String DEFAULT_LANGUAGE_TOKEN
public void doPut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPut
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public boolean isRedirectable(javax.servlet.http.HttpServletRequest request, java.lang.String redirectPath, javax.servlet.http.Cookie lastRedirectCookie)
public java.lang.String determineFavicon(javax.servlet.http.HttpServletRequest request)
public void rootDispatch(WGA wga, Design outerLayout, TMLContext mainContext, java.lang.String mediaKey) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public void dispatchToRenderer(WGA wga, Design layout, TMLContext context, java.lang.String mediaKey) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public java.util.Map<java.lang.String,Cookie> fetchHttpCookies(javax.servlet.http.HttpServletRequest request)
public static void saveUserProfile(WGACore core, TMLUserProfile tmlUserProfile, javax.servlet.http.HttpServletRequest request) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public static boolean isAuthoringMode(java.lang.String dbReference, javax.servlet.http.HttpSession session)
public static boolean isBrowserInterface(javax.servlet.http.HttpSession session)
request
- public static java.lang.String buildContentURLID(de.innovationgate.webgate.api.WGContent content, java.lang.String mediaKey, boolean isBI) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public static java.lang.String buildLayoutURLID(de.innovationgate.webgate.api.WGDatabase db, java.lang.String layoutKey, java.lang.String language, java.lang.String mediaKey) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public static java.lang.String getCompleteRequestURL(javax.servlet.http.HttpServletRequest request)
public static java.lang.String getCompleteRequestURL(java.lang.StringBuffer requestURL, java.lang.String queryString)
public static de.innovationgate.webgate.api.WGContent getContentByAnyKey(java.lang.String contentKey, de.innovationgate.webgate.api.WGDatabase database, javax.servlet.http.HttpServletRequest req) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public static de.innovationgate.webgate.api.WGContent getContentByAnyKey(java.lang.String contentKey, de.innovationgate.webgate.api.WGDatabase database, de.innovationgate.webgate.api.WGLanguageChooser languageChooser, boolean isBI) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public static de.innovationgate.webgate.api.WGContent getContentByAnyKey(WGPDispatcher.URLID id, de.innovationgate.webgate.api.WGDatabase database, de.innovationgate.webgate.api.WGLanguageChooser languageChooser, boolean isBI) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public PostProcessResult postProcessDesignResource(de.innovationgate.webgate.api.WGCSSJSModule lib, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws de.innovationgate.webgate.api.WGException, java.lang.InstantiationException, java.lang.IllegalAccessException
de.innovationgate.webgate.api.WGException
java.lang.InstantiationException
java.lang.IllegalAccessException
public PostProcessResult postProcessDesignResource(de.innovationgate.webgate.api.WGCSSJSModule lib, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Boolean compress) throws de.innovationgate.webgate.api.WGException, java.lang.InstantiationException, java.lang.IllegalAccessException
de.innovationgate.webgate.api.WGException
java.lang.InstantiationException
java.lang.IllegalAccessException
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
GenericServlet.init(ServletConfig)
public WGACore getCore()
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
GenericServlet.destroy()
public void shutdown()
public java.lang.String getLoginURL(javax.servlet.http.HttpServletRequest req, de.innovationgate.webgate.api.WGDatabase database, java.lang.String sourceURL) throws java.io.UnsupportedEncodingException, de.innovationgate.webgate.api.WGException
java.io.UnsupportedEncodingException
de.innovationgate.webgate.api.WGException
public java.lang.String getAdminLoginURL(javax.servlet.http.HttpServletRequest req, java.lang.String sourceURL) throws java.io.UnsupportedEncodingException, org.apache.commons.httpclient.URIException
java.io.UnsupportedEncodingException
org.apache.commons.httpclient.URIException
public static java.lang.StringBuffer qualifyWGAURL(java.lang.String url, javax.servlet.http.HttpServletRequest req, de.innovationgate.webgate.api.WGDatabase database, boolean qualifyWithoutDBKey)
url
- The url to qualifyreq
- A request object, used to determine the application context
pathdatabase
- A database, used to determine a database keyqualifyWithoutDBKey
- If true interprets paths beginning with slash to already contain the database key. Otherwise paths beginning with slash are interpreted to be relative to the database URL.public static java.lang.String getPublisherURL(javax.servlet.http.HttpServletRequest request, boolean absolute)
public static java.lang.String getPublisherURL(javax.servlet.http.HttpServletRequest request)
public int getBrowsingSecurity(de.innovationgate.webgate.api.WGDatabase db)
public java.lang.String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
getServletInfo
in class javax.servlet.GenericServlet
GenericServlet.getServletInfo()
public java.lang.String getContextPath()
public void setContextPath(java.lang.String contextPath)
contextPath
- The contextPath to setpublic int getListenPort()
public boolean isServePages()
public boolean isAdminLoggedIn(javax.servlet.http.HttpServletRequest request)
public void setServePages(boolean servePages)
servePages
- The servePages to setpublic static java.lang.String buildVirtualLink(WGA wga, de.innovationgate.webgate.api.WGContent content, java.lang.String mediaKey, java.lang.String layoutKey) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public void sendError(int code, java.lang.String message, java.lang.String dbHint) throws HttpErrorException
code
- message
- dbHint
- HttpErrorException
public void sendError(int code, java.lang.String message) throws HttpErrorException
code
- message
- HttpErrorException
public java.lang.String addTemporaryDownload(javax.servlet.http.HttpSession session, de.innovationgate.utils.TemporaryFile file)
public java.lang.String addTemporaryDownload(javax.servlet.http.HttpSession session, java.io.File file) throws java.io.IOException
java.io.IOException
public boolean browserCacheIsValid(javax.servlet.http.HttpServletRequest request, java.lang.Long lastModified, java.lang.String currentETag)
public boolean isBinary(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public boolean dispatchErrorTmlRequest(WGAError error, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)