Package org.alfresco.rest.requests
Class SharedLinks
- java.lang.Object
-
- org.alfresco.rest.requests.ModelRequest<SharedLinks>
-
- org.alfresco.rest.requests.SharedLinks
-
public class SharedLinks extends ModelRequest<SharedLinks>
Declares all Rest API under the /shared-links path- Author:
- Meenal Bhave
-
-
Field Summary
-
Fields inherited from class org.alfresco.rest.requests.ModelRequest
restWrapper
-
-
Constructor Summary
Constructors Constructor Description SharedLinks(RestWrapper restWrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RestSharedLinksModelcreateSharedLink(org.alfresco.utility.model.FileModel file)Creates SharedLink for the specified fileRestSharedLinksModelCollectioncreateSharedLinks(org.alfresco.utility.model.FileModel... files)Creates SharedLink for all the specified filesRestSharedLinksModelcreateSharedLinkWithExpiryDate(org.alfresco.utility.model.FileModel file, java.lang.String expiryDate)Creates SharedLink for the specified file, with the given expiry datevoiddeleteSharedLink(RestSharedLinksModel sharedLinksModel)Removes SharedLink for the specified file, the sharedlink is deleted, file is unshared as a resultRestSharedLinksModelgetSharedLink(RestSharedLinksModel sharedLinksModel)Retrieve details for a specific sharedLink using GET call on "shared-links/{sharedLinkId}"RestResponsegetSharedLinkContent(RestSharedLinksModel sharedLinksModel)Retrieve content for a specific sharedLink using GET call on "shared-links/{sharedLinkId}/content"RestRenditionInfoModelgetSharedLinkRendition(RestSharedLinksModel sharedLinksModel, java.lang.String renditionId)Retrieves specific Rendition for the specified sharedLinkRestResponsegetSharedLinkRenditionContent(RestSharedLinksModel sharedLinksModel, java.lang.String renditionId)Retrieve rendition content for the specified sharedLink using GET call on "shared-links/{sharedLinkId}/renditions/{renditionId}/content"RestRenditionInfoModelCollectiongetSharedLinkRenditions(RestSharedLinksModel sharedLinksModel)Retrieves Renditions for the specified sharedLinkRestSharedLinksModelCollectiongetSharedLinks()Retrieve sharedLinks using GET call on /shared-linksRestResponsesendSharedLinkEmail(RestSharedLinksModel sharedLinksModel, java.lang.String postBody)Send email with a specific sharedLink using POST call on "shared-links/{sharedLinkId}/email"-
Methods inherited from class org.alfresco.rest.requests.ModelRequest
includePath, usingParams
-
-
-
-
Constructor Detail
-
SharedLinks
public SharedLinks(RestWrapper restWrapper)
-
-
Method Detail
-
getSharedLinks
public RestSharedLinksModelCollection getSharedLinks() throws java.lang.Exception
Retrieve sharedLinks using GET call on /shared-links- Returns:
- RestSharedLinksModelCollection
- Throws:
JsonToModelConversionExceptionjava.lang.Exception
-
getSharedLink
public RestSharedLinksModel getSharedLink(RestSharedLinksModel sharedLinksModel) throws java.lang.Exception
Retrieve details for a specific sharedLink using GET call on "shared-links/{sharedLinkId}"- Parameters:
sharedLinksModel-- Returns:
- RestSharedLinkModel
- Throws:
JsonToModelConversionExceptionjava.lang.Exception
-
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
-
getSharedLinkRenditions
public RestRenditionInfoModelCollection getSharedLinkRenditions(RestSharedLinksModel sharedLinksModel) throws java.lang.Exception
Retrieves Renditions for the specified sharedLink- Returns:
- RestRenditionInfoModelCollection
- Throws:
JsonToModelConversionExceptionjava.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:
JsonToModelConversionExceptionjava.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
-
-