Interface QuickShareService

  • All Known Implementing Classes:
    QuickShareServiceImpl

    public interface QuickShareService
    The 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
      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.
      boolean canRead​(java.lang.String sharedId)
      Determine if the current user has permission to read the shared content.
      void deleteQuickShareLinkExpiryAction​(QuickShareLinkExpiryAction quickShareLinkExpiryAction)
      Removes (hard deletes) the previously persisted QuickShareLinkExpiryAction and its related schedule ScheduledPersistedAction from 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.
      boolean isQuickShareEnabled()
      Whether the quick share is enabled or not.
      void sendEmailNotification​(QuickShareServiceImpl.QuickShareEmailRequest emailRequest)
      Notifies users by email that a content has been shared with them, and the details of it.
      QuickShareDTO shareContent​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Share content identified by nodeRef.
      QuickShareDTO shareContent​(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.
      void unshareContent​(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:
        QuickShareDisabledException
        org.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 share
        expiryDate - The expiry date of the shared link
        Returns:
        QuickDTO with details of the share
        Throws:
        QuickShareDisabledException
        org.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.InvalidNodeRefException
        Get QuickShare related metadata for the given node.
        Parameters:
        nodeRef - NodeRef
        Returns:
        Map
        Throws:
        QuickShareDisabledException
        org.alfresco.service.cmr.repository.InvalidNodeRefException
      • 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