|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.handler.util.Util
public class Util
| Constructor Summary | |
|---|---|
Util(javax.servlet.ServletConfig servletConfig)
|
|
| Method Summary | |
|---|---|
java.lang.String |
encodeURL(java.lang.String url,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Sign url. |
java.lang.String |
encrypt(java.lang.String value)
Return the encrypted, normalized value. |
java.lang.String |
getContents(java.lang.String urlString,
boolean allowCache)
Return the contents of url. |
java.lang.String |
getContents(java.lang.String urlString,
nl.gx.proxy.Header[] headers,
boolean allowCache)
Return the contents of url. |
javax.sql.DataSource |
getDataSource(java.lang.String datasource)
|
java.lang.String |
getExternalContents(java.net.URL url)
Return the contents of url. |
static Util |
getInstance()
|
static nl.gx.webmanager.handler.config.ObjectTimeStampFetcher |
getObjectTimeStampFetcher()
Creates an instance of an ObjectTimeStampFetcher. |
nl.gx.proxy.connection.HttpConnection |
getShowConnection(java.lang.String urlString,
nl.gx.proxy.Header[] headers,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates a connection to the Controller servlet. |
java.lang.String |
getShowContents(java.lang.String urlString,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Return the contents of url. |
static nl.gx.proxy.TimeStampFetcher |
getSoftTimeStampFetcher(nl.gx.webmanager.handler.config.ObjectTimeStampFetcher objectTimestampFetcher)
Creates an instance a softTimeStampFetcher for the given objectTimestampFetcher. |
java.lang.String |
getUserName(javax.servlet.http.HttpServletRequest req)
Returns whatever is stored under GX_username in the session. |
boolean |
isCacheAllowed(java.lang.String requestServerName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Checks whether caching is allow for a request on the specified host. |
static boolean |
isSecureServerName(java.lang.String servername)
Indicates whether the servername argument is a secure domain. |
static void |
setInstance(Util util)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util(javax.servlet.ServletConfig servletConfig)
| Method Detail |
|---|
public static nl.gx.webmanager.handler.config.ObjectTimeStampFetcher getObjectTimeStampFetcher()
public static nl.gx.proxy.TimeStampFetcher getSoftTimeStampFetcher(nl.gx.webmanager.handler.config.ObjectTimeStampFetcher objectTimestampFetcher)
objectTimestampFetcher - an objectTimestampFetcher
public static void setInstance(Util util)
public static Util getInstance()
public javax.sql.DataSource getDataSource(java.lang.String datasource)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getUserName(javax.servlet.http.HttpServletRequest req)
req - The request from which the user header should be read.
public java.lang.String encodeURL(java.lang.String url,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws java.io.UnsupportedEncodingException
url - req - res -
java.io.UnsupportedEncodingExceptionpublic java.lang.String encrypt(java.lang.String value)
value -
public java.lang.String getShowContents(java.lang.String urlString,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
urlString - The url for which the content should be returnedheaders - The extra request headers that should be added to the request to the origin serverallowCache - Indicates whether cached content is acceptable
java.io.IOException - If the content could not be read completely
public nl.gx.proxy.connection.HttpConnection getShowConnection(java.lang.String urlString,
nl.gx.proxy.Header[] headers,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.net.MalformedURLException,
java.io.IOException
urlString - The url representation of the contents that should be retrievedheaders - The headers that should be set when fetching the contents.request - The original request that should be used in a request dispatcher.response - The original reponse that should be used in a request dispatcher.
java.net.MalformedURLException - If the urlString argument could not be parsed.
java.io.IOException - If the content could not be retrieved successfully
public java.lang.String getContents(java.lang.String urlString,
boolean allowCache)
throws java.io.IOException
urlString - The url for which the content should be returnedallowCache - Indicates whether cached content is acceptable
java.io.IOException - If the content could not be read completely
public java.lang.String getContents(java.lang.String urlString,
nl.gx.proxy.Header[] headers,
boolean allowCache)
throws java.io.IOException
urlString - The url for which the content should be returnedheaders - The extra request headers that should be added to the request to the origin serverallowCache - Indicates whether cached content is acceptable
java.io.IOException - If the content could not be read completely
public java.lang.String getExternalContents(java.net.URL url)
throws java.io.IOException
url - The url for which the content should be returned
java.io.IOException - If the content could not be read completely
public boolean isCacheAllowed(java.lang.String requestServerName,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
requestServerName - The host in the original request.
true if a request for on the specified requestServerName should check the cache
for a cached version. false if caching is not allowed for that servername.
Possible reason for this are: the hostname is an editing domain or caching has been disabled in
general.public static boolean isSecureServerName(java.lang.String servername)
servername - the servername from where the request came
true if it is a configured secure servername, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||