org.apache.velocity.tools.view
Class CookieTool.SugarCookie

java.lang.Object
  extended by javax.servlet.http.Cookie
      extended by org.apache.velocity.tools.view.CookieTool.SugarCookie
All Implemented Interfaces:
Cloneable
Enclosing class:
CookieTool

public static class CookieTool.SugarCookie
extends Cookie

Extends Cookie to add some fluid API sugar and a toString() method that renders the Cookie's value instead of the usual Object.toString() shenanigans.


Constructor Summary
CookieTool.SugarCookie(Cookie c)
           
CookieTool.SugarCookie(String name, String value)
           
 
Method Summary
 CookieTool.SugarCookie comment(Object obj)
           
 CookieTool.SugarCookie domain(Object obj)
           
 Cookie getPlain()
           
 CookieTool.SugarCookie maxAge(Object obj)
           
 CookieTool.SugarCookie path(Object obj)
           
 CookieTool.SugarCookie secure(Object obj)
           
 String toString()
           
 CookieTool.SugarCookie value(Object obj)
           
 CookieTool.SugarCookie version(Object obj)
           
 
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
 

Constructor Detail

CookieTool.SugarCookie

public CookieTool.SugarCookie(Cookie c)

CookieTool.SugarCookie

public CookieTool.SugarCookie(String name,
                              String value)
Method Detail

value

public CookieTool.SugarCookie value(Object obj)

maxAge

public CookieTool.SugarCookie maxAge(Object obj)

comment

public CookieTool.SugarCookie comment(Object obj)

domain

public CookieTool.SugarCookie domain(Object obj)

path

public CookieTool.SugarCookie path(Object obj)

version

public CookieTool.SugarCookie version(Object obj)

secure

public CookieTool.SugarCookie secure(Object obj)

getPlain

public Cookie getPlain()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.