Class SoapFolderClient
java.lang.Object
com.logicaldoc.webservice.soap.client.SoapClient<FolderService>
com.logicaldoc.webservice.soap.client.SoapFolderClient
- All Implemented Interfaces:
FolderService
Folder Web Service client.
- Since:
- 7.5
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
ConstructorsConstructorDescriptionSoapFolderClient(String endpoint) SoapFolderClient(String endpoint, int gzipThreshold, boolean log, int timeout) -
Method Summary
Modifier 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 folderWSFolder[]Computes 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 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.voidMerges the contents of folder into a targetvoidMoves an existing folder with the given identifier.voidRenames an existing folder.voidsetAccessControlList(String sid, long folderId, WSAccessControlEntry[] acl) Sets the Access Control ListvoidUpdates an existing folder.
-
Constructor Details
-
SoapFolderClient
-
SoapFolderClient
-
-
Method Details
-
create
public WSFolder create(String sid, WSFolder folder) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceCreates a new folder. The user can completely customize the folder through a value object containing the folder's metadata- Specified by:
createin interfaceFolderService- Parameters:
sid- Session identifierfolder- value object containing the folder's metadata- Returns:
- The value object containing the folder's metadata
- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
createFolder
public long createFolder(String sid, long parentId, String name) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceCreate a new folder.- Specified by:
createFolderin interfaceFolderService- Parameters:
sid- Session identifierparentId- The parent's IDname- The new folder's name- Returns:
- The newly created folder ID
- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
delete
public void delete(String sid, long folderId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceDeletes an existing folder.- Specified by:
deletein interfaceFolderService- Parameters:
sid- Session identifierfolderId- The folder id- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
getFolder
public WSFolder getFolder(String sid, long folderId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceGets an existing folder- Specified by:
getFolderin interfaceFolderService- Parameters:
sid- Session identifierfolderId- The folder id- Returns:
- A value object containing the folder's metadata
- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
isReadable
public boolean isReadable(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:FolderServiceTests if a folder is readable.- Specified by:
isReadablein interfaceFolderService- Parameters:
sid- Session identifierfolderId- The folder id- Returns:
- True if the identifier denotes a readable folder, otherwise false.
- Throws:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
move
public void move(String sid, long folderId, long parentId) throws AuthenticationException, PersistenceException, WebserviceException, PermissionException Description copied from interface:FolderServiceMoves an existing folder with the given identifier.- Specified by:
movein interfaceFolderService- Parameters:
sid- Session identifierfolderId- The folder idparentId- The folder id of the new parent folder- Throws:
AuthenticationException- Invalid sessionPersistenceException- Error in the databaseWebserviceException- Error in the webservicePermissionException- The user does not have the required permission
-
copy
public void copy(String sid, long folderId, long parentId, int foldersOnly, String securityOption) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:FolderServiceCopies an existing folder with the given identifier.- Specified by:
copyin interfaceFolderService- Parameters:
sid- Session identifierfolderId- The folder idparentId- 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:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the databasePermissionException- The user does not have the required permission
-
rename
public void rename(String sid, long folderId, String name) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceRenames an existing folder.- Specified by:
renamein interfaceFolderService- Parameters:
sid- Session identifierfolderId- The folder idname- The new folder name- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
listChildren
public WSFolder[] listChildren(String sid, long folderId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceLists all direct folders of a parent folder.
Attention: readable only sub-folders are returned.- Specified by:
listChildrenin interfaceFolderService- Parameters:
sid- identifier of th sessionfolderId- identifier of the folder- Returns:
- Array of folders contained in the folder
- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
getRootFolder
public WSFolder getRootFolder(String sid) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:FolderServiceGets root metadata- Specified by:
getRootFolderin interfaceFolderService- Parameters:
sid- Session identifier- Returns:
- A value object containing the folder's metadata
- Throws:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
getDefaultWorkspace
public WSFolder getDefaultWorkspace(String sid) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceGets the Default workspace- Specified by:
getDefaultWorkspacein interfaceFolderService- Parameters:
sid- Session identifier- Returns:
- A value object containing the workspace's metadata
- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
isWritable
public boolean isWritable(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:FolderServiceTests if a folder is writable- Specified by:
isWritablein interfaceFolderService- Parameters:
sid- Session identifierfolderId- The folder id- Returns:
- True if the identifier denotes a writable folder, otherwise false
- Throws:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
getPath
public WSFolder[] getPath(String sid, long folderId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceComputes the path from the root to the target folder.- Specified by:
getPathin interfaceFolderService- 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:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
update
public void update(String sid, WSFolder folder) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceUpdates an existing folder. To perform this you need the RENAME permission.- Specified by:
updatein interfaceFolderService- Parameters:
sid- Session identifierfolder- The folders metadata(please compile the ID)- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
createPath
public WSFolder createPath(String sid, long parentId, String path) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceCreates the folder for the specified path. All unexisting nodes specified in the path will be created- Specified by:
createPathin interfaceFolderService- 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:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
listWorkspaces
public WSFolder[] listWorkspaces(String sid) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:FolderServiceRetrieves the list of all workspaces.- Specified by:
listWorkspacesin interfaceFolderService- Parameters:
sid- Session identifier- Returns:
- array of workspaces
- Throws:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
findByPath
public WSFolder findByPath(String sid, String path) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceFinds the folder at the specified path- Specified by:
findByPathin interfaceFolderService- Parameters:
sid- Session identifierpath- The folder's path(for example /Default/dog/cat/mouse)- Returns:
- The created folder
- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
isGranted
public boolean isGranted(String sid, long folderId, String permission) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:FolderServiceTests if the current user has a specific permission on a folder- Specified by:
isGrantedin interfaceFolderService- Parameters:
sid- Session identifierfolderId- The folder idpermission- The permission to check (eg: 'read', 'write', ...)- Returns:
- True if the identifier denotes a granted permission, otherwise false
- Throws:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
createAlias
public WSFolder createAlias(String sid, long parentId, long foldRef) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceCreates a new folder alias- Specified by:
createAliasin interfaceFolderService- Parameters:
sid- Session identifierparentId- The parent folderfoldRef- The referenced folder- Returns:
- The newly created alias
- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
merge
public void merge(String sid, long sourceId, long targetId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:FolderServiceMerges the contents of folder into a target- Specified by:
mergein interfaceFolderService- Parameters:
sid- Session identifiersourceId- Identifier of the source foldertargetId- Identifier of the target folder- Throws:
AuthenticationException- Invalid sessionPermissionException- The user does not have the required permissionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
getAccessControlList
public WSAccessControlEntry[] getAccessControlList(String sid, long folderId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:FolderServiceRetrieves the access control list- Specified by:
getAccessControlListin interfaceFolderService- Parameters:
sid- Session identifierfolderId- Folder id- Returns:
- 'error' if error occurred, the right objects collection
- Throws:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the databasePermissionException- The permission has not been granted
-
setAccessControlList
public void setAccessControlList(String sid, long folderId, WSAccessControlEntry[] acl) throws PersistenceException, PermissionException, AuthenticationException, WebserviceException Description copied from interface:FolderServiceSets the Access Control List- Specified by:
setAccessControlListin interfaceFolderService- Parameters:
sid- Session identifierfolderId- Folder idacl- the complete Access Control List- Throws:
PersistenceException- Error in the databasePermissionException- The user does not have the required permissionAuthenticationException- Invalid sessionWebserviceException- Error in the webservice
-