RE: StatusService getRepresentation and Variant

2009-03-10 Thread Jerome Louvel
Hi Tim,

In your case, as you are outside a Resource you might want to leverage the
ClientInfo#getPreferredVariant(ListVariant variants, Language
defaultLanguage) method directly.

It is also used by Resource#getPreferredVariant().
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-Message d'origine-
De : Thierry Boileau [mailto:thierry.boil...@noelios.com] 
Envoyé : samedi 7 mars 2009 09:01
À : discuss@restlet.tigris.org
Objet : Re: StatusService getRepresentation and Variant

Hello Tim,

you can call the Resource#getPreferredVariant method.

Best regards,
Thierry Boileau

 Would anyone be able to recommend the correct way to determine what the
preferred Variant was for the requested Resource from the
StatusService.getRepresentation() method?

 I would like to return different representations of error messages based
on the Variant requested for the original resource.

 I am currently using Restlet 1.1.3. 

 Thanks,
 Tim

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId
 =1277561



--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=12814
72

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1302764


Re: StatusService getRepresentation and Variant

2009-03-07 Thread Thierry Boileau
Hello Tim,

you can call the Resource#getPreferredVariant method.

Best regards,
Thierry Boileau

 Would anyone be able to recommend the correct way to determine what the 
 preferred Variant was for the requested Resource from the 
 StatusService.getRepresentation() method?

 I would like to return different representations of error messages based on 
 the Variant requested for the original resource.

 I am currently using Restlet 1.1.3. 

 Thanks,
 Tim

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1277561



--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1281472