dev@jsr311.java.net

RE: Summary: Representation<T> and Entity<T>

From: Jerome Louvel <jerome.louvel_at_noelios.com>
Date: Wed, 11 Apr 2007 11:00:01 +0200

Thanks Marc for the accurate summary. I would only object to this line:

> - Representation<T> is useful for cases where metadata can't be
> determined statically

If you can annotate the representation POJOs, then you could reuse the
@MediaType annotation on a method dynamically returning this info:

        @MediaType
        public String getMimeType() {...}

Best regards,
Jerome

> -----Message d'origine-----
> De : Dhanji R. Prasanna [mailto:dhanji_at_gmail.com]
> Envoyé : mercredi 11 avril 2007 05:54
> À : dev_at_jsr311.dev.java.net
> Objet : Re: Summary: Representation<T> and Entity<T>
>
> Great summary! Helps me too. We should have a digest like
> this every week or something =).
> I'll bet that'd be useful for people watching this thread
> only occasionally.
>
>
> On 4/11/07, Marc Hadley <Marc.Hadley_at_sun.com> wrote:
>
> On Apr 10, 2007, at 2:41 PM, Ryan Heaton wrote:
> - Regardless of whether Entity<T> is retained or not we need a
> general purpose mechanism to access request information - said
> another way we shouldn't have to define a separate
> annotation for
> each piece of metadata.
>
>
> Just want to clarify that by "we shouldn't have to..." you
> mean the *end-user* shouldnt have to.
>
> The discussion is around whether jsr311 can offer both
> granular metadata injection points (fine grained
> @[MetadataItem] on method params--which may do some
> parsing/type coercion) as well as a more raw glob of request
> metadata: HttpRequestContext or (the less-http-gnostic)
> EntityMetadata.