On Apr 26, 2007, at 10:18 AM, Jerome Louvel wrote:
>
> The GET method is a special case method. There would be no direct
> handling
> like for post(), put() or delete(). It is useful to take into
> account the
> content negotation and caching. By default, no get() method would be
> necessary but the presence of a @Representation annotation on a get*()
> method would expose one set of representation for the current
> resource. You
> could have on the same resource class:
>
> @Representation
> Customer getCustomer(){...}
>
> @Representation
> Document getCustomerAsXml(){...}
>
> @Representation(mediaType="application/xml")
> InputStream toXml(){...}
>
So in your proposition @Representation marks a method as servicing a
GET request ? Or could it also be used on put, post, delete, ...
methods ? E.g.
@Representation(mediaType="application/xml")
InputStream delete() {...}
Marc.
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.
- application/pkcs7-signature attachment: smime.p7s