public class FolderClient extends AbstractClient<FolderService> implements FolderService
client, endpoint
Constructor and Description |
---|
FolderClient(String endpoint) |
FolderClient(String endpoint,
int gzipThreshold,
boolean log,
int timeout) |
Modifier and Type | Method and Description |
---|---|
WSFolder |
create(String sid,
WSFolder folder)
Create a new folder.
|
WSFolder |
createPath(String sid,
long parentId,
String path)
Creates the folder for the specified path.
|
void |
delete(String sid,
long folderId)
Deletes an existing folder with the given identifier.
|
WSFolder |
findByPath(String sid,
String path)
Finds the folder at the specified path
|
WSFolder |
getDefaultWorkspace(String sid)
Gets the Default workspace
|
WSFolder |
getFolder(String sid,
long folderId)
Gets folder metadata of an existing folder with the given identifier.
|
Right[] |
getGrantedGroups(String sid,
long folderId)
Retrieves the list of granted groups for the given folder.
|
Right[] |
getGrantedUsers(String sid,
long folderId)
Retrieves the list of granted users for the given folder.
|
WSFolder[] |
getPath(String sid,
long folderId)
Computes the path from the root to the target folder.
|
WSFolder |
getRootFolder(String sid)
Gets root metadata
|
void |
grantGroup(String sid,
long folderId,
long groupId,
int permissions,
boolean recursive)
Grant group permission to the folder.
|
void |
grantUser(String sid,
long folderId,
long userId,
int permissions,
boolean recursive)
Grant user permission to the folder.
|
boolean |
isGranted(String sid,
long folderId,
int permission)
Test if the current user has a specific permission.
|
boolean |
isReadable(String sid,
long folderId)
Test if a folder identifier is readable.
|
boolean |
isWriteable(String sid,
long folderId)
Test if a folder identifier is writeable.
|
WSFolder[] |
listChildren(String sid,
long folderId)
Lists all direct folders of a parent folder.
|
WSFolder[] |
listWorkspaces(String sid)
Retrieves the list of all workspaces.
|
void |
move(String sid,
long folderId,
long parentId)
Moves an existing folder with the given identifier.
|
void |
rename(String sid,
long folderId,
String name)
Renames an existing folder with the given identifier.
|
void |
update(String sid,
WSFolder folder)
Updates an existing folder.
|
configureSSL, configureTimeout, initClient
public FolderClient(String endpoint, int gzipThreshold, boolean log, int timeout) throws IOException
IOException
public FolderClient(String endpoint) throws IOException
IOException
public WSFolder create(String sid, WSFolder folder) throws Exception
FolderService
create
in interface FolderService
sid
- Session identifierfolder
- value object containing the folder's metadataException
public void delete(String sid, long folderId) throws Exception
FolderService
delete
in interface FolderService
sid
- Session identifierfolderId
- The folder idException
public WSFolder getFolder(String sid, long folderId) throws Exception
FolderService
getFolder
in interface FolderService
sid
- Session identifierfolderId
- The folder idException
public boolean isReadable(String sid, long folderId) throws Exception
FolderService
isReadable
in interface FolderService
sid
- Session identifierfolderId
- The folder idException
public void move(String sid, long folderId, long parentId) throws Exception
FolderService
move
in interface FolderService
sid
- Session identifierfolderId
- The folder idparentId
- The folder id of the new parent folderException
public void rename(String sid, long folderId, String name) throws Exception
FolderService
rename
in interface FolderService
sid
- Session identifierfolderId
- The folder idname
- The new folder nameException
public WSFolder[] listChildren(String sid, long folderId) throws Exception
FolderService
listChildren
in interface FolderService
sid
- Session identifierException
public WSFolder getRootFolder(String sid) throws Exception
FolderService
getRootFolder
in interface FolderService
sid
- Session identifierException
public WSFolder getDefaultWorkspace(String sid) throws Exception
FolderService
getDefaultWorkspace
in interface FolderService
sid
- Session identifierException
public boolean isWriteable(String sid, long folderId) throws Exception
FolderService
isWriteable
in interface FolderService
sid
- Session identifierfolderId
- The folder idException
public WSFolder[] getPath(String sid, long folderId) throws Exception
FolderService
getPath
in interface FolderService
sid
- Session identifierfolderId
- The target folder idException
public Right[] getGrantedGroups(String sid, long folderId) throws Exception
FolderService
getGrantedGroups
in interface FolderService
sid
- Session identifierfolderId
- Folder idException
public Right[] getGrantedUsers(String sid, long folderId) throws Exception
FolderService
getGrantedUsers
in interface FolderService
sid
- Session identifierfolderId
- Folder idException
public void grantGroup(String sid, long folderId, long groupId, int permissions, boolean recursive) throws Exception
FolderService
grantGroup
in interface FolderService
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.Exception
public void grantUser(String sid, long folderId, long userId, int permissions, boolean recursive) throws Exception
FolderService
grantUser
in interface FolderService
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.Exception
public void update(String sid, WSFolder folder) throws Exception
FolderService
update
in interface FolderService
sid
- Session identifierfolder
- The folders metadata(please compile the ID)Exception
public WSFolder createPath(String sid, long parentId, String path) throws Exception
FolderService
createPath
in interface FolderService
sid
- Session identifierparentId
- The parent folderpath
- The folder path(for example /Default/dog/cat/mouse)Exception
public WSFolder[] listWorkspaces(String sid) throws Exception
FolderService
listWorkspaces
in interface FolderService
sid
- Session identifierException
public WSFolder findByPath(String sid, String path) throws Exception
FolderService
findByPath
in interface FolderService
sid
- Session identifierpath
- The folder path(for example /Default/dog/cat/mouse)Exception
public boolean isGranted(String sid, long folderId, int permission) throws Exception
FolderService
isGranted
in interface FolderService
sid
- Session identifierfolderId
- The folder idpermission
- The permission representationException
Copyright © 2008-2014 Logical Objects. All Rights Reserved.