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.extensions.digitalasset
Interface DigitalAssetResourceManagerPlugin

All Known Implementing Classes:
  AbstractDigitalAssetResourceManagerPlugin

    public interface DigitalAssetResourceManagerPlugin

DigitalAssetResourceManagerPlugin provides an interface for a given Digital Asset Manager that wishes to provide the management capabilities for files/images within WCM.

If a plugin is defined within the system and enabled, WCM will call to this plugin to retrieve digital asset and to associate/bind a WCM resource with a given DAM resource.

A DigitalAssetResourceManagerPlugin can be registered with WCM by using the Eclipse extension support and defining an extension point for the `com.ibm.workplace.wcm.api.extensions.DigitalAssetResourceManagerPlugin` extension.

Since:
  8.5.cf3

Method Summary
`boolean` | `canHandle(DigitalAssetID id)` Determines if this plugin supports/handles DigitalAssets associated with the provided DigitalAssetID.
`boolean` | `canHandle(java.lang.String digitalAssetID)` Determines if this plugin supports/handles DigitalAssets associated with the provided DigitalAssetID/selection token.
`DigitalAsset` | `consumeSelectedAsset(java.lang.String digitalAssetPath, DigitalAsset asset)` Consumes a selected asset.
`DigitalAssetID` | `createDigitalAssetID(DigitalAsset asset)` Creates a DigitalAssetID for the given DigitalAsset
`java.io.InputStream` | `getAssetInputStream(DigitalAsset asset)` Gets InputStrem to the given DigitalAsset.
`DigitalAssetResourceSerializer` | `getDigitalAssetResourceSerializer()` Serializer object to allow a DigitalAssetID and DigitalAssetMetaData to be serialized to and from Strings.
`java.lang.String` | `getName()` Provides the Name of the plugin
`java.lang.String` | `getProviderName()` Provides the Provider/Company name for the DAM
`java.lang.String` | `getRenderableDigitalAssetURLString(DigitalAsset da)` Return a URL or PoC URI string the asset represented by the provided DigitalAsset.
`java.lang.String` | `getRenderableRenditionNameString(java.lang.String rendPath)` Returns the short name of the rendition resource
`java.lang.String` | `getRenderableRenditionURLString(java.lang.String rendPath)` Returns the renditions URL.
`java.io.InputStream` | `getRenditionInputStream(java.lang.String renditionPath)` Gets InputStrem to the given Rendition.
`boolean` | `supportsInputStream()` Check if the provider supports InputStreams and the `getAssetInputStream(DigitalAsset)` method.
`boolean` | `supportsType(java.lang.Class<? extends Resource> resourceType)` Check if the provider supports the given resource type.

Method Detail

### getName

    java.lang.String getName()

  Provides the Name of the plugin

  Returns:
    name of the plugin

### getProviderName

    java.lang.String getProviderName()

  Provides the Provider/Company name for the DAM

  Returns:
    The Provider/Company name for the DAM

### getRenderableDigitalAssetURLString

    java.lang.String getRenderableDigitalAssetURLString(DigitalAsset da)

  Return a URL or PoC URI string the asset represented by the provided DigitalAsset. The URL/URI String is intended to be used with a src or href tag within rendered content

  For example, This URL/URI may be used in rendering the resource/asset in a IMG tag.

  Parameters:
    `da` - - the DigitalAsset of the asset WCM wishes to obtain the URL for.
  Returns:
    - URL/URI string the asset represented by the provided DigitalAsset.

### createDigitalAssetID

    DigitalAssetID createDigitalAssetID(DigitalAsset asset)

  Creates a DigitalAssetID for the given DigitalAsset

  Parameters:
    `asset` - - asset for which an ID is needed.
  Returns:
    the ID for the given DigitalAsset

### getAssetInputStream

    java.io.InputStream getAssetInputStream(DigitalAsset asset)
                                            throws DigitalAssetException,
                                                   PropertyRetrievalException

  Gets InputStrem to the given DigitalAsset. This method only returns an input stream if the provider does support input streams. Check with `supportsInputStream()` if the provider does support input streams.

  Parameters:
    `asset` - - DigitalAsset the InputStream is to be retrieved for
  Returns:
    InputStream to the asset
  Throws:
    `DigitalAssetException` - - thrown if any exception occurred getting the InputStream
    `PropertyRetrievalException` - if the file cannot be retrieved, or provider does not support input streams.

