Package com.logicaldoc.web.service
Class DocumentServiceImpl
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.jakarta.AbstractRemoteServiceServlet
com.google.gwt.user.server.rpc.jakarta.RemoteServiceServlet
com.logicaldoc.web.service.AbstractRemoteService
com.logicaldoc.web.service.DocumentServiceImpl
- All Implemented Interfaces:
- com.google.gwt.user.client.rpc.RemoteService,- com.google.gwt.user.server.rpc.SerializationPolicyProvider,- DocumentService,- jakarta.servlet.Servlet,- jakarta.servlet.ServletConfig,- Serializable
The document service for the operations on the documents done through the
 GUI.
- Since:
- 6.0
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.logicaldoc.gui.frontend.client.services.DocumentServiceDocumentService.Instance
- 
Field SummaryFields inherited from class jakarta.servlet.http.HttpServletLEGACY_DO_HEAD
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddBookmarks(List<Long> ids, int type) Adds new bookmarksaddDocuments(boolean importZip, String charset, boolean immediateIndexing, GUIDocument metadata) addDocuments(String language, long folderId, boolean importZip, String charset, boolean immediateIndexing, Long templateId) Adds new documents previously uploadedlongAdds a new document note on the given documentvoidapplyParentFolderSecurity(long docId) Applies all security settings from the folder to the documentvoidarchiveDocuments(List<Long> docIds, String comment) Archives a set of documentslongarchiveFolder(long folderId, String comment) Archives the documents in a folderbulkUpdate(List<Long> ids, GUIDocument vo, boolean ignoreEmptyFields) Applies to a selection of documents all the given datacheckin(GUIDocument document, boolean major) Checks-in a new document versioncheckinContent(long docId, String content) Checks-in a new document's text contentvoidChecks out the documentvoidCleans the uploaded files folderConverts a document in a given formatlongcountDocuments(List<Long> folderIds, int status) Counts the documents in a given status contained the specified folder's treescreateDocument(GUIDocument document, String content) Creates a new document with the given text contentcreateDownloadTicket(long docId, int type, String suffix, Integer expireHours, Date expireDate, Integer maxDownloads, Integer maxViews) Creates a download ticketcreateWithContent(GUIDocument vo, String content, boolean checkout) Creates a new empty documentvoiddeDuplicate(Long folderId, boolean retainNewest) Convert duplicates with aliases, just one of the documents is maintainedvoidDeletes a selection of documentsvoiddeleteBookmarks(List<Long> bookmarkIds) Deletes a set of bookmarksvoiddeleteFromTrash(List<Long> ids) Deletes a selection of documents from trashvoiddeleteLinks(List<Long> ids) Deletes a selection of linksvoiddeleteNotes(List<Long> ids) Deletes a selection of document notesdeleteRating(long id) Deletes a votevoiddeleteTicket(long ticketId) deleteVersions(List<Long> ids) Deletes a selection of versionsvoiddestroyDocuments(List<Long> docIds) Permanently deletes a selection of documents, no restore will be possible latervoiddisableTicket(long ticketId) voidClear the user's trashvoidenableTicket(long ticketId) voidenforceFilesIntoFolderStore(long folderId) Enforces that all the files in the given tree are stored in the store configured in the owning folder.extractEmail(long docId, String fileVersion) Extracts the email representation from a .eml or .msg filefromDocument(Document doc, GUIFolder folder, User sessionUser) getAllowedPermissions(List<Long> docIds) Gets the allowed permissions on a set of documents in regards of the current usergetById(long docId) Retrieves a specific document by its IDgetContentAsString(long docId) Retrieves the document's content as a stringgetDocument(Session session, long docId) getNotes(long docId, String fileVersion, Collection<String> types) Retrieves the notes of a documentgetRating(long docId) Retrieves the rating of the given documentgetUserRating(long docId) Retrieves the vote of the current user on the specified documentgetVersionsById(long id1, long id2) Retrieves two specific versions by its IDvoidindexDocuments(List<Long> docIds) Indexes the given set of documentsbooleanisPasswordProtected(long docId) Checks if the document is protected by a passwordvoidlinkDocuments(List<Long> inDocIds, List<Long> outDocIds) Links a set of documentsvoidLocks a set of documentsvoidmakeImmutable(List<Long> docIds, String comment) Makes immutable a set of documentsvoidmarkHistoryAsRead(String event) Marks as read the histories related to the current user and the given event.voidmarkIndexable(List<Long> docIds, int policy) Marks a set of documents as indexablevoidmarkUnindexable(List<Long> docIds) Marks a set of documents as unindexableMerges a set of documents into a single PDFpromoteVersion(long docId, String version) If you promote a prior version, what it does is make it the default version again.Renames the given documentreplaceAlias(long aliasId) Replaces an alias with a copy of the original filevoidreplaceFile(long docId, String fileVersion, String comment) Replaces the file associated to a given versionvoidRestores a given documentsave(GUIDocument guiDocument) Saves the document in the DBvoidsaveACL(GUIDocument guiDocument) Applies all security settings to documentsaveEmailAttachment(long docId, String fileVersion, String attachmentFileName) Extracts an email attachment and saves it in the same folder of the documentvoidsaveNotes(long docId, String fileVersion, List<GUIDocumentNote> notes, Collection<String> types) Saves a set of notesintsaveRating(GUIRating rating) Save a rating vote on a documentsendAsEmail(GUIEmail guiMail, String locale) Sends a document as email(attachment or download ticket)voidsetPassword(long docId, String password) Puts a password protection to the documentstatic DocumenttoDocument(GUIDocument guiDocument) Produces a plain new Document from a GUIDocumentvoidunarchiveDocuments(List<Long> docIds) Restores a given set of archived documentsvoidUnlocks a set of documentsbooleanChecks if the document can be accessed with the given passwordvoidunsetPassword(long docId, String currentPassword) Removes the password protection from the documentvoidupdateBookmark(GUIBookmark bookmark) Updates a single bookmark's datavoidupdateLink(long id, String type) Updates the links typevoidupdateNote(long docId, long noteId, String fileVersion, String message) Updates a document note on the given documentintupdatePages(long docId) Counts the pages of a document and updates the DB.voidvalidate(GUIDocument document) Validates the metadataMethods inherited from class com.logicaldoc.web.service.AbstractRemoteServicesetThreadRequestMethods inherited from class com.google.gwt.user.server.rpc.jakarta.RemoteServiceServletgetSerializationPolicy, init, processCall, processCall, processPostMethods inherited from class com.google.gwt.user.server.rpc.jakarta.AbstractRemoteServiceServletdoPostMethods inherited from class jakarta.servlet.http.HttpServletserviceMethods inherited from class jakarta.servlet.GenericServletdestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
- 
Constructor Details- 
DocumentServiceImplpublic DocumentServiceImpl()
 
