Stripes

Public UrlBindingFactory method to create UrlBinding prototypes

Details

Description

I'd like to propose creation of a public method in UrlBindingFactory that would allow creation of URLBinding prototypes. The method would be similar to parseUrlBinding(Class<? extends ActionBean>), but would take a String parameter instead.

Example:

UrlBinding prototype = UrlBindingFactory.parseUrlBinding(String);

Callers could use this prototype could then be used for any purpose, for example added to the URLBindingFactory in a custom ActionResolver. The use case for this particular request, FYI, is a file-based ActionResolver implementation that would read URLBindings from a file. This would permit URLBindings to be configurable rather than welded to classes as annotations.

Activity

Hide
Ben Gunter added a comment - 26/Nov/08 12:52 PM

Hi, Andrew. I couldn't provide parseUrlBinding(String) because every UrlBinding must be associated with an ActionBean class. Instead, I added parseUrlBinding(Class, String) so you can pass in your own pattern along with the ActionBean class you want to associate it with. Hope this is sufficient for your needs.

Show
Ben Gunter added a comment - 26/Nov/08 12:52 PM Hi, Andrew. I couldn't provide parseUrlBinding(String) because every UrlBinding must be associated with an ActionBean class. Instead, I added parseUrlBinding(Class, String) so you can pass in your own pattern along with the ActionBean class you want to associate it with. Hope this is sufficient for your needs.
Hide
Andrew Jaquith added a comment - 26/Nov/08 2:30 PM

Re-reading my hastily-typed request several months later, it's clear that I forgot the Class parameter.

Thanks for this enhancement. The project I'm working on (JSPWiki) will make good use of this new method. I intend to create a "FileActionResolver" implementation with it, which I will contribute back to Stripes once it's done.

Ben, I don't know if you are American or not, but if you are, Happy Thanksgiving.

Show
Andrew Jaquith added a comment - 26/Nov/08 2:30 PM Re-reading my hastily-typed request several months later, it's clear that I forgot the Class parameter. Thanks for this enhancement. The project I'm working on (JSPWiki) will make good use of this new method. I intend to create a "FileActionResolver" implementation with it, which I will contribute back to Stripes once it's done. Ben, I don't know if you are American or not, but if you are, Happy Thanksgiving.

People

Vote (0)
Watch (1)

Dates

  • Created:
    11/Aug/08 8:15 AM
    Updated:
    04/Jan/11 2:50 PM
    Resolved:
    26/Nov/08 12:52 PM