Class ShareDocumentService
java.lang.Object
org.exoplatform.wcm.ext.component.document.service.ShareDocumentService
- All Implemented Interfaces:
IShareDocumentService,org.picocontainer.Startable
public class ShareDocumentService
extends Object
implements IShareDocumentService, org.picocontainer.Startable
Created by The eXo Platform SAS
Author : eXoPlatform
exo@exoplatform.com
Nov 19, 2014
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionShareDocumentService(org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.cms.link.LinkManager linkManager, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService) -
Method Summary
Modifier and TypeMethodDescriptionpublishDocumentToSpace(String space, javax.jcr.Node currentNode, String comment, String perm) Share a document to a space, permission of space's user also apply to this document.publishDocumentToSpace(String space, javax.jcr.Node currentNode, String comment, String perm, Boolean postActivity) Share a document to a space, permission of space's user also apply to this document.voidpublishDocumentToUser(String user, javax.jcr.Node currentNode, String comment, String perm) Share a document to a uservoidshareDocumentActivityToSpace(org.exoplatform.social.core.activity.model.ExoSocialActivity sharedActivity) Share documents of an activity to a spacevoidstart()voidstop()voidunpublishDocumentToSpace(String space, org.exoplatform.services.jcr.core.ExtendedNode node) Unshare a document to a spacevoidunpublishDocumentToUser(String user, org.exoplatform.services.jcr.core.ExtendedNode node) Unshare a document to a user
-
Field Details
-
MIX_PRIVILEGEABLE
- See Also:
-
ID
- See Also:
-
REPOSITORY
- See Also:
-
WORKSPACE
- See Also:
-
DOCPATH
- See Also:
-
NODEPATH_NAME
- See Also:
-
REPOSITORY_NAME
- See Also:
-
WORKSPACE_NAME
- See Also:
-
-
Constructor Details
-
ShareDocumentService
public ShareDocumentService(org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.cms.link.LinkManager linkManager, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService)
-
-
Method Details
-
publishDocumentToSpace
public String publishDocumentToSpace(String space, javax.jcr.Node currentNode, String comment, String perm) Description copied from interface:IShareDocumentServiceShare a document to a space, permission of space's user also apply to this document.There is a symbolic link of origin document will create at Documents/Shared folder of destination space.
- Specified by:
publishDocumentToSpacein interfaceIShareDocumentService- Parameters:
space- destination space will share file incurrentNode- file will be sharedcomment- message attach with share activityperm- permission of destination space's member on origin node- Returns:
- return false if have issue
-
publishDocumentToSpace
public String publishDocumentToSpace(String space, javax.jcr.Node currentNode, String comment, String perm, Boolean postActivity) Description copied from interface:IShareDocumentServiceShare a document to a space, permission of space's user also apply to this document.There is a symbolic link of origin document will create at Documents/Shared folder of destination space.
- Specified by:
publishDocumentToSpacein interfaceIShareDocumentService- Parameters:
space- destination space will share file incurrentNode- file will be sharedcomment- message attach with share activityperm- permission of destination space's member on origin nodepostActivity- define post activity after sharing to a space or not- Returns:
- return false if have issue
-
publishDocumentToUser
public void publishDocumentToUser(String user, javax.jcr.Node currentNode, String comment, String perm) Description copied from interface:IShareDocumentServiceShare a document to a userThere is a symbolic link of origin document will be created at Private/Documents/Shared folder of destination user.
- Specified by:
publishDocumentToUserin interfaceIShareDocumentService- Parameters:
user- destination user to share file withcurrentNode- file will be sharedcomment- message attach with share activityperm- permission of destination space's member on origin node
-
unpublishDocumentToUser
public void unpublishDocumentToUser(String user, org.exoplatform.services.jcr.core.ExtendedNode node) Description copied from interface:IShareDocumentServiceUnshare a document to a userThe symbolic link of origin document will be removed from Private/Documents/Shared folder of destination user.
- Specified by:
unpublishDocumentToUserin interfaceIShareDocumentService- Parameters:
user- destination user to share file withnode- file will be shared
-
unpublishDocumentToSpace
public void unpublishDocumentToSpace(String space, org.exoplatform.services.jcr.core.ExtendedNode node) Description copied from interface:IShareDocumentServiceUnshare a document to a spaceThe symbolic link of origin document will be removed from Documents/Shared folder of destination space.
- Specified by:
unpublishDocumentToSpacein interfaceIShareDocumentService- Parameters:
space- destination user to share file withnode- file will be shared
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-