@ConsumerType public interface RenditionHandler
RenditionHandler
interface defines the API for rendition handlers. Each RenditionHandler
must be identifiable via a unique ID 'rendition.handler.id'.
RenditionHandler is used by the Asset API to delegate Access, Creation & Deletion of Rendition
.
Implementations of this interface must be registered as OSGi services.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_ID
PROPERTY_ID must be set by the implementation class as an OSGi service property
This is used by the Asset API to identify RenditionHandler
|
static java.lang.String |
PROPERTY_RENDITION_MIME_TYPE
This property constant defines a property key for the mime type.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteRendition(Resource resource)
Delete the rendition resource.
|
Rendition |
getRendition(Resource resource)
Get Rendition.
|
Rendition |
setRendition(Resource resource,
java.io.InputStream is,
java.util.Map<java.lang.String,java.lang.Object> map)
Set
Rendition . |
static final java.lang.String PROPERTY_ID
static final java.lang.String PROPERTY_RENDITION_MIME_TYPE
RenditionHandler
or the API clients to define the mime type of the Rendition
For example, if the rendition handler requires mime type: final Map<String, Object> map = new HashMap<String, Object>(); map.put(RenditionHandler.PROPERTY_RENDITION_MIME_TYPE, "image/gif"); .... asset.setRendition("image.gif", InputStream, map);
Rendition getRendition(Resource resource)
Resource
to Rendition.resource
- Rendition resourceRendition setRendition(Resource resource, java.io.InputStream is, java.util.Map<java.lang.String,java.lang.Object> map)
Rendition
. Implementations are free to define Resource data structure.resource
- Rendition resourceis
- InputStream to create the rendition binary or nullmap
- containing values needed by this handler.AssetException
- if Rendition cannot be setvoid deleteRendition(Resource resource)
resource
- To be deletedAssetException
- if Rendition cannot be deletedCopyright © 2010 - 2020 Adobe. All Rights Reserved