Package com.day.cq.dam.api
Interface Rendition
-
@ProviderType public interface Rendition extends Resource
TheRenditioninterface specifies the handling of anAsset's rendition. Renditions are based on the renditions found in the asset's rendition folder (./jcr:content/renditions). Such renditions are based on nodes of typent:file.
-
-
Field Summary
-
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AssetgetAsset()Returns this rendition's parent Asset.BinarygetBinary()Returns theBinaryof this rendition.java.lang.StringgetMimeType()Returns the mime type of the rendition's binary, as denoted by itsjcr:mimeTypeproperty.java.lang.StringgetName()Returns the name of the rendition.java.lang.StringgetPath()Returns the path of the rendition, e.g.ValueMapgetProperties()Returns theValueMapof the rendition's underlying ./jcr:content node.longgetSize()Returns the size in bytes of the rendition's binary.java.io.InputStreamgetStream()Returns theInputStreamrepresenting the binary of this rendition.-
Methods inherited from interface org.apache.sling.api.resource.Resource
getChild, getChildren, getParent, getResourceMetadata, getResourceResolver, getResourceSuperType, getResourceType, getValueMap, hasChildren, isResourceType, listChildren
-
-
-
-
Method Detail
-
getMimeType
java.lang.String getMimeType()
Returns the mime type of the rendition's binary, as denoted by itsjcr:mimeTypeproperty.- Returns:
- The mime type of the rendition's binary.
-
getName
java.lang.String getName()
Returns the name of the rendition. The name corresponds to the node name underlying the rendition, e.g. ./jcr:content/renditions/myrendition gives a name of myrendition
-
getPath
java.lang.String getPath()
Returns the path of the rendition, e.g. /content/dam/myasset/jcr:content/renditions/myrendition.
-
getProperties
ValueMap getProperties()
Returns theValueMapof the rendition's underlying ./jcr:content node.- Returns:
- The content properties.
-
getSize
long getSize()
Returns the size in bytes of the rendition's binary.- Returns:
- The size.
-
getStream
java.io.InputStream getStream()
Returns theInputStreamrepresenting the binary of this rendition. Alternatively the stream can be obtained by adapting the rendition:... final Rendition rendition = asset.getRendition("myrendition"); final InputStream stream = rendition.adaptTo(InputStream.class); ...- Returns:
- The input stream of the rendition's binary, or
nullif the binary is not found.
-
getBinary
Binary getBinary()
Returns theBinaryof this rendition.- Returns:
- The rendition's binary, or
nullif the binary is not found.
-
-