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 java.lang.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 Constructor Description RenditionsImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, Rendition rendition, boolean executeAsync, Parameters parameters)Creates a rendition for the given node - either async r syncvoidcreateRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, Rendition rendition, boolean executeAsync, Parameters parameters)Creates a rendition for the given node - either async r syncvoidcreateRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, Rendition rendition, Parameters parameters)Creates a rendition for the given node asynchronously.voidcreateRenditions(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, java.util.List<Rendition> renditions, Parameters parameters)Creates renditions that don't already exist for the given node asynchronously.voidcreateRenditions(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.List<Rendition> renditions, Parameters parameters)Creates renditions that don't already exist for the given node asynchronously.BinaryResourcegetContent(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, java.lang.String renditionId, Parameters parameters)Downloads rendition.BinaryResourcegetContent(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String renditionId, Parameters parameters)Downloads rendition.BinaryResourcegetContentNoValidation(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, java.lang.String renditionId, Parameters parameters)Downloads rendition.BinaryResourcegetContentNoValidation(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String renditionId, Parameters parameters)Downloads rendition.RenditiongetRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, java.lang.String renditionId, Parameters parameters)Gets information about a rendition of a node in the repository.RenditiongetRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String renditionId, Parameters parameters)Gets information about a rendition of a node in the repository.protected org.alfresco.service.cmr.repository.NodeRefgetRenditionByName(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String renditionId, Parameters parameters)CollectionWithPagingInfo<Rendition>getRenditions(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, Parameters parameters)Lists all available renditions includes those that have been created and those that are yet to be created.CollectionWithPagingInfo<Rendition>getRenditions(org.alfresco.service.cmr.repository.NodeRef nodeRef, Parameters parameters)Lists all available renditions includes those that have been created and those that are yet to be created.voidinit()voidsetNodes(Nodes nodes)voidsetRenditionsDataCollector(RenditionsDataCollector renditionsDataCollector)voidsetRenditionService2(org.alfresco.repo.rendition2.RenditionService2 renditionService2)voidsetResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)voidsetScriptThumbnailService(org.alfresco.repo.thumbnail.script.ScriptThumbnailService scriptThumbnailService)voidsetServiceRegistry(org.alfresco.service.ServiceRegistry serviceRegistry)voidsetTenantService(org.alfresco.repo.tenant.TenantService tenantService)protected RenditiontoApiRendition(java.lang.String renditionName)protected RenditiontoApiRendition(org.alfresco.service.cmr.repository.NodeRef renditionNodeRef)
-
-
-
Method Detail
-
setNodes
public void setNodes(Nodes nodes)
-
setScriptThumbnailService
public void setScriptThumbnailService(org.alfresco.repo.thumbnail.script.ScriptThumbnailService scriptThumbnailService)
-
setServiceRegistry
public void setServiceRegistry(org.alfresco.service.ServiceRegistry serviceRegistry)
-
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
- Specified by:
setResourceLoaderin interfaceorg.springframework.context.ResourceLoaderAware
-
setTenantService
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
-
setRenditionService2
public void setRenditionService2(org.alfresco.repo.rendition2.RenditionService2 renditionService2)
-
setRenditionsDataCollector
public void setRenditionsDataCollector(RenditionsDataCollector renditionsDataCollector)
-
init
public void init()
-
getRenditions
public CollectionWithPagingInfo<Rendition> getRenditions(org.alfresco.service.cmr.repository.NodeRef nodeRef, 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 nodeRefparameters- theParametersobject to get the parameters passed into the request- Returns:
- the rendition results
-
getRenditions
public CollectionWithPagingInfo<Rendition> getRenditions(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.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
public Rendition getRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.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 noderenditionId- the rendition idparameters- theParametersobject to get the parameters passed into the request- Returns:
- the
Renditionobject
-
getRendition
public Rendition getRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, java.lang.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
public void createRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, Rendition rendition, Parameters parameters)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(org.alfresco.service.cmr.repository.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- theRenditionrequest
-
createRendition
public void createRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.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- theRenditionrequest
-
createRenditions
public void createRenditions(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.List<Rendition> renditions, Parameters parameters) throws NotFoundException, ConstraintViolatedExceptionDescription 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(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, java.util.List<Rendition> renditions, Parameters parameters) throws NotFoundException, ConstraintViolatedExceptionDescription 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.
-
getContent
public BinaryResource getContent(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String renditionId, Parameters parameters)
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(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, java.lang.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(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.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(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String versionLabelId, java.lang.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
-
getRenditionByName
protected org.alfresco.service.cmr.repository.NodeRef getRenditionByName(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String renditionId, Parameters parameters)
-
toApiRendition
protected Rendition toApiRendition(org.alfresco.service.cmr.repository.NodeRef renditionNodeRef)
-
toApiRendition
protected Rendition toApiRendition(java.lang.String renditionName)
-
-