I like the JSR168 approach to URLs, where URLs are objects. So if URL
was an interface, with two concrete implementations (one for servlet
and one for portlet), URL manipulation would be very flexible and easy
(e.g. addParameter, setAttribute etc), and rendering the URL as a
String
would be nothing more than invoking the toString() method. This could
be especially convenient in a portlet, since the framework might need
to modify the URLs to add state information before it is rendered.

Nils-H

On 2/5/07, Don Brown <[EMAIL PROTECTED]> wrote:
Cool, but please, please, please find some way to avoid a static helper
class :)  BTW, it would be cool if the urlbuilder would be able to
automatically discover any other objects that want a shot at the URL
building process.  See how the TagLibrary or TemplateEngine classes are
discovered for examples.

Don

Tom Schneider wrote:
> Ok, I had a little time tonight to put together a preliminary design
> for the URLBuilder.  Here's what I have so far for the interface:
>
> URLBuilder
> +buildURL(CustomAttributes, ActionMapping)  // this method is for when
> an action, namespace, method, etc. is supplied
> +buildURL(CustomAttributes, String)  // this method is for when the
> url value itself is provided
>
> My expectation is each builder would use the default ActionMapper
> under the hood.  From an infrastructure standpoint, it would be
> configured and injected the same as the ActionMapper is.
>
> The custom attributes that I've come up with so far are:
> CustomPortletAttributes:
> RenderRequest, RenderResponse
> windowState
> portletUrlType
> portletMode
>
> CustomServletAttributes:
> HttpServletRequest, HttpServletResponse
> encodeParams
> includeContext
> scheme
>
> I'm not exactly sure how we'll build these up.  Either the client code
> of the builder will have to know how to build each type or we'll need
> a static helper class that does most of the work.  I'll probably be
> taking a stab at implementation this weekend.
> Tom
>
>
> Patrick Lightbody wrote:
>> Tom,
>> How is this coming along? I imagine that some of this work would also
>> relate to the ActionMapper interface, since it does have some
>> responsibilities for rendering out URLs. Keep us posted.
>> ---------------------------------------------------------------------
>> Posted via Jive Forums
>>
http://forums.opensymphony.com/thread.jspa?threadID=59916&messageID=119811#119811
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to