com.fatwire.gst.foundation.facade.assetapi.asset
Class ScatteredAsset

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.fatwire.gst.foundation.facade.assetapi.asset.ScatteredAsset
All Implemented Interfaces:
Serializable, Map<String,Object>

public class ScatteredAsset
extends AbstractMap<String,Object>
implements Serializable

An asset that has loaded the attributes into memory. In the constructor all the attributes are copied into memory and and can be accessed via the Map methods.

This class implements Serializable interface so the object can be serialized if needed. The serialization use-case is the best use-case for this class. The AssetMapAdapter is a better candidate to use if you are interested in accessing attribute data as a Map, for instance in a expression language like JSP EL.

Since:
Nov 23, 2009
Author:
Dolf.Dijkstra
See Also:
AssetMapAdapter, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ScatteredAsset(com.fatwire.assetapi.data.AssetData delegate)
          Reads all the attributes, in case of name collisions meta attributes take precedence.
ScatteredAsset(com.fatwire.assetapi.data.AssetData delegate, boolean meta, String... attributes)
          This constructor checks if the attributes are meta attributes and based on the passed in meta asks for the meta value.
ScatteredAsset(com.fatwire.assetapi.data.AssetData delegate, String... attributes)
          This constructor checks if the attributes are meta attributes and if so, asks for the meta value.
 
Method Summary
 Set<Map.Entry<String,Object>> entrySet()
           
 com.fatwire.assetapi.data.AssetId getAssetId()
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScatteredAsset

public ScatteredAsset(com.fatwire.assetapi.data.AssetData delegate,
                      String... attributes)
This constructor checks if the attributes are meta attributes and if so, asks for the meta value. In case that you have a flex attribute with the name 'description' the flex attribute value will not be used, but the primary asset row 'description' field value.

Parameters:
delegate -
attributes - the names of attributes to load the data from into memory

ScatteredAsset

public ScatteredAsset(com.fatwire.assetapi.data.AssetData delegate)
Reads all the attributes, in case of name collisions meta attributes take precedence.

Parameters:
delegate -

ScatteredAsset

public ScatteredAsset(com.fatwire.assetapi.data.AssetData delegate,
                      boolean meta,
                      String... attributes)
This constructor checks if the attributes are meta attributes and based on the passed in meta asks for the meta value.

Parameters:
delegate -
meta - true if the attributes are meta attributes
attributes - the names of attributes to load the data from into memory
Method Detail

getAssetId

public com.fatwire.assetapi.data.AssetId getAssetId()
Returns:
the id of this asset
See Also:
AssetData.getAssetId()

entrySet

public Set<Map.Entry<String,Object>> entrySet()
Specified by:
entrySet in interface Map<String,Object>
Specified by:
entrySet in class AbstractMap<String,Object>


Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.