- 
- 
Method Details- 
addBookmarksDescription copied from interface:DocumentServiceAdds new bookmarks- Specified by:
- addBookmarksin interface- DocumentService
- Parameters:
- ids- identfiers of the documents or folders to bookmark
- type- the type of bookmark (0 = document, 1 = folder)
- Throws:
- ServerException- an error happened in the server application
 
- 
indexDocumentsDescription copied from interface:DocumentServiceIndexes the given set of documents- Specified by:
- indexDocumentsin interface- DocumentService
- Parameters:
- docIds- The set of documents to index
- Throws:
- ServerException- an error happened in the server application
 
- 
destroyDocumentsDescription copied from interface:DocumentServicePermanently deletes a selection of documents, no restore will be possible later- Specified by:
- destroyDocumentsin interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- Throws:
- ServerException- an error happened in the server application
 
- 
addDocumentspublic List<GUIDocument> addDocuments(boolean importZip, String charset, boolean immediateIndexing, GUIDocument metadata) throws ServerException - Specified by:
- addDocumentsin interface- DocumentService
- Throws:
- ServerException
 
- 
checkinDescription copied from interface:DocumentServiceChecks-in a new document version- Specified by:
- checkinin interface- DocumentService
- Parameters:
- document- The document to update
- major- True if this is a major version
- Returns:
- The updated document
- Throws:
- ServerException- an error happened in the server application
 
