|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.services.webpage.WebPageHelper
Helper methods for WebPage Service
Field Summary | |
static int |
CT_APPLICATION
|
static int |
CT_BINARY
|
static int |
CT_CSS
|
static int |
CT_HTML
|
static int |
CT_IMAGE
|
static int |
CT_JS
|
static int |
CT_TEXT
|
Constructor Summary | |
WebPageHelper()
|
Method Summary | |
static java.lang.String |
buildCookieString(javax.servlet.http.Cookie cookie)
Given a cookie object, build a http-compliant cookie string header |
static java.lang.String |
concatURLs(java.lang.String base,
java.lang.String path)
Given a base string and a path string, concatenates the strings to make a full URL. |
static long |
generateId()
|
static java.lang.String |
getAvailabilityStatus(int status)
|
static int |
getContentType(java.lang.String typeString,
java.lang.String resource)
Given the content-type header string, returns a content type id |
static java.lang.String |
getIP(java.lang.String hostname)
|
static boolean |
parseCookies(java.lang.String cookieHeader,
SiteSession session)
Parses cookies from the HTTP response header string and stores them into this instance's cookies collection |
static java.lang.StringBuffer |
replaceAll(java.lang.StringBuffer buffer,
java.lang.String find,
java.lang.String replacement)
given a stringbuffer, replaces 'find' with 'replacement' |
static void |
writeHeader(java.io.FileOutputStream fos,
java.lang.String resource)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CT_TEXT
public static final int CT_BINARY
public static final int CT_APPLICATION
public static final int CT_HTML
public static final int CT_IMAGE
public static final int CT_CSS
public static final int CT_JS
Constructor Detail |
public WebPageHelper()
Method Detail |
public static int getContentType(java.lang.String typeString, java.lang.String resource)
typeString
- the http content-type header string.
public static java.lang.String buildCookieString(javax.servlet.http.Cookie cookie)
public static boolean parseCookies(java.lang.String cookieHeader, SiteSession session)
cookieHeader
- the string from the response header with the cookies.
public static java.lang.StringBuffer replaceAll(java.lang.StringBuffer buffer, java.lang.String find, java.lang.String replacement)
buffer
- the string to be manipulated.find
- the string to be replaced.replacement
- the string that is put in place.public static java.lang.String concatURLs(java.lang.String base, java.lang.String path)
base
- the base part of a URL, such as http://localhost/path
- the path part of the url, such as /webinterface/controllers/x.phppublic static java.lang.String getAvailabilityStatus(int status)
public static void writeHeader(java.io.FileOutputStream fos, java.lang.String resource) throws java.io.IOException
java.io.IOException
public static java.lang.String getIP(java.lang.String hostname)
public static long generateId()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |