org.apache.tapestry.services.impl
Class CookieSourceImpl

java.lang.Object
  extended by org.apache.tapestry.services.impl.CookieSourceImpl
All Implemented Interfaces:
CookieSource

public class CookieSourceImpl
extends java.lang.Object
implements CookieSource

Implementation of the CookieSourceservice interface.

Since:
4.0
Author:
Howard Lewis Ship

Constructor Summary
CookieSourceImpl()
           
 
Method Summary
 java.lang.String readCookieValue(java.lang.String name)
          Returns the value of the first cookie whose name matches.
 void removeCookieValue(java.lang.String name)
          Removes a previously written cookie, by writing a new cookie with a maxAge of 0.
 void setRequest(javax.servlet.http.HttpServletRequest request)
           
 void setResponse(javax.servlet.http.HttpServletResponse response)
           
 void writeCookieValue(java.lang.String name, java.lang.String value)
          Creates or updates a cookie value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieSourceImpl

public CookieSourceImpl()
Method Detail

readCookieValue

public java.lang.String readCookieValue(java.lang.String name)
Description copied from interface: CookieSource
Returns the value of the first cookie whose name matches. Returns null if no such cookie exists.

Specified by:
readCookieValue in interface CookieSource

writeCookieValue

public void writeCookieValue(java.lang.String name,
                             java.lang.String value)
Description copied from interface: CookieSource
Creates or updates a cookie value. The value is stored permanently (no timeout, not session based). TODO: add suport for timeouts and session cookies.

Specified by:
writeCookieValue in interface CookieSource

removeCookieValue

public void removeCookieValue(java.lang.String name)
Description copied from interface: CookieSource
Removes a previously written cookie, by writing a new cookie with a maxAge of 0.

Specified by:
removeCookieValue in interface CookieSource

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)

setResponse

public void setResponse(javax.servlet.http.HttpServletResponse response)