- 
addDocumentspublic List<GUIDocument> addDocuments(String language, long folderId, boolean importZip, String charset, boolean immediateIndexing, Long templateId) throws ServerException Description copied from interface:DocumentServiceAdds new documents previously uploaded- Specified by:
- addDocumentsin interface- DocumentService
- Parameters:
- language- The language applied to all documents
- folderId- The destination folder identifier
- importZip- If .zip files have to be unpacked and the contained documents imported
- charset- Charset to use to process the .zip files
- immediateIndexing- If the documents must be immediately indexed
- templateId- The documents template
- Returns:
- The list of created documents
- Throws:
- ServerException- an error happened in the server application
 
- 
promoteVersionDescription copied from interface:DocumentServiceIf 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:
- docId- the identifier of the document
- version- version specification
- Returns:
- the document
- Throws:
- ServerException- an error happened in the server application
 
- 
checkoutDescription copied from interface:DocumentServiceChecks out the document- Specified by:
- checkoutin interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- Throws:
- ServerException- an error happened in the server application
 
- 
lockDescription copied from interface:DocumentServiceLocks a set of documents- Specified by:
- lockin interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- comment- the comment to the lock
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteDescription copied from interface:DocumentServiceDeletes a selection of documents- Specified by:
- deletein interface- DocumentService
- Parameters:
- ids- identifiers of the documents
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteBookmarksDescription copied from interface:DocumentServiceDeletes a set of bookmarks- Specified by:
- deleteBookmarksin interface- DocumentService
- Parameters:
- bookmarkIds- identifiers of the bookmarks to delete
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteLinksDescription copied from interface:DocumentServiceDeletes a selection of links- Specified by:
- deleteLinksin interface- DocumentService
- Parameters:
- ids- identifiers of the links
- Throws:
- ServerException- an error happened in the server application
 
- 
getByIdDescription copied from interface:DocumentServiceRetrieves a specific document by its ID- Specified by:
- getByIdin interface- DocumentService
- Parameters:
- docId- identifier of the document
- Returns:
- the document retrieved by the server application
- Throws:
- ServerException- an error happened in the server application
 
- 
isPasswordProtectedDescription copied from interface:DocumentServiceChecks if the document is protected by a password- Specified by:
- isPasswordProtectedin interface- DocumentService
- Parameters:
- docId- identifier of the document
- Returns:
- true only if the document has been protected by a password
- Throws:
- ServerException- an error happened in the server application
 
- 
getDocumentpublic GUIDocument getDocument(Session session, long docId) throws InvalidSessionServerException, PersistenceException, PermissionException 
- 
fromDocumentpublic GUIDocument fromDocument(Document doc, GUIFolder folder, User sessionUser) throws PersistenceException - Throws:
- PersistenceException
 
- 
getVersionsByIdDescription copied from interface:DocumentServiceRetrieves two specific versions by its ID- Specified by:
- getVersionsByIdin interface- DocumentService
- Parameters:
- id1- identifier of the first version
- id2- identifier of the second version
- Returns:
- the two versions
- Throws:
- ServerException- an error happened in the server application
 
- 
linkDocumentsDescription copied from interface:DocumentServiceLinks a set of documents- Specified by:
- linkDocumentsin interface- DocumentService
- Parameters:
- inDocIds- identifiers of the documents for the IN direction
- outDocIds- identifiers of the documents for the OUT direction
- Throws:
- ServerException- an error happened in the server application
 
- 
makeImmutableDescription copied from interface:DocumentServiceMakes immutable a set of documents- Specified by:
- makeImmutablein interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- comment- the commit
- Throws:
- ServerException- an error happened in the server application
 
