org.xcmis.spi
Interface RenditionProvider


public interface RenditionProvider

Version:
$Id: RenditionProvider.java 1220 2010-06-04 08:06:28Z andrew00x $
Author:
Andrey Parfonov

Method Summary
 int getHeight()
          Get rendition height.
 String getKind()
          Get rendition kind.
 MimeType getProducedMediaType()
          Get media type of produced rendition content stream
 RenditionContentStream getRenditionStream(ContentStream stream)
          Create content stream of rendition for specified object.
 MimeType[] getSupportedMediaType()
          Get a list of source media types supported by this provider.
 int getWidth()
          Get rendition width.
 

Method Detail

getRenditionStream

RenditionContentStream getRenditionStream(ContentStream stream)
                                          throws IOException
Create content stream of rendition for specified object.

Parameters:
stream - source stream
Returns:
rendition stream
Throws:
IOException - if any i/o error occurs

getSupportedMediaType

MimeType[] getSupportedMediaType()
Get a list of source media types supported by this provider. For example: [image/*] says provider is able to create renditions for all images.

Returns:
set of supported media types

getProducedMediaType

MimeType getProducedMediaType()
Get media type of produced rendition content stream

Returns:
produced content stream

getKind

String getKind()
Get rendition kind. At the moment just one expected kind 'cmis:thumbnail'.

Returns:
rendition kind

getHeight

int getHeight()
Get rendition height. It should provider height of thumbnail if rendition type is 'cmis:thumbnail'.

Returns:
rendition height or -1 if not able to determine height or rendition kind is not 'cmis:thumbnail

getWidth

int getWidth()
Get rendition width. It should provider width of thumbnail if rendition type is 'cmis:thumbnail'.

Returns:
rendition width or -1 if not able to determine width or rendition kind is not 'cmis:thumbnail


Copyright © 2010 eXo Platform SAS. All Rights Reserved.