dev@jersey.java.net

Re: All resource reps instead of reference

From: Nam Nguyen <Nam.Nguyen_at_Sun.COM>
Date: Wed, 02 Jan 2008 12:50:46 -0800

Paul Sandoz wrote:
> Hi Arun,
>
> I assume you are referring to the NetBeans RESTful database plugin?
>
> I do not know of such an option.
We discussed about this but it was dropped because of other higher
priority. I just file this issue to keep track:
http://www.netbeans.org/issues/show_bug.cgi?id=124611
>
> If such a feature were supported i think it would also require a
> paging mechanism, for example using a query parameter (with a default
> number of entries embedded in the representation so that the size of
> the representation does not become too large).
This is already implemented by Peter. For example:
http://localhost:8085/WebApplication9//resources/customers/?start=0&max=10
> Potentially another feature is to only return a partial set of
> informtion for each entry rather than a complete embedded
> representation i.e. just enough important information for a client to
> make a decision whether they need to get the whole representation from
> the URI.
We also discuss about this more flexible option. This might requires
some JAX-B support for dynamic list of properties and attribute during
marshaling. Or, we might have to provide some custom marshaller.
>
> Note that HTTP pipelining and caching can make also things reasonably
> efficient, but it will still involve a latency to report not modified
> responses. But IIRC caching support is yet to be implemented.
>
> Paul.
>
> Arun Gupta wrote:
>> A Jersey endpoint return results like:
>>
>> -- cut here --
>> -
>> <events
>> uri="http://localhost:8080/WebApplication2/resources/events/">
>> -
>> <eventRef
>> uri="http://localhost:8080/WebApplication2/resources/events/1/">
>> <id>1</id>
>> </eventRef>
>> -
>> <eventRef
>> uri="http://localhost:8080/WebApplication2/resources/events/2/">
>> <id>2</id>
>> </eventRef>
>> -
>> <eventRef
>> uri="http://localhost:8080/WebApplication2/resources/events/3/">
>> <id>3</id>
>> </eventRef>
>> -
>> <eventRef
>> uri="http://localhost:8080/WebApplication2/resources/events/4/">
>> <id>4</id>
>> -- cut here --
>>
>> Is there an option (that can be configured on the endpoint or passed
>> as parameters to the URL) such that the result contains all the
>> resources instead of reference to the resources ?
>>
>> -Arun
>