Class SoapDocumentService
java.lang.Object
com.logicaldoc.webservice.AbstractService
com.logicaldoc.webservice.soap.endpoint.SoapDocumentService
- All Implemented Interfaces:
- DocumentService
- Direct Known Subclasses:
- RestDocumentService
Document Web Service Implementation (SOAP)
- Since:
- 5.2
- Author:
- Matteo Caruso - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdds a new note for the given documentvoidcheckin(String sid, long docId, String comment, String filename, boolean release, WSDocument docVO, InputStream content) voidcheckin(String sid, long docId, String comment, String filename, boolean release, jakarta.activation.DataHandler content) Checks in an existing document with the given identifier to create a new version.voidcheckinDocument(String sid, long docId, String comment, String filename, boolean release, WSDocument docVO, jakarta.activation.DataHandler content) Checks in an existing document with the given identifier to create a new version.voidcheckinDocument(String sid, long docId, String comment, String filename, boolean release, WSDocument docVO, InputStream content) voidChecks out an existing document with the given identifier.Copies a document into another folder.create(String sid, WSDocument document, jakarta.activation.DataHandler content) Create a new document.create(String sid, WSDocument document, InputStream content) 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 ticketvoidCreates the PDF conversion of the given document.voidcreateThumbnail(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 ticketvoidDeletes an existing document with the given identifier.voiddeleteLink(String sid, long id) Removes an existing linkvoiddeleteNote(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.getAccessControlList(String sid, long docId) Retrieves the access control listgetAliases(String sid, long docId) Gets the aliases of the given documentjakarta.activation.DataHandlergetContent(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, List<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 indexGets all the links of a specific documentGets the notes for the given documentgetRatings(String sid, long docId) Gets all the ratings of the given documentgetRecentDocuments(String sid, Integer max) Lists of last modified documents by current user.jakarta.activation.DataHandlergetResource(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 versionjakarta.activation.DataHandlergetVersionContent(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 identifierbooleanisDownload(String sid, long docId) Tests if a document is downloadablebooleanTests if the current user has a specific permission on a documentbooleanTests if a document is readable.booleanTests if a document is writableCreates a new link between two documents.Gets the documents in a specific folderlistDocuments(String sid, long folderId, String fileName) Gets the documents in a specific foldervoidLocks an existing document with the given identifier.voidMoves an existing document with the given identifier.voidpromoteVersion(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 documentvoidRe-indexes(or indexes from scratch) a documentvoidRenames the title of an existing document with the given identifier.voidreplaceFile(String sid, long docId, String fileVersion, String comment, jakarta.activation.DataHandler content) Replaces the file associated to a given version.voidRestores a deleted documentAdds a new note for the given documentvoidSends a set of documents as mail attachmentsvoidsetAccessControlList(String sid, long docId, List<WSAccessControlEntry> acl) Sets the Access Control ListvoidsetPassword(String sid, long docId, String password) Puts a password protection to the documentvoidUnlocks an existing document with the given identifier.booleanUnprotects a document that is password protected.voidunsetPassword(String sid, long docId, String currentPassword) Removes the password protection from the documentvoidupdate(String sid, WSDocument document) Updates an existing document with the value object containing the document's metadatalongupload(String sid, Long docId, Long folderId, boolean release, String filename, String language, jakarta.activation.DataHandler content) Creates a new document or updates an existing one.voiduploadResource(String sid, long docId, String fileVersion, String suffix, jakarta.activation.DataHandler content) Uploads a new resource attached to the given document.Methods inherited from class com.logicaldoc.webservice.AbstractServiceconvertDateToString, convertStringToDate, getCurrentMessage, isValidateSession, setCurrentMessage, setValidateSession
- 
Constructor Details- 
SoapDocumentServicepublic SoapDocumentService()
 
- 
- 
Method Details- 
createpublic WSDocument create(String sid, WSDocument document, jakarta.activation.DataHandler content) throws IOException, AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceCreate a new document. The user can completely customize the document through a value object containing the document's metadata- Specified by:
- createin interface- DocumentService
- Parameters:
- sid- identifier of the session
- document- Web service value object containing the document's metadata
- content- The document's binary content
- Returns:
- The value object containing the document's metadata
- Throws:
- IOException- I/O error
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
createpublic WSDocument create(String sid, WSDocument document, InputStream content) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException 
- 
checkinDocumentpublic void checkinDocument(String sid, long docId, String comment, String filename, boolean release, WSDocument docVO, InputStream content) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, IOException 
- 
checkinDocumentpublic void checkinDocument(String sid, long docId, String comment, String filename, boolean release, WSDocument docVO, jakarta.activation.DataHandler content) throws IOException, AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceChecks in an existing document with the given identifier to create a new version.- Specified by:
- checkinDocumentin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- comment- The check in operation comment
- filename- The document file name
- release- True if this is a new release(e.g.: 2.0) rather than a subversion(e.g.: 1.1)
- docVO- metadata for the document
- content- The document's binary content
- Throws:
- IOException- I/O error
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
checkinpublic void checkin(String sid, long docId, String comment, String filename, boolean release, jakarta.activation.DataHandler content) throws IOException, AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceChecks in an existing document with the given identifier to create a new version.- Specified by:
- checkinin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- comment- The check in operation comment
- filename- The document file name
- release- 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 error
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
checkinpublic void checkin(String sid, long docId, String comment, String filename, boolean release, WSDocument docVO, InputStream content) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException 
- 
checkoutpublic void checkout(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentServiceChecks out an existing document with the given identifier.- Specified by:
- checkoutin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
 
- 
deletepublic void delete(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentServiceDeletes an existing document with the given identifier.- Specified by:
- deletein interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
 
- 
getContentpublic jakarta.activation.DataHandler getContent(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Description copied from interface:DocumentServiceGets the content of an existing document with the given identifier- Specified by:
- getContentin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- Returns:
- The requested document's binary
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- IOException- I/O error
 
- 
getVersionContentpublic jakarta.activation.DataHandler getVersionContent(String sid, long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Description copied from interface:DocumentServiceGets the content of a specific version of a document- Specified by:
- getVersionContentin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- version- The specific version(it can be empty)
- Returns:
- The requested version's binary
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- IOException- I/O error
 
- 
getResourcepublic jakarta.activation.DataHandler getResource(String sid, long docId, String fileVersion, String suffix) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Description copied from interface:DocumentServiceGets the content of a resource associated to the given document.- Specified by:
- getResourcein interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- fileVersion- 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:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- IOException- I/O error
 
- 
createPdfpublic void createPdf(String sid, long docId, String fileVersion) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Description copied from interface:DocumentServiceCreates the PDF conversion of the given document. If the conversion was already created, nothing will happen.- Specified by:
- createPdfin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- fileVersion- The specific file version(it can be empty)
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- IOException- I/O error
 
- 
createThumbnailpublic void createThumbnail(String sid, long docId, String fileVersion, String type) throws AuthenticationException, WebserviceException, PersistenceException, IOException Description copied from interface:DocumentServiceCreates the thumbnail of the given document. If the thumbnail was already created, nothing will happen.- Specified by:
- createThumbnailin interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- The document id
- fileVersion- 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:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- IOException- I/O error
 
- 
uploadResourcepublic void uploadResource(String sid, long docId, String fileVersion, String suffix, jakarta.activation.DataHandler content) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Description copied from interface:DocumentServiceUploads a new resource attached to the given document. If the resource already exists it is overwritten.- Specified by:
- uploadResourcein interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- The document id
- fileVersion- 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:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- IOException- I/O error
 
- 
getDocumentpublic WSDocument getDocument(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceGets the metadata of an existing document with the given identifier- Specified by:
- getDocumentin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- Returns:
- A value object containing the document's metadata
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- the required document does not exist
 
- 
getDocumentByCustomIdpublic WSDocument getDocumentByCustomId(String sid, String customId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentServiceGets document metadata of an existing document with the given custom identifier- Specified by:
- getDocumentByCustomIdin interface- DocumentService
- Parameters:
- sid- identifier of the session
- customId- The custom id
- Returns:
- A value object containing the document's metadata
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
 
- 
lockpublic void lock(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceLocks an existing document with the given identifier.- Specified by:
- lockin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The requested document does not exist
 
- 
movepublic void move(String sid, long docId, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceMoves an existing document with the given identifier.- Specified by:
- movein interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- folderId- Identifier of the new document's folder
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
copypublic WSDocument copy(String sid, long docId, long folderId, boolean links, boolean notes, boolean security) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Description copied from interface:DocumentServiceCopies a document into another folder.- Specified by:
- copyin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- folderId- Identifier of the new document's folder
- links- If links must be copied too
- notes- If notes and annotations must be copied too
- Returns:
- The created copy
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- IOException- I/O error
 
- 
renamepublic void rename(String sid, long docId, String name) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceRenames the title of an existing document with the given identifier.- Specified by:
- renamein interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- name- The new document title
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
restorepublic void restore(String sid, long docId, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceRestores a deleted document- Specified by:
- restorein interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- folderId- Id of the folder in which the document must be restored
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
unlockpublic void unlock(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceUnlocks an existing document with the given identifier.- Specified by:
- unlockin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
updatepublic void update(String sid, WSDocument document) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException Description copied from interface:DocumentServiceUpdates an existing document with the value object containing the document's metadata- Specified by:
- updatein interface- DocumentService
- Parameters:
- sid- identifier of the session
- document- The value object containing the document's metadata
- Throws:
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- UnexistingResourceException- The specified document does not exist
 
- 
listDocumentspublic List<WSDocument> listDocuments(String sid, long folderId, String fileName) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentServiceGets the documents in a specific folder- Specified by:
- listDocumentsin interface- DocumentService
- Parameters:
- sid- identifier of the session
- folderId- The folder id
- fileName- Optional file name filter
- Returns:
- Collection of documents
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
 
- 
listpublic List<WSDocument> list(String sid, long folderId, String fileName, String sort, Integer page, Integer max) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentServiceGets the documents in a specific folder- Specified by:
- listin interface- DocumentService
- Parameters:
- sid- identifier of the session
- folderId- The folder id
- fileName- Optional file name filter
- sort- Optional sort criteria (eg date asc)
- page- Optional page number
- max- Optional maximum number of elements per page
- Returns:
- Collection of documents
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
 
- 
getDocumentspublic List<WSDocument> getDocuments(String sid, List<Long> docIds) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceGets document metadata of a collection of existing documents with the given identifiers- Specified by:
- getDocumentsin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docIds- identifiers of the documents
- Returns:
- the list of documents
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getRecentDocumentspublic List<WSDocument> getRecentDocuments(String sid, Integer max) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceLists of last modified documents by current user.- Specified by:
- getRecentDocumentsin interface- DocumentService
- Parameters:
- sid- identifier of the session
- max- Maximum number of returned records
- Returns:
- List of documents
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
sendEmailpublic void sendEmail(String sid, List<Long> docIds, String recipients, String subject, String message) throws AuthenticationException, WebserviceException, PersistenceException, IOException, jakarta.mail.MessagingException Description copied from interface:DocumentServiceSends a set of documents as mail attachments- Specified by:
- sendEmailin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docIds- Set of document identifiers
- recipients- Set of recipients(comma separated)
- subject- The email subject
- message- The email message body
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- IOException- I/O error
- jakarta.mail.MessagingException- error sending the email
 
- 
createAliaspublic WSDocument createAlias(String sid, long docId, long folderId, String type) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentServiceCreates a new document alias for the given document inside a specified folder- Specified by:
- createAliasin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The original document id
- folderId- 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:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
 
- 
reindexpublic void reindex(String sid, long docId, String content) throws ParsingException, AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceRe-indexes(or indexes from scratch) a document- Specified by:
- reindexin interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- The document id
- content- The content to be used (if null the file is parsed)
- Throws:
- ParsingException- Error in adding the entry into fulltext index
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error at data layer
 
- 
getAliasespublic List<WSDocument> getAliases(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceGets the aliases of the given document- Specified by:
- getAliasesin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The master document ID
- Returns:
- List of aliases
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
uploadpublic long upload(String sid, Long docId, Long folderId, boolean release, String filename, String language, jakarta.activation.DataHandler content) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException Description copied from interface:DocumentServiceCreates a new document or updates an existing one.- Specified by:
- uploadin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- 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 name
- language- The language for the document
- content- The document's binary content
- Returns:
- The created/updated document's ID
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- IOException- I/O erro
 
- 
linkpublic WSLink link(String sid, long doc1, long doc2, String type) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceCreates a new link between two documents.- Specified by:
- linkin interface- DocumentService
- Parameters:
- sid- identifier of the session
- doc1- ID of document 1
- doc2- ID of document 2
- type- The link type(it can be empty)
- Returns:
- the new link
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
getLinkspublic List<WSLink> getLinks(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentServiceGets all the links of a specific document- Specified by:
- getLinksin interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- ID of the document
- Returns:
- The new links of the document
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
 
- 
deleteLinkpublic void deleteLink(String sid, long id) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceRemoves an existing link- Specified by:
- deleteLinkin interface- DocumentService
- Parameters:
- sid- identifier of the session
- id- ID of the link
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error at data layer
 
- 
getExtractedTextpublic String getExtractedText(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceGets the document's text stored in the full-text index- Specified by:
- getExtractedTextin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- Returns:
- The requested document's text
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
createDownloadTicketpublic String createDownloadTicket(String sid, long docId, String suffix, Integer expireHours, String expireDate, Integer maxDownloads) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentServiceCreates a new download ticket- Specified by:
- createDownloadTicketin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- suffix- can be null or 'conversion.pdf'
- expireHours- expiration time expressed in hours
- expireDate- exact expiration date expressed in the format yyyy-MM-dd
- maxDownloads- maximum number of downloads allowed
- Returns:
- the download ticket
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the download permission
 
- 
createViewTicketpublic String createViewTicket(String sid, long docId, String suffix, Integer expireHours, String expireDate, Integer maxDownloads, Integer maxViews) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentServiceCreates a new view ticket- Specified by:
- createViewTicketin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- suffix- can be null or 'conversion.pdf'
- expireHours- expiration time expressed in hours
- expireDate- exact expiration date expressed in the format yyyy-MM-dd
- maxDownloads- maximum number of downloads allowed
- maxViews- maximum number of downloads allowed
- Returns:
- the download ticket
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the download permission
 
- 
setPasswordpublic void setPassword(String sid, long docId, String password) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServicePuts a password protection to the document- Specified by:
- setPasswordin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- password- the new password
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
unsetPasswordpublic void unsetPassword(String sid, long docId, String currentPassword) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceRemoves the password protection from the document- Specified by:
- unsetPasswordin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- currentPassword- the password
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
unprotectpublic boolean unprotect(String sid, long docId, String password) throws PersistenceException, AuthenticationException, WebserviceException Description copied from interface:DocumentServiceUnprotects a document that is password protected. If the given password is right, the document remains unprotected for the duration of the session- Specified by:
- unprotectin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- password- the password
- Returns:
- was it uprotected?
- Throws:
- PersistenceException- Error in the database
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
 
- 
addNotepublic WSNote addNote(String sid, long docId, String note) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceAdds a new note for the given document- Specified by:
- addNotein interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- note- text of the note
- Returns:
- the created note
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
saveNotepublic WSNote saveNote(String sid, long docId, WSNote wsNote) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceAdds a new note for the given document- Specified by:
- saveNotein interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- wsNote- the note to add
- Returns:
- the added note
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
deleteNotepublic void deleteNote(String sid, long noteId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceAdds a new note for the given document- Specified by:
- deleteNotein interface- DocumentService
- Parameters:
- sid- identifier of the session
- noteId- identifier of the note
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
deleteVersionpublic String deleteVersion(String sid, long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceDeletes a version of a document with the given identifiers. You can not delete the latest version of a document- Specified by:
- deleteVersionin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- version- The specific version
- Returns:
- the latest version specification
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getNotespublic List<WSNote> getNotes(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceGets the notes for the given document- Specified by:
- getNotesin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- Returns:
- list of notes
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
rateDocumentpublic WSRating rateDocument(String sid, long docId, int vote) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServicePuts a new rating on the given document- Specified by:
- rateDocumentin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- vote- the vote
- Returns:
- the rating
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
getRatingspublic List<WSRating> getRatings(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceGets all the ratings of the given document- Specified by:
- getRatingsin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- identifier of the document
- Returns:
- List of ratings
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
replaceFilepublic void replaceFile(String sid, long docId, String fileVersion, String comment, jakarta.activation.DataHandler content) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException, UnexistingResourceException Description copied from interface:DocumentServiceReplaces the file associated to a given version.- Specified by:
- replaceFilein interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- fileVersion- The file version
- comment- The comment left for this action
- content- The file's binary content
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- IOException- I/O error
- UnexistingResourceException- The specified document does not exist
 
- 
promoteVersionpublic void promoteVersion(String sid, long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, IOException, UnexistingResourceException Description copied from interface:DocumentServicePromotes 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).- Specified by:
- promoteVersionin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- the document to be updated
- version- the version
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- IOException- I/O error
- UnexistingResourceException- The specified document does not exist
 
- 
getVersionpublic WSDocument getVersion(String sid, long docId, String version) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceGets a specific version- Specified by:
- getVersionin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- version- The version number
- Returns:
- The version
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
getVersionspublic List<WSDocument> getVersions(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException, UnexistingResourceException Description copied from interface:DocumentServiceGets the version history of an existing document with the given identifier- Specified by:
- getVersionsin interface- DocumentService
- Parameters:
- sid- identifier of the session
- docId- The document id
- Returns:
- Collection of versions
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- UnexistingResourceException- The specified document does not exist
 
- 
setAccessControlListpublic void setAccessControlList(String sid, long docId, List<WSAccessControlEntry> acl) throws PersistenceException, PermissionException, AuthenticationException, WebserviceException Description copied from interface:DocumentServiceSets the Access Control List- Specified by:
- setAccessControlListin interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- Document id
- acl- the complete Access Control List
- Throws:
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
 
- 
getAccessControlListpublic List<WSAccessControlEntry> getAccessControlList(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceRetrieves the access control list- Specified by:
- getAccessControlListin interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- Document id
- Returns:
- 'error' if error occurred, the right objects collection
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
isReadpublic boolean isRead(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceTests if a document is readable.- Specified by:
- isReadin interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- The document id
- Returns:
- True if the identifier denotes a readable document, otherwise false.
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
isWritepublic boolean isWrite(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceTests if a document is writable- Specified by:
- isWritein interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- The document id
- Returns:
- True if the identifier denotes a writable folder, otherwise false
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
isDownloadpublic boolean isDownload(String sid, long docId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceTests if a document is downloadable- Specified by:
- isDownloadin interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- The document id
- Returns:
- True if the identifier denotes a writable folder, otherwise false
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
isGrantedpublic boolean isGranted(String sid, long docId, String permission) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentServiceTests if the current user has a specific permission on a document- Specified by:
- isGrantedin interface- DocumentService
- Parameters:
- sid- Session identifier
- docId- The document id
- permission- The permission to check (eg: 'read', 'write', ...)
- Returns:
- True if the identifier denotes a granted permission, otherwise false
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
 
-