Class RestDocumentClient
- java.lang.Object
-
- com.logicaldoc.webservice.rest.client.AbstractRestClient
-
- com.logicaldoc.webservice.rest.client.RestDocumentClient
-
public class RestDocumentClient extends AbstractRestClient
-
-
Constructor Summary
Constructors Constructor Description RestDocumentClient(String endpoint, String username, String password)RestDocumentClient(String endpoint, String username, String password, int timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WSNoteaddNote(long docId, String note)voidcheckin(long docId, String comment, Boolean release, File packageFile)voidcheckout(long docId)WSDocumentcreate(WSDocument document, File packageFile)WSDocumentcreate(WSDocument document, javax.activation.DataHandler dataHandler)voidcreatePdf(long docId, String fileVersion)voidcreateThumbnail(long docId, String fileVersion, String type)voiddelete(long docId)voiddeleteNote(long noteId)Adds a new note for the given documentvoiddeleteVersion(long docId, String version)Adds a new note for the given documentjavax.activation.DataHandlergetContent(long docId)WSDocumentgetDocument(long docId)WSNote[]getNotes(long docId)Gets the notes for the given documentWSRating[]getRatings(long docId)Gets all the ratings of the given documentjavax.activation.DataHandlergetVersionContent(long docId, String version)WSDocument[]list(long folderId)WSDocument[]listDocuments(long folderId, String fileName)WSRatingrateDocument(long docId, int vote)Puts a new rating on the given documentvoidupdate(WSDocument document)
-
-
-
Method Detail
-
create
public WSDocument create(WSDocument document, File packageFile) throws Exception
- Throws:
Exception
-
create
public WSDocument create(WSDocument document, javax.activation.DataHandler dataHandler) throws Exception
- Throws:
Exception
-
list
public WSDocument[] list(long folderId) throws Exception
- Throws:
Exception
-
listDocuments
public WSDocument[] listDocuments(long folderId, String fileName) throws Exception
- Throws:
Exception
-
getDocument
public WSDocument getDocument(long docId) throws Exception
- Throws:
Exception
-
getContent
public javax.activation.DataHandler getContent(long docId) throws Exception- Throws:
Exception
-
getVersionContent
public javax.activation.DataHandler getVersionContent(long docId, String version) throws Exception- Throws:
Exception
-
update
public void update(WSDocument document) throws Exception
- Throws:
Exception
-
checkin
public void checkin(long docId, String comment, Boolean release, File packageFile) throws Exception- Throws:
Exception
-
deleteNote
public void deleteNote(long noteId) throws ExceptionAdds a new note for the given document- Parameters:
noteId- identifier of the note- Throws:
Exception- error in the server application
-
deleteVersion
public void deleteVersion(long docId, String version) throws ExceptionAdds a new note for the given document- Parameters:
docId- identifier of the documentversion- document's version- Throws:
Exception- error in the server application
-
getNotes
public WSNote[] getNotes(long docId) throws Exception
Gets the notes for the given document- Parameters:
docId- identifier of the document- Returns:
- array of ratings
- Throws:
Exception- error in the server application
-
rateDocument
public WSRating rateDocument(long docId, int vote) throws Exception
Puts a new rating on the given document- Parameters:
docId- identifier of the documentvote- the vote- Returns:
- the rating
- Throws:
Exception- error in the server application
-
getRatings
public WSRating[] getRatings(long docId) throws Exception
Gets all the ratings of the given document- Parameters:
docId- identifier of the document- Returns:
- array of ratings
- Throws:
Exception- error in the server application
-
-