Package com.logicaldoc.webservice.soap
Interface FolderService
- All Known Implementing Classes:
RestFolderService
,RestFolderSwagger
,SoapFolderClient
,SoapFolderService
public interface FolderService
Folder Web Service definition interface
- Since:
- 5.2
- Author:
- Matteo Caruso - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Copies an existing folder with the given identifier.Creates a new folder.createAlias
(String sid, long parentId, long foldRef) Creates a new folder aliaslong
createFolder
(String sid, long parentId, String name) Create a new folder.createPath
(String sid, long parentId, String path) Creates the folder for the specified path.void
Deletes an existing folder.findByPath
(String sid, String path) Finds the folder at the specified pathGets the Default workspaceGets an existing folderWSRight[]
getGrantedGroups
(String sid, long folderId) Retrieves the list of granted groups for the given folderWSRight[]
getGrantedUsers
(String sid, long folderId) Retrieves the list of granted users for the given folder.WSFolder[]
Computes the path from the root to the target folder.getRootFolder
(String sid) Gets root metadatavoid
grantGroup
(String sid, long folderId, long groupId, int permissions, boolean recursive) Grants group permission to the foldervoid
Grants user permission to the folder.boolean
Tests if the current user has a specific permission on a folderboolean
isReadable
(String sid, long folderId) Tests if a folder is readable.boolean
isWritable
(String sid, long folderId) Tests if a folder is writableWSFolder[]
listChildren
(String sid, long folderId) Lists all direct folders of a parent folder.
Attention: readable only sub-folders are returned.WSFolder[]
listWorkspaces
(String sid) Retrieves the list of all workspaces.void
Merges the contents of folder into a targetvoid
Moves an existing folder with the given identifier.void
Renames an existing folder.void
Updates an existing folder.
-
Method Details
-
create
WSFolder create(String sid, WSFolder folder) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Creates a new folder. The user can completely customize the folder through a value object containing the folder's metadata- Parameters:
sid
- Session identifierfolder
- value object containing the folder's metadata- Returns:
- The value object containing the folder's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
createAlias
WSFolder createAlias(String sid, long parentId, long foldRef) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Creates a new folder alias- Parameters:
sid
- Session identifierparentId
- The parent folderfoldRef
- The referenced folder- Returns:
- The newly created alias
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
createFolder
long createFolder(String sid, long parentId, String name) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Create a new folder.- Parameters:
sid
- Session identifierparentId
- The parent's IDname
- The new folder's name- Returns:
- The newly created folder ID
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
delete
void delete(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Deletes an existing folder.- Parameters:
sid
- Session identifierfolderId
- The folder id- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
rename
void rename(String sid, long folderId, String name) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Renames an existing folder.- Parameters:
sid
- Session identifierfolderId
- The folder idname
- The new folder name- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
update
void update(String sid, WSFolder folder) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Updates an existing folder. To perform this you need the RENAME permission.- Parameters:
sid
- Session identifierfolder
- The folders metadata(please compile the ID)- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
move
void move(String sid, long folderId, long parentId) throws PersistenceException, AuthenticationException, WebserviceException Moves an existing folder with the given identifier.- Parameters:
sid
- Session identifierfolderId
- The folder idparentId
- The folder id of the new parent folder- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
merge
void merge(String sid, long sourceId, long targetId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Merges the contents of folder into a target- Parameters:
sid
- Session identifiersourceId
- Identifier of the source foldertargetId
- Identifier of the target folder- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
copy
void copy(String sid, long folderId, long targetId, int foldersOnly, String securityOption) throws AuthenticationException, WebserviceException, PersistenceException Copies an existing folder with the given identifier.- Parameters:
sid
- Session identifierfolderId
- The folder idtargetId
- The folder id of the target folderfoldersOnly
- If 1, only the folders will be copied and not the documentssecurityOption
- How to assign the security policies to the newly created folders:- null or none: empty security policies
- inherit: the new folder will point to the parent for the security policies
- replicate: the new folder will have a copy of the security policies of the source folder
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getFolder
WSFolder getFolder(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets an existing folder- Parameters:
sid
- Session identifierfolderId
- The folder id- Returns:
- A value object containing the folder's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getRootFolder
WSFolder getRootFolder(String sid) throws AuthenticationException, WebserviceException, PersistenceException Gets root metadata- Parameters:
sid
- Session identifier- Returns:
- A value object containing the folder's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getDefaultWorkspace
WSFolder getDefaultWorkspace(String sid) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets the Default workspace- Parameters:
sid
- Session identifier- Returns:
- A value object containing the workspace's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
listChildren
WSFolder[] listChildren(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Lists all direct folders of a parent folder.
Attention: readable only sub-folders are returned.- Parameters:
sid
- identifier of th sessionfolderId
- identifier of the folder- Returns:
- Array of folders contained in the folder
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
isReadable
boolean isReadable(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Tests if a folder is readable.- Parameters:
sid
- Session identifierfolderId
- The folder id- Returns:
- True if the identifier denotes a readable folder, otherwise false.
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
isWritable
boolean isWritable(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Tests if a folder is writable- Parameters:
sid
- Session identifierfolderId
- The folder id- Returns:
- True if the identifier denotes a writable folder, otherwise false
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
isGranted
boolean isGranted(String sid, long folderId, int permission) throws AuthenticationException, WebserviceException, PersistenceException Tests if the current user has a specific permission on a folder- Parameters:
sid
- Session identifierfolderId
- The folder idpermission
- The permission representation- Returns:
- True if the identifier denotes a granted permission, otherwise false
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getPath
WSFolder[] getPath(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Computes the path from the root to the target folder.- Parameters:
sid
- Session identifierfolderId
- The target folder id- Returns:
- The list of folder, the first is the root, the last is the target folder
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
grantUser
void grantUser(String sid, long folderId, long userId, int permissions, boolean recursive) throws PersistenceException, PermissionException, AuthenticationException, WebserviceException Grants user permission to the folder.- Parameters:
sid
- Session identifierfolderId
- Folder iduserId
- User Idpermissions
- the permission integer representation. If '0', the user will be not granted to access the folder.recursive
- recursion option. If true, the grant operation is applied also to the subfolders.- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
grantGroup
void grantGroup(String sid, long folderId, long groupId, int permissions, boolean recursive) throws PermissionException, PersistenceException, AuthenticationException, WebserviceException Grants group permission to the folder- Parameters:
sid
- Session identifierfolderId
- Folder idgroupId
- Group Idpermissions
- the permission integer representation. If '0', the group will be not granted to access the folder.recursive
- recursion option. If true, the grant operation is applied also to the subfolders- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getGrantedUsers
WSRight[] getGrantedUsers(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Retrieves the list of granted users for the given folder.- Parameters:
sid
- Session identifierfolderId
- Folder id- Returns:
- 'error' if error occurred, the right objects collection.
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getGrantedGroups
WSRight[] getGrantedGroups(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Retrieves the list of granted groups for the given folder- Parameters:
sid
- Session identifierfolderId
- Folder id- Returns:
- 'error' if error occurred, the right objects collection
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
createPath
WSFolder createPath(String sid, long parentId, String path) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Creates the folder for the specified path. All unexisting nodes specified in the path will be created- Parameters:
sid
- Session identifierparentId
- The parent folderpath
- The folder's path(for example /Default/dog/cat/mouse)- Returns:
- the folder that represents the given path
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
findByPath
WSFolder findByPath(String sid, String path) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Finds the folder at the specified path- Parameters:
sid
- Session identifierpath
- The folder's path(for example /Default/dog/cat/mouse)- Returns:
- The created folder
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
listWorkspaces
WSFolder[] listWorkspaces(String sid) throws AuthenticationException, WebserviceException, PersistenceException Retrieves the list of all workspaces.- Parameters:
sid
- Session identifier- Returns:
- array of workspaces
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-