Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.workplace.wcm.api
Interface RenditionCapability

All Known Subinterfaces:
  FileComponent, ImageComponent, LibraryFileComponent, LibraryImageComponent

    public interface RenditionCapability

Interface representing capability of storing renditions. Renditions are different versions of an resource. Examples are thumbnails or smaller versions of the image for mobile devices. The image rendition is part of the encapsulating resource (has the same UUID), but can be addressed by a unique URL.

Since:
  8.5.cf3

Method Summary
`Rendition` | `createRendition(java.lang.String renditionName, java.lang.String resourceName, byte[] resourceBytes)` Create a new rendition and add it to this Resource.
`Rendition` | `createRendition(java.lang.String renditionName, java.lang.String resourceName, java.io.File resourceFile)` Create a new rendition and add it to this Resource.
`Rendition` | `getRendition(java.lang.String renditionName)` Get rendition with the given name.
`java.util.List<Rendition>` | `getRenditions()` Get a list of all renditions defined for this resource.
`void` | `removeRendition(java.lang.String renditionName)` Remove renditions with the given resource name.

Method Detail

### getRenditions

    java.util.List<Rendition> getRenditions()

  Get a list of all renditions defined for this resource.

  Returns:
    list of all renditions, or empty list if none exist

### createRendition

    Rendition createRendition(java.lang.String renditionName,
                              java.lang.String resourceName,
                              byte[] resourceBytes)
                              throws OperationFailedException,
                                     java.lang.IllegalArgumentException

  Create a new rendition and add it to this Resource.

  Parameters:
    `renditionName` - the new rendition name, must not be `null`.
    `resourceName` - the new rendition resource name, must not be `null`.
    `resourceBytes` - the content of the resource file as a byte array, , must not be `null`.
  Returns:
    newly created rendition
  Throws:
    `OperationFailedException` - if the resource file could not be set
    `java.lang.IllegalArgumentException` - If a rendition with the given Resource Name already exists, or the name is `null`.

### createRendition

    Rendition createRendition(java.lang.String renditionName,
                              java.lang.String resourceName,
                              java.io.File resourceFile)
                              throws OperationFailedException,
                                     java.lang.IllegalArgumentException

  Create a new rendition and add it to this Resource. This method consumes less memory then setting the entire byte array of the resource.

  Parameters:
    `renditionName` - the new rendition name, must not be `null`.
    `resourceName` - the new rendition resource name, must not be `null`.
    `resourceFile` - the contents of the resource as a file on the file system, must not be `null`.
  Returns:
    newly created rendition
  Throws:
    `OperationFailedException` - if the resource file could not be set
    `java.lang.IllegalArgumentException` - If a rendition with the given Resource Name already exists, or the name is `null`.

### getRendition

    Rendition getRendition(java.lang.String renditionName)
                           throws java.lang.IllegalArgumentException

  Get rendition with the given name.

  Parameters:
    `renditionName` - the name of the rendition, must not be `null`.
  Returns:
    the rendition, or `null` if a rendition with the given name was not found.
  Throws:
    `java.lang.IllegalArgumentException` - If the name is `null`.

### removeRendition

    void removeRendition(java.lang.String renditionName)
                         throws java.lang.IllegalArgumentException

  Remove renditions with the given resource name. In order to replace a rendition the rendition to be replaced needs to be removed and the new rendition needs to be added.

  Parameters:
    `renditionName` - name of the rendition to be removed.
  Throws:
    `java.lang.IllegalArgumentException` - If rendition with the given Resource name does not exist

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD