org.apache.tapestry.services
Interface CookieSource

All Known Implementing Classes:
CookieSourceImpl

public interface CookieSource

Used by other services to obtain cookie values for the current request.

Since:
4.0
Author:
Howard Lewis Ship

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 writeCookieValue(java.lang.String name, java.lang.String value)
          Creates or updates a cookie value.
 

Method Detail

readCookieValue

java.lang.String readCookieValue(java.lang.String name)
Returns the value of the first cookie whose name matches. Returns null if no such cookie exists.


writeCookieValue

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


removeCookieValue

void removeCookieValue(java.lang.String name)
Removes a previously written cookie, by writing a new cookie with a maxAge of 0.