- 
markHistoryAsReadDescription copied from interface:DocumentServiceMarks as read the histories related to the current user and the given event.- Specified by:
- markHistoryAsReadin interface- DocumentService
- Parameters:
- event- The history event to mark as read
- Throws:
- ServerException- an error happened in the server application
 
- 
markIndexableDescription copied from interface:DocumentServiceMarks a set of documents as indexable- Specified by:
- markIndexablein interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- policy- indexing policy:- Constants.INDEX_TO_INDEXor- Constants.INDEX_TO_INDEX_METADATA
- Throws:
- ServerException- an error happened in the server application
 
- 
markUnindexableDescription copied from interface:DocumentServiceMarks a set of documents as unindexable- Specified by:
- markUnindexablein interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- Throws:
- ServerException- an error happened in the server application
 
- 
restoreDescription copied from interface:DocumentServiceRestores a given document- Specified by:
- restorein interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- folderId- identifier of the folder in which to restore the documents
- Throws:
- ServerException- an error happened in the server application
 
- 
validateDescription copied from interface:DocumentServiceValidates the metadata- Specified by:
- validatein interface- DocumentService
- Parameters:
- document- The document to validate
- Throws:
- ServerException- in case of invalid instance, this exception contains the errors
 
- 
saveDescription copied from interface:DocumentServiceSaves the document in the DB- Specified by:
- savein interface- DocumentService
- Parameters:
- guiDocument- The document to save
- Returns:
- The saved document
- Throws:
- ServerException- an error happened in the server application
 
- 
toDocumentProduces a plain new Document from a GUIDocument- Parameters:
- guiDocument- the GUI document
- Returns:
- the core Document
- Throws:
- PersistenceException- error at data layer
 
- 
sendAsEmailDescription copied from interface:DocumentServiceSends a document as email(attachment or download ticket)- Specified by:
- sendAsEmailin interface- DocumentService
- Parameters:
- guiMail- the email to send
- locale- the locale specification
- Returns:
- "ok" otherwise an error code
- Throws:
- ServerException- an error happened in the server application
 
- 
unlockDescription copied from interface:DocumentServiceUnlocks a set of documents- Specified by:
- unlockin interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- Throws:
- ServerException- an error happened in the server application
 
- 
updateBookmarkDescription copied from interface:DocumentServiceUpdates a single bookmark's data- Specified by:
- updateBookmarkin interface- DocumentService
- Parameters:
- bookmark- the bookmark to update
- Throws:
- ServerException- an error happened in the server application
 
- 
updateLinkDescription copied from interface:DocumentServiceUpdates the links type- Specified by:
- updateLinkin interface- DocumentService
- Parameters:
- id- The link identifier
- type- The new type to be set
- Throws:
- ServerException- an error happened in the server application
 
- 
cleanUploadedFileFolderDescription copied from interface:DocumentServiceCleans the uploaded files folder- Specified by:
- cleanUploadedFileFolderin interface- DocumentService
- Throws:
- ServerException- an error happened in the server application
 
- 
getRatingDescription copied from interface:DocumentServiceRetrieves the rating of the given document- Specified by:
- getRatingin interface- DocumentService
- Parameters:
- docId- identifier of the document
- Returns:
- the rating retrieved by the server application
- Throws:
- ServerException- an error happened in the server application
 
- 
saveRatingDescription copied from interface:DocumentServiceSave a rating vote on a document- Specified by:
- saveRatingin interface- DocumentService
- Parameters:
- rating- the document's rating
- Returns:
- the new document rating value
- Throws:
- ServerException- an error happened in the server application
 
- 
addNoteDescription copied from interface:DocumentServiceAdds a new document note on the given document- Specified by:
- addNotein interface- DocumentService
- Parameters:
- docId- identifier of the document
- message- the note's text
- Returns:
- identifier of the created note
- Throws:
- ServerException- an error happened in the server application
 
