Package com.logicaldoc.web.service
Class DocumentServiceImpl
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
com.google.gwt.user.server.rpc.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
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
The document service for the operations on the documents done through the
GUI.
- Since:
- 6.0
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.logicaldoc.gui.frontend.client.services.DocumentService
DocumentService.Instance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBookmarks
(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 uploadedlong
Adds a new document note on the given documentvoid
archiveDocuments
(Long[] docIds, String comment) Archives a set of documentslong
archiveFolder
(long folderId, String comment) Archives the documents in a folderbulkUpdate
(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 contentvoid
Checks out the documentvoid
Cleans the uploaded files folderConverts a document in a given formatlong
countDocuments
(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 contentString[]
createDownloadTicket
(long docId, String suffix, Integer expireHours, Date expireDate, Integer maxDownloads) Creates a download ticketcreateWithContent
(GUIDocument vo, String content, boolean checkout) Creates a new empty documentvoid
deDuplicate
(Long folderId, boolean retainNewest) Convert duplicates with aliases, just one of the documents is maintainedvoid
Deletes a selection of documentsvoid
deleteBookmarks
(long[] bookmarkIds) Deletes a set of bookmarksvoid
deleteFromTrash
(Long[] ids) Deletes a selection of documents from trashvoid
deleteLinks
(long[] ids) Deletes a selection of linksvoid
deleteNotes
(long[] ids) Deletes a selection of document notesdeleteRating
(long id) Deletes a votevoid
deleteTicket
(long ticketId) deleteVersions
(long[] ids) Deletes a selection of versionsvoid
disableTicket
(long ticketId) void
Clear the user's trashvoid
enableTicket
(long ticketId) void
enforceFilesIntoFolderStorage
(long folderId) Enforces that all the files in the given tree are stored in the storage configured in the owning folder.extractEmail
(long docId, String fileVersion) Extracts the email representation from a .eml or .msg filestatic GUIDocument
fromDocument
(Document doc, GUIFolder folder, User sessionUser) getById
(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 IDvoid
indexDocuments
(Long[] docIds) Indexes the given set of documentsvoid
linkDocuments
(Long[] inDocIds, Long[] outDocIds) Links a set of documentsvoid
Locks a set of documentsvoid
makeImmutable
(Long[] docIds, String comment) Makes immutable a set of documentsvoid
markHistoryAsRead
(String event) Marks as read the histories related to the current user and the given event.void
markIndexable
(Long[] docIds, int policy) Marks a set of documents as indexablevoid
markUnindexable
(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 filevoid
replaceFile
(long docId, String fileVersion, String comment) Replaces the file associated to a given versionvoid
Restores a given documentsave
(GUIDocument guiDocument) Saves the document in the DBsaveEmailAttachment
(long docId, String fileVersion, String attachmentFileName) Extracts an email attachment and saves it in the same folder of the documentvoid
saveNotes
(long docId, GUIDocumentNote[] notes, Collection<String> types) Saves a set of notesint
saveRating
(GUIRating rating) Save a rating vote on a documentsendAsEmail
(GUIEmail guiMail, String locale) Sends a document as email(attachment or download ticket)void
setPassword
(long docId, String password) Puts a password protection to the documentstatic Document
toDocument
(GUIDocument guiDocument) Produces a plain new Document from a GUIDocumentvoid
unarchiveDocuments
(long[] docIds) Restores a given set of archived documentsvoid
Unlocks a set of documentsboolean
Checks if the document can be accessed with the given passwordvoid
unsetPassword
(long docId, String currentPassword) Removes the password protection from the documentvoid
updateBookmark
(GUIBookmark bookmark) Updates a single bookmark's datavoid
updateLink
(long id, String type) Updates the links typevoid
updateNote
(long docId, long noteId, String message) Updates a document note on the given documentint
updatePages
(long docId) Counts the pages of a document and updates the DB.void
validate
(GUIDocument document) Validates the metadataMethods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, init, processCall, processCall, processPost
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost
Methods inherited from class javax.servlet.http.HttpServlet
service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
DocumentServiceImpl
public DocumentServiceImpl()
-
-
Method Details
-
addBookmarks
Description copied from interface:DocumentService
Adds new bookmarks- Specified by:
addBookmarks
in interfaceDocumentService
- Parameters:
ids
- identfiers of the documents or folders to bookmarktype
- the type of bookmark (0 = document, 1 = folder)- Throws:
ServerException
- an error happened in the server application
-
indexDocuments
Description copied from interface:DocumentService
Indexes the given set of documents- Specified by:
indexDocuments
in interfaceDocumentService
- Parameters:
docIds
- The set of documents to index- Throws:
ServerException
- an error happened in the server application
-
addDocuments
public GUIDocument[] addDocuments(boolean importZip, String charset, boolean immediateIndexing, GUIDocument metadata) throws ServerException - Specified by:
addDocuments
in interfaceDocumentService
- Throws:
ServerException
-
checkin
Description copied from interface:DocumentService
Checks-in a new document version- Specified by:
checkin
in interfaceDocumentService
- Parameters:
document
- The document to updatemajor
- True if this is a major version- Returns:
- The updated document
- Throws:
ServerException
- an error happened in the server application
-
addDocuments
public GUIDocument[] addDocuments(String language, long folderId, boolean importZip, String charset, boolean immediateIndexing, Long templateId) throws ServerException Description copied from interface:DocumentService
Adds new documents previously uploaded- Specified by:
addDocuments
in interfaceDocumentService
- Parameters:
language
- The language applied to all documentsfolderId
- The destination folder identifierimportZip
- If .zip files have to be unpacked and the contained documents importedcharset
- Charset to use to process the .zip filesimmediateIndexing
- If the documents must be immediately indexedtemplateId
- The documents template- Returns:
- The list of created documents
- Throws:
ServerException
- an error happened in the server application
-
promoteVersion
Description copied from interface:DocumentService
If you promote a prior version, what it does is make it the default version again. (regardless of there being many versions)- Specified by:
promoteVersion
in interfaceDocumentService
- Parameters:
docId
- the identifier of the documentversion
- version specification- Returns:
- the document
- Throws:
ServerException
- an error happened in the server application
-
checkout
Description copied from interface:DocumentService
Checks out the document- Specified by:
checkout
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documents- Throws:
ServerException
- an error happened in the server application
-
lock
Description copied from interface:DocumentService
Locks a set of documents- Specified by:
lock
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documentscomment
- the comment to the lock- Throws:
ServerException
- an error happened in the server application
-
delete
Description copied from interface:DocumentService
Deletes a selection of documents- Specified by:
delete
in interfaceDocumentService
- Parameters:
ids
- identifiers of the documents- Throws:
ServerException
- an error happened in the server application
-
deleteBookmarks
Description copied from interface:DocumentService
Deletes a set of bookmarks- Specified by:
deleteBookmarks
in interfaceDocumentService
- Parameters:
bookmarkIds
- identifiers of the bookmarks to delete- Throws:
ServerException
- an error happened in the server application
-
deleteLinks
Description copied from interface:DocumentService
Deletes a selection of links- Specified by:
deleteLinks
in interfaceDocumentService
- Parameters:
ids
- identifiers of the links- Throws:
ServerException
- an error happened in the server application
-
getById
Description copied from interface:DocumentService
Retrieves a specific document by its ID- Specified by:
getById
in interfaceDocumentService
- Parameters:
docId
- identifier of the document- Returns:
- the document retrieved by the server application
- Throws:
ServerException
- an error happened in the server application
-
getDocument
public GUIDocument getDocument(Session session, long docId) throws InvalidSessionServerException, PersistenceException, PermissionException -
fromDocument
public static GUIDocument fromDocument(Document doc, GUIFolder folder, User sessionUser) throws PersistenceException - Throws:
PersistenceException
-
getVersionsById
Description copied from interface:DocumentService
Retrieves two specific versions by its ID- Specified by:
getVersionsById
in interfaceDocumentService
- Parameters:
id1
- identifier of the first versionid2
- identifier of the second version- Returns:
- the two versions
- Throws:
ServerException
- an error happened in the server application
-
linkDocuments
Description copied from interface:DocumentService
Links a set of documents- Specified by:
linkDocuments
in interfaceDocumentService
- Parameters:
inDocIds
- identifiers of the documents for the IN directionoutDocIds
- identifiers of the documents for the OUT direction- Throws:
ServerException
- an error happened in the server application
-
makeImmutable
Description copied from interface:DocumentService
Makes immutable a set of documents- Specified by:
makeImmutable
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documentscomment
- the commit- Throws:
ServerException
- an error happened in the server application
-
markHistoryAsRead
Description copied from interface:DocumentService
Marks as read the histories related to the current user and the given event.- Specified by:
markHistoryAsRead
in interfaceDocumentService
- Parameters:
event
- The history event to mark as read- Throws:
ServerException
- an error happened in the server application
-
markIndexable
Description copied from interface:DocumentService
Marks a set of documents as indexable- Specified by:
markIndexable
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documentspolicy
- indexing policy:Constants.INDEX_TO_INDEX
orConstants.INDEX_TO_INDEX_METADATA
- Throws:
ServerException
- an error happened in the server application
-
markUnindexable
Description copied from interface:DocumentService
Marks a set of documents as unindexable- Specified by:
markUnindexable
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documents- Throws:
ServerException
- an error happened in the server application
-
restore
Description copied from interface:DocumentService
Restores a given document- Specified by:
restore
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documentsfolderId
- identifier of the folder in which to restore the documents- Throws:
ServerException
- an error happened in the server application
-
validate
Description copied from interface:DocumentService
Validates the metadata- Specified by:
validate
in interfaceDocumentService
- Parameters:
document
- The document to validate- Throws:
ServerException
- in case of invalid instance, this exception contains the errors
-
save
Description copied from interface:DocumentService
Saves the document in the DB- Specified by:
save
in interfaceDocumentService
- Parameters:
guiDocument
- The document to save- Returns:
- The saved document
- Throws:
ServerException
- an error happened in the server application
-
toDocument
Produces a plain new Document from a GUIDocument- Parameters:
guiDocument
- the GUI document- Returns:
- the core Document
- Throws:
PersistenceException
- error at data layer
-
sendAsEmail
Description copied from interface:DocumentService
Sends a document as email(attachment or download ticket)- Specified by:
sendAsEmail
in interfaceDocumentService
- Parameters:
guiMail
- the email to sendlocale
- the locale specification- Returns:
- "ok" otherwise an error code
- Throws:
ServerException
- an error happened in the server application
-
unlock
Description copied from interface:DocumentService
Unlocks a set of documents- Specified by:
unlock
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documents- Throws:
ServerException
- an error happened in the server application
-
updateBookmark
Description copied from interface:DocumentService
Updates a single bookmark's data- Specified by:
updateBookmark
in interfaceDocumentService
- Parameters:
bookmark
- the bookmark to update- Throws:
ServerException
- an error happened in the server application
-
updateLink
Description copied from interface:DocumentService
Updates the links type- Specified by:
updateLink
in interfaceDocumentService
- Parameters:
id
- The link identifiertype
- The new type to be set- Throws:
ServerException
- an error happened in the server application
-
cleanUploadedFileFolder
Description copied from interface:DocumentService
Cleans the uploaded files folder- Specified by:
cleanUploadedFileFolder
in interfaceDocumentService
- Throws:
ServerException
- an error happened in the server application
-
getRating
Description copied from interface:DocumentService
Retrieves the rating of the given document- Specified by:
getRating
in interfaceDocumentService
- Parameters:
docId
- identifier of the document- Returns:
- the rating retrieved by the server application
- Throws:
ServerException
- an error happened in the server application
-
saveRating
Description copied from interface:DocumentService
Save a rating vote on a document- Specified by:
saveRating
in interfaceDocumentService
- Parameters:
rating
- the document's rating- Returns:
- the new document rating value
- Throws:
ServerException
- an error happened in the server application
-
addNote
Description copied from interface:DocumentService
Adds a new document note on the given document- Specified by:
addNote
in interfaceDocumentService
- Parameters:
docId
- identifier of the documentmessage
- the note's text- Returns:
- identifier of the created note
- Throws:
ServerException
- an error happened in the server application
-
getNotes
public GUIDocumentNote[] getNotes(long docId, String fileVersion, Collection<String> types) throws ServerException Description copied from interface:DocumentService
Retrieves the notes of a document- Specified by:
getNotes
in interfaceDocumentService
- Parameters:
docId
- identifier of the documentfileVersion
- file version specificationtypes
- optional filter for the note type- Returns:
- the notes on the given version
- Throws:
ServerException
- an error happened in the server application
-
saveNotes
public void saveNotes(long docId, GUIDocumentNote[] notes, Collection<String> types) throws ServerException Description copied from interface:DocumentService
Saves a set of notes- Specified by:
saveNotes
in interfaceDocumentService
- Parameters:
docId
- identifier of the documentnotes
- the notes to savetypes
- optional filter for the note type- Throws:
ServerException
- an error happened in the server application
-
deleteNotes
Description copied from interface:DocumentService
Deletes a selection of document notes- Specified by:
deleteNotes
in interfaceDocumentService
- Parameters:
ids
- identifiers of the notes- Throws:
ServerException
- an error happened in the server application
-
bulkUpdate
public GUIDocument[] bulkUpdate(Long[] ids, GUIDocument vo, boolean ignoreEmptyFields) throws ServerException Description copied from interface:DocumentService
Applies to a selection of documents all the given data- Specified by:
bulkUpdate
in interfaceDocumentService
- Parameters:
ids
- identifiers of the documents to updatevo
- the value object to use as templateignoreEmptyFields
- flag to skip fields empty in thevo
- Returns:
- the updated documents
- Throws:
ServerException
- an error happened in the server application
-
updateNote
Description copied from interface:DocumentService
Updates a document note on the given document- Specified by:
updateNote
in interfaceDocumentService
- Parameters:
docId
- identifier of the documentnoteId
- identifier of the notemessage
- text of the note- Throws:
ServerException
- an error happened in the server application
-
deleteVersions
Description copied from interface:DocumentService
Deletes a selection of versions- Specified by:
deleteVersions
in interfaceDocumentService
- Parameters:
ids
- identifiers of the versions- Returns:
- the document the deleted versions belongs to
- Throws:
ServerException
- an error happened in the server application
-
createWithContent
public GUIDocument createWithContent(GUIDocument vo, String content, boolean checkout) throws ServerException Description copied from interface:DocumentService
Creates a new empty document- Specified by:
createWithContent
in interfaceDocumentService
- Parameters:
vo
- the value object to use as templatecontent
- the text body of the new documentcheckout
- if the new document must be checked out- Returns:
- the created document
- Throws:
ServerException
- an error happened in the server application
-
deleteFromTrash
Description copied from interface:DocumentService
Deletes a selection of documents from trash- Specified by:
deleteFromTrash
in interfaceDocumentService
- Parameters:
ids
- identifiers of documents- Throws:
ServerException
- an error happened in the server application
-
emptyTrash
Description copied from interface:DocumentService
Clear the user's trash- Specified by:
emptyTrash
in interfaceDocumentService
- Throws:
ServerException
- an error happened in the server application
-
archiveDocuments
Description copied from interface:DocumentService
Archives a set of documents- Specified by:
archiveDocuments
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documentscomment
- the commit- Throws:
ServerException
- an error happened in the server application
-
archiveFolder
Description copied from interface:DocumentService
Archives the documents in a folder- Specified by:
archiveFolder
in interfaceDocumentService
- Parameters:
folderId
- identifier of the foldercomment
- a comment for the action- Returns:
- number of records added to the archive
- Throws:
ServerException
- an error happened in the server application
-
unarchiveDocuments
Description copied from interface:DocumentService
Restores a given set of archived documents- Specified by:
unarchiveDocuments
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documents- Throws:
ServerException
- an error happened in the server application
-
countDocuments
Description copied from interface:DocumentService
Counts the documents in a given status contained the specified folder's trees- Specified by:
countDocuments
in interfaceDocumentService
- Parameters:
folderIds
- identifiers of the foldersstatus
- a filter on the document's status- Returns:
- the count
- Throws:
ServerException
- an error happened in the server application
-
createDownloadTicket
public String[] createDownloadTicket(long docId, String suffix, Integer expireHours, Date expireDate, Integer maxDownloads) throws ServerException Description copied from interface:DocumentService
Creates a download ticket- Specified by:
createDownloadTicket
in interfaceDocumentService
- Parameters:
docId
- identifier of the documentsuffix
- the suffix(null or 'pdf')expireHours
- how many validity hoursexpireDate
- the exact expiration datemaxDownloads
- maximum number of allowed downloads- 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
-
setPassword
Description copied from interface:DocumentService
Puts a password protection to the document- Specified by:
setPassword
in interfaceDocumentService
- Parameters:
docId
- the identifier of the document to protectpassword
- the password to assign- Throws:
ServerException
- an error happened in the server application
-
unsetPassword
Description copied from interface:DocumentService
Removes the password protection from the document- Specified by:
unsetPassword
in interfaceDocumentService
- Parameters:
docId
- the identifier of the document to unprotectcurrentPassword
- the password to clear- Throws:
ServerException
- an error happened in the server application
-
unprotect
Description copied from interface:DocumentService
Checks if the document can be accessed with the given password- Specified by:
unprotect
in interfaceDocumentService
- Parameters:
docId
- the identifier of the document to unprotectpassword
- the password to clear- Returns:
- is the password is correct
- Throws:
ServerException
- an error happened in the server application
-
getContentAsString
Description copied from interface:DocumentService
Retrieves the document's content as a string- Specified by:
getContentAsString
in interfaceDocumentService
- Parameters:
docId
- identifier of the document- Returns:
- the document's extracted content
- Throws:
ServerException
- an error happened in the server application
-
checkinContent
Description copied from interface:DocumentService
Checks-in a new document's text content- Specified by:
checkinContent
in interfaceDocumentService
- Parameters:
docId
- identifier of the documentcontent
- content of the file- Returns:
- the document
- Throws:
ServerException
- an error happened in the server application
-
replaceFile
Description copied from interface:DocumentService
Replaces the file associated to a given version- Specified by:
replaceFile
in interfaceDocumentService
- Parameters:
docId
- the identifier of the documentfileVersion
- the file versioncomment
- the comment- Throws:
ServerException
- an error happened in the server application
-
createDocument
Description copied from interface:DocumentService
Creates a new document with the given text content- Specified by:
createDocument
in interfaceDocumentService
- Parameters:
document
- the document to createcontent
- the contents- Returns:
- the created document
- Throws:
ServerException
- an error happened in the server application
-
getUserRating
Description copied from interface:DocumentService
Retrieves the vote of the current user on the specified document- Specified by:
getUserRating
in interfaceDocumentService
- Parameters:
docId
- the identifier of the document- Returns:
- the rating
- Throws:
ServerException
- an error happened in the server application
-
deleteRating
Description copied from interface:DocumentService
Deletes a vote- Specified by:
deleteRating
in interfaceDocumentService
- Parameters:
id
- identifier of the rating to delete- Returns:
- the result
- Throws:
ServerException
- an error happened in the server application
-
convert
Description copied from interface:DocumentService
Converts a document in a given format- Specified by:
convert
in interfaceDocumentService
- Parameters:
docId
- identifier of the document to convertfileVersion
- version of the fileformat
- the format to convert to (e.g.: pdf, txt, ...- Returns:
- the converted document
- Throws:
ServerException
- an error happened in the server application
-
extractEmail
Description copied from interface:DocumentService
Extracts the email representation from a .eml or .msg file- Specified by:
extractEmail
in interfaceDocumentService
- Parameters:
docId
- the identifier of the mail documentfileVersion
- the File Version- Returns:
- the email representation
- Throws:
ServerException
- an error happened in the server application
-
saveEmailAttachment
public GUIDocument saveEmailAttachment(long docId, String fileVersion, String attachmentFileName) throws ServerException Description copied from interface:DocumentService
Extracts an email attachment and saves it in the same folder of the document- Specified by:
saveEmailAttachment
in interfaceDocumentService
- Parameters:
docId
- the identifier of the mail documentfileVersion
- the File VersionattachmentFileName
- name of the attachment- Returns:
- the just created document
- Throws:
ServerException
- an error happened in the server application
-
replaceAlias
Description copied from interface:DocumentService
Replaces an alias with a copy of the original file- Specified by:
replaceAlias
in interfaceDocumentService
- Parameters:
aliasId
- ID of the alias to replace- Returns:
- the just created document
- Throws:
ServerException
- an error happened in the server application
-
deDuplicate
Description copied from interface:DocumentService
Convert duplicates with aliases, just one of the documents is maintained- Specified by:
deDuplicate
in interfaceDocumentService
- Parameters:
folderId
- optional ID of the folder to processretainNewest
- 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:
deleteTicket
in interfaceDocumentService
- Throws:
ServerException
-
enableTicket
- Specified by:
enableTicket
in interfaceDocumentService
- Throws:
ServerException
-
disableTicket
- Specified by:
disableTicket
in interfaceDocumentService
- Throws:
ServerException
-
enforceFilesIntoFolderStorage
Description copied from interface:DocumentService
Enforces that all the files in the given tree are stored in the storage 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:
enforceFilesIntoFolderStorage
in interfaceDocumentService
- Parameters:
folderId
- identifier of the tree root- Throws:
ServerException
- an error happened in the server application
-
merge
public GUIDocument merge(Long[] docIds, long targetFolderId, String fileName) throws ServerException Description copied from interface:DocumentService
Merges a set of documents into a single PDF- Specified by:
merge
in interfaceDocumentService
- Parameters:
docIds
- identifiers of the documents to mergetargetFolderId
- identifier of the folder that will receive the merged PDFfileName
- file name of the merged file- Returns:
- the newly created merged document
- Throws:
ServerException
- an error happened in the server application
-
updatePages
Description copied from interface:DocumentService
Counts the pages of a document and updates the DB.- Specified by:
updatePages
in interfaceDocumentService
- Parameters:
docId
- identifier of the document- Returns:
- number of pages
- Throws:
ServerException
- an error happened in the server application
-
rename
Description copied from interface:DocumentService
Renames the given document- Specified by:
rename
in interfaceDocumentService
- Parameters:
documentId
- identifier of the documentsname
- the new document's filename- Returns:
- The updated document
- Throws:
ServerException
- an error happened in the server application
-