Hi again :)
The JDK's Template class that we leverage doesn't seem to support this
feature (I might be wrong)... Feel free to enter a RFE for this to keep that
in mind. In the future, we might reimplement Template without dependency on
JDK's regex package.
For now, instead of having multiple mappings, you could use a "catch all"
variable: "/{catchAll}/end1/end2" when the "catchAll" type would be
TYPE_URI_PATH for example.
Best regards,
Jerome
-----Message d'origine-----
De : Ralf Bommersbach [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 30 mai 2008 17:56
À : [email protected]
Objet : MODE_ENDS_WITH?
Hello, its me again.
I see that the Template class support a MODE_STARTS_WITH and MODE_EQUALS
but no MODE_ENDS_WITH. I think that would be very helpful in many
use-cases, for example if you have a URL like /.../.../.../result where
the path before the result-resource is variable but you always have a
results-resource at the end...
Right now I have to explicitly set a route for every possible mutation
of the paths with a result-resource at the end, would be much easier if
I could just write router.attach("/result",
ResultResource.class).getTemplate().setMatchingMode(Template.MODE_ENDS_WITH)
just an idea, what do you think?