|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cocoon.environment.portlet.PortletCookie
public final class PortletCookie
Implements Cookie interface for the JSR-168 Portlet environment.
Portlet preferences are available in the Cocoon as Cookie objects.
| Constructor Summary | |
|---|---|
PortletCookie(String name,
String value)
|
|
| Method Summary | |
|---|---|
String |
getComment()
Returns the comment describing the purpose of this cookie, or null if the cookie has no comment. |
String |
getDomain()
Returns the domain name set for this cookie. |
int |
getMaxAge()
Returns the maximum age of the cookie, specified in seconds, By default, -1 indicating the cookie will persist
until browser shutdown. |
String |
getName()
Returns the name of the cookie. |
String |
getPath()
Returns the path on the server to which the browser returns this cookie. |
boolean |
getSecure()
Returns true if the browser is sending cookies
only over a secure protocol, or false if the
browser can send cookies using any protocol. |
String |
getValue()
Returns the value of the cookie. |
int |
getVersion()
Returns the version of the protocol this cookie complies with. |
void |
init(String name,
String value)
Constructs a cookie with a specified name and value. |
void |
setComment(String purpose)
This method does nothing |
void |
setDomain(String pattern)
This method does nothing |
void |
setMaxAge(int expiry)
This method does nothing |
void |
setPath(String uri)
This method does nothing |
void |
setSecure(boolean flag)
This method does nothing |
void |
setValue(String newValue)
Assigns a new value to a cookie after the cookie is created. |
void |
setVersion(int v)
Sets the version of the cookie protocol this cookie complies with. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PortletCookie(String name,
String value)
| Method Detail |
|---|
public void init(String name,
String value)
name - a String specifying the name of the cookievalue - a String specifying the value of the cookiesetValue(String)public void setComment(String purpose)
setComment in interface Cookiepurpose - a String specifying the comment
to display to the userCookie.getComment()public String getComment()
Cookienull if the cookie has no comment.
getComment in interface CookiesetComment(String)public void setDomain(String pattern)
setDomain in interface Cookiepattern - a String containing the domain name
within which this cookie is visible;
form is according to RFC 2109Cookie.getDomain()public String getDomain()
Cookie
getDomain in interface CookiesetDomain(String)public void setMaxAge(int expiry)
setMaxAge in interface Cookieexpiry - an integer specifying the maximum age of the
cookie in seconds; if negative, means
the cookie is not stored; if zero, deletes
the cookieCookie.getMaxAge()public int getMaxAge()
Cookie-1 indicating the cookie will persist
until browser shutdown.
getMaxAge in interface CookiesetMaxAge(int)public void setPath(String uri)
setPath in interface Cookieuri - a String specifying a pathCookie.getPath()public String getPath()
Cookie
getPath in interface CookiesetPath(String)public void setSecure(boolean flag)
setSecure in interface Cookieflag - if true, sends the cookie from the browser
to the server using only when using a secure protocol;
if false, sent on any protocolgetSecure()public boolean getSecure()
Cookietrue if the browser is sending cookies
only over a secure protocol, or false if the
browser can send cookies using any protocol.
getSecure in interface CookiesetSecure(boolean)public String getName()
getName in interface CookieString specifying the cookie's namepublic void setValue(String newValue)
With Version 0 cookies, values should not contain white space, brackets, parentheses, equals signs, commas, double quotes, slashes, question marks, at signs, colons, and semicolons. Empty values may not behave the same way on all browsers.
setValue in interface CookienewValue - a String specifying the new valuegetValue(),
Cookiepublic String getValue()
getValue in interface CookieString containing the cookie's
present valuesetValue(String),
Cookiepublic int getVersion()
getVersion in interface CookiesetVersion(int)public void setVersion(int v)
setVersion in interface Cookiev - 0 if the cookie should comply with
the original Netscape specification;
1 if the cookie should comply with RFC 2109getVersion()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||