|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sssw.fw.util.EboCookieUtil
This class provides methods for working with Cookies from the Browser response specified in the context object.
Constructor Summary | |
EboCookieUtil()
|
Method Summary | |
static void |
addCookieToResponse(EbiContext context,
Cookie cookie)
Adds a cookie to the underlying response |
static Cookie |
getCookie(EbiContext context,
String cookieName)
Retrieves a cookie from the underlying request with the specified name |
static Cookie |
getCookieFromBrowser(String cookieName,
int maxAge,
EbiContext context,
boolean create)
Get the cookie identified by cookieName from the context's request. |
static String |
getCookieHeader(Cookie cookie)
Construction the Set-cookie header value based on the past in cookie |
static Enumeration |
getCookieNames(EbiContext context)
Return the names of all cookies found in the request object of the context |
static Cookie[] |
getCookies(EbiContext context)
Retrieves the cookies that are part of the contexts request object |
static Cookie[] |
getCookies(String cookieHeader)
Takes a string in the form of the http header and returns an array of cookies |
static String |
getCookieValue(EbiContext context,
String cookieName)
Get the cookie value of the cookie specified by the cookieName. |
static Object |
getCookieValue(String cookieName,
EbiContext context)
Get the cookie value. |
static int |
getMaxAge(int days)
Return the max age specified by this cookie. |
static void |
setCookieInBrowser(Cookie cookie,
EbiContext context)
Set the cookie into the response provided by the context |
static void |
setCookieValue(String cookieName,
String cookieValue,
int maxAge,
EbiContext context)
Set the cookie into the response provided by the context using specified value and max age. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public EboCookieUtil()
Method Detail |
public static Cookie[] getCookies(String cookieHeader)
Example cookie header: Cookie: Name1=Value1; Name2=Value2; Name3=Value3; Name4=Value4
- public static void addCookieToResponse(EbiContext context, Cookie cookie)
This method will determine the response type of the response contained by the context. It will then add the cookie to the response object
context
- the originating contextcookie
- the cookie to be added to the responsepublic static String getCookieHeader(Cookie cookie)
cookie
- the original cookiepublic static void setCookieInBrowser(Cookie cookie, EbiContext context)
cookie
- The cookie to place in the browser.context
- The context that provides the response object for the cookie.public static int getMaxAge(int days)
public static void setCookieValue(String cookieName, String cookieValue, int maxAge, EbiContext context)
cookieName
- Name of the CookiecookieValue
- Set the Cookie to the value specified by this parametermaxAge
- Number of days before Browser expires the Cookiecontext
- com.sssw.fw.api.EbiContext that provides the response object
for the cookie.public static Object getCookieValue(String cookieName, EbiContext context)
cookieName
- Name of the Cookiecontext
- com.sssw.fw.api.EbiContext that provides the request object
for the cookie.public static String getCookieValue(EbiContext context, String cookieName)
cookieName
- Name of the Cookiecontext
- com.sssw.fw.api.EbiContext that provides the request object
for the cookie.public static Cookie getCookieFromBrowser(String cookieName, int maxAge, EbiContext context, boolean create)
cookieName
- the identifier for the cookie.maxAge
- the maxAge of the cookie in the browser.context
- the context that provides the request to retrieve the cookie fromcreate
- true = create cookie if it does not exist
false = do not create cookie if it does not existpublic static Cookie[] getCookies(EbiContext context)
context
- public static Cookie getCookie(EbiContext context, String cookieName)
context
- cookieName
- public static Enumeration getCookieNames(EbiContext context)
context
- the com.sssw.fw.api.EbiContext object that provides the request
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |