Package er.rest.format

Examples of er.rest.format.ERXStringBufferRestResponse


    return updateObjectWithPath(obj, filter, path(entityName, id, action, format), format);
  }

  public ERXRestRequestNode updateObjectWithPath(Object obj, ERXKeyFilter filter, String path, ERXRestFormat format) throws HttpException, IOException {
    ERXRestRequestNode node = ERXRestRequestNode.requestNodeWithObjectAndFilter(obj, filter, _context);
    ERXStringBufferRestResponse response = new ERXStringBufferRestResponse();
    format.writer().appendToResponse(node, response, format.delegate(), _context);

    HttpClient client = httpClient();
    PutMethod updateObjectMethod = new PutMethod(new ERXMutableURL(_baseURL).appendPath(path).toExternalForm());
    updateObjectMethod.setRequestEntity(new StringRequestEntity(response.toString()));
    client.executeMethod(updateObjectMethod);
    return requestNodeWithMethod(updateObjectMethod);
  }
View Full Code Here


    return createObjectWithPath(obj, filter, path(entityName, id, action, format), format);
  }

  public ERXRestRequestNode createObjectWithPath(Object obj, ERXKeyFilter filter, String path, ERXRestFormat format) throws HttpException, IOException {
    ERXRestRequestNode node = ERXRestRequestNode.requestNodeWithObjectAndFilter(obj, filter, _context);
    ERXStringBufferRestResponse response = new ERXStringBufferRestResponse();
    format.writer().appendToResponse(node, response, format.delegate(), _context);

    HttpClient client = httpClient();
    PostMethod updateObjectMethod = new PostMethod(new ERXMutableURL(_baseURL).appendPath(path).toExternalForm());
    updateObjectMethod.setRequestEntity(new StringRequestEntity(response.toString()));
    client.executeMethod(updateObjectMethod);
    return requestNodeWithMethod(updateObjectMethod, format);
  }
View Full Code Here

TOP

Related Classes of er.rest.format.ERXStringBufferRestResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.