com.fatwire.assetapi.data
Interface AssetData

All Known Subinterfaces:
MutableAssetData
All Known Implementing Classes:
AssetDataImpl

public interface AssetData

This interface represents an asset instance (data of a single asset). The intention of the interface is to provide a view (possibly a narrower view) of data contained in the asset.

AssetData is a combination of

AttributeData represents data for a given attribute. A given instance of AssetData may not contain data for all attributes. List of attribute names whose data is part of an AssetData instance can be obtained by invoking AssetData.getAttributeNames().

Attributes for which data exists in an AssetData instance is determined by how the instance of AssetData was obtained. See AssetDataManager for ways to obtain an instance of AssetData.


Method Summary
 AssetId getAssetId()
          Returns unique identification of the asset instance AssetId
 AssetTypeDef getAssetTypeDef()
          Returns AssetTypeDef this instance is based on.
 java.util.List<AssetId> getAssociatedAssets(java.lang.String name)
          Returns named associations by given name.
 java.util.List<AttributeData> getAttributeData()
          Returns a list of all attribute data associated with this instance of asset
 AttributeData getAttributeData(java.lang.String attributeName)
          Returns data associated with a given attribute.
 java.util.List<java.lang.String> getAttributeNames()
          Returns List of attribute names contained in this instance of AssetData.
 java.util.List<AssetId> getParents()
          Returns Asset identifiers of parent assets, if any.
 

Method Detail

getAssetId

AssetId getAssetId()
Returns unique identification of the asset instance AssetId

Returns:
AssetId associated with the instance

getAttributeNames

java.util.List<java.lang.String> getAttributeNames()
Returns List of attribute names contained in this instance of AssetData.

Returns:
Attribute names that make this instance of AssetData. (note: the asset itself could have more attributes, use AssetTypeDef to get to those).

getAssetTypeDef

AssetTypeDef getAssetTypeDef()
Returns AssetTypeDef this instance is based on.

Returns:
returns a AssetTypeDef handle to the asset type this instance is built upon.

getAttributeData

AttributeData getAttributeData(java.lang.String attributeName)
Returns data associated with a given attribute.

Parameters:
attributeName - name of the attribute
Returns:
AttributeData instance for an attribute of a given name.

getAttributeData

java.util.List<AttributeData> getAttributeData()
Returns a list of all attribute data associated with this instance of asset

Returns:
List of all attribute data

getAssociatedAssets

java.util.List<AssetId> getAssociatedAssets(java.lang.String name)
Returns named associations by given name. Note: unnamed association is retrieved by using AssetAssociationDef.UnnamedAssociationName constant in place association name.

Parameters:
name - name of the association
Returns:
List of AssetId of associated assets.

getParents

java.util.List<AssetId> getParents()
                                   throws AssetAccessException
Returns Asset identifiers of parent assets, if any.

Returns:
List of parent asset identifiers for this asset instance, if any.
Throws:
AssetAccessException - captures layer specific failures and wraps other internal exceptions.