Interface QuickShareService
-
- All Known Implementing Classes:
QuickShareServiceImpl
public interface QuickShareServiceThe QuickShare service. Responsible for creating, updating and retrieving Quick share metadata,- Since:
- Cloud/4.2
- Author:
- Alex Miller, janv
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanDeleteSharedLink(org.alfresco.service.cmr.repository.NodeRef nodeRef, String sharedByUserId)Determine if the current user has permission to delete the shared link.booleancanRead(String sharedId)Determine if the current user has permission to read the shared content.voiddeleteQuickShareLinkExpiryAction(QuickShareLinkExpiryAction quickShareLinkExpiryAction)Removes (hard deletes) the previously persistedQuickShareLinkExpiryActionand its related scheduleScheduledPersistedActionfrom the repository.Map<String,Object>getMetaData(String shareId)Get QuickShare related metadata for the given shareId.Map<String,Object>getMetaData(org.alfresco.service.cmr.repository.NodeRef nodeRef)Get QuickShare related metadata for the given node.org.alfresco.util.Pair<String,org.alfresco.service.cmr.repository.NodeRef>getTenantNodeRefFromSharedId(String sharedId)Get the tenant domain and node reference for the the given share id.booleanisQuickShareEnabled()Whether the quick share is enabled or not.voidsendEmailNotification(QuickShareServiceImpl.QuickShareEmailRequest emailRequest)Notifies users by email that a content has been shared with them, and the details of it.QuickShareDTOshareContent(org.alfresco.service.cmr.repository.NodeRef nodeRef)Share content identified by nodeRef.QuickShareDTOshareContent(org.alfresco.service.cmr.repository.NodeRef nodeRef, Date expiryDate)Share content identified by nodeRef and optionally set an expiry date for the shared link.voidunshareContent(String sharedId)Unshare the content identified by sharedId
-
-
-
Method Detail
-
shareContent
QuickShareDTO shareContent(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws QuickShareDisabledException, org.alfresco.service.cmr.repository.InvalidNodeRefException
Share content identified by nodeRef.- Parameters:
nodeRef- The NodeRef of the content to share- Returns:
- QuickDTO with details of the share
- Throws:
QuickShareDisabledExceptionorg.alfresco.service.cmr.repository.InvalidNodeRefException
-
shareContent
QuickShareDTO shareContent(org.alfresco.service.cmr.repository.NodeRef nodeRef, Date expiryDate) throws QuickShareDisabledException, org.alfresco.service.cmr.repository.InvalidNodeRefException
Share content identified by nodeRef and optionally set an expiry date for the shared link.- Parameters:
nodeRef- The NodeRef of the content to shareexpiryDate- The expiry date of the shared link- Returns:
- QuickDTO with details of the share
- Throws:
QuickShareDisabledExceptionorg.alfresco.service.cmr.repository.InvalidNodeRefException
-
getMetaData
Map<String,Object> getMetaData(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws QuickShareDisabledException, org.alfresco.service.cmr.repository.InvalidNodeRefException
Get QuickShare related metadata for the given node.- Parameters:
nodeRef- NodeRef- Returns:
- Map
- Throws:
QuickShareDisabledExceptionorg.alfresco.service.cmr.repository.InvalidNodeRefException
-
getMetaData
Map<String,Object> getMetaData(String shareId) throws QuickShareDisabledException, InvalidSharedIdException
Get QuickShare related metadata for the given shareId.- Parameters:
shareId- String- Returns:
- Map
- Throws:
QuickShareDisabledExceptionInvalidSharedIdException
-
getTenantNodeRefFromSharedId
org.alfresco.util.Pair<String,org.alfresco.service.cmr.repository.NodeRef> getTenantNodeRefFromSharedId(String sharedId) throws QuickShareDisabledException, InvalidSharedIdException
Get the tenant domain and node reference for the the given share id.- Parameters:
sharedId- String- Returns:
- Pair
- Throws:
QuickShareDisabledExceptionInvalidSharedIdException
-
unshareContent
void unshareContent(String sharedId) throws QuickShareDisabledException, InvalidSharedIdException
Unshare the content identified by sharedId- Parameters:
sharedId- The shared id of the content to unshare.- Throws:
QuickShareDisabledExceptionInvalidSharedIdException
-
canRead
boolean canRead(String sharedId)
Determine if the current user has permission to read the shared content.
-
sendEmailNotification
void sendEmailNotification(QuickShareServiceImpl.QuickShareEmailRequest emailRequest)
Notifies users by email that a content has been shared with them, and the details of it.- Parameters:
emailRequest- The email details including its template details
-
canDeleteSharedLink
boolean canDeleteSharedLink(org.alfresco.service.cmr.repository.NodeRef nodeRef, String sharedByUserId)Determine if the current user has permission to delete the shared link.
-
isQuickShareEnabled
boolean isQuickShareEnabled()
Whether the quick share is enabled or not.- Returns:
- true if quick share is enabled, false otherwise.
- Since:
- 5.2
-
deleteQuickShareLinkExpiryAction
void deleteQuickShareLinkExpiryAction(QuickShareLinkExpiryAction quickShareLinkExpiryAction)
Removes (hard deletes) the previously persistedQuickShareLinkExpiryActionand its related scheduleScheduledPersistedActionfrom the repository.- Parameters:
quickShareLinkExpiryAction- TheQuickShareLinkExpiryActionto be deleted.
-
-