Class RestDocumentClient
java.lang.Object
com.logicaldoc.webservice.rest.client.AbstractRestClient
com.logicaldoc.webservice.rest.client.RestDocumentClient
-
Constructor Summary
ConstructorsConstructorDescriptionRestDocumentClient(String endpoint, String username, String password) RestDocumentClient(String endpoint, String username, String password, int timeout) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcheckout(long docId) create(WSDocument document, File packageFile) create(WSDocument document, javax.activation.DataHandler dataHandler) voidvoidcreateThumbnail(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) getDocument(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) list(long folderId) listDocuments(long folderId, String fileName) rateDocument(long docId, int vote) Puts a new rating on the given documentvoidupdate(WSDocument document)
-
Constructor Details
-
RestDocumentClient
-
RestDocumentClient
-
-
Method Details
-
create
- Throws:
FileNotFoundException
-
create
-
list
public WSDocument[] list(long folderId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException -
listDocuments
public WSDocument[] listDocuments(long folderId, String fileName) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException -
getDocument
public WSDocument getDocument(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException -
delete
public void delete(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException -
getContent
public javax.activation.DataHandler getContent(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, IOException -
getVersionContent
public javax.activation.DataHandler getVersionContent(long docId, String version) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, IOException -
checkout
public void checkout(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException -
update
public void update(WSDocument document) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException -
checkin
public void checkin(long docId, String comment, Boolean release, File packageFile) throws FileNotFoundException - Throws:
FileNotFoundException
-
addNote
public WSNote addNote(long docId, String note) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException -
deleteNote
public void deleteNote(long noteId) throws AuthenticationException, WebserviceException, PersistenceException Adds a new note for the given document- Parameters:
noteId- identifier of the note- Throws:
PersistenceException- Error in the data layerWebserviceException- Error in the Webservice layerAuthenticationException- Authentication issue
-
deleteVersion
public void deleteVersion(long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException Adds a new note for the given document- Parameters:
docId- identifier of the documentversion- document's version- Throws:
PersistenceException- Error in the data layerWebserviceException- Error in the Webservice layerAuthenticationException- Authentication issue
-
getNotes
public WSNote[] getNotes(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Gets the notes for the given document- Parameters:
docId- identifier of the document- Returns:
- array of ratings
- Throws:
PersistenceException- Error in the data layerWebserviceException- Error in the Webservice layerAuthenticationException- Authentication issuePermissionException- Not enough permissions
-
rateDocument
public WSRating rateDocument(long docId, int vote) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Puts a new rating on the given document- Parameters:
docId- identifier of the documentvote- the vote- Returns:
- the rating
- Throws:
PersistenceException- Error in the data layerWebserviceException- Error in the Webservice layerAuthenticationException- Authentication issuePermissionException- Not enough permissions
-
getRatings
public WSRating[] getRatings(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Gets all the ratings of the given document- Parameters:
docId- identifier of the document- Returns:
- array of ratings
- Throws:
PersistenceException- Error in the data layerWebserviceException- Error in the Webservice layerAuthenticationException- Authentication issuePermissionException- Not enough permissions
-
createPdf
public void createPdf(long docId, String fileVersion) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, IOException -
createThumbnail
public void createThumbnail(long docId, String fileVersion, String type) throws AuthenticationException, WebserviceException, PersistenceException, IOException
-