Package com.logicaldoc.web.service
Class FolderServiceImpl
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.FolderServiceImpl
- All Implemented Interfaces:
- com.google.gwt.user.client.rpc.RemoteService,- com.google.gwt.user.server.rpc.SerializationPolicyProvider,- FolderService,- jakarta.servlet.Servlet,- jakarta.servlet.ServletConfig,- Serializable
Implementation of the FolderService
- Since:
- 6.0
- Author:
- Matteo Caruso - LogicalDOC
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.logicaldoc.gui.frontend.client.services.FolderServiceFolderService.Instance
- 
Field SummaryFields inherited from class jakarta.servlet.http.HttpServletLEGACY_DO_HEAD
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidapplyGridLayout(long folderId) Replicates the folder's grid layout to all the subtreevoidapplyMetadata(long parentId) Applies all extended attributes to a sub-treevoidapplyOCR(long parentId) Applies all OCR settings to a sub-treevoidapplyStore(long parentId) Applies the store setting to a sub-treevoidapplyTags(long parentId) Applies all tags to a sub-treevoidapplyTemplate(long folderId, long templateId, boolean inheritSecurity) Applies a template to a foldercomputeStats(long folderId) Counts the docs and subfolders of a given parentvoidcopyFolders(List<Long> folderIds, long targetId, boolean foldersOnly, String securityOption, GUIFolder model) Copies a folder under a target folderCreates a new foldercreateAlias(long parentId, long foldRef) Creates a new folder aliasvoidDeletes the folders and the subtreesvoiddeleteFromTrash(List<Long> ids) Deletes a selection of folders from trashfromFolder(Folder folder, boolean computePath) getAllowedPermissions(List<Long> folderIds) Gets the allowed permissions on a set of folders in regards of the current usergetFolder(long folderId, boolean computePath, boolean computeDocs, boolean computeSubfolders) Gets the Folder initializing the permissions.inheritACL(long folderId, long rightsFolderId) Inherits the ACL of another folderLoads the folders templatesvoidMerges some folders to a target foldervoidMoves some folders under a target foldervoidpaste(List<Long> docIds, long folderId, String action, boolean links, boolean notes, boolean security) Pastes documents into the target foldervoidpasteAsAlias(List<Long> docIds, long folderId, String type) Read the uploaded image and converts it into Base64voidRenames the given foldervoidRestores a given folderSaves the folder in the DBvoidApplies all security settings to foldervoidsaveTemplates(List<GUIValue> templates) Saves the passed folder templatesvoidsetFolderPagination(long folderId, Integer startRecord, Integer pageSize) Sets the pagination informations for the visualization of the folders treeMethods 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- 
FolderServiceImplpublic FolderServiceImpl()
 
- 
- 
Method Details- 
inheritACLDescription copied from interface:FolderServiceInherits the ACL of another folder- Specified by:
- inheritACLin interface- FolderService
- Parameters:
- folderId- The folder that has to be updated
- rightsFolderId- the folder that defines the rights
- Returns:
- The updated Folder
- Throws:
- ServerException- an error happened in the server application
 
- 
saveACLDescription copied from interface:FolderServiceApplies all security settings to folder- Specified by:
- saveACLin interface- FolderService
- Parameters:
- guiFolder- The folder that contains the new security settings
- subtree- If true, the current security settings will be applied to the sub-folders
- Throws:
- ServerException- an error happened in the server application
 
- 
applyMetadataDescription copied from interface:FolderServiceApplies all extended attributes to a sub-tree- Specified by:
- applyMetadatain interface- FolderService
- Parameters:
- parentId- The parent folder containing the metadata
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteDescription copied from interface:FolderServiceDeletes the folders and the subtrees- Specified by:
- deletein interface- FolderService
- Parameters:
- folderIds- identifiers of the folders
- Throws:
- ServerException- an error happened in the server application
 
