users@jersey.java.net

Re: [Jersey] AbstractResources

From: Cameron Jones <cmhjones_at_gmail.com>
Date: Thu, 15 Oct 2009 13:25:03 +1100

Jersey feature request opened:

https://jersey.dev.java.net/issues/show_bug.cgi?id=386


On 05/10/2009, at 7:41 PM, Paul Sandoz wrote:

>
> On Oct 3, 2009, at 2:08 AM, Cameron Jones wrote:
>
>> Hi Paul,
>>
>> I'm looking to build a resource's navigation from the declared sub
>> resource paths, since these are the uri templates it seems like i
>> can get the names from here to keep things DRY?
>>
>> i'm not sure if there are other use cases but this kind of meta-
>> data is very useful tho i don't know whether you would want to
>> support it as a main jersey feature.
>>
>
> This model is critical to the functioning of Jersey. It is used in
> the following areas:
>
> - creating runtime artifacts to match and dispatch and inject on
> resource classes;
>
> - generating WADL
>
> - resource filter factories
>
> By default it is possible to obtain the WADL for a resource by the
> client sending an OPTIONS request. From this it is possible for the
> client to navigate resources. It may be that in your case an
> instance of the JAXB WADL class for a resource may be more
> appropriate?
>
> In any case i think providing either the AbstractResources or the
> WADL equivalent is useful. Could you log a feature? (our priority is
> to get Jersey integrated with Glassfish for EE 6 so i will not have
> any time to do anything until that is complete).
>
> Paul.
>
>
>> it reminds me of some of the hibernate meta-classes which it
>> generated from hbm.xml files - these used to be really useful
>> before i switched to JPA and lost interest in the guts of ORM :)
>>
>> maybe you know of some generic annotations runtime meta-data
>> thingy? i need to brush up on this stuff...
>>
>> thanks,
>> cam
>>
>>
>> On 02/10/2009, at 9:26 PM, Paul Sandoz wrote:
>>
>>> Hi Cameron,
>>>
>>> Can you describe a bit about what you would like to do?
>>>
>>> On Oct 2, 2009, at 12:19 PM, Cameron Jones wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm not very familiar with annotations processing or the jersey
>>>> implementation, is there an easy way to access a resource's
>>>> annotations?
>>>>
>>>> The AbstractResource class has the kind of methods i am looking
>>>> for but is it accessible to resources?
>>>>
>>>
>>> There is currently no publicly available functionality to obtain
>>> the AbstractResource from a resource class. Such functionality
>>> would be very easy to expose. But it would help if i can
>>> understand what you use-case is.
>>>
>>> Paul.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>