public void updateDocument(String documentPath, String content) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(content.getBytes("UTF-8")); Response res = callPost(buildEncodeCall(API_UPDATE, documentPath), in); if (logger.isDebugEnabled()) logger.debug("RemoteStore.updateDocument() " + documentPath + " = " + res.getStatus().getCode()); if (Status.STATUS_OK != res.getStatus().getCode()) { throw new IOException("Unable to update document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
public void createDocument(String documentPath, String content) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(content.getBytes("UTF-8")); Response res = callPost(buildEncodeCall(API_CREATE, documentPath), in); if (logger.isDebugEnabled()) logger.debug("RemoteStore.createDocument() " + documentPath + " = " + res.getStatus().getCode()); if (Status.STATUS_OK != res.getStatus().getCode()) { throw new IOException("Unable to create document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
public void updateDocument(String documentPath, String content) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(content.getBytes("UTF-8")); Response res = callPost(buildEncodeCall(API_UPDATE, documentPath), in); if (logger.isDebugEnabled()) logger.debug("RemoteStore.updateDocument() " + documentPath + " = " + res.getStatus().getCode()); if (Status.STATUS_OK != res.getStatus().getCode()) { throw new IOException("Unable to update document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
public void createDocument(String documentPath, String content) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(content.getBytes("UTF-8")); Response res = callPost(buildEncodeCall(API_CREATE, documentPath), in); if (logger.isDebugEnabled()) logger.debug("RemoteStore.createDocument() " + documentPath + " = " + res.getStatus().getCode()); if (Status.STATUS_OK != res.getStatus().getCode()) { throw new IOException("Unable to create document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
public void updateDocument(String documentPath, String content) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(content.getBytes("UTF-8")); Response res = callPost(buildEncodeCall(API_UPDATE, documentPath), in); if (logger.isDebugEnabled()) logger.debug("RemoteStore.updateDocument() " + documentPath + " = " + res.getStatus().getCode()); if (Status.STATUS_OK != res.getStatus().getCode()) { throw new IOException("Unable to update document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
public void createDocument(String documentPath, String content) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(content.getBytes("UTF-8")); Response res = callPost(buildEncodeCall(API_CREATE, documentPath), in); if (logger.isDebugEnabled()) logger.debug("RemoteStore.createDocument() " + documentPath + " = " + res.getStatus().getCode()); if (Status.STATUS_OK != res.getStatus().getCode()) { throw new IOException("Unable to create document path: " + documentPath + " in remote store: " + this.getEndpoint() + " due to error: " + res.getStatus().getCode() + " " + res.getStatus().getMessage()); } }
out.close(); ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); Response res = callPost(buildEncodeCall(API_CREATE_MULTI, ""), in);
out.close(); ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); Response res = callPost(buildEncodeCall(API_CREATE_MULTI, ""), in);
out.close(); ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); Response res = callPost(buildEncodeCall(API_CREATE_MULTI, ""), in);