- 
getNotespublic List<GUIDocumentNote> getNotes(long docId, String fileVersion, Collection<String> types) throws ServerException Description copied from interface:DocumentServiceRetrieves the notes of a document- Specified by:
- getNotesin interface- DocumentService
- Parameters:
- docId- identifier of the document
- fileVersion- file version specification
- types- optional filter for the note type
- Returns:
- the notes on the given version
- Throws:
- ServerException- an error happened in the server application
 
- 
saveNotespublic void saveNotes(long docId, String fileVersion, List<GUIDocumentNote> notes, Collection<String> types) throws ServerException Description copied from interface:DocumentServiceSaves a set of notes- Specified by:
- saveNotesin interface- DocumentService
- Parameters:
- docId- identifier of the document
- fileVersion- optional file version all the notes are bound to
- notes- the notes to save
- types- optional filter for the note type
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteNotesDescription copied from interface:DocumentServiceDeletes a selection of document notes- Specified by:
- deleteNotesin interface- DocumentService
- Parameters:
- ids- identifiers of the notes
- Throws:
- ServerException- an error happened in the server application
 
- 
bulkUpdatepublic List<GUIDocument> bulkUpdate(List<Long> ids, GUIDocument vo, boolean ignoreEmptyFields) throws ServerException Description copied from interface:DocumentServiceApplies to a selection of documents all the given data- Specified by:
- bulkUpdatein interface- DocumentService
- Parameters:
- ids- identifiers of the documents to update
- vo- the value object to use as template
- ignoreEmptyFields- flag to skip fields empty in the- vo
- Returns:
- the updated documents
- Throws:
- ServerException- an error happened in the server application
 
- 
updateNotepublic void updateNote(long docId, long noteId, String fileVersion, String message) throws ServerException Description copied from interface:DocumentServiceUpdates a document note on the given document- Specified by:
- updateNotein interface- DocumentService
- Parameters:
- docId- identifier of the document
- noteId- identifier of the note
- fileVersion- file version to bind the note to
- message- text of the note
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteVersionsDescription copied from interface:DocumentServiceDeletes a selection of versions- Specified by:
- deleteVersionsin interface- DocumentService
- Parameters:
- ids- identifiers of the versions
- Returns:
- the document the deleted versions belongs to
- Throws:
- ServerException- an error happened in the server application
 
- 
createWithContentpublic GUIDocument createWithContent(GUIDocument vo, String content, boolean checkout) throws ServerException Description copied from interface:DocumentServiceCreates a new empty document- Specified by:
- createWithContentin interface- DocumentService
- Parameters:
- vo- the value object to use as template
- content- the text body of the new document
- checkout- if the new document must be checked out
- Returns:
- the created document
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteFromTrashDescription copied from interface:DocumentServiceDeletes a selection of documents from trash- Specified by:
- deleteFromTrashin interface- DocumentService
- Parameters:
- ids- identifiers of documents
- Throws:
- ServerException- an error happened in the server application
 
- 
emptyTrashDescription copied from interface:DocumentServiceClear the user's trash- Specified by:
- emptyTrashin interface- DocumentService
- Throws:
- ServerException- an error happened in the server application
 
- 
archiveDocumentsDescription copied from interface:DocumentServiceArchives a set of documents- Specified by:
- archiveDocumentsin interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- comment- the commit
- Throws:
- ServerException- an error happened in the server application
 
- 
archiveFolderDescription copied from interface:DocumentServiceArchives the documents in a folder- Specified by:
- archiveFolderin interface- DocumentService
- Parameters:
- folderId- identifier of the folder
- comment- a comment for the action
- Returns:
- number of records added to the archive
- Throws:
- ServerException- an error happened in the server application
 
- 
unarchiveDocumentsDescription copied from interface:DocumentServiceRestores a given set of archived documents- Specified by:
- unarchiveDocumentsin interface- DocumentService
- Parameters:
- docIds- identifiers of the documents
- Throws:
- ServerException- an error happened in the server application
 
- 
countDocumentsDescription copied from interface:DocumentServiceCounts the documents in a given status contained the specified folder's trees- Specified by:
- countDocumentsin interface- DocumentService
- Parameters:
- folderIds- identifiers of the folders
- status- a filter on the document's status
- Returns:
- the count
- Throws:
- ServerException- an error happened in the server application
 
