/** * Updates a stored document with its case id. When a document is uploaded at case start, it * occurs before the case has been launched and thus there is not yet a case id allocated. Once * the case launch is successful, this method is called to associate the case id with the already * uploaded document. * * @param docID the id of the already uploaded document * @param caseID the case id of the case launched with the document as a case param * @param handle a valid session handle * @return a success or error message * @throws IOException if the service can't be reached */ public String addCaseID(long docID, String caseID, String handle) throws IOException { YDocument doc = new YDocument(); doc.setId(docID); doc.setCaseId(caseID); return executePost(toByteArray(doc, "addcaseid", handle)).toString("UTF-8"); }
/** * Removes a document from the Document Store * * @param docID the id of the document to remove. The id must match an existing document * @param handle a valid session handle * @return a success or error message * @throws IOException if the service can't be reached */ public String removeDocument(long docID, String handle) throws IOException { YDocument doc = new YDocument(); doc.setId(docID); return removeDocument(doc, handle); }