com.fatwire.assetapi.data
Interface AssetDataReadStrategy

All Known Implementing Classes:
CSElementReadStrategy, DimensionSetReadStrategy, FlexAttributeReadStrategy, FlexDefReadStrategy, FlexFilterReadStrategy, FlexPDReadStrategy

public interface AssetDataReadStrategy

AssetDataReadStrategy is the basic interface that would be used for handling Asset Data read from Content Server.


Method Summary
 MutableAssetData read(IAsset asset, AssetId id)
          Reads asset data for the given AssetId from the IAsset specified
 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,
                                                 AssetNotExistException
Reads asset data for all given AssetIds.

Parameters:
ids - List of AssetIds
Returns:
Iterator 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.
AssetNotExistException

read

MutableAssetData read(IAsset asset,
                      AssetId id)
                      throws AssetAccessException
Reads asset data for the given AssetId from the IAsset specified

Parameters:
asset - the asset where the asset will be read from
id - AssetId to read for
Returns:
a MutableAssetData
Throws:
AssetAccessException - is thrown when error met reading the data from the asset

readAttributes

MutableAssetData readAttributes(AssetId id,
                                java.util.List<java.lang.String> attributeNames)
                                throws AssetAccessException,
                                       AssetNotExistException
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.
AssetNotExistException


Copyright (c) 2003 - 2010 FatWire Corporation All Rights Reserved.