public class FolderServiceImpl extends AbstractService implements FolderService
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
context| Constructor and Description |
|---|
FolderServiceImpl() |
| 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.
|
checkAdministrator, checkDownloadEnable, checkGroup, checkPermission, checkPublished, checkReadEnable, checkWriteEnable, convertDateToString, convertStringToDate, getSettings, isWebserviceEnabled, setValidateSession, validateSessionpublic WSFolder create(String sid, WSFolder folder) throws Exception
FolderServicecreate in interface FolderServicesid - Session identifierfolder - value object containing the folder's metadataExceptionpublic void delete(String sid, long folderId) throws Exception
FolderServicedelete in interface FolderServicesid - Session identifierfolderId - The folder idExceptionpublic WSFolder getFolder(String sid, long folderId) throws Exception
FolderServicegetFolder in interface FolderServicesid - Session identifierfolderId - The folder idExceptionpublic WSFolder findByPath(String sid, String path) throws Exception
FolderServicefindByPath in interface FolderServicesid - Session identifierpath - The folder path(for example /Default/dog/cat/mouse)Exceptionpublic boolean isReadable(String sid, long folderId) throws Exception
FolderServiceisReadable in interface FolderServicesid - Session identifierfolderId - The folder idExceptionpublic WSFolder[] listChildren(String sid, long folderId) throws Exception
FolderServicelistChildren in interface FolderServicesid - Session identifierExceptionpublic void move(String sid, long folderId, long parentId) throws Exception
FolderServicemove in interface FolderServicesid - Session identifierfolderId - The folder idparentId - The folder id of the new parent folderExceptionpublic void rename(String sid, long folderId, String name) throws Exception
FolderServicerename in interface FolderServicesid - Session identifierfolderId - The folder idname - The new folder nameExceptionpublic WSFolder getRootFolder(String sid) throws Exception
FolderServicegetRootFolder in interface FolderServicesid - Session identifierExceptionpublic WSFolder getDefaultWorkspace(String sid) throws Exception
FolderServicegetDefaultWorkspace in interface FolderServicesid - Session identifierExceptionpublic boolean isWriteable(String sid, long folderId) throws Exception
FolderServiceisWriteable in interface FolderServicesid - Session identifierfolderId - The folder idExceptionpublic boolean isGranted(String sid, long folderId, int permission) throws Exception
FolderServiceisGranted in interface FolderServicesid - Session identifierfolderId - The folder idpermission - The permission representationExceptionpublic WSFolder[] getPath(String sid, long folderId) throws Exception
FolderServicegetPath in interface FolderServicesid - Session identifierfolderId - The target folder idExceptionpublic void grantUser(String sid, long folderId, long userId, int permissions, boolean recursive) throws Exception
FolderServicegrantUser in interface FolderServicesid - 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.Exceptionpublic void grantGroup(String sid, long folderId, long groupId, int permissions, boolean recursive) throws Exception
FolderServicegrantGroup in interface FolderServicesid - 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.Exceptionpublic Right[] getGrantedUsers(String sid, long folderId) throws Exception
FolderServicegetGrantedUsers in interface FolderServicesid - Session identifierfolderId - Folder idExceptionpublic Right[] getGrantedGroups(String sid, long folderId) throws Exception
FolderServicegetGrantedGroups in interface FolderServicesid - Session identifierfolderId - Folder idExceptionpublic void update(String sid, WSFolder folder) throws Exception
FolderServiceupdate in interface FolderServicesid - Session identifierfolder - The folders metadata(please compile the ID)Exceptionpublic WSFolder createPath(String sid, long parentId, String path) throws Exception
FolderServicecreatePath in interface FolderServicesid - Session identifierparentId - The parent folderpath - The folder path(for example /Default/dog/cat/mouse)Exceptionpublic WSFolder[] listWorkspaces(String sid) throws Exception
FolderServicelistWorkspaces in interface FolderServicesid - Session identifierExceptionCopyright © 2008-2014 Logical Objects. All Rights Reserved.