|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.http.Cookie
org.pajes.servlet.PajeCookie
public class PajeCookie
The PajeCookie class adds to the functionality of the Cookie class by providing the facility to handle "sub-values". Thus, multiple key/value pairs can be safely stored inside the one cookie, removing the necessity to use a whole series of cookies, one for each piece of information to be stored.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_NAME
This is the default name assigned to instances created with the null constructor. |
| Constructor Summary | |
|---|---|
PajeCookie()
Builds a new cookie with the default name. |
|
PajeCookie(javax.servlet.http.Cookie cookie)
Builds a PajeCookie from a normal Cookie instance. |
|
PajeCookie(java.lang.String name)
Builds a new cookie with a specified name. |
|
| Method Summary | |
|---|---|
void |
deleteSubValue(java.lang.String key)
This method removes a sub-value associated with a specified key from the cookie's list of sub-values. |
java.lang.String |
getSubValue(java.lang.String key)
This method searches the cookie value for a specified key amongst the sub-values, and returns an associated sub-value string value if it is found. |
boolean |
isNew()
Determines if this is a new cookie, or if it was created from an existing cookie. |
void |
setSubValue(java.lang.String key,
java.lang.String value)
This method stores a key/value pair as a sub-value within the cookie's value string. |
java.lang.String |
toString()
|
| Methods inherited from class javax.servlet.http.Cookie |
|---|
clone, getComment, getDomain, getMaxAge, getName, getPath, getSecure, getValue, getVersion, setComment, setDomain, setMaxAge, setPath, setSecure, setValue, setVersion |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_NAME
| Constructor Detail |
|---|
public PajeCookie()
default name.
public PajeCookie(javax.servlet.http.Cookie cookie)
cookie - The Cookie to copy from when instantiating the new PajeCookie.public PajeCookie(java.lang.String name)
name - The name to be assigned to the new cookie| Method Detail |
|---|
public void deleteSubValue(java.lang.String key)
key - The key to be removed from the list of sub-values.public java.lang.String getSubValue(java.lang.String key)
key - The key to search for.
public boolean isNew()
public void setSubValue(java.lang.String key,
java.lang.String value)
key - The key to reference the value with.value - The information to be stored.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||