Class SharedLinks


  • public class SharedLinks
    extends ModelRequest<SharedLinks>
    Declares all Rest API under the /shared-links path
    Author:
    Meenal Bhave
    • Constructor Detail

      • SharedLinks

        public SharedLinks​(RestWrapper restWrapper)
    • Method Detail

      • getSharedLinkContent

        public RestResponse getSharedLinkContent​(RestSharedLinksModel sharedLinksModel)
                                          throws java.lang.Exception
        Retrieve content for a specific sharedLink using GET call on "shared-links/{sharedLinkId}/content"
        Parameters:
        sharedLinksModel -
        Returns:
        RestResponse
        Throws:
        java.lang.Exception
      • sendSharedLinkEmail

        public RestResponse sendSharedLinkEmail​(RestSharedLinksModel sharedLinksModel,
                                                java.lang.String postBody)
                                         throws java.lang.Exception
        Send email with a specific sharedLink using POST call on "shared-links/{sharedLinkId}/email"
        Parameters:
        sharedLinksModel -
        postBody -
        Returns:
        RestResponse
        Throws:
        java.lang.Exception
      • getSharedLinkRendition

        public RestRenditionInfoModel getSharedLinkRendition​(RestSharedLinksModel sharedLinksModel,
                                                             java.lang.String renditionId)
                                                      throws java.lang.Exception
        Retrieves specific Rendition for the specified sharedLink
        Parameters:
        sharedLinksModel -
        renditionId -
        Returns:
        RestRenditionInfoModel
        Throws:
        JsonToModelConversionException
        java.lang.Exception
      • getSharedLinkRenditionContent

        public RestResponse getSharedLinkRenditionContent​(RestSharedLinksModel sharedLinksModel,
                                                          java.lang.String renditionId)
                                                   throws java.lang.Exception
        Retrieve rendition content for the specified sharedLink using GET call on "shared-links/{sharedLinkId}/renditions/{renditionId}/content"
        Parameters:
        sharedLinksModel -
        renditionId -
        Returns:
        RestRenditionInfoModel
        Throws:
        java.lang.Exception
      • deleteSharedLink

        public void deleteSharedLink​(RestSharedLinksModel sharedLinksModel)
                              throws java.lang.Exception
        Removes SharedLink for the specified file, the sharedlink is deleted, file is unshared as a result
        Parameters:
        RestSharedLinksModel -
        Throws:
        java.lang.Exception
      • createSharedLink

        public RestSharedLinksModel createSharedLink​(org.alfresco.utility.model.FileModel file)
                                              throws java.lang.Exception
        Creates SharedLink for the specified file
        Parameters:
        file -
        Returns:
        RestSharedLinksModel
        Throws:
        java.lang.Exception
      • createSharedLinks

        public RestSharedLinksModelCollection createSharedLinks​(org.alfresco.utility.model.FileModel... files)
                                                         throws java.lang.Exception
        Creates SharedLink for all the specified files
        Parameters:
        file - list
        Returns:
        RestSharedLinksModelCollection
        Throws:
        java.lang.Exception
      • createSharedLinkWithExpiryDate

        public RestSharedLinksModel createSharedLinkWithExpiryDate​(org.alfresco.utility.model.FileModel file,
                                                                   java.lang.String expiryDate)
                                                            throws java.lang.Exception
        Creates SharedLink for the specified file, with the given expiry date
        Parameters:
        file -
        expiryDate - : format: "2027-03-23T23:00:00.000+0000";
        Returns:
        RestSharedLinksModel
        Throws:
        java.lang.Exception