Package org.alfresco.rest.api.impl
Class RenditionsImpl
java.lang.Object
org.alfresco.rest.api.impl.RenditionsImpl
- All Implemented Interfaces:
Renditions,org.springframework.beans.factory.Aware,org.springframework.context.ResourceLoaderAware
public class RenditionsImpl
extends Object
implements Renditions, org.springframework.context.ResourceLoaderAware
- Author:
- Jamal Kaabi-Mofrad, janv
-
Field Summary
Fields inherited from interface org.alfresco.rest.api.Renditions
PARAM_ATTACHMENT, PARAM_PLACEHOLDER, PARAM_STATUS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateRendition(NodeRef nodeRef, String versionLabelId, Rendition rendition, boolean executeAsync, Parameters parameters) Creates a rendition for the given node - either async r syncvoidcreateRendition(NodeRef nodeRef, Rendition rendition, boolean executeAsync, Parameters parameters) Creates a rendition for the given node - either async r syncvoidcreateRendition(NodeRef nodeRef, Rendition rendition, Parameters parameters) Creates a rendition for the given node asynchronously.voidcreateRenditions(NodeRef nodeRef, String versionLabelId, List<Rendition> renditions, Parameters parameters) Creates renditions that don't already exist for the given node asynchronously.voidcreateRenditions(NodeRef nodeRef, List<Rendition> renditions, Parameters parameters) Creates renditions that don't already exist for the given node asynchronously.voiddeleteRendition(NodeRef nodeRef, String versionId, String renditionId, Parameters parameters) Delete the rendition node.voiddeleteRendition(NodeRef nodeRef, String renditionId, Parameters parameters) Delete the rendition node.getContent(NodeRef nodeRef, String versionLabelId, String renditionId, Parameters parameters) Downloads rendition.getContent(NodeRef nodeRef, String renditionId, Parameters parameters) Downloads rendition.getContentNoValidation(NodeRef nodeRef, String versionLabelId, String renditionId, Parameters parameters) Downloads rendition.getContentNoValidation(NodeRef nodeRef, String renditionId, Parameters parameters) Downloads rendition.getRendition(NodeRef nodeRef, String versionLabelId, String renditionId, Parameters parameters) Gets information about a rendition of a node in the repository.getRendition(NodeRef nodeRef, String renditionId, Parameters parameters) Gets information about a rendition of a node in the repository.protected NodeRefgetRenditionByName(NodeRef nodeRef, String renditionId, Parameters parameters) getRenditions(NodeRef nodeRef, String versionLabelId, Parameters parameters) Lists all available renditions includes those that have been created and those that are yet to be created.getRenditions(NodeRef nodeRef, Parameters parameters) Lists all available renditions includes those that have been created and those that are yet to be created.voidinit()requestContentDirectUrl(NodeRef nodeRef, String versionId, String renditionId, boolean attachment, Long validFor, String fileName) Gets a presigned URL to directly access content.voidvoidsetRenditionsDataCollector(RenditionsDataCollector renditionsDataCollector) voidsetRenditionService2(RenditionService2 renditionService2) voidsetResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) voidsetScriptThumbnailService(ScriptThumbnailService scriptThumbnailService) voidsetServiceRegistry(ServiceRegistry serviceRegistry) voidsetTenantService(TenantService tenantService) protected RenditiontoApiRendition(String renditionName) protected RenditiontoApiRendition(NodeRef renditionNodeRef) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.rest.api.Renditions
requestContentDirectUrl, requestContentDirectUrl, requestContentDirectUrl, requestContentDirectUrl
-
Constructor Details
-
RenditionsImpl
public RenditionsImpl()
-
-
Method Details
-
setNodes
-
setScriptThumbnailService
-
setServiceRegistry
-
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) - Specified by:
setResourceLoaderin interfaceorg.springframework.context.ResourceLoaderAware
-
setTenantService
-
setRenditionService2
-
setRenditionsDataCollector
-
init
public void init() -
getRenditions
Description copied from interface:RenditionsLists all available renditions includes those that have been created and those that are yet to be created.- Specified by:
getRenditionsin interfaceRenditions- Parameters:
nodeRef- the source/live nodeRefparameters- theParametersobject to get the parameters passed into the request- Returns:
- the rendition results
-
getRenditions
public CollectionWithPagingInfo<Rendition> getRenditions(NodeRef nodeRef, String versionLabelId, Parameters parameters) Description copied from interface:RenditionsLists all available renditions includes those that have been created and those that are yet to be created.- Specified by:
getRenditionsin interfaceRenditions- Parameters:
nodeRef- the source/live nodeRefversionLabelId- the version id (aka version label)parameters- theParametersobject to get the parameters passed into the request- Returns:
- the rendition results
-
getRendition
Description copied from interface:RenditionsGets information about a rendition of a node in the repository. If there is no rendition, then returns the available/registered rendition.- Specified by:
getRenditionin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live noderenditionId- the rendition idparameters- theParametersobject to get the parameters passed into the request- Returns:
- the
Renditionobject
-
getRendition
public Rendition getRendition(NodeRef nodeRef, String versionLabelId, String renditionId, Parameters parameters) Description copied from interface:RenditionsGets information about a rendition of a node in the repository. If there is no rendition, then returns the available/registered rendition.- Specified by:
getRenditionin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live nodeversionLabelId- the version id (aka version label)renditionId- the rendition idparameters- theParametersobject to get the parameters passed into the request- Returns:
- the
Renditionobject
-
createRendition
Description copied from interface:RenditionsCreates a rendition for the given node asynchronously.- Specified by:
createRenditionin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live noderendition- theRenditionrequestparameters- theParametersobject to get the parameters passed into the request
-
createRendition
public void createRendition(NodeRef nodeRef, Rendition rendition, boolean executeAsync, Parameters parameters) Description copied from interface:RenditionsCreates a rendition for the given node - either async r sync- Specified by:
createRenditionin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live noderendition- theRenditionrequestexecuteAsync-parameters-
-
createRendition
public void createRendition(NodeRef nodeRef, String versionLabelId, Rendition rendition, boolean executeAsync, Parameters parameters) Description copied from interface:RenditionsCreates a rendition for the given node - either async r sync- Specified by:
createRenditionin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live nodeversionLabelId- the version id (aka version label)rendition- theRenditionrequestexecuteAsync-parameters-
-
createRenditions
public void createRenditions(NodeRef nodeRef, List<Rendition> renditions, Parameters parameters) throws NotFoundException, ConstraintViolatedException Description copied from interface:RenditionsCreates renditions that don't already exist for the given node asynchronously.- Specified by:
createRenditionsin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live noderenditions- the list ofRenditionrequestsparameters- theParametersobject to get the parameters passed into the request- Throws:
NotFoundException- if any of the rendition id do not exist.ConstraintViolatedException- if all of the renditions already exist.
-
createRenditions
public void createRenditions(NodeRef nodeRef, String versionLabelId, List<Rendition> renditions, Parameters parameters) throws NotFoundException, ConstraintViolatedException Description copied from interface:RenditionsCreates renditions that don't already exist for the given node asynchronously.- Specified by:
createRenditionsin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live nodeversionLabelId- the version id (aka version label)renditions- the list ofRenditionrequestsparameters- theParametersobject to get the parameters passed into the request- Throws:
NotFoundException- if any of the rendition id do not exist.ConstraintViolatedException- if all of the renditions already exist.
-
deleteRendition
Description copied from interface:RenditionsDelete the rendition node.- Specified by:
deleteRenditionin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live noderenditionId- the rendition idparameters- theParametersobject to get the parameters passed into the request
-
deleteRendition
public void deleteRendition(NodeRef nodeRef, String versionId, String renditionId, Parameters parameters) Description copied from interface:RenditionsDelete the rendition node.- Specified by:
deleteRenditionin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live nodeversionId- the version id (aka version label)renditionId- the rendition idparameters- theParametersobject to get the parameters passed into the request
-
getContent
Description copied from interface:RenditionsDownloads rendition.- Specified by:
getContentin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live noderenditionId- the rendition idparameters- theParametersobject to get the parameters passed into the request- Returns:
- the rendition stream
-
getContent
public BinaryResource getContent(NodeRef nodeRef, String versionLabelId, String renditionId, Parameters parameters) Description copied from interface:RenditionsDownloads rendition.- Specified by:
getContentin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live nodeversionLabelId- the version id (aka version label)renditionId- the rendition idparameters- theParametersobject to get the parameters passed into the request- Returns:
- the rendition stream
-
getContentNoValidation
public BinaryResource getContentNoValidation(NodeRef nodeRef, String renditionId, Parameters parameters) Description copied from interface:RenditionsDownloads rendition.- Specified by:
getContentNoValidationin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live noderenditionId- the rendition idparameters- theParametersobject to get the parameters passed into the request- Returns:
- the rendition stream
-
getContentNoValidation
public BinaryResource getContentNoValidation(NodeRef nodeRef, String versionLabelId, String renditionId, Parameters parameters) Description copied from interface:RenditionsDownloads rendition.- Specified by:
getContentNoValidationin interfaceRenditions- Parameters:
nodeRef- the source nodeRef, ie. live nodeversionLabelId- the version id (aka version label)renditionId- the rendition idparameters- theParametersobject to get the parameters passed into the request- Returns:
- the rendition stream
-
requestContentDirectUrl
public DirectAccessUrl requestContentDirectUrl(NodeRef nodeRef, String versionId, String renditionId, boolean attachment, Long validFor, String fileName) Gets a presigned URL to directly access content.- Specified by:
requestContentDirectUrlin interfaceRenditions- Parameters:
nodeRef- the node reference for which to obtain the direct accessURLversionId- the version id (aka version label)renditionId- the rendition idattachment-trueif an attachmentURLis requested,falsefor an embeddedURLvalidFor- the time at which the direct accessURLwill expirefileName- optional name for the file when downloaded- Returns:
- a direct access
URLobject for the content.
-
getRenditionByName
-
toApiRendition
-
toApiRendition
-