### consumeSelectedAsset

    DigitalAsset consumeSelectedAsset(java.lang.String digitalAssetPath,
                                      DigitalAsset asset)
                                      throws DigitalAssetException

  Consumes a selected asset. Depending on the DAM this may do nothing more than constructs a DigitalAsset for the given/selected file. If the DAM needs to prepare the selected file in any way this is where it may be done.

  The token parameter is the string provided by the chooser plugin when an asset is selected

  Parameters:
    `digitalAssetPath` - - selected path of a DigitalAsset
    `asset` - - the current DigitalAsset into which the selected asset should be consumed into.
  Returns:
    the DigitalAsset for the newly consumed/selected asset
  Throws:
    `DigitalAssetException` - - thrown if any exception occurred getting the InputStream

### canHandle

    boolean canHandle(DigitalAssetID id)

  Determines if this plugin supports/handles DigitalAssets associated with the provided DigitalAssetID. If this plugin supports the provided ID it should return true, otherwise it should return false

  Parameters:
    `id` - - DigitalAssetID associated with a DigitalAsset
  Returns:
    true if this plugin provides digitalAssets associated with the id provided.

### canHandle

    boolean canHandle(java.lang.String digitalAssetID)

  Determines if this plugin supports/handles DigitalAssets associated with the provided DigitalAssetID/selection token.

  The supplied `digitalAssetID` may be of 2 forms.

  1. The first is the serialized version of a DigitalAssetID. If this plugin returns true then its DigitalAssetResourceSerializer will be used to reconstruct the DigitalAssetID for the asset.
  2. The second is after a selection is made via a DigitalAssetChooser, the valued supplied in the digital_asset_token_id form field will be passed to a DigitalAssetResourceManagerPlugin looking to see which one can handle the selected Asset before calling consumeSelectedAsset on that plugin. If this plugin supports the provided ID it should return true, otherwise it should return false

  Parameters:
    `digitalAssetID` - the serialized ID or selectedToken to be checked
  Returns:
    true if this plugin provides digitalAssets associated with the id provided.

### getDigitalAssetResourceSerializer

    DigitalAssetResourceSerializer getDigitalAssetResourceSerializer()

  Serializer object to allow a DigitalAssetID and DigitalAssetMetaData to be serialized to and from Strings. The String/Serialized version of these objects are used to store the object within WCM repository

  Returns:
    a DigitalAssetResourceSerializer for serializing this plugins objects

### supportsType

    boolean supportsType(java.lang.Class<? extends Resource> resourceType)

  Check if the provider supports the given resource type. Some provider may only support a specific type, e.g. ImageComponent, other may support any resource.

  Parameters:
    `resourceType` - - the resource type to check for
  Returns:
    true, if the provider does support selecting a resouce of the given type.

### supportsInputStream

    boolean supportsInputStream()

  Check if the provider supports InputStreams and the `getAssetInputStream(DigitalAsset)` method.

  Returns:
    true, if the provider supports input streams.

### getRenditionInputStream

    java.io.InputStream getRenditionInputStream(java.lang.String renditionPath)

  Gets InputStrem to the given Rendition. This method only returns an input stream if the provider does support input streams. Check with `supportsInputStream()`

  Parameters:
    `renditionPath` - - Rendition the InputStream is to be retrieved
  Returns:
    InputStream to the rendition

### getRenderableRenditionURLString

    java.lang.String getRenderableRenditionURLString(java.lang.String rendPath)

  Returns the renditions URL.

  Parameters:
    `rendPath` - the DAM's path to the given rendition
  Returns:
    the rendition's URL.

### getRenderableRenditionNameString

    java.lang.String getRenderableRenditionNameString(java.lang.String rendPath)

  Returns the short name of the rendition resource

  Parameters:
    `rendPath` - the DAM's path to the given rendition
  Returns:
    the short name of the rendition resource

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