- 
createDownloadTicketpublic List<String> createDownloadTicket(long docId, int type, String suffix, Integer expireHours, Date expireDate, Integer maxDownloads, Integer maxViews) throws ServerException Description copied from interface:DocumentServiceCreates a download ticket- Specified by:
- createDownloadTicketin interface- DocumentService
- Parameters:
- docId- identifier of the document
- type- the ticket type (0='download' 2='view')
- suffix- the suffix(null or 'pdf')
- expireHours- how many validity hours
- expireDate- the exact expiration date
- maxDownloads- maximum number of allowed downloads
- maxViews- maximum number of allowed views
- Returns:
- the generated ticket ID, a sample URL using the browser's URL, a sample URL using the server.url setting
- Throws:
- ServerException- an error happened in the server application
 
- 
setPasswordDescription copied from interface:DocumentServicePuts a password protection to the document- Specified by:
- setPasswordin interface- DocumentService
- Parameters:
- docId- the identifier of the document to protect
- password- the password to assign
- Throws:
- ServerException- an error happened in the server application
 
- 
unsetPasswordDescription copied from interface:DocumentServiceRemoves the password protection from the document- Specified by:
- unsetPasswordin interface- DocumentService
- Parameters:
- docId- the identifier of the document to unprotect
- currentPassword- the password to clear
- Throws:
- ServerException- an error happened in the server application
 
- 
unprotectDescription copied from interface:DocumentServiceChecks if the document can be accessed with the given password- Specified by:
- unprotectin interface- DocumentService
- Parameters:
- docId- the identifier of the document to unprotect
- password- the password to clear
- Returns:
- is the password is correct
- Throws:
- ServerException- an error happened in the server application
 
- 
getContentAsStringDescription copied from interface:DocumentServiceRetrieves the document's content as a string- Specified by:
- getContentAsStringin interface- DocumentService
- Parameters:
- docId- identifier of the document
- Returns:
- the document's extracted content
- Throws:
- ServerException- an error happened in the server application
 
- 
checkinContentDescription copied from interface:DocumentServiceChecks-in a new document's text content- Specified by:
- checkinContentin interface- DocumentService
- Parameters:
- docId- identifier of the document
- content- content of the file
- Returns:
- the document
- Throws:
- ServerException- an error happened in the server application
 
- 
replaceFileDescription copied from interface:DocumentServiceReplaces the file associated to a given version- Specified by:
- replaceFilein interface- DocumentService
- Parameters:
- docId- the identifier of the document
- fileVersion- the file version
- comment- the comment
- Throws:
- ServerException- an error happened in the server application
 
- 
createDocumentDescription copied from interface:DocumentServiceCreates a new document with the given text content- Specified by:
- createDocumentin interface- DocumentService
- Parameters:
- document- the document to create
- content- the contents
- Returns:
- the created document
- Throws:
- ServerException- an error happened in the server application
 
- 
getUserRatingDescription copied from interface:DocumentServiceRetrieves the vote of the current user on the specified document- Specified by:
- getUserRatingin interface- DocumentService
- Parameters:
- docId- the identifier of the document
- Returns:
- the rating
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteRatingDescription copied from interface:DocumentServiceDeletes a vote- Specified by:
- deleteRatingin interface- DocumentService
- Parameters:
- id- identifier of the rating to delete
- Returns:
- the result
- Throws:
- ServerException- an error happened in the server application
 
