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.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
public class DocumentServiceImpl extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements DocumentService
The document service for the operations on the documents done through the GUI.- Since:
- 6.0
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.logicaldoc.gui.frontend.client.services.DocumentService
DocumentService.Instance
-
-
Constructor Summary
Constructors Constructor Description DocumentServiceImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBookmarks(long[] ids, int type)Adds new bookmarksGUIDocument[]addDocuments(boolean importZip, String charset, boolean immediateIndexing, GUIDocument metadata)GUIDocument[]addDocuments(String language, long folderId, boolean importZip, String charset, boolean immediateIndexing, Long templateId)Adds new documents previously uploadedlongaddNote(long docId, String message)Adds a new document note on the given documentvoidarchiveDocuments(long[] docIds, String comment)Archives a set of documentslongarchiveFolder(long folderId, String comment)Archives the documents in a foldervoidbulkUpdate(long[] ids, GUIDocument vo, boolean ignoreEmptyFields)Applies to a selection of documents all the given dataGUIDocumentcheckin(GUIDocument document, boolean major)Checks-in a new document versionGUIDocumentcheckinContent(long docId, String content)Checks-in a new document's text contentvoidcheckout(long docId)Checks out the documentvoidcleanUploadedFileFolder()Cleans the uploaded files folderGUIDocumentconvert(long docId, String fileVersion, String format)Converts a document in a given formatlongcountDocuments(long[] folderIds, int status)Counts the documents in a given status contained the specified folder's treesGUIDocumentcreateDocument(GUIDocument document, String content)Creates a new document with the given text contentStringcreateDownloadTicket(long docId, String suffix, Integer expireHours, Date expireDate, Integer maxDownloads)GUIDocumentcreateWithContent(GUIDocument vo, String content)Creates a new empty documentvoiddeDuplicate(Long folderId, boolean retainNewest)Convert duplicates with aliases, just one of the documents is maintainedvoiddelete(long[] ids)Deletes a selection of documentsvoiddeleteBookmarks(long[] bookmarkIds)Deletes a set of bookmarksvoiddeleteFromTrash(Long[] ids)Deletes a selection of documents from trashvoiddeleteLinks(long[] ids)Deletes a selection of linksvoiddeleteNotes(long[] ids)Deletes a selection of document notesIntegerdeleteRating(long id)Deletes a votevoiddeleteTicket(long ticketId)GUIDocumentdeleteVersions(long[] ids)Deletes a selection of versionsvoiddisableTicket(long ticketId)voidemptyTrash()Clear the user's trashvoidenableTicket(long ticketId)GUIEmailextractEmail(long docId, String fileVersion)Extracts the email representation from a .eml or .msg filestatic GUIDocumentfromDocument(Document doc, GUIFolder folder, User sessionUser)GUIAttribute[]getAttributes(long templateId)Retrieves all attributes of the specified templateGUIDocumentgetById(long docId)Retrieves a specific document by its IDStringgetContentAsString(long docId)Retrieves the document's content as a stringstatic GUIDocumentgetDocument(Session session, long docId)GUIDocumentNote[]getNotes(long docId, String fileVersion)Retrieves the notes of a documentGUIRatinggetRating(long docId)Retrieves the rating of the given documentGUIRatinggetUserRating(long docId)Retrieves the vote of the current user on the specified documentGUIVersion[]getVersionsById(long id1, long id2)Retrieves two specific versions by its IDvoidindexDocuments(Long[] docIds)Indexes the given set of documentsvoidlinkDocuments(long[] inDocIds, long[] outDocIds)Links a set of documentsvoidlock(long[] docIds, String comment)Locks a set of documentsvoidmakeImmutable(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(long[] docIds, int policy)Marks a set of documents as indexablevoidmarkUnindexable(long[] docIds)Marks a set of documents as unindexableGUIDocumentpromoteVersion(long docId, String version)If you promote a prior version, what it does is make it the default version again.GUIDocumentreplaceAlias(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 versionvoidrestore(Long[] docIds, long folderId)Restores a given documentGUIDocumentsave(GUIDocument document)Saves the document in the DBGUIDocumentsaveEmailAttachment(long docId, String fileVersion, String attachmentFileName)Extracts an email attachment and saves it in the same folder of the documentvoidsaveNotes(long docId, GUIDocumentNote[] notes)Saves a set of notesintsaveRating(GUIRating rating)Save a rating vote on a documentStringsendAsEmail(GUIEmail email, String locale)Sends a document as email(attachment or download ticket)voidsetPassword(long docId, String password)Puts a password protection to the documentvoidunarchiveDocuments(long[] docIds)Restores a given set of archived documentsvoidunlock(long[] docIds)Unlocks a set of documentsbooleanunprotect(long docId, String password)Checks 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 message)Updates a document note on the given document-
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, init, processCall, processCall, processPost
-
-
-
-
Method Detail
-
addBookmarks
public void addBookmarks(long[] ids, int type) throws ServerExceptionDescription copied from interface:DocumentServiceAdds new bookmarks- Specified by:
addBookmarksin 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
public void indexDocuments(Long[] docIds) throws ServerException
Description copied from interface:DocumentServiceIndexes the given set of documents- Specified by:
indexDocumentsin 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:
addDocumentsin interfaceDocumentService- Throws:
ServerException
-
addDocuments
public 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 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
public GUIDocument promoteVersion(long docId, String version) throws ServerException
Description 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 interfaceDocumentService- Parameters:
docId- the identifier of the documentversion- version specification- Returns:
- the document
- Throws:
ServerException- an error happened in the server application
-
checkin
public GUIDocument checkin(GUIDocument document, boolean major) throws ServerException
Description copied from interface:DocumentServiceChecks-in a new document version- Specified by:
checkinin 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
-
checkout
public void checkout(long docId) throws ServerExceptionDescription copied from interface:DocumentServiceChecks out the document- Specified by:
checkoutin interfaceDocumentService- Parameters:
docId- identifier of the document- Throws:
ServerException- an error happened in the server application
-
delete
public void delete(long[] ids) throws ServerExceptionDescription copied from interface:DocumentServiceDeletes a selection of documents- Specified by:
deletein interfaceDocumentService- Parameters:
ids- identifiers of the documents- Throws:
ServerException- an error happened in the server application
-
deleteBookmarks
public void deleteBookmarks(long[] bookmarkIds) throws ServerExceptionDescription copied from interface:DocumentServiceDeletes a set of bookmarks- Specified by:
deleteBookmarksin interfaceDocumentService- Parameters:
bookmarkIds- identifiers of the bookmarks to delete- Throws:
ServerException- an error happened in the server application
-
deleteLinks
public void deleteLinks(long[] ids) throws ServerExceptionDescription copied from interface:DocumentServiceDeletes a selection of links- Specified by:
deleteLinksin interfaceDocumentService- Parameters:
ids- identifiers of the links- Throws:
ServerException- an error happened in the server application
-
getAttributes
public GUIAttribute[] getAttributes(long templateId) throws ServerException
Description copied from interface:DocumentServiceRetrieves all attributes of the specified template- Specified by:
getAttributesin interfaceDocumentService- Parameters:
templateId- identifier of the template- Returns:
- the attributes
- Throws:
ServerException- an error happened in the server application
-
getById
public GUIDocument getById(long docId) throws ServerException
Description copied from interface:DocumentServiceRetrieves a specific document by its ID- Specified by:
getByIdin 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 static GUIDocument getDocument(Session session, long docId) throws Exception
- Throws:
Exception
-
fromDocument
public static GUIDocument fromDocument(Document doc, GUIFolder folder, User sessionUser)
-
getVersionsById
public GUIVersion[] getVersionsById(long id1, long id2) throws ServerException
Description copied from interface:DocumentServiceRetrieves two specific versions by its ID- Specified by:
getVersionsByIdin 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
public void linkDocuments(long[] inDocIds, long[] outDocIds) throws ServerExceptionDescription copied from interface:DocumentServiceLinks a set of documents- Specified by:
linkDocumentsin 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
-
lock
public void lock(long[] docIds, String comment) throws ServerExceptionDescription copied from interface:DocumentServiceLocks a set of documents- Specified by:
lockin interfaceDocumentService- Parameters:
docIds- identifiers of the documentscomment- the comment to the lock- Throws:
ServerException- an error happened in the server application
-
makeImmutable
public void makeImmutable(long[] docIds, String comment) throws ServerExceptionDescription copied from interface:DocumentServiceMakes immutable a set of documents- Specified by:
makeImmutablein interfaceDocumentService- Parameters:
docIds- identifiers of the documentscomment- the commit- Throws:
ServerException- an error happened in the server application
-
markHistoryAsRead
public void markHistoryAsRead(String event) throws ServerException
Description copied from interface:DocumentServiceMarks as read the histories related to the current user and the given event.- Specified by:
markHistoryAsReadin interfaceDocumentService- Parameters:
event- The history event to mark as read- Throws:
ServerException- an error happened in the server application
-
markIndexable
public void markIndexable(long[] docIds, int policy) throws ServerExceptionDescription copied from interface:DocumentServiceMarks a set of documents as indexable- Specified by:
markIndexablein interfaceDocumentService- Parameters:
docIds- identifiers of the documentspolicy- indexing policy:Constants.INDEX_TO_INDEXorConstants.INDEX_TO_INDEX_METADATA- Throws:
ServerException- an error happened in the server application
-
markUnindexable
public void markUnindexable(long[] docIds) throws ServerExceptionDescription copied from interface:DocumentServiceMarks a set of documents as unindexable- Specified by:
markUnindexablein interfaceDocumentService- Parameters:
docIds- identifiers of the documents- Throws:
ServerException- an error happened in the server application
-
restore
public void restore(Long[] docIds, long folderId) throws ServerException
Description copied from interface:DocumentServiceRestores a given document- Specified by:
restorein 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
-
save
public GUIDocument save(GUIDocument document) throws ServerException
Description copied from interface:DocumentServiceSaves the document in the DB- Specified by:
savein interfaceDocumentService- Parameters:
document- The document to save- Returns:
- The saved document
- Throws:
ServerException- an error happened in the server application
-
sendAsEmail
public String sendAsEmail(GUIEmail email, String locale) throws ServerException
Description copied from interface:DocumentServiceSends a document as email(attachment or download ticket)- Specified by:
sendAsEmailin interfaceDocumentService- Parameters:
email- the email to sendlocale- the locale specification- Returns:
- "ok" otherwise an error code
- Throws:
ServerException- an error happened in the server application
-
unlock
public void unlock(long[] docIds) throws ServerExceptionDescription copied from interface:DocumentServiceUnlocks a set of documents- Specified by:
unlockin interfaceDocumentService- Parameters:
docIds- identifiers of the documents- Throws:
ServerException- an error happened in the server application
-
updateBookmark
public void updateBookmark(GUIBookmark bookmark) throws ServerException
Description copied from interface:DocumentServiceUpdates a single bookmark's data- Specified by:
updateBookmarkin interfaceDocumentService- Parameters:
bookmark- the bookmark to update- Throws:
ServerException- an error happened in the server application
-
updateLink
public void updateLink(long id, String type) throws ServerExceptionDescription copied from interface:DocumentServiceUpdates the links type- Specified by:
updateLinkin interfaceDocumentService- Parameters:
id- The link identifiertype- The new type to be set- Throws:
ServerException- an error happened in the server application
-
cleanUploadedFileFolder
public void cleanUploadedFileFolder() throws ServerExceptionDescription copied from interface:DocumentServiceCleans the uploaded files folder- Specified by:
cleanUploadedFileFolderin interfaceDocumentService- Throws:
ServerException- an error happened in the server application
-
getRating
public GUIRating getRating(long docId) throws ServerException
Description copied from interface:DocumentServiceRetrieves the rating of the given document- Specified by:
getRatingin 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
public int saveRating(GUIRating rating) throws ServerException
Description copied from interface:DocumentServiceSave a rating vote on a document- Specified by:
saveRatingin interfaceDocumentService- Parameters:
rating- the document's rating- Returns:
- the new document rating value
- Throws:
ServerException- an error happened in the server application
-
addNote
public long addNote(long docId, String message) throws ServerExceptionDescription copied from interface:DocumentServiceAdds a new document note on the given document- Specified by:
addNotein 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) throws ServerException
Description copied from interface:DocumentServiceRetrieves the notes of a document- Specified by:
getNotesin interfaceDocumentService- Parameters:
docId- identifier of the documentfileVersion- file version specification- Returns:
- the notes on the given version
- Throws:
ServerException- an error happened in the server application
-
saveNotes
public void saveNotes(long docId, GUIDocumentNote[] notes) throws ServerExceptionDescription copied from interface:DocumentServiceSaves a set of notes- Specified by:
saveNotesin interfaceDocumentService- Parameters:
docId- identifier of the documentnotes- the notes to save- Throws:
ServerException- an error happened in the server application
-
deleteNotes
public void deleteNotes(long[] ids) throws ServerExceptionDescription copied from interface:DocumentServiceDeletes a selection of document notes- Specified by:
deleteNotesin interfaceDocumentService- Parameters:
ids- identifiers of the notes- Throws:
ServerException- an error happened in the server application
-
bulkUpdate
public void bulkUpdate(long[] ids, GUIDocument vo, boolean ignoreEmptyFields) throws ServerExceptionDescription copied from interface:DocumentServiceApplies to a selection of documents all the given data- Specified by:
bulkUpdatein interfaceDocumentService- Parameters:
ids- identifiers of the documents to updatevo- the value object to use as templateignoreEmptyFields- flag to skip fields empty in thevo- Throws:
ServerException- an error happened in the server application
-
updateNote
public void updateNote(long docId, long noteId, String message) throws ServerExceptionDescription copied from interface:DocumentServiceUpdates a document note on the given document- Specified by:
updateNotein 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
public GUIDocument deleteVersions(long[] ids) throws ServerException
Description copied from interface:DocumentServiceDeletes a selection of versions- Specified by:
deleteVersionsin 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) throws ServerException
Description copied from interface:DocumentServiceCreates a new empty document- Specified by:
createWithContentin interfaceDocumentService- Parameters:
vo- the value object to use as templatecontent- the text body of the new document- Returns:
- the created document
- Throws:
ServerException- an error happened in the server application
-
deleteFromTrash
public void deleteFromTrash(Long[] ids) throws ServerException
Description copied from interface:DocumentServiceDeletes a selection of documents from trash- Specified by:
deleteFromTrashin interfaceDocumentService- Parameters:
ids- identifiers of documents- Throws:
ServerException- an error happened in the server application
-
emptyTrash
public void emptyTrash() throws ServerExceptionDescription copied from interface:DocumentServiceClear the user's trash- Specified by:
emptyTrashin interfaceDocumentService- Throws:
ServerException- an error happened in the server application
-
archiveDocuments
public void archiveDocuments(long[] docIds, String comment) throws ServerExceptionDescription copied from interface:DocumentServiceArchives a set of documents- Specified by:
archiveDocumentsin interfaceDocumentService- Parameters:
docIds- identifiers of the documentscomment- the commit- Throws:
ServerException- an error happened in the server application
-
archiveFolder
public long archiveFolder(long folderId, String comment) throws ServerExceptionDescription copied from interface:DocumentServiceArchives the documents in a folder- Specified by:
archiveFolderin 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
public void unarchiveDocuments(long[] docIds) throws ServerExceptionDescription copied from interface:DocumentServiceRestores a given set of archived documents- Specified by:
unarchiveDocumentsin interfaceDocumentService- Parameters:
docIds- identifiers of the documents- Throws:
ServerException- an error happened in the server application
-
countDocuments
public long countDocuments(long[] folderIds, int status) throws ServerExceptionDescription copied from interface:DocumentServiceCounts the documents in a given status contained the specified folder's trees- Specified by:
countDocumentsin 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
- Specified by:
createDownloadTicketin interfaceDocumentService- Throws:
ServerException
-
setPassword
public void setPassword(long docId, String password) throws ServerExceptionDescription copied from interface:DocumentServicePuts a password protection to the document- Specified by:
setPasswordin interfaceDocumentService- Parameters:
docId- the identifier of the document to protectpassword- the password to assign- Throws:
ServerException- an error happened in the server application
-
unsetPassword
public void unsetPassword(long docId, String currentPassword) throws ServerExceptionDescription copied from interface:DocumentServiceRemoves the password protection from the document- Specified by:
unsetPasswordin interfaceDocumentService- Parameters:
docId- the identifier of the document to unprotectcurrentPassword- the password to clear- Throws:
ServerException- an error happened in the server application
-
unprotect
public boolean unprotect(long docId, String password) throws ServerExceptionDescription copied from interface:DocumentServiceChecks if the document can be accessed with the given password- Specified by:
unprotectin 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
public String getContentAsString(long docId) throws ServerException
Description copied from interface:DocumentServiceRetrieves the document's content as a string- Specified by:
getContentAsStringin interfaceDocumentService- Parameters:
docId- identifier of the document- Returns:
- the document's extracted content
- Throws:
ServerException- an error happened in the server application
-
checkinContent
public GUIDocument checkinContent(long docId, String content) throws ServerException
Description copied from interface:DocumentServiceChecks-in a new document's text content- Specified by:
checkinContentin interfaceDocumentService- Parameters:
docId- identifier of the documentcontent- content of the file- Returns:
- the document
- Throws:
ServerException- an error happened in the server application
-
replaceFile
public void replaceFile(long docId, String fileVersion, String comment) throws ServerExceptionDescription copied from interface:DocumentServiceReplaces the file associated to a given version- Specified by:
replaceFilein interfaceDocumentService- Parameters:
docId- the identifier of the documentfileVersion- the file versioncomment- the comment- Throws:
ServerException- an error happened in the server application
-
createDocument
public GUIDocument createDocument(GUIDocument document, String content) throws ServerException
Description copied from interface:DocumentServiceCreates a new document with the given text content- Specified by:
createDocumentin interfaceDocumentService- Parameters:
document- the document to createcontent- the contents- Returns:
- the created document
- Throws:
ServerException- an error happened in the server application
-
getUserRating
public GUIRating getUserRating(long docId) throws ServerException
Description copied from interface:DocumentServiceRetrieves the vote of the current user on the specified document- Specified by:
getUserRatingin interfaceDocumentService- Parameters:
docId- the identifier of the document- Returns:
- the rating
- Throws:
ServerException- an error happened in the server application
-
deleteRating
public Integer deleteRating(long id) throws ServerException
Description copied from interface:DocumentServiceDeletes a vote- Specified by:
deleteRatingin interfaceDocumentService- Parameters:
id- identifier of the rating to delete- Returns:
- the result
- Throws:
ServerException- an error happened in the server application
-
convert
public GUIDocument convert(long docId, String fileVersion, String format) throws ServerException
Description copied from interface:DocumentServiceConverts a document in a given format- Specified by:
convertin 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
public GUIEmail extractEmail(long docId, String fileVersion) throws ServerException
Description copied from interface:DocumentServiceExtracts the email representation from a .eml or .msg file- Specified by:
extractEmailin 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:DocumentServiceExtracts an email attachment and saves it in the same folder of the document- Specified by:
saveEmailAttachmentin 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
public GUIDocument replaceAlias(long aliasId) throws ServerException
Description copied from interface:DocumentServiceReplaces an alias with a copy of the original file- Specified by:
replaceAliasin interfaceDocumentService- Parameters:
aliasId- ID of the alias to replace- Returns:
- the just created document
- Throws:
ServerException- an error happened in the server application
-
deDuplicate
public void deDuplicate(Long folderId, boolean retainNewest) throws ServerException
Description copied from interface:DocumentServiceConvert duplicates with aliases, just one of the documents is maintained- Specified by:
deDuplicatein 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
public void deleteTicket(long ticketId) throws ServerException- Specified by:
deleteTicketin interfaceDocumentService- Throws:
ServerException
-
enableTicket
public void enableTicket(long ticketId) throws ServerException- Specified by:
enableTicketin interfaceDocumentService- Throws:
ServerException
-
disableTicket
public void disableTicket(long ticketId) throws ServerException- Specified by:
disableTicketin interfaceDocumentService- Throws:
ServerException
-
-