|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.cnes.sitools.util.RIAPUtils
public final class RIAPUtils
Utils class for RIAP calls
Method Summary | ||
---|---|---|
static boolean |
deleteObject(java.lang.String url,
org.restlet.Context context)
Delete a, object at the specified url |
|
static
|
deleteObject(T object,
java.lang.String url,
org.restlet.Context context)
Delete a T object at the specified url |
|
static void |
exhaust(org.restlet.representation.Representation representation)
Exhaust representation properly |
|
static void |
exhaust(org.restlet.Response response)
Exhaust response properly |
|
static
|
getListOfObjects(java.lang.String url,
org.restlet.Context context)
Get an Object of class id , at the specified url using the RIAP
protocol. |
|
static
|
getObject(java.lang.String url,
org.restlet.Context context)
Get an Object of class id , at the specified url using the RIAP
protocol. |
|
static
|
getObject(java.lang.String url,
org.restlet.Context context,
org.restlet.data.MediaType mediaType)
Get an Object of class id , at the specified url using the RIAP
protocol. |
|
static
|
getObject(java.lang.String id,
java.lang.String url,
org.restlet.Context context)
Get an Object of class id , at the specified url using the RIAP
protocol. |
|
static
|
getObject(java.lang.String id,
java.lang.String url,
org.restlet.Context context,
org.restlet.data.MediaType mediaType)
Get an Object of class id , at the specified url using the RIAP
protocol. |
|
static
|
getObjectFromName(java.lang.String url,
java.lang.String name,
org.restlet.Context context)
Get an Object of class name , at the specified url using the RIAP
protocol. |
|
static java.lang.String |
getRiapBase()
Get the RIAP base URl |
|
static org.restlet.representation.Representation |
handle(java.lang.String url,
org.restlet.data.Method method,
org.restlet.data.MediaType mediaType,
org.restlet.Context context)
Handle a call with the RIAP protocol without entity. |
|
static org.restlet.representation.Representation |
handle(java.lang.String url,
org.restlet.representation.Representation entity,
org.restlet.data.Method method,
org.restlet.data.MediaType mediaType,
org.restlet.Context context)
Handle a call with the RIAP protocol with entity. |
|
static Response |
handleParseResponse(java.lang.String url,
org.restlet.data.Method method,
org.restlet.data.MediaType mediaType,
org.restlet.Context context)
Handle a call with the RIAP protocol without entity, parse the response and return a Response |
|
static Response |
handleParseResponse(java.lang.String url,
org.restlet.representation.Representation entity,
org.restlet.data.Method method,
org.restlet.data.MediaType mediaType,
org.restlet.Context context)
Handle a call with the RIAP protocol with entity , parse the response and return a Response object |
|
static
|
persistObject(T object,
java.lang.String url,
org.restlet.Context context)
Persist a given T object to the given url |
|
static
|
updateObject(T object,
java.lang.String url,
org.restlet.Context context)
Persist a given T object to the given url |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> T getObject(java.lang.String id, java.lang.String url, org.restlet.Context context)
id
, at the specified url
using the RIAP
protocol. The context
is required in order to make an RIAP call
T
- the class of the objectid
- the id of the objecturl
- the url of the objectcontext
- the context
public static <T> T getObject(java.lang.String id, java.lang.String url, org.restlet.Context context, org.restlet.data.MediaType mediaType)
id
, at the specified url
using the RIAP
protocol. The context
is required in order to make an RIAP call
T
- the class of the objectid
- the id of the objecturl
- the url of the objectcontext
- the contextmediaType
- the mediaType needed (Must be a Java object serialize media type)
public static <T> T getObject(java.lang.String url, org.restlet.Context context)
id
, at the specified url
using the RIAP
protocol. The context
is required in order to make an RIAP call
T
- the class of the objecturl
- the url of the objectcontext
- the context
public static <T> T getObject(java.lang.String url, org.restlet.Context context, org.restlet.data.MediaType mediaType)
id
, at the specified url
using the RIAP
protocol. The context
is required in order to make an RIAP call
T
- the class of the objecturl
- the url of the objectcontext
- the contextmediaType
- the mediaType needed (Must be a Java object serialize media type)
public static <T> T getObjectFromName(java.lang.String url, java.lang.String name, org.restlet.Context context)
name
, at the specified url
using the RIAP
protocol. The context
is required in order to make an RIAP call Return null if there is no or multiple
T
- the class of the objecturl
- the url of the objectname
- the name of the objectcontext
- the context
public static <T> java.util.List<T> getListOfObjects(java.lang.String url, org.restlet.Context context)
id
, at the specified url
using the RIAP
protocol. The context
is required in order to make an RIAP call
T
- the class of the objecturl
- the url of the objectcontext
- the context
public static <T extends java.io.Serializable> T persistObject(T object, java.lang.String url, org.restlet.Context context)
T
- the type of object to persist, must implements Serializable
object
- the object to persisturl
- the urlcontext
- the Context
public static <T extends java.io.Serializable> T updateObject(T object, java.lang.String url, org.restlet.Context context)
T
- the type of object to persist, must implements Serializable
object
- the object to persisturl
- the urlcontext
- the Context
public static <T extends IResource> boolean deleteObject(T object, java.lang.String url, org.restlet.Context context)
T
- object implementing IResourceobject
- the object to deleteurl
- the url where to delete the object, without the object idcontext
- the Context
public static boolean deleteObject(java.lang.String url, org.restlet.Context context)
url
- the url of the object, with the id of the objectcontext
- the Context
public static org.restlet.representation.Representation handle(java.lang.String url, org.restlet.data.Method method, org.restlet.data.MediaType mediaType, org.restlet.Context context)
url
- the urlmethod
- the Method to performmediaType
- the accepted mediaTypecontext
- the Context
public static org.restlet.representation.Representation handle(java.lang.String url, org.restlet.representation.Representation entity, org.restlet.data.Method method, org.restlet.data.MediaType mediaType, org.restlet.Context context)
url
- the urlentity
- the entity of the requestmethod
- the Method to performmediaType
- the accepted mediaTypecontext
- the Context
public static Response handleParseResponse(java.lang.String url, org.restlet.data.Method method, org.restlet.data.MediaType mediaType, org.restlet.Context context)
url
- the urlmethod
- the Method to performmediaType
- the accepted mediaTypecontext
- the Context
public static Response handleParseResponse(java.lang.String url, org.restlet.representation.Representation entity, org.restlet.data.Method method, org.restlet.data.MediaType mediaType, org.restlet.Context context)
url
- the urlentity
- the entity of the requestmethod
- the Method to performmediaType
- the accepted mediaTypecontext
- the Context
public static void exhaust(org.restlet.Response response)
response
- the response to exhaust
java.lang.Exception
public static void exhaust(org.restlet.representation.Representation representation)
representation
- the representation to exhaust
java.lang.Exception
public static java.lang.String getRiapBase()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |