Class RestDocumentClient
java.lang.Object
com.logicaldoc.webservice.rest.client.AbstractRestClient<DocumentService>
com.logicaldoc.webservice.rest.client.RestDocumentClient
-
Constructor Summary
ConstructorsConstructorDescriptionRestDocumentClient(String endpoint, String apiKey) RestDocumentClient(String endpoint, String apiKey, int timeout) -
Method Summary
Modifier 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
-
list
public List<WSDocument> list(long folderId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException -
listPaginated
public List<WSDocument> listPaginated(long folderId, String fileName, String sort, Integer page, Integer max) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException -
listDocuments
public List<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 jakarta.activation.DataHandler getContent(long docId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, IOException -
getVersionContent
public jakarta.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, UnexistingResourceException -
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, UnexistingResourceException -
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 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 layerWebserviceException- Error in the Webservice layerAuthenticationException- Authentication issuePermissionException- Not enough permissionsUnexistingResourceException- The specified document does not exist
-
rateDocument
public 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 documentvote- the vote- Returns:
- the rating
- Throws:
PersistenceException- Error in the data layerWebserviceException- Error in the Webservice layerAuthenticationException- Authentication issuePermissionException- Not enough permissionsUnexistingResourceException- The specified document does not exist
-
getRatings
public 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 layerWebserviceException- Error in the Webservice layerAuthenticationException- Authentication issuePermissionException- Not enough permissionsUnexistingResourceException- The specified document does not exist
-
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
-