On Wed, 02 Jun 2010 14:11:33 -0300, Howard Lewis Ship <[email protected]>
wrote:
I'm starting work on a replacement for the URLRewriter system. We've
previously discussed this, and it will be a non-backwards compatible
change (I'm starting by removing the existing URLRewriter and related
code).
The goals are:
* Keep it simple.
* Make it possible to easily rewrite the Links created for component
event requests, page render requests, and asset requests.
I think the basic API will be something like:
public interface ComponentEventLinkTransformer {
Link transformComponentEventLink(Link link,
ComponentEventRequestParameters parameters);
}
In other words, contributed code has access to the same information as
the ComponentEventLinkEncoder service (in fact, this will be invoked
from inside CELE). There will be an ordered configuratoin
of transformers. A transformer can return a non-null Link to replace
the default Link.
I have two main use cases:
One client wants to easily prefix all Tapestry requests with the
virtual folder "t5" (i.e., "/t5/somepage") to make it easier to run
the T4 and T5 versions of the application side-by-side.
A second client wants some specific control over URLs. They want a
certain page to have a number of URLs that would normally map to the
Index page instead map to this alternate page, with context.
Obfuscated example: they want "/toys", "/games", and "/equipment" to
all point to a Search page, each with a different page activation
context. The short URL is important to them, but there's already an
Index page at "/".
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
Coordenador e professor da Especialização em Engenharia de Software com
Ênfase em Java da Faculdade Pitágoras
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]