Package com.logicaldoc.webservice.soap
Interface DocumentService
- All Known Implementing Classes:
RestDocumentService
,RestDocumentSwagger
,SoapDocumentClient
,SoapDocumentService
public interface DocumentService
Document Web Service definition interface
- Since:
- 5.2
- Author:
- Matteo Caruso - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new note for the given documentvoid
checkin
(String sid, long docId, String comment, String filename, boolean release, javax.activation.DataHandler content) Checks in an existing document with the given identifier to create a new version.void
checkinDocument
(String sid, long docId, String comment, String filename, boolean release, WSDocument docVO, javax.activation.DataHandler content) Checks in an existing document with the given identifier to create a new version.void
Checks out an existing document with the given identifier.Copies a document into another folder.create
(String sid, WSDocument document, javax.activation.DataHandler content) Create a new document.createAlias
(String sid, long docId, long folderId, String type) Creates a new document alias for the given document inside a specified foldercreateDownloadTicket
(String sid, long docId, String suffix, Integer expireHours, String expireDate, Integer maxDownloads) Creates a new download ticketvoid
Creates the PDF conversion of the given document.void
createThumbnail
(String sid, long docId, String fileVersion, String type) Creates the thumbnail of the given document.createViewTicket
(String sid, long docId, String suffix, Integer expireHours, String expireDate, Integer maxDownloads, Integer maxViews) Creates a new view ticketvoid
Deletes an existing document with the given identifier.void
deleteLink
(String sid, long id) Removes an existing linkvoid
deleteNote
(String sid, long noteId) Adds a new note for the given documentdeleteVersion
(String sid, long docId, String version) Deletes a version of a document with the given identifiers.getAliases
(String sid, long docId) Gets the aliases of the given documentjavax.activation.DataHandler
getContent
(String sid, long docId) Gets the content of an existing document with the given identifiergetDocument
(String sid, long docId) Gets the metadata of an existing document with the given identifiergetDocumentByCustomId
(String sid, String customId) Gets document metadata of an existing document with the given custom identifiergetDocuments
(String sid, Long[] docIds) Gets document metadata of a collection of existing documents with the given identifiersgetExtractedText
(String sid, long docId) Gets the document's text stored in the full-text indexWSLink[]
Gets all the links of a specific documentWSNote[]
Gets the notes for the given documentWSRating[]
getRatings
(String sid, long docId) Gets all the ratings of the given documentgetRecentDocuments
(String sid, Integer maxHits) Lists of last modified documents of the current session.javax.activation.DataHandler
getResource
(String sid, long docId, String fileVersion, String suffix) Gets the content of a resource associated to the given document.getVersion
(String sid, long docId, String version) Gets a specific versionjavax.activation.DataHandler
getVersionContent
(String sid, long docId, String version) Gets the content of a specific version of a documentgetVersions
(String sid, long docId) Gets the version history of an existing document with the given identifierboolean
isReadable
(String sid, long docId) Tests if a document is readableCreates a new link between two documents.listDocuments
(String sid, long folderId, String fileName) Gets a document in a specific foldervoid
Locks an existing document with the given identifier.void
Moves an existing document with the given identifier.void
promoteVersion
(String sid, long docId, String version) Promotes an old version to the current default one.rateDocument
(String sid, long docId, int vote) Puts a new rating on the given documentvoid
Re-indexes(or indexes from scratch) a documentvoid
Renames the title of an existing document with the given identifier.void
replaceFile
(String sid, long docId, String fileVersion, String comment, javax.activation.DataHandler content) Replaces the file associated to a given version.void
Restores a deleted documentAdds a new note for the given documentvoid
Sends a set of documents as mail attachmentsvoid
setPassword
(String sid, long docId, String password) Puts a password protection to the documentvoid
Unlocks an existing document with the given identifier.boolean
Unprotects a document that is password protected.void
unsetPassword
(String sid, long docId, String currentPassword) Removes the password protection from the documentvoid
update
(String sid, WSDocument document) Updates an existing document with the value object containing the document's metadatalong
upload
(String sid, Long docId, Long folderId, boolean release, String filename, String language, javax.activation.DataHandler content) Creates a new document or updates an existing one.void
uploadResource
(String sid, long docId, String fileVersion, String suffix, javax.activation.DataHandler content) Uploads a new resource attached to the given document.
-
Method Details
-
create
WSDocument create(String sid, WSDocument document, javax.activation.DataHandler content) throws IOException, AuthenticationException, PermissionException, WebserviceException, PersistenceException Create a new document. The user can completely customize the document through a value object containing the document's metadata- Parameters:
sid
- identifier of the sessiondocument
- Web service value object containing the document's metadatacontent
- The document's binary content- Returns:
- The value object containing the document's metadata
- Throws:
IOException
- I/O errorPersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
delete
void delete(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Deletes an existing document with the given identifier.- Parameters:
sid
- identifier of the sessiondocId
- The document id- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
lock
void lock(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Locks an existing document with the given identifier.- Parameters:
sid
- identifier of the sessiondocId
- The document id- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
unlock
void unlock(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Unlocks an existing document with the given identifier.- Parameters:
sid
- identifier of the sessiondocId
- identifier of the document- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
rename
void rename(String sid, long docId, String name) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Renames the title of an existing document with the given identifier.- Parameters:
sid
- identifier of the sessiondocId
- The document idname
- The new document title- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
move
void move(String sid, long docId, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Moves an existing document with the given identifier.- Parameters:
sid
- identifier of the sessiondocId
- The document idfolderId
- Identifier of the new document's folder- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
copy
WSDocument copy(String sid, long docId, long folderId, boolean links, boolean notes) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Copies a document into another folder.- Parameters:
sid
- identifier of the sessiondocId
- The document idfolderId
- Identifier of the new document's folderlinks
- If links must be copied toonotes
- If notes and annotations must be copied too- Returns:
- The created copy
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionIOException
- I/O error
-
getDocument
WSDocument getDocument(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets the metadata of an existing document with the given identifier- Parameters:
sid
- identifier of the sessiondocId
- The document id- Returns:
- A value object containing the document's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getDocumentByCustomId
WSDocument getDocumentByCustomId(String sid, String customId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets document metadata of an existing document with the given custom identifier- Parameters:
sid
- identifier of the sessioncustomId
- The custom id- Returns:
- A value object containing the document's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getDocuments
WSDocument[] getDocuments(String sid, Long[] docIds) throws AuthenticationException, WebserviceException, PersistenceException Gets document metadata of a collection of existing documents with the given identifiers- Parameters:
sid
- identifier of the sessiondocIds
- identifiers of the documents- Returns:
- the list of documents
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getAliases
WSDocument[] getAliases(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException Gets the aliases of the given document- Parameters:
sid
- identifier of the sessiondocId
- The master document ID- Returns:
- Arrays of aliases
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
update
void update(String sid, WSDocument document) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Updates an existing document with the value object containing the document's metadata- Parameters:
sid
- identifier of the sessiondocument
- The value object containing the document's metadata- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getContent
javax.activation.DataHandler getContent(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Gets the content of an existing document with the given identifier- Parameters:
sid
- identifier of the sessiondocId
- The document id- Returns:
- The requested document's binary
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionIOException
- I/O error
-
getExtractedText
String getExtractedText(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException Gets the document's text stored in the full-text index- Parameters:
sid
- identifier of the sessiondocId
- The document id- Returns:
- The requested document's text
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getVersionContent
javax.activation.DataHandler getVersionContent(String sid, long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Gets the content of a specific version of a document- Parameters:
sid
- identifier of the sessiondocId
- The document idversion
- The specific version(it can be empty)- Returns:
- The requested version's binary
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionIOException
- I/O error
-
getResource
javax.activation.DataHandler getResource(String sid, long docId, String fileVersion, String suffix) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Gets the content of a resource associated to the given document.- Parameters:
sid
- identifier of the sessiondocId
- The document idfileVersion
- The specific file version(it can be empty)suffix
- Suffix specification(it can be empty, conversion.pdf to get the PDF conversion)- Returns:
- The requested resource's binary
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionIOException
- I/O error
-
checkout
void checkout(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Checks out an existing document with the given identifier.- Parameters:
sid
- identifier of the sessiondocId
- The document id- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
checkin
void checkin(String sid, long docId, String comment, String filename, boolean release, javax.activation.DataHandler content) throws IOException, AuthenticationException, PermissionException, WebserviceException, PersistenceException Checks in an existing document with the given identifier to create a new version.- Parameters:
sid
- identifier of the sessiondocId
- The document idcomment
- The check in operation commentfilename
- The document file namerelease
- True if this is a new release(eg: 2.0) rather than a subversion(eg: 1.1)content
- The document's binary content- Throws:
IOException
- I/O errorPersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
checkinDocument
void checkinDocument(String sid, long docId, String comment, String filename, boolean release, WSDocument docVO, javax.activation.DataHandler content) throws IOException, AuthenticationException, PermissionException, WebserviceException, PersistenceException Checks in an existing document with the given identifier to create a new version.- Parameters:
sid
- identifier of the sessiondocId
- The document idcomment
- The check in operation commentfilename
- The document file namerelease
- True if this is a new release(e.g.: 2.0) rather than a subversion(e.g.: 1.1)docVO
- metadata for the documentcontent
- The document's binary content- Throws:
IOException
- I/O errorPersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
replaceFile
void replaceFile(String sid, long docId, String fileVersion, String comment, javax.activation.DataHandler content) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Replaces the file associated to a given version.- Parameters:
sid
- identifier of the sessiondocId
- The document idfileVersion
- The file versioncomment
- The comment left for this actioncontent
- The file's binary content- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionIOException
- I/O error
-
promoteVersion
void promoteVersion(String sid, long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Promotes an old version to the current default one. If you promote a prior version, what it does is make it the default version again. (regardless of there being many versions).- Parameters:
sid
- identifier of the sessiondocId
- the document to be updatedversion
- the version- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionIOException
- I/O error
-
upload
long upload(String sid, Long docId, Long folderId, boolean release, String filename, String language, javax.activation.DataHandler content) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Creates a new document or updates an existing one.- Parameters:
sid
- identifier of the sessiondocId
- The document id (optional)folderId
- The folder id (optional)release
- True if this is a major release(eg: 2.0) rather than a minor release(eg: 1.12)filename
- The document file namelanguage
- The language for the documentcontent
- The document's binary content- Returns:
- The created/updated document's ID
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionIOException
- I/O erro
-
uploadResource
void uploadResource(String sid, long docId, String fileVersion, String suffix, javax.activation.DataHandler content) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Uploads a new resource attached to the given document. If the resource already exists it is overwritten.- Parameters:
sid
- Session identifierdocId
- The document idfileVersion
- The specific file version(it can be empty)suffix
- Suffix specification(it cannot be empty, use 'conversion.pdf' to put the PDF conversion)content
- The resource's binary content- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionIOException
- I/O error
-
isReadable
boolean isReadable(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException Tests if a document is readable- Parameters:
sid
- identifier of the sessiondocId
- The document id- Returns:
- True if the identifier denotes a document, otherwise false
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
restore
void restore(String sid, long docId, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Restores a deleted document- Parameters:
sid
- identifier of the sessiondocId
- The document idfolderId
- Id of the folder in which the document must be restored- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getVersions
WSDocument[] getVersions(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets the version history of an existing document with the given identifier- Parameters:
sid
- identifier of the sessiondocId
- The document id- Returns:
- Array of versions
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getVersion
WSDocument getVersion(String sid, long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets a specific version- Parameters:
sid
- identifier of the sessiondocId
- The document idversion
- The version number- Returns:
- The version
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
listDocuments
WSDocument[] listDocuments(String sid, long folderId, String fileName) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets a document in a specific folder- Parameters:
sid
- identifier of the sessionfolderId
- The folder idfileName
- Optional file name filter- Returns:
- A value object containing the document's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getRecentDocuments
WSDocument[] getRecentDocuments(String sid, Integer maxHits) throws AuthenticationException, WebserviceException, PersistenceException Lists of last modified documents of the current session.- Parameters:
sid
- identifier of the sessionmaxHits
- Maximum number of returned records- Returns:
- Array of documents
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
sendEmail
void sendEmail(String sid, Long[] docIds, String recipients, String subject, String message) throws AuthenticationException, WebserviceException, PersistenceException, IOException, javax.mail.MessagingException Sends a set of documents as mail attachments- Parameters:
sid
- identifier of the sessiondocIds
- Set of document identifiersrecipients
- Set of recipients(comma separated)subject
- The email subjectmessage
- The email message body- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionIOException
- I/O errorjavax.mail.MessagingException
- error sending the email
-
createAlias
WSDocument createAlias(String sid, long docId, long folderId, String type) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Creates a new document alias for the given document inside a specified folder- Parameters:
sid
- identifier of the sessiondocId
- The original document idfolderId
- Identifier of the folder in which will be stored the alias.type
- Type of the alias- Returns:
- The value object containing the document's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
link
WSLink link(String sid, long doc1, long doc2, String type) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Creates a new link between two documents.- Parameters:
sid
- identifier of the sessiondoc1
- ID of document 1doc2
- ID of document 2type
- The link type(it can be empty)- Returns:
- the new link
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getLinks
WSLink[] getLinks(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets all the links of a specific document- Parameters:
sid
- Session identifierdocId
- ID of the document- Returns:
- The new links of the document
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
deleteLink
void deleteLink(String sid, long id) throws AuthenticationException, WebserviceException, PersistenceException Removes an existing link- Parameters:
sid
- identifier of the sessionid
- ID of the link- Throws:
PersistenceException
- Error at data layerWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
reindex
void reindex(String sid, long docId, String content) throws AuthenticationException, WebserviceException, PersistenceException, ParseException Re-indexes(or indexes from scratch) a document- Parameters:
sid
- Session identifierdocId
- The document idcontent
- The content to be used (if null the file is parsed)- Throws:
PersistenceException
- Error at data layerWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionParseException
- Error in adding the entry into fulltext index
-
createPdf
void createPdf(String sid, long docId, String fileVersion) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Creates the PDF conversion of the given document. If the conversion was already created, nothing will happen.- Parameters:
sid
- identifier of the sessiondocId
- The document idfileVersion
- The specific file version(it can be empty)- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionIOException
- I/O error
-
createThumbnail
void createThumbnail(String sid, long docId, String fileVersion, String type) throws AuthenticationException, WebserviceException, PersistenceException, IOException Creates the thumbnail of the given document. If the thumbnail was already created, nothing will happen.- Parameters:
sid
- Session identifierdocId
- The document idfileVersion
- The specific file version(it can be empty)type
- The thumbnail type(eg: thumb, tile, mobile, thumbXXX where XXX is a resolution in pixels)- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionIOException
- I/O error
-
createDownloadTicket
String createDownloadTicket(String sid, long docId, String suffix, Integer expireHours, String expireDate, Integer maxDownloads) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Creates a new download ticket- Parameters:
sid
- identifier of the sessiondocId
- identifier of the documentsuffix
- can be null or 'conversion.pdf'expireHours
- expiration time expressed in hoursexpireDate
- exact expiration date expressed in the format yyyy-MM-ddmaxDownloads
- maximum number of downloads allowed- Returns:
- the download ticket
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the download permission
-
createViewTicket
String createViewTicket(String sid, long docId, String suffix, Integer expireHours, String expireDate, Integer maxDownloads, Integer maxViews) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Creates a new view ticket- Parameters:
sid
- identifier of the sessiondocId
- identifier of the documentsuffix
- can be null or 'conversion.pdf'expireHours
- expiration time expressed in hoursexpireDate
- exact expiration date expressed in the format yyyy-MM-ddmaxDownloads
- maximum number of downloads allowedmaxViews
- maximum number of downloads allowed- Returns:
- the download ticket
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the download permission
-
setPassword
void setPassword(String sid, long docId, String password) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Puts a password protection to the document- Parameters:
sid
- identifier of the sessiondocId
- identifier of the documentpassword
- the new password- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
unsetPassword
void unsetPassword(String sid, long docId, String currentPassword) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Removes the password protection from the document- Parameters:
sid
- identifier of the sessiondocId
- identifier of the documentcurrentPassword
- the password- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
unprotect
boolean unprotect(String sid, long docId, String password) throws PersistenceException, AuthenticationException, WebserviceException Unprotects a document that is password protected. If the given password is right, the document remains unprotected for the duration of the session- Parameters:
sid
- identifier of the sessiondocId
- identifier of the documentpassword
- the password- Returns:
- was it uprotected?
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
addNote
WSNote addNote(String sid, long docId, String note) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Adds a new note for the given document- Parameters:
sid
- identifier of the sessiondocId
- identifier of the documentnote
- text of the note- Returns:
- the created note
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
saveNote
WSNote saveNote(String sid, long docId, WSNote note) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Adds a new note for the given document- Parameters:
sid
- identifier of the sessiondocId
- identifier of the documentnote
- the note to add- Returns:
- the added note
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
deleteNote
void deleteNote(String sid, long noteId) throws AuthenticationException, WebserviceException, PersistenceException Adds a new note for the given document- Parameters:
sid
- identifier of the sessionnoteId
- identifier of the note- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getNotes
WSNote[] getNotes(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets the notes for the given document- Parameters:
sid
- identifier of the sessiondocId
- identifier of the document- Returns:
- array of notes
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
deleteVersion
String deleteVersion(String sid, long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException Deletes a version of a document with the given identifiers. You can not delete the latest version of a document- Parameters:
sid
- identifier of the sessiondocId
- The document idversion
- The specific version- Returns:
- the latest version specification
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
rateDocument
WSRating rateDocument(String sid, long docId, int vote) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Puts a new rating on the given document- Parameters:
sid
- identifier of the sessiondocId
- identifier of the documentvote
- the vote- Returns:
- the rating
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getRatings
WSRating[] getRatings(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets all the ratings of the given document- Parameters:
sid
- identifier of the sessiondocId
- identifier of the document- Returns:
- array of ratings
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-