com.ibm.workplace.wcm.api.extensions.digitalasset
Class AbstractDigitalAssetResourceManagerPlugin

java.lang.Object
  extended by com.ibm.workplace.wcm.api.extensions.digitalasset.AbstractDigitalAssetResourceManagerPlugin
All Implemented Interfaces:
DigitalAssetResourceManagerPlugin

public abstract class AbstractDigitalAssetResourceManagerPlugin
extends java.lang.Object
implements DigitalAssetResourceManagerPlugin

Abstract helper class that implements the methods with default returns or exceptions as not implemented.

Since:
8.5.cf3

Constructor Summary
AbstractDigitalAssetResourceManagerPlugin()
           
 
Method Summary
 DigitalAsset consumeSelectedAsset(java.lang.String arg0, DigitalAsset asset)
          Consumes a selected asset.
 java.io.InputStream getAssetInputStream(DigitalAsset arg0)
          Gets InputStrem to the given DigitalAsset.
 DigitalAssetResourceSerializer getDigitalAssetResourceSerializer()
          Serializer object to allow a DigitalAssetID and DigitalAssetMetaData to be serialized to and from Strings.
 boolean supportsInputStream()
          Check if the provider supports InputStreams and the DigitalAssetResourceManagerPlugin.getAssetInputStream(DigitalAsset) method.
 boolean supportsType(java.lang.Class<? extends Resource> resourceType)
          Check if the provider supports the given resource type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.workplace.wcm.api.extensions.digitalasset.DigitalAssetResourceManagerPlugin
canHandle, canHandle, createDigitalAssetID, getName, getProviderName, getRenderableDigitalAssetURLString, getRenderableRenditionNameString, getRenderableRenditionURLString, getRenditionInputStream
 

Constructor Detail

AbstractDigitalAssetResourceManagerPlugin

public AbstractDigitalAssetResourceManagerPlugin()
Method Detail

consumeSelectedAsset

public DigitalAsset consumeSelectedAsset(java.lang.String arg0,
                                         DigitalAsset asset)
                                  throws DigitalAssetException
Description copied from interface: DigitalAssetResourceManagerPlugin
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

Specified by:
consumeSelectedAsset in interface DigitalAssetResourceManagerPlugin
Parameters:
arg0 - - 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

getAssetInputStream

public java.io.InputStream getAssetInputStream(DigitalAsset arg0)
                                        throws DigitalAssetException,
                                               com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Description copied from interface: DigitalAssetResourceManagerPlugin
Gets InputStrem to the given DigitalAsset. This method only returns an input stream if the provider does support input streams. Check with DigitalAssetResourceManagerPlugin.supportsInputStream() if the provider does support input streams.

Specified by:
getAssetInputStream in interface DigitalAssetResourceManagerPlugin
Parameters:
arg0 - - DigitalAsset the InputStream is to be retrieved for
Returns:
InputStream to the asset
Throws:
DigitalAssetException - - thrown if any exception occurred getting the InputStream
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if the file cannot be retrieved, or provider does not support input streams.

getDigitalAssetResourceSerializer

public DigitalAssetResourceSerializer getDigitalAssetResourceSerializer()
Description copied from interface: DigitalAssetResourceManagerPlugin
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

Specified by:
getDigitalAssetResourceSerializer in interface DigitalAssetResourceManagerPlugin
Returns:
a DigitalAssetResourceSerializer for serializing this plugins objects

supportsType

public boolean supportsType(java.lang.Class<? extends Resource> resourceType)
Description copied from interface: DigitalAssetResourceManagerPlugin
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.

Specified by:
supportsType in interface DigitalAssetResourceManagerPlugin
Parameters:
resourceType - - the resource type to check for
Returns:
true, if the provider does support selecting a resouce of the given type.

supportsInputStream

public boolean supportsInputStream()
Description copied from interface: DigitalAssetResourceManagerPlugin
Check if the provider supports InputStreams and the DigitalAssetResourceManagerPlugin.getAssetInputStream(DigitalAsset) method.

Specified by:
supportsInputStream in interface DigitalAssetResourceManagerPlugin
Returns:
true, if the provider supports input streams.