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 SummaryModifier and TypeMethodDescriptionvoidCopies an existing folder with the given identifier.Creates a new folder.createAlias(String sid, long parentId, long foldRef) Creates a new folder aliaslongcreateFolder(String sid, long parentId, String name) Create a new folder.createPath(String sid, long parentId, String path) Creates the folder for the specified path.voidDeletes an existing folder.findByPath(String sid, String path) Finds the folder at the specified pathgetAccessControlList(String sid, long folderId) Retrieves the access control listGets the Default workspaceGets an existing folderComputes the path from the root to the target folder.getRootFolder(String sid) Gets root metadatabooleanTests if the current user has a specific permission on a folderbooleanisReadable(String sid, long folderId) Tests if a folder is readable.booleanisWritable(String sid, long folderId) Tests if a folder is writableLists all direct folders of a parent folder.
 Attention: readable sub-folders only are returned.listChildren(String sid, long folderId) Lists all direct folders of a parent folder.
 Attention: readable only sub-folders are returned.listWorkspaces(String sid) Retrieves the list of all workspaces.voidMerges the contents of folder into a targetvoidMoves an existing folder with the given identifier.voidRenames an existing folder.voidsetAccessControlList(String sid, long folderId, List<WSAccessControlEntry> acl) Sets the Access Control ListvoidUpdates an existing folder.
- 
Method Details- 
createWSFolder 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 identifier
- folder- value object containing the folder's metadata
- Returns:
- The value object containing the folder's metadata
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
createAliasWSFolder createAlias(String sid, long parentId, long foldRef) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Creates a new folder alias- Parameters:
- sid- Session identifier
- parentId- The parent folder
- foldRef- The referenced folder
- Returns:
- The newly created alias
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
createFolderlong createFolder(String sid, long parentId, String name) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Create a new folder.- Parameters:
- sid- Session identifier
- parentId- The parent's ID
- name- The new folder's name
- Returns:
- The newly created folder ID
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
deletevoid delete(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Deletes an existing folder.- Parameters:
- sid- Session identifier
- folderId- The folder id
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
renamevoid rename(String sid, long folderId, String name) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Renames an existing folder.- Parameters:
- sid- Session identifier
- folderId- The folder id
- name- The new folder name
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
updatevoid 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 identifier
- folder- The folders metadata(please compile the ID)
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
movevoid move(String sid, long folderId, long parentId) throws PersistenceException, AuthenticationException, WebserviceException, PermissionException Moves an existing folder with the given identifier.- Parameters:
- sid- Session identifier
- folderId- The folder id
- parentId- The folder id of the new parent folder
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
mergevoid merge(String sid, long sourceId, long targetId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Merges the contents of folder into a target- Parameters:
- sid- Session identifier
- sourceId- Identifier of the source folder
- targetId- Identifier of the target folder
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
copyvoid copy(String sid, long folderId, long targetId, int foldersOnly, String securityOption) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Copies an existing folder with the given identifier.- Parameters:
- sid- Session identifier
- folderId- The folder id
- targetId- The folder id of the target folder
- foldersOnly- If 1, only the folders will be copied and not the documents
- securityOption- 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 database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
getFolderWSFolder getFolder(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Gets an existing folder- Parameters:
- sid- Session identifier
- folderId- The folder id
- Returns:
- A value object containing the folder's metadata
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
getRootFolderWSFolder 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 database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
 
- 
getDefaultWorkspaceWSFolder 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 database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
listChildrenList<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 session
- folderId- identifier of the folder
- Returns:
- List of folders contained in the folder
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
listList<WSFolder> list(String sid, long folderId, String sort, Integer page, Integer max) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Lists all direct folders of a parent folder.
 Attention: readable sub-folders only are returned.- Parameters:
- sid- identifier of th session
- folderId- identifier of the folder
- sort- Optional sort criteria (eg creation asc)
- page- Optional page number
- max- Optional maximum number of elements per page
- Returns:
- List of folders contained in the folder
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
isReadableboolean isReadable(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Tests if a folder is readable.- Parameters:
- sid- Session identifier
- folderId- The folder id
- Returns:
- True if the identifier denotes a readable folder, otherwise false.
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
 
- 
isWritableboolean isWritable(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Tests if a folder is writable- Parameters:
- sid- Session identifier
- folderId- The folder id
- Returns:
- True if the identifier denotes a writable folder, otherwise false
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
 
- 
isGrantedboolean isGranted(String sid, long folderId, String permission) throws AuthenticationException, WebserviceException, PersistenceException Tests if the current user has a specific permission on a folder- Parameters:
- sid- Session identifier
- folderId- The folder id
- permission- The permission to check (eg: 'read', 'write', ...)
- Returns:
- True if the identifier denotes a granted permission, otherwise false
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
 
- 
getPathList<WSFolder> getPath(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Computes the path from the root to the target folder.- Parameters:
- sid- Session identifier
- folderId- 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 database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
setAccessControlListvoid setAccessControlList(String sid, long folderId, List<WSAccessControlEntry> acl) throws PersistenceException, PermissionException, AuthenticationException, WebserviceException Sets the Access Control List- Parameters:
- sid- Session identifier
- folderId- Folder id
- acl- the complete Access Control List
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
getAccessControlListList<WSAccessControlEntry> getAccessControlList(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Retrieves the access control list- Parameters:
- sid- Session identifier
- folderId- Folder id
- Returns:
- 'error' if error occurred, the right objects collection
- Throws:
- PermissionException- The permission has not been granted
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
 
- 
createPathWSFolder 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 identifier
- parentId- The parent folder
- path- The folder's path(for example /Default/dog/cat/mouse)
- Returns:
- the folder that represents the given path
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
findByPathWSFolder findByPath(String sid, String path) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Finds the folder at the specified path- Parameters:
- sid- Session identifier
- path- The folder's path(for example /Default/dog/cat/mouse)
- Returns:
- The created folder
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
- PermissionException- The user does not have the required permission
 
- 
listWorkspacesList<WSFolder> listWorkspaces(String sid) throws AuthenticationException, WebserviceException, PersistenceException Retrieves the list of all workspaces.- Parameters:
- sid- Session identifier
- Returns:
- list of workspaces
- Throws:
- PersistenceException- Error in the database
- WebserviceException- Error in the webservice
- AuthenticationException- Invalid session
 
 
-