Class org.ditchnet.util.Cookie

Object
   |
   +--org.ditchnet.util.Cookie

class org.ditchnet.util.Cookie

Author: Todd Ditchendorf
Defined in tabs.js


Field Summary
<static>  Object DELIM
          
<static>  Object DOMAIN
          
<static>  Object EQUALS
          
<static>  Object EXPIRES
          
<static>  Object PATH
          
<static>  Object SECURE
          
<static>  Object SUB_VALUE_DELIM
          
 
Constructor Summary
org.ditchnet.util.Cookie ()
           

Bean that represents individual Cookie objects, packaging their attributes into a convenient API that can more easily be manipulated and set.

Also contains 2 static convenience methods for setting and the cookies for the current page.

 
Method Summary
 Object _getDefaultDomain()
           Private method to get the devault value for the domain attribute value for this Cookie object.
 Object _getDefaultExpires()
           Private method to get the devault value for the expires attribute value for this Cookie object.
 Object getDomain()
           Get the domain attribute value for this Cookie object.
 Object getExpires()
           Get the expires attribute value for this Cookie object.
 Object getName()
           Get the name attribute value for this Cookie object.
 Object getPath()
           Get the path attribute value for this Cookie object.
 Object getValue()
           Get the value attribute value for this Cookie object.
 Object isSecure()
           Get the secure attribute value for this Cookie object.
 void setDomain(domain)
           Set the domain attribute value for this Cookie object.
 void setExpires(expires)
           Set the expires attribute value for this Cookie object.
 void setName(name)
           Set the name attribute value for this Cookie object.
 void setPath(path)
           Set the path attribute value for this Cookie object.
 void setSecure(secure)
           Set the secure attribute value for this Cookie object.
 void setValue(value)
           Set the value attribute value for this Cookie object.
 Object toCookieString()
           Returns a String representation of this Cookie in the standard cookie syntax.
 Object toNameValueString()
           Returns a String representation of this Cookie in the standard cookie syntax -- but only the name and value with no trailing semicolon.
<static> void addPageCookie(c)
           Static convenience method that sets the given cookie for the current page.
<static> Object getPageCookieString()
           Static convenience method that returns all the document.cookie String for the current page.
<static> void pageHasCookieWithName(c)
          
<static> void pageHasCookieWithNameAndValue(c)
           Static convenience method that checks the document.cookie String for the current page to see if the give Cookie exists.

Field Detail

DELIM

<static> Object DELIM

DOMAIN

<static> Object DOMAIN

EQUALS

<static> Object EQUALS

EXPIRES

<static> Object EXPIRES

PATH

<static> Object PATH

SECURE

<static> Object SECURE

SUB_VALUE_DELIM

<static> Object SUB_VALUE_DELIM

Constructor Detail

org.ditchnet.util.Cookie

org.ditchnet.util.Cookie()

Method Detail

_getDefaultDomain

Object _getDefaultDomain()

_getDefaultExpires

Object _getDefaultExpires()

getDomain

Object getDomain()

getExpires

Object getExpires()

getName

Object getName()

getPath

Object getPath()

getValue

Object getValue()

isSecure

Object isSecure()

setDomain

void setDomain(domain)

setExpires

void setExpires(expires)

setName

void setName(name)

setPath

void setPath(path)

setSecure

void setSecure(secure)

setValue

void setValue(value)

toCookieString

Object toCookieString()

toNameValueString

Object toNameValueString()

addPageCookie

<static> void addPageCookie(c)

getPageCookieString

<static> Object getPageCookieString()

pageHasCookieWithName

<static> void pageHasCookieWithName(c)

pageHasCookieWithNameAndValue

<static> void pageHasCookieWithNameAndValue(c)