fr.cnes.sitools.common
Class SitoolsRepresentations

java.lang.Object
  extended by fr.cnes.sitools.common.SitoolsRepresentations

public final class SitoolsRepresentations
extends java.lang.Object

Class to produce common representation of a standard and generic SITools Response.

Author:
jp.boignard (AKKA Technologies)

Method Summary
static void configure(com.thoughtworks.xstream.XStream xstream, Response response)
          XStream configuration depending on response content.
static org.restlet.representation.Representation getRepresentation(Response response, org.restlet.representation.Variant variant, org.restlet.Context context)
          Gets the Response Representation (XML / JSON) according to the given variant
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRepresentation

public static org.restlet.representation.Representation getRepresentation(Response response,
                                                                          org.restlet.representation.Variant variant,
                                                                          org.restlet.Context context)
Gets the Response Representation (XML / JSON) according to the given variant

Parameters:
response - Response
variant - RESTlet MediaType
context - the Context
Returns:
Representation (XStreamRepresentation)

configure

public static void configure(com.thoughtworks.xstream.XStream xstream,
                             Response response)
XStream configuration depending on response content.

Parameters:
xstream - the stream to configure
response - the response to use for configure


Copyright © 2010-2013 CNES. All Rights Reserved.