- 
convertDescription copied from interface:DocumentServiceConverts a document in a given format- Specified by:
- convertin interface- DocumentService
- Parameters:
- docId- identifier of the document to convert
- fileVersion- version of the file
- format- the format to convert to (e.g.: pdf, txt, ...
- Returns:
- the converted document
- Throws:
- ServerException- an error happened in the server application
 
- 
extractEmailDescription copied from interface:DocumentServiceExtracts the email representation from a .eml or .msg file- Specified by:
- extractEmailin interface- DocumentService
- Parameters:
- docId- the identifier of the mail document
- fileVersion- the File Version
- Returns:
- the email representation
- Throws:
- ServerException- an error happened in the server application
 
- 
saveEmailAttachmentpublic GUIDocument saveEmailAttachment(long docId, String fileVersion, String attachmentFileName) throws ServerException Description copied from interface:DocumentServiceExtracts an email attachment and saves it in the same folder of the document- Specified by:
- saveEmailAttachmentin interface- DocumentService
- Parameters:
- docId- the identifier of the mail document
- fileVersion- the File Version
- attachmentFileName- name of the attachment
- Returns:
- the just created document
- Throws:
- ServerException- an error happened in the server application
 
- 
replaceAliasDescription copied from interface:DocumentServiceReplaces an alias with a copy of the original file- Specified by:
- replaceAliasin interface- DocumentService
- Parameters:
- aliasId- ID of the alias to replace
- Returns:
- the just created document
- Throws:
- ServerException- an error happened in the server application
 
- 
deDuplicateDescription copied from interface:DocumentServiceConvert duplicates with aliases, just one of the documents is maintained- Specified by:
- deDuplicatein interface- DocumentService
- Parameters:
- folderId- optional ID of the folder to process
- retainNewest- true if the newest has to be retained, otherwise it will be the oldest.
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteTicket- Specified by:
- deleteTicketin interface- DocumentService
- Throws:
- ServerException
 
- 
enableTicket- Specified by:
- enableTicketin interface- DocumentService
- Throws:
- ServerException
 
- 
disableTicket- Specified by:
- disableTicketin interface- DocumentService
- Throws:
- ServerException
 
- 
enforceFilesIntoFolderStoreDescription copied from interface:DocumentServiceEnforces that all the files in the given tree are stored in the store configured in the owning folder. The process is asynchronous, at the end an internal message to the user will be sent to alert him about its end.- Specified by:
- enforceFilesIntoFolderStorein interface- DocumentService
- Parameters:
- folderId- identifier of the tree root
- Throws:
- ServerException- an error happened in the server application
 
- 
mergepublic GUIDocument merge(List<Long> docIds, long targetFolderId, String fileName) throws ServerException Description copied from interface:DocumentServiceMerges a set of documents into a single PDF- Specified by:
- mergein interface- DocumentService
- Parameters:
- docIds- identifiers of the documents to merge
- targetFolderId- identifier of the folder that will receive the merged PDF
- fileName- file name of the merged file
- Returns:
- the newly created merged document
- Throws:
- ServerException- an error happened in the server application
 
- 
updatePagesDescription copied from interface:DocumentServiceCounts the pages of a document and updates the DB.- Specified by:
- updatePagesin interface- DocumentService
- Parameters:
- docId- identifier of the document
- Returns:
- number of pages
- Throws:
- ServerException- an error happened in the server application
 
- 
renameDescription copied from interface:DocumentServiceRenames the given document- Specified by:
- renamein interface- DocumentService
- Parameters:
- documentId- identifier of the documents
- name- the new document's filename
- Returns:
- The updated document
- Throws:
- ServerException- an error happened in the server application
 
- 
saveACLDescription copied from interface:DocumentServiceApplies all security settings to document- Specified by:
- saveACLin interface- DocumentService
- Parameters:
- guiDocument- The document that will contain the new security settings
- Throws:
- ServerException- an error happened in the server application
 
- 
applyParentFolderSecurityDescription copied from interface:DocumentServiceApplies all security settings from the folder to the document- Specified by:
- applyParentFolderSecurityin interface- DocumentService
- Parameters:
- docId- The document that will contain the new security settings
- Throws:
- ServerException- an error happened in the server application
 
- 
getAllowedPermissionsDescription copied from interface:DocumentServiceGets the allowed permissions on a set of documents in regards of the current user- Specified by:
- getAllowedPermissionsin interface- DocumentService
- Parameters:
- docIds- collection of the documents
- Throws:
- ServerException
 
 
-