Interface FolderService
-
- All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
- All Known Implementing Classes:
FolderServiceImpl
@RemoteServiceRelativePath("folder") public interface FolderService extends com.google.gwt.user.client.rpc.RemoteServiceThe client side stub for the Folder Service. This service allows r/w operations on folders.- Since:
- 6.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classFolderService.Instance
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplyMetadata(long parentId)Applies all extended attributes to a sub-treevoidapplyRights(GUIFolder folder, boolean subfolders)Applies all security settings to foldervoidapplyTags(long parentId)Applies all tags to a sub-treevoidapplyTemplate(long folderId, long templateId, boolean inheritSecurity)Applies a template to a folderint[]computeStats(long folderId)Counts the docs and subfolders of a given parentvoidcopyFolders(long[] folderIds, long targetId, boolean foldersOnly, boolean inheritSecurity)Copies a folder under a target folderGUIFoldercreate(GUIFolder newFolder, boolean inheritSecurity)Creates a new folderGUIFoldercreateAlias(long parentId, long foldRef)Creates a new folder aliasvoiddelete(long[] folderIds)Deletes the folders and the subtreesvoiddeleteFromTrash(Long[] ids)Deletes a selection of folders from trashGUIFoldergetFolder(long folderId, boolean computePath, boolean computeDocs, boolean computeSubfolders)Gets the Folder initializing the permissions.GUIFolderinheritRights(long folderId, long rightsFolderId)Inherits the rights of another folderGUIValue[]loadTemplates()Loads the folders templatesvoidmove(long[] folderIds, long targetId)Moves some folders under a target foldervoidpaste(long[] docIds, long folderId, String action)Pastes documents into the target foldervoidpasteAsAlias(long[] docIds, long folderId, String type)voidrename(long folderId, String name)Renames the given foldervoidrestore(Long[] folderIds, long targetId)Restores a given folderGUIFoldersave(GUIFolder folder)Saves the folder in the DBvoidsaveTemplates(GUIValue[] templates)Saves the passed folder templatesvoidsetFolderPagination(long folderId, Integer startRecord, Integer pageSize)Sets the pagination informations for the visualization of the folders tree
-
-
-
Method Detail
-
save
GUIFolder save(GUIFolder folder) throws ServerException
Saves the folder in the DB- Parameters:
folder- The folder to save- Returns:
- The saved folder
- Throws:
ServerException- an error happened in the server application
-
create
GUIFolder create(GUIFolder newFolder, boolean inheritSecurity) throws ServerException
Creates a new folder- Parameters:
newFolder- The folder to be createdinheritSecurity- 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
-
createAlias
GUIFolder createAlias(long parentId, long foldRef) throws ServerException
Creates a new folder alias- Parameters:
parentId- The folder in which the alias must be createdfoldRef- The original folder- Returns:
- The created alias
- Throws:
ServerException- an error happened in the server application
-
rename
void rename(long folderId, String name) throws ServerExceptionRenames the given folder- Parameters:
folderId- identifier of the foldername- the new folder's name- Throws:
ServerException- an error happened in the server application
-
applyRights
void applyRights(GUIFolder folder, boolean subfolders) throws ServerException
Applies all security settings to folder- Parameters:
folder- The folder that contains the new security settingssubfolders- If true, the current security settings will be applied to the sub-folders- Throws:
ServerException- an error happened in the server application
-
inheritRights
GUIFolder inheritRights(long folderId, long rightsFolderId) throws ServerException
Inherits the rights of another folder- Parameters:
folderId- The folder that has to be updatedrightsFolderId- the folder that defines the rights- Returns:
- The updated Folder
- Throws:
ServerException- an error happened in the server application
-
applyMetadata
void applyMetadata(long parentId) throws ServerExceptionApplies all extended attributes to a sub-tree- Parameters:
parentId- The parent folder containing the metadata- Throws:
ServerException- an error happened in the server application
-
applyTags
void applyTags(long parentId) throws ServerExceptionApplies all tags to a sub-tree- Parameters:
parentId- The parent folder containing the tags- Throws:
ServerException- an error happened in the server application
-
getFolder
GUIFolder getFolder(long folderId, boolean computePath, boolean computeDocs, boolean computeSubfolders) throws ServerException
Gets the Folder initializing the permissions.- Parameters:
folderId- The folder identifiercomputePath- True if the complete path must be retrievedcomputeDocs- True if the number of contained documents must be computedcomputeSubfolders- True if the number of contained subfolders must be computed- Returns:
- The Folder bean
- Throws:
ServerException- an error happened in the server application
-
delete
void delete(long[] folderIds) throws ServerExceptionDeletes the folders and the subtrees- Parameters:
folderIds- identifiers of the folders- Throws:
ServerException- an error happened in the server application
-
deleteFromTrash
void deleteFromTrash(Long[] ids) throws ServerException
Deletes a selection of folders from trash- Parameters:
ids- identifiers of the folders- Throws:
ServerException- an error happened in the server application
-
restore
void restore(Long[] folderIds, long targetId) throws ServerException
Restores a given folder- Parameters:
folderIds- identifiers of the folderstargetId- identifier of the folder that will receive the restore- Throws:
ServerException- an error happened in the server application
-
move
void move(long[] folderIds, long targetId) throws ServerExceptionMoves some folders under a target folder- Parameters:
folderIds- identifiers of the folderstargetId- identifier of the folder that will receive the move- Throws:
ServerException- an error happened in the server application
-
copyFolders
void copyFolders(long[] folderIds, long targetId, boolean foldersOnly, boolean inheritSecurity) throws ServerExceptionCopies a folder under a target folder- Parameters:
folderIds- identifiers of the folderstargetId- identifier of the folder that will receive the copyfoldersOnly- flag to copy just the folders and not the documentsinheritSecurity- flag to inherit the security policies fromtargetId- Throws:
ServerException- an error happened in the server application
-
paste
void paste(long[] docIds, long folderId, String action) throws ServerExceptionPastes documents into the target folder- Parameters:
docIds- the documents identifiersfolderId- the target folder identifieraction- the selected action(Clipboard.COPYorClipboard.COPY)- Throws:
ServerException- an error happened in the server application
-
pasteAsAlias
void pasteAsAlias(long[] docIds, long folderId, String type) throws ServerException- Throws:
ServerException
-
loadTemplates
GUIValue[] loadTemplates() throws ServerException
Loads the folders templates- Returns:
- the folder templates
- Throws:
ServerException- an error happened in the server application
-
saveTemplates
void saveTemplates(GUIValue[] templates) throws ServerException
Saves the passed folder templates- Parameters:
templates- the folder templates- Throws:
ServerException- an error happened in the server application
-
applyTemplate
void applyTemplate(long folderId, long templateId, boolean inheritSecurity) throws ServerExceptionApplies a template to a folder- Parameters:
folderId- identifier of the folder to use as roottemplateId- identifier of the template to useinheritSecurity- if the new folders mus inherit the security fromfolderId- Throws:
ServerException- an error happened in the server application
-
computeStats
int[] computeStats(long folderId) throws ServerExceptionCounts the docs and subfolders of a given parent- Parameters:
folderId- identifier of the folder- Returns:
- the statistics
- Throws:
ServerException- an error happened in the server application
-
setFolderPagination
void setFolderPagination(long folderId, Integer startRecord, Integer pageSize) throws ServerExceptionSets the pagination informations for the visualization of the folders tree- Parameters:
folderId- ID of the folderstartRecord- Start record indexpageSize- Current page size- Throws:
ServerException- an error happened in the server application
-
-