- 
fromFolder- Throws:
- PersistenceException
 
- 
computeStatsDescription copied from interface:FolderServiceCounts the docs and subfolders of a given parent- Specified by:
- computeStatsin interface- FolderService
- Parameters:
- folderId- identifier of the folder
- Returns:
- the statistics (total number of documents, total number of subfolders, total size
- Throws:
- ServerException- an error happened in the server application
 
- 
getFolder- Throws:
- ServerException
 
- 
getFolderpublic GUIFolder getFolder(Session session, long folderId, boolean computePath) throws ServerException - Throws:
- ServerException
 
- 
getFolderpublic GUIFolder getFolder(long folderId, boolean computePath, boolean computeDocs, boolean computeSubfolders) throws ServerException Description copied from interface:FolderServiceGets the Folder initializing the permissions.- Specified by:
- getFolderin interface- FolderService
- Parameters:
- folderId- The folder identifier
- computePath- True if the complete path must be retrieved
- computeDocs- True if the number of contained documents must be computed
- computeSubfolders- True if the number of contained subfolders must be computed
- Returns:
- The Folder bean
- Throws:
- ServerException- an error happened in the server application
 
- 
copyFolderspublic void copyFolders(List<Long> folderIds, long targetId, boolean foldersOnly, String securityOption, GUIFolder model) throws ServerException Description copied from interface:FolderServiceCopies a folder under a target folder- Specified by:
- copyFoldersin interface- FolderService
- Parameters:
- folderIds- identifiers of the folders
- targetId- identifier of the folder that will receive the copy
- foldersOnly- flag to copy just the folders and not the documents
- securityOption- how to setup the security for the new folder'none', 'inherit' or 'replicate'
- model- a model to use for creating the new folder
- Throws:
- ServerException- an error happened in the server application
 
- 
moveDescription copied from interface:FolderServiceMoves some folders under a target folder- Specified by:
- movein interface- FolderService
- Parameters:
- folderIds- identifiers of the folders
- targetId- identifier of the folder that will receive the move
- Throws:
- ServerException- an error happened in the server application
 
- 
renameDescription copied from interface:FolderServiceRenames the given folder- Specified by:
- renamein interface- FolderService
- Parameters:
- folderId- identifier of the folder
- name- the new folder's name
- Throws:
- ServerException- an error happened in the server application
 
- 
saveDescription copied from interface:FolderServiceSaves the folder in the DB- Specified by:
- savein interface- FolderService
- Parameters:
- guiFolder- The folder to save
- Returns:
- The saved folder
- Throws:
- ServerException- an error happened in the server application
 
- 
createDescription copied from interface:FolderServiceCreates a new folder- Specified by:
- createin interface- FolderService
- Parameters:
- newFolder- The folder to be created
- inheritSecurity- True if the new folder has to inherit the security policies from the parent
- Returns:
- The saved folder
- Throws:
- ServerException- an error happened in the server application
 
- 
createAliasDescription copied from interface:FolderServiceCreates a new folder alias- Specified by:
- createAliasin interface- FolderService
- Parameters:
- parentId- The folder in which the alias must be created
- foldRef- The original folder
- Returns:
- The created alias
- Throws:
- ServerException- an error happened in the server application
 
- 
pastepublic void paste(List<Long> docIds, long folderId, String action, boolean links, boolean notes, boolean security) throws ServerException Description copied from interface:FolderServicePastes documents into the target folder- Specified by:
- pastein interface- FolderService
- Parameters:
- docIds- the documents identifiers
- folderId- the target folder identifier
- action- the selected action(- Clipboard.COPYor- Clipboard.COPY)
- links- if the links must be copied too
- notes- if the notes and annotations must be copied too
- security- if the security settings must be copied too
- Throws:
- ServerException- an error happened in the server application
 
- 
pasteAsAlias- Specified by:
- pasteAsAliasin interface- FolderService
- Throws:
- ServerException
 
- 
loadTemplatesDescription copied from interface:FolderServiceLoads the folders templates- Specified by:
- loadTemplatesin interface- FolderService
- Returns:
- the folder templates
- Throws:
- ServerException- an error happened in the server application
 
- 
saveTemplatesDescription copied from interface:FolderServiceSaves the passed folder templates- Specified by:
- saveTemplatesin interface- FolderService
- Parameters:
- templates- the folder templates
- Throws:
- ServerException- an error happened in the server application
 
- 
applyTemplatepublic void applyTemplate(long folderId, long templateId, boolean inheritSecurity) throws ServerException Description copied from interface:FolderServiceApplies a template to a folder- Specified by:
- applyTemplatein interface- FolderService
- Parameters:
- folderId- identifier of the folder to use as root
- templateId- identifier of the template to use
- inheritSecurity- if the new folders mus inherit the security from- folderId
- Throws:
- ServerException- an error happened in the server application
 
- 
restoreDescription copied from interface:FolderServiceRestores a given folder- Specified by:
- restorein interface- FolderService
- Parameters:
- folderIds- identifiers of the folders
- parentId- identifier of the folder that will receive the restore
- Throws:
- ServerException- an error happened in the server application
 
- 
deleteFromTrashDescription copied from interface:FolderServiceDeletes a selection of folders from trash- Specified by:
- deleteFromTrashin interface- FolderService
- Parameters:
- ids- identifiers of the folders
- Throws:
- ServerException- an error happened in the server application
 
- 
applyTagsDescription copied from interface:FolderServiceApplies all tags to a sub-tree- Specified by:
- applyTagsin interface- FolderService
- Parameters:
- parentId- The parent folder containing the tags
- Throws:
- ServerException- an error happened in the server application
 
- 
setFolderPaginationpublic void setFolderPagination(long folderId, Integer startRecord, Integer pageSize) throws ServerException Description copied from interface:FolderServiceSets the pagination informations for the visualization of the folders tree- Specified by:
- setFolderPaginationin interface- FolderService
- Parameters:
- folderId- ID of the folder
- startRecord- Start rec index
- pageSize- Current page size
- Throws:
- ServerException- an error happened in the server application
 
- 
applyGridLayoutDescription copied from interface:FolderServiceReplicates the folder's grid layout to all the subtree- Specified by:
- applyGridLayoutin interface- FolderService
- Parameters:
- folderId- identifier of the root folder whose setting will be replicated
- Throws:
- ServerException- error generated in the server application
 
- 
applyOCRDescription copied from interface:FolderServiceApplies all OCR settings to a sub-tree- Specified by:
- applyOCRin interface- FolderService
- Parameters:
- parentId- The parent folder containing the settings
- Throws:
- ServerException- an error happened in the server application
 
- 
applyStoreDescription copied from interface:FolderServiceApplies the store setting to a sub-tree- Specified by:
- applyStorein interface- FolderService
- Parameters:
- parentId- The parent folder containing the tags
- Throws:
- ServerException- an error happened in the server application
 
- 
mergeDescription copied from interface:FolderServiceMerges some folders to a target folder- Specified by:
- mergein interface- FolderService
- Parameters:
- folderIds- identifiers of the folders
- targetId- identifier of the folder that will receive the merge
- Throws:
- ServerException- an error happened in the server application
 
- 
readImageDescription copied from interface:FolderServiceRead the uploaded image and converts it into Base64- Specified by:
- readImagein interface- FolderService
- Returns:
- the string conversion of the uploaded image
- Throws:
- ServerException- an error happened in the server application
 
- 
getAllowedPermissionsDescription copied from interface:FolderServiceGets the allowed permissions on a set of folders in regards of the current user- Specified by:
- getAllowedPermissionsin interface- FolderService
- Parameters:
- folderIds- collection of the folders
- Throws:
- ServerException
 
 
-