Class QuickShareLinksImpl

java.lang.Object
org.alfresco.rest.api.impl.QuickShareLinksImpl
All Implemented Interfaces:
QuickShareLinks, RecognizedParamsExtractor, org.springframework.beans.factory.InitializingBean

public class QuickShareLinksImpl extends Object implements QuickShareLinks, RecognizedParamsExtractor, org.springframework.beans.factory.InitializingBean
Centralises access to shared link (public "quick share") services and maps between representations.
Since:
publicapi1.0
Author:
janv, Jamal Kaabi-Mofrad
  • Constructor Details

    • QuickShareLinksImpl

      public QuickShareLinksImpl()
  • Method Details

    • setServiceRegistry

      public void setServiceRegistry(ServiceRegistry sr)
    • setQuickShareService

      public void setQuickShareService(QuickShareService quickShareService)
    • setNodes

      public void setNodes(Nodes nodes)
    • setRenditions

      public void setRenditions(Renditions renditions)
    • setEnabled

      public void setEnabled(boolean enabled)
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • readById

      public QuickShareLink readById(String sharedId, Parameters parameters)
      Returns limited metadata regarding the shared (content) link.

      Note: does *not* require authenticated access for (public) shared link.

      Specified by:
      readById in interface QuickShareLinks
    • readProperty

      public BinaryResource readProperty(String sharedId, String renditionId, Parameters parameters) throws EntityNotFoundException
      Download content via shared link.

      Note: does *not* require authenticated access for (public) shared link.

      Specified by:
      readProperty in interface QuickShareLinks
      Parameters:
      sharedId -
      renditionId - - optional
      parameters - Parameters
      Returns:
      Throws:
      EntityNotFoundException
    • delete

      public void delete(String sharedId, Parameters parameters)
      Delete the shared link.

      Once deleted, the shared link will no longer exist hence get/download will no longer work (ie. return 404). If the link is later re-created then a new unique shared id will be generated.

      Requires authenticated access.

      Specified by:
      delete in interface QuickShareLinks
      Parameters:
      sharedId - String id of the quick share
    • create

      public List<QuickShareLink> create(List<QuickShareLink> nodeIds, Parameters parameters)
      Create quick share.

      Requires authenticated access.

      Specified by:
      create in interface QuickShareLinks
      Parameters:
      nodeIds -
      parameters -
      Returns:
    • emailSharedLink

      public void emailSharedLink(String sharedId, QuickShareLinkEmailRequest emailRequest, Parameters parameters)
      Description copied from interface: QuickShareLinks
      Notifies users by email that a content has been shared with them.
      Specified by:
      emailSharedLink in interface QuickShareLinks
      Parameters:
      sharedId - The string id of the quick share
      emailRequest - The email details including its template details
      parameters - The Parameters object to get the parameters passed into the request
    • getRendition

      public Rendition getRendition(String sharedId, String renditionId)
      Description copied from interface: QuickShareLinks
      Gets information about a rendition of a shared link.
      Specified by:
      getRendition in interface QuickShareLinks
      Returns:
      the Rendition object
    • getRenditions

      public CollectionWithPagingInfo<Rendition> getRenditions(String sharedId)
      Description copied from interface: QuickShareLinks
      List renditions info - note: only returns available (=> created) renditions. Note: does *not* require authenticated access for (public) shared link.
      Specified by:
      getRenditions in interface QuickShareLinks
      Returns:
    • findLinks

      public CollectionWithPagingInfo<QuickShareLink> findLinks(Parameters parameters)
      Description copied from interface: QuickShareLinks
      Find (search) for shared links visible to current user. Optionally filter by "sharedByUser/id" (if -me- then filter by current user).
      Specified by:
      findLinks in interface QuickShareLinks
      Returns: