|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.ucm.look.data.remote.restful.RestMethod
public class RestMethod
Class to connect directly with the Server
Constructor Summary | |
---|---|
RestMethod()
|
Method Summary | |
---|---|
static java.lang.String |
decodeResponse(HttpResponse response)
Translate the response server to an String |
static void |
doDelete(java.lang.String url)
Delete a resource in the server |
static JSONObject |
doGet(java.lang.String url)
Retrieve a resource from the server |
static HttpResponse |
doPost(java.lang.String url,
JSONObject c)
Used to insert an element |
static HttpResponse |
doPut(java.lang.String url,
JSONObject c)
To Update an element |
static int |
getLastId()
To know the 'number' of last id inserted in the Server |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RestMethod()
Method Detail |
---|
public static java.lang.String decodeResponse(HttpResponse response)
response
- Response of the server
public static void doDelete(java.lang.String url) throws ClientProtocolException, java.io.IOException
url
- Element URI
ClientProtocolException
java.io.IOException
public static JSONObject doGet(java.lang.String url)
url
- Element URI to get
public static HttpResponse doPost(java.lang.String url, JSONObject c)
url
- Element URIc
- The element represented with a JSON
public static HttpResponse doPut(java.lang.String url, JSONObject c)
url
- Element URIc
- The element to update represented with a JSON
public static int getLastId()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |