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
-
-
Field Summary
-
Fields inherited from interface org.alfresco.rest.api.Renditions
PARAM_STATUS
-
-
Constructor Summary
Constructors Constructor Description RenditionsImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, Rendition rendition, boolean executeAsync, Parameters parameters)
Creates a rendition for the given node - either async r syncvoid
createRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, Rendition rendition, Parameters parameters)
Creates a rendition for the given node asynchronously.BinaryResource
getContent(org.alfresco.service.cmr.repository.NodeRef nodeRef, String renditionId, Parameters parameters)
Downloads rendition.BinaryResource
getContentNoValidation(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, String renditionId, Parameters parameters)
Downloads rendition.Rendition
getRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, String renditionId, Parameters parameters)
Gets information about a rendition of a node in the repository.protected org.alfresco.service.cmr.repository.NodeRef
getRenditionByName(org.alfresco.service.cmr.repository.NodeRef nodeRef, String renditionId, Parameters parameters)
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.void
init()
void
setNodes(Nodes nodes)
void
setRenditionsDataCollector(RenditionsDataCollector renditionsDataCollector)
void
setRenditionService2(org.alfresco.repo.rendition2.RenditionService2 renditionService2)
void
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
void
setScriptThumbnailService(org.alfresco.repo.thumbnail.script.ScriptThumbnailService scriptThumbnailService)
void
setServiceRegistry(org.alfresco.service.ServiceRegistry serviceRegistry)
void
setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
protected Rendition
toApiRendition(String renditionName)
protected Rendition
toApiRendition(org.alfresco.service.cmr.repository.NodeRef renditionNodeRef)
org.alfresco.service.cmr.repository.NodeRef
validateNode(org.alfresco.service.cmr.repository.StoreRef storeRef, String nodeId)
-
-
-
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:
setResourceLoader
in 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:Renditions
Lists all available renditions includes those that have been created and those that are yet to be created.- Specified by:
getRenditions
in interfaceRenditions
parameters
- theParameters
object to get the parameters passed into the request- Returns:
- the rendition results
-
getRendition
public Rendition getRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, String renditionId, Parameters parameters)
Description copied from interface:Renditions
Gets information about a rendition of a node in the repository. If there is no rendition, then returns the available/registered rendition.- Specified by:
getRendition
in interfaceRenditions
renditionId
- the rendition idparameters
- theParameters
object to get the parameters passed into the request- Returns:
- the
Rendition
object
-
createRendition
public void createRendition(org.alfresco.service.cmr.repository.NodeRef nodeRef, Rendition rendition, Parameters parameters)
Description copied from interface:Renditions
Creates a rendition for the given node asynchronously.- Specified by:
createRendition
in interfaceRenditions
rendition
- theRendition
requestparameters
- theParameters
object 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:Renditions
Creates a rendition for the given node - either async r sync- Specified by:
createRendition
in interfaceRenditions
-
getContent
public BinaryResource getContent(org.alfresco.service.cmr.repository.NodeRef nodeRef, String renditionId, Parameters parameters)
Description copied from interface:Renditions
Downloads rendition.- Specified by:
getContent
in interfaceRenditions
- Parameters:
nodeRef
- the source nodeRefrenditionId
- the rendition idparameters
- theParameters
object to get the parameters passed into the request- Returns:
- the rendition stream
-
getContentNoValidation
public BinaryResource getContentNoValidation(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, String renditionId, Parameters parameters)
Description copied from interface:Renditions
Downloads rendition.- Specified by:
getContentNoValidation
in interfaceRenditions
- Parameters:
sourceNodeRef
- the source nodeRefrenditionId
- the rendition idparameters
- theParameters
object 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, String renditionId, Parameters parameters)
-
toApiRendition
protected Rendition toApiRendition(org.alfresco.service.cmr.repository.NodeRef renditionNodeRef)
-
validateNode
public org.alfresco.service.cmr.repository.NodeRef validateNode(org.alfresco.service.cmr.repository.StoreRef storeRef, String nodeId)
-
-