tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Stepanov <denis.stepa...@gmail.com>
Subject Re: [PATCH] First shot at reworking the Cookies interface.
Date Mon, 19 Nov 2012 11:38:15 GMT
It looks more like a cookie writer than a builder.

It would be better to create an interface a.p.t.s.Cookie alternative to the javax.servlet.http.Cookie
so it would be possible to modify current cookie value without using the servlet api, all
setters could return Cookie instance to support method chaining, than there is no need for
a builder at all.

Suggested API:

cookies.create("abc", "xyz").setPath("fff").setMaxAge("fdfdf") ...

cookies.has("abc") // checks if cookie with a name "abc" exists

cookies.get("abc").setValue("fffff"); // throws an exception if a cookie with a name "abc"
doesn't exist


cookies.getAll() : Collection<Cookie>

for ... each ... when ...

I would deprecate all current methods from the a.p.t.s.Cookies service and remove them in
the next version. Should be CookieSource and CookieSink refactored to use a.p.t.s.Cookie or


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message