public class CloudFileActionService extends Object implements org.picocontainer.Startable
| Modifier and Type | Class and Description |
|---|---|
protected class |
CloudFileActionService.LinkRemoveListener
Act on ecd:cloudFileLinkGroup property removal on a cloud file symlink and then unshare the file from the
group where it was shared by the link.
|
protected class |
CloudFileActionService.LinkTrashListener
Act on Cloud File symlink trashing.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.exoplatform.clouddrive.CloudDriveService |
cloudDrive |
protected org.exoplatform.services.cms.CmsService |
cmsService |
protected org.exoplatform.services.cms.drives.ManageDriveService |
documentDrives |
protected static String |
ECD_CLOUDFILELINK |
protected static String |
ECD_SHAREIDENTITY |
protected static String |
EXO_OWNEABLE |
protected static String |
EXO_PRIVILEGEABLE |
protected static String |
EXO_TRASHFOLDER |
protected org.exoplatform.clouddrive.jcr.NodeFinder |
finder
Node finder facade on actual storage implementation.
|
protected String |
groupsPath |
protected org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator |
hierarchyCreator |
protected org.exoplatform.services.jcr.RepositoryService |
jcrService |
protected org.exoplatform.services.cms.link.LinkManager |
linkManager |
protected org.exoplatform.services.listener.ListenerService |
listenerService |
protected static org.exoplatform.services.log.Log |
LOG |
protected static String[] |
MANAGER_PERMISSION |
protected static String |
MIX_VERSIONABLE |
protected org.exoplatform.services.organization.OrganizationService |
orgService |
protected static String[] |
READER_PERMISSION |
protected Map<String,String> |
removedLinks
Symlink to cloud file UUID mappings.
|
protected Map<String,String> |
removedShared
Cloud file UUID to shared group name mappings.
|
protected org.exoplatform.services.jcr.ext.app.SessionProviderService |
sessionProviders |
protected static String |
SHARE_CLOUD_FILES_SPACES |
protected static String |
SPACES_GROUP |
protected org.exoplatform.services.cms.documents.TrashService |
trash |
protected String |
usersPath |
protected org.exoplatform.clouddrive.ThreadExecutor |
workerExecutor
Trashed symlinks removal workers.
|
| Constructor and Description |
|---|
CloudFileActionService(org.exoplatform.clouddrive.CloudDriveService cloudDrive,
org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.services.organization.OrganizationService orgService,
org.exoplatform.clouddrive.jcr.NodeFinder finder,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator,
org.exoplatform.services.cms.link.LinkManager linkManager,
org.exoplatform.services.cms.drives.ManageDriveService documentDrives,
org.exoplatform.services.cms.documents.TrashService trash,
org.exoplatform.services.listener.ListenerService listeners,
org.exoplatform.services.cms.CmsService cmsService) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
documentName(javax.jcr.Node document)
Find pretty name of the document.
|
protected javax.jcr.NodeIterator |
getCloudFileLinks(javax.jcr.Node targetNode,
String shareIdentity,
boolean useSystemSession) |
String |
getDriveNameFromPath(String nodePath)
Deprecated.
|
org.exoplatform.services.cms.drives.DriveData |
getNodeDrive(javax.jcr.Node node) |
org.exoplatform.services.cms.drives.DriveData |
getUserDrive(String userName) |
javax.jcr.Node |
getUserPublicNode(String userName) |
boolean |
isGroupDrive(org.exoplatform.services.cms.drives.DriveData drive) |
boolean |
isUserDrive(org.exoplatform.services.cms.drives.DriveData drive) |
javax.jcr.Node |
linkFile(javax.jcr.Node srcNode,
javax.jcr.Node destNode,
String destIdentity) |
javax.jcr.Node |
linkShareToUser(javax.jcr.Node fileNode,
org.exoplatform.clouddrive.CloudDrive fileDrive,
String userName) |
protected void |
listenFileLinks() |
javax.jcr.Node |
markRemoveLink(javax.jcr.Node linkNode) |
String |
postSharedActivity(javax.jcr.Node node,
javax.jcr.Node link,
String comment) |
void |
removeLinks(javax.jcr.Node fileNode,
String shareIdentity) |
protected void |
removePermissions(javax.jcr.Node node,
boolean deep,
String... identities)
Remove read permissions on the target node for all given identities (e.g.
|
protected void |
setAllPermissions(javax.jcr.Node node,
String... identities)
Set all available permissions to given node for given identities.
|
protected void |
setParentPermissions(javax.jcr.Node parent,
String... identities)
Set permissions on a parent node of a link target: all child nodes will become exo:privilegeable (thus
copy permissions from its priviligeable parent).
|
protected void |
setPermissions(javax.jcr.Node node,
boolean deep,
boolean forcePrivilegeable,
String... identities)
Set read permissions on the target node to all given identities (e.g.
|
protected void |
setPermissions(javax.jcr.Node node,
String... identities)
Set read permissions on the target node to all given identities (e.g.
|
void |
shareCloudFile(javax.jcr.Node fileNode,
org.exoplatform.clouddrive.CloudDrive cloudDrive,
String... identities) |
void |
start() |
void |
stop() |
protected javax.jcr.Session |
systemSession()
System session in default workspace of current JCR repository.
|
void |
unshareCloudFile(javax.jcr.Node fileNode,
org.exoplatform.clouddrive.CloudDrive cloudDrive,
String... identities) |
protected static final org.exoplatform.services.log.Log LOG
protected static final String SPACES_GROUP
protected static final String SHARE_CLOUD_FILES_SPACES
protected static final String EXO_OWNEABLE
protected static final String EXO_PRIVILEGEABLE
protected static final String ECD_CLOUDFILELINK
protected static final String ECD_SHAREIDENTITY
protected static final String MIX_VERSIONABLE
protected static final String EXO_TRASHFOLDER
protected static final String[] READER_PERMISSION
protected static final String[] MANAGER_PERMISSION
protected final org.exoplatform.clouddrive.CloudDriveService cloudDrive
protected final org.exoplatform.services.jcr.RepositoryService jcrService
protected final org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator
protected final org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders
protected final org.exoplatform.services.organization.OrganizationService orgService
protected final org.exoplatform.services.cms.link.LinkManager linkManager
protected final org.exoplatform.services.cms.drives.ManageDriveService documentDrives
protected final org.exoplatform.services.cms.documents.TrashService trash
protected final org.exoplatform.services.listener.ListenerService listenerService
protected final org.exoplatform.services.cms.CmsService cmsService
protected final Map<String,String> removedShared
protected final org.exoplatform.clouddrive.jcr.NodeFinder finder
protected final org.exoplatform.clouddrive.ThreadExecutor workerExecutor
protected final String groupsPath
protected final String usersPath
public CloudFileActionService(org.exoplatform.clouddrive.CloudDriveService cloudDrive,
org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.services.organization.OrganizationService orgService,
org.exoplatform.clouddrive.jcr.NodeFinder finder,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator,
org.exoplatform.services.cms.link.LinkManager linkManager,
org.exoplatform.services.cms.drives.ManageDriveService documentDrives,
org.exoplatform.services.cms.documents.TrashService trash,
org.exoplatform.services.listener.ListenerService listeners,
org.exoplatform.services.cms.CmsService cmsService)
public boolean isGroupDrive(org.exoplatform.services.cms.drives.DriveData drive)
public boolean isUserDrive(org.exoplatform.services.cms.drives.DriveData drive)
public javax.jcr.Node linkShareToUser(javax.jcr.Node fileNode,
org.exoplatform.clouddrive.CloudDrive fileDrive,
String userName)
throws Exception
Exceptionpublic org.exoplatform.services.cms.drives.DriveData getUserDrive(String userName) throws Exception
Exceptionpublic javax.jcr.Node getUserPublicNode(String userName) throws Exception
Exceptionpublic void removeLinks(javax.jcr.Node fileNode,
String shareIdentity)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic org.exoplatform.services.cms.drives.DriveData getNodeDrive(javax.jcr.Node node)
throws Exception
Exception@Deprecated public String getDriveNameFromPath(String nodePath) throws CloudFileActionException
CloudFileActionExceptionpublic javax.jcr.Node linkFile(javax.jcr.Node srcNode,
javax.jcr.Node destNode,
String destIdentity)
throws org.exoplatform.clouddrive.NotCloudDriveException,
org.exoplatform.clouddrive.DriveRemovedException,
javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
org.exoplatform.clouddrive.NotCloudDriveExceptionorg.exoplatform.clouddrive.DriveRemovedExceptionjavax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.CloudDriveExceptionpublic javax.jcr.Node markRemoveLink(javax.jcr.Node linkNode)
throws org.exoplatform.clouddrive.NotCloudDriveException,
org.exoplatform.clouddrive.DriveRemovedException,
javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
org.exoplatform.clouddrive.NotCloudDriveExceptionorg.exoplatform.clouddrive.DriveRemovedExceptionjavax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.CloudDriveExceptionpublic void shareCloudFile(javax.jcr.Node fileNode,
org.exoplatform.clouddrive.CloudDrive cloudDrive,
String... identities)
throws org.exoplatform.clouddrive.NotCloudDriveException,
org.exoplatform.clouddrive.DriveRemovedException,
javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
org.exoplatform.clouddrive.NotCloudDriveExceptionorg.exoplatform.clouddrive.DriveRemovedExceptionjavax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.CloudDriveExceptionpublic void unshareCloudFile(javax.jcr.Node fileNode,
org.exoplatform.clouddrive.CloudDrive cloudDrive,
String... identities)
throws org.exoplatform.clouddrive.NotCloudDriveException,
org.exoplatform.clouddrive.DriveRemovedException,
javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
org.exoplatform.clouddrive.NotCloudDriveExceptionorg.exoplatform.clouddrive.DriveRemovedExceptionjavax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.CloudDriveExceptionpublic String postSharedActivity(javax.jcr.Node node, javax.jcr.Node link, String comment) throws org.exoplatform.clouddrive.CloudDriveException
org.exoplatform.clouddrive.CloudDriveExceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startableprotected void listenFileLinks()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected void setPermissions(javax.jcr.Node node,
String... identities)
throws AccessControlException,
javax.jcr.RepositoryException
exo:privilegeable it will add such mixin to allow set the permissions first. Requested
permissions will be set to all children nodes if the child already exo:privilegeable.node - Node link target nodeidentities - array of String with user identifiers (names or memberships)AccessControlExceptionjavax.jcr.RepositoryExceptionprotected void setPermissions(javax.jcr.Node node,
boolean deep,
boolean forcePrivilegeable,
String... identities)
throws AccessControlException,
javax.jcr.RepositoryException
exo:privilegeable and forcePrivilegeable is
false. If deep is true the target children nodes will be checked
also for a need to set the requested permissions. node - Node link target nodedeep - Boolean if true then also children nodes will be set to the requested
permissionsforcePrivilegeable - Boolean if true and node not yet
exo:privilegeable it will add such mixin to allow set the permissions.identities - array of String with user identifiers (names or memberships)AccessControlExceptionjavax.jcr.RepositoryExceptionprotected void removePermissions(javax.jcr.Node node,
boolean deep,
String... identities)
throws AccessControlException,
javax.jcr.RepositoryException
deep is true then permissions will be removed on all ancestor nodes (sub-tree
for folders).node - Node link target nodedeep - Boolean if true then also remove the permissions from children nodesidentities - array of String with user identifiers (names or memberships)AccessControlExceptionjavax.jcr.RepositoryExceptionprotected void setParentPermissions(javax.jcr.Node parent,
String... identities)
throws AccessControlException,
javax.jcr.RepositoryException
parent - identities - AccessControlExceptionjavax.jcr.RepositoryExceptionprotected void setAllPermissions(javax.jcr.Node node,
String... identities)
throws AccessControlException,
javax.jcr.RepositoryException
node - identities - AccessControlExceptionjavax.jcr.RepositoryExceptionprotected String documentName(javax.jcr.Node document) throws javax.jcr.RepositoryException
document - javax.jcr.RepositoryExceptionprotected javax.jcr.Session systemSession()
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected javax.jcr.NodeIterator getCloudFileLinks(javax.jcr.Node targetNode,
String shareIdentity,
boolean useSystemSession)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2003–2016 eXo Platform SAS. All rights reserved.