Class RestDocumentClient
java.lang.Object
com.logicaldoc.webservice.rest.client.AbstractRestClient<DocumentService>
com.logicaldoc.webservice.rest.client.RestDocumentClient
- 
Constructor SummaryConstructorsConstructorDescriptionRestDocumentClient(String endpoint, String apiKey) RestDocumentClient(String endpoint, String apiKey, int timeout) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoidcheckout(long docId) create(WSDocument document, jakarta.activation.DataHandler dataHandler) create(WSDocument document, File packageFile) 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 documentjakarta.activation.DataHandlergetContent(long docId) getDocument(long docId) getNotes(long docId) Gets the notes for the given documentgetRatings(long docId) Gets all the ratings of the given documentjakarta.activation.DataHandlergetVersionContent(long docId, String version) list(long folderId) listDocuments(long folderId, String fileName) listPaginated(long folderId, String fileName, String sort, Integer page, Integer max) 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
- 
listpublic List<WSDocument> list(long folderId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException 
- 
listPaginatedpublic List<WSDocument> listPaginated(long folderId, String fileName, String sort, Integer page, Integer max) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException 
- 
listDocumentspublic List<WSDocument> listDocuments(long folderId, String fileName) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException 
- 
getDocumentpublic WSDocument getDocument(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException 
- 
deletepublic void delete(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException 
- 
getContentpublic jakarta.activation.DataHandler getContent(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, IOException 
- 
getVersionContentpublic jakarta.activation.DataHandler getVersionContent(long docId, String version) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, IOException 
- 
checkoutpublic void checkout(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException 
- 
updatepublic void update(WSDocument document) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException 
- 
checkinpublic void checkin(long docId, String comment, Boolean release, File packageFile) throws FileNotFoundException - Throws:
- FileNotFoundException
 
- 
addNotepublic WSNote addNote(long docId, String note) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException 
- 
deleteNotepublic 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 layer
- WebserviceException- Error in the Webservice layer
- AuthenticationException- Authentication issue
 
- 
deleteVersionpublic void deleteVersion(long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException Adds a new note for the given document- Parameters:
- docId- identifier of the document
- version- document's version
- Throws:
- PersistenceException- Error in the data layer
- WebserviceException- Error in the Webservice layer
- AuthenticationException- Authentication issue
 
- 
getNotespublic List<WSNote> getNotes(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException Gets the notes for the given document- Parameters:
- docId- identifier of the document
- Returns:
- list of ratings
- Throws:
- PersistenceException- Error in the data layer
- WebserviceException- Error in the Webservice layer
- AuthenticationException- Authentication issue
- PermissionException- Not enough permissions
- UnexistingResourceException- The specified document does not exist
 
- 
rateDocumentpublic WSRating rateDocument(long docId, int vote) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException Puts a new rating on the given document- Parameters:
- docId- identifier of the document
- vote- the vote
- Returns:
- the rating
- Throws:
- PersistenceException- Error in the data layer
- WebserviceException- Error in the Webservice layer
- AuthenticationException- Authentication issue
- PermissionException- Not enough permissions
- UnexistingResourceException- The specified document does not exist
 
- 
getRatingspublic List<WSRating> getRatings(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException Gets all the ratings of the given document- Parameters:
- docId- identifier of the document
- Returns:
- array of ratings
- Throws:
- PersistenceException- Error in the data layer
- WebserviceException- Error in the Webservice layer
- AuthenticationException- Authentication issue
- PermissionException- Not enough permissions
- UnexistingResourceException- The specified document does not exist
 
- 
createPdfpublic void createPdf(long docId, String fileVersion) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, IOException 
- 
createThumbnailpublic void createThumbnail(long docId, String fileVersion, String type) throws AuthenticationException, WebserviceException, PersistenceException, IOException 
 
-