On Oct 25, 2010, at 1:14 PM, Imran M Yousuf wrote:
> On Mon, Oct 25, 2010 at 4:41 PM, Paul Sandoz
> <Paul.Sandoz_at_oracle.com> wrote:
>>
>>> On Thu, 14 Oct 2010 @ 19:25:04, Imran M
>>> Yousuf<imyousuf_at_smartitengineering.com> wrote
>>>>
>>>> I have requirement for which I will need to use a functionality
>>>> such
>>>> as HttpRequestContext.getAcceptableMediaType; but I see that it has
>>>> been deprecated (SVN Commit #3121), could find the reason of
>>>> deprecation in Issue 382 or release note. Is it safe to use it?
>>>> What
>>>> is the right API use for same purpose?
>> <snip />
>> The methods are deprecated because they are no longer used, and
>> necessarily
>> accurate in light of changes to what the "qs" means.
>>
>> Imran, what are you using them for?
>
> I am using it for a CMS where the representation of a content can be
> user defined. That is, a user can say that "use this representation
> template (e.g. a velocity template) to generate x/y media format of
> this content". So what I have is user defined media types and clients
> accept media types, I want to choose the best fit of them. Please let
> me know if further clarification is needed.
>
In that case i would recommend using the Variant support.
See the JavaOne 2010 presentation for how it works:
http://blogs.sun.com/sandoz/resource/J1-2010-JAX-RS-S313265.pdf
Paul.