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, java.lang.String sharedByUserId)Determine if the current user has permission to delete the shared link.booleancanRead(java.lang.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.java.util.Map<java.lang.String,java.lang.Object>getMetaData(java.lang.String shareId)Get QuickShare related metadata for the given shareId.java.util.Map<java.lang.String,java.lang.Object>getMetaData(org.alfresco.service.cmr.repository.NodeRef nodeRef)Get QuickShare related metadata for the given node.org.alfresco.util.Pair<java.lang.String,org.alfresco.service.cmr.repository.NodeRef>getTenantNodeRefFromSharedId(java.lang.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, java.util.Date expiryDate)Share content identified by nodeRef and optionally set an expiry date for the shared link.voidunshareContent(java.lang.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, java.util.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
java.util.Map<java.lang.String,java.lang.Object> getMetaData(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws QuickShareDisabledException, org.alfresco.service.cmr.repository.InvalidNodeRefExceptionGet QuickShare related metadata for the given node.- Parameters:
nodeRef- NodeRef- Returns:
- Map
- Throws:
QuickShareDisabledExceptionorg.alfresco.service.cmr.repository.InvalidNodeRefException
-
getMetaData
java.util.Map<java.lang.String,java.lang.Object> getMetaData(java.lang.String shareId) throws QuickShareDisabledException, InvalidSharedIdExceptionGet QuickShare related metadata for the given shareId.- Parameters:
shareId- String- Returns:
- Map
- Throws:
QuickShareDisabledExceptionInvalidSharedIdException
-
getTenantNodeRefFromSharedId
org.alfresco.util.Pair<java.lang.String,org.alfresco.service.cmr.repository.NodeRef> getTenantNodeRefFromSharedId(java.lang.String sharedId) throws QuickShareDisabledException, InvalidSharedIdExceptionGet the tenant domain and node reference for the the given share id.- Parameters:
sharedId- String- Returns:
- Pair
- Throws:
QuickShareDisabledExceptionInvalidSharedIdException
-
unshareContent
void unshareContent(java.lang.String sharedId) throws QuickShareDisabledException, InvalidSharedIdExceptionUnshare the content identified by sharedId- Parameters:
sharedId- The shared id of the content to unshare.- Throws:
QuickShareDisabledExceptionInvalidSharedIdException
-
canRead
boolean canRead(java.lang.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, java.lang.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.
-
-