com.fatwire.assetapi.data
Interface AssetDataReadStrategy

All Known Implementing Classes:
CSElementReadStrategy

public interface AssetDataReadStrategy

TODO: Add class/interface details


Method Summary
 MutableAssetData read(IAsset asset, AssetId id)
           
 java.lang.Iterable<MutableAssetData> read(java.util.List<AssetId> ids)
          Reads asset data for all given AssetIds.
 java.lang.Iterable<MutableAssetData> read(Query query)
          Reads all asset data that satisfies a given Query
 MutableAssetData readAttributes(AssetId id, java.util.List<java.lang.String> attributeNames)
          Reads given set attribute data and returns an AssetData instance containing them.
 

Method Detail

read

java.lang.Iterable<MutableAssetData> read(Query query)
                                          throws AssetAccessException
Reads all asset data that satisfies a given Query

Parameters:
query - Query to be satisfied.
Returns:
Iterator of AssetData instances.
Throws:
AssetAccessException - is thrown when Query is invalid by the way of incorrect attributes or invalid operation given the choice of query algorithm. AssetAccessException also wraps any AssetExcptions thrown by the internal implementation.

read

java.lang.Iterable<MutableAssetData> read(java.util.List<AssetId> ids)
                                          throws AssetAccessException
Reads asset data for all given AssetIds.

Parameters:
ids - List of AssetIds
Returns:
List of AssetData instances belonging to AssetIds
Throws:
AssetAccessException - is thrown when any of the AssetIds passed in does not exist. AssetAccessException also wraps any AssetExcptions thrown by the internal implementation.

read

MutableAssetData read(IAsset asset,
                      AssetId id)
                      throws AssetAccessException
Throws:
AssetAccessException

readAttributes

MutableAssetData readAttributes(AssetId id,
                                java.util.List<java.lang.String> attributeNames)
                                throws AssetAccessException
Reads given set attribute data and returns an AssetData instance containing them.

Parameters:
id - AssetId to read attributes for
attributeNames - names of the attributes
Returns:
AssetData containing values for requested attributes.
Throws:
AssetAccessException - if thrown if the AssetId does not exist or attrbute names passed are incorrect for the asset. AssetAccessException also wraps any AssetExcptions thrown by the internal implementation.