|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fatwire.gst.foundation.facade.assetapi.asset.TemplateAsset
public class TemplateAsset
This class provides easy access to AssetData, to be used in rendering code in read-only mode. Is is called TemplateAsset because the intent is that it is to be used in Templates.
It has casting accessors for values of the different attribute types. It must be noted that naming conflicts between flex attribute names and meta attribute names are resolved by giving the meta attribute preference.
TemplateAsset asset = ...;
String name = asset.asString("name");
Constructor Summary | |
---|---|
TemplateAsset(com.fatwire.assetapi.data.AssetData delegate)
|
Method Summary | |
---|---|
com.fatwire.assetapi.data.AssetId |
asAssetId(String name)
|
com.fatwire.assetapi.data.BlobObject |
asBlob(String name)
|
com.fatwire.assetapi.data.BlobObject.BlobAddress |
asBlobAddress(String name)
|
Date |
asDate(String name)
|
Double |
asDouble(String name)
|
Float |
asFloat(String name)
|
Integer |
asInt(String name)
|
List<?> |
asList(String name)
|
Long |
asLong(String name)
|
String |
asString(String name)
|
boolean |
equals(Object obj)
|
com.fatwire.assetapi.data.AssetId |
getAssetId()
|
com.fatwire.assetapi.def.AssetTypeDef |
getAssetTypeDef()
|
com.fatwire.assetapi.data.AssetId |
getAssociatedAsset(String name)
|
List<com.fatwire.assetapi.data.AssetId> |
getAssociatedAssets(String name)
|
Object |
getAttribute(String name)
|
com.fatwire.assetapi.data.AttributeData |
getAttributeData(String name,
boolean meta)
|
List<String> |
getAttributeNames()
Get all the attribute names. |
com.fatwire.assetapi.data.AssetData |
getDelegate()
|
List<com.fatwire.assetapi.data.AssetId> |
getImmediateParents(String name)
|
com.fatwire.mda.Dimension |
getLocale()
|
Object |
getMetaAttribute(String name)
|
List<String> |
getMetaAttributeNames()
Gets all the names of the meta attributes. |
List<com.fatwire.assetapi.data.AssetId> |
getParents()
|
String |
getSubtype()
|
com.fatwire.assetapi.def.AttributeTypeEnum |
getType(String name)
Get the type of the attribute. |
int |
hashCode()
|
boolean |
isAttribute(String name)
Checks if the asset has an attribute by the provided name. |
boolean |
isSingleValued(String name)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TemplateAsset(com.fatwire.assetapi.data.AssetData delegate)
delegate
- Method Detail |
---|
public com.fatwire.assetapi.data.AssetData getDelegate()
public com.fatwire.assetapi.data.AssetId getAssetId()
AssetData.getAssetId()
public String getSubtype()
public com.fatwire.assetapi.def.AssetTypeDef getAssetTypeDef()
AssetData.getAssetTypeDef()
public List<com.fatwire.assetapi.data.AssetId> getAssociatedAssets(String name)
name
- name of the association
AssetData.getAssociatedAssets(java.lang.String)
public com.fatwire.assetapi.data.AssetId getAssociatedAsset(String name)
name
- name of the association
AssetData.getAssociatedAssets(java.lang.String)
public Object getAttribute(String name)
name
-
AssetData.getAttributeData(java.lang.String,
boolean)
public Object getMetaAttribute(String name)
name
- the name of the attribute.
AssetData.getAttributeData(java.lang.String,
boolean)
public boolean isSingleValued(String name)
name
-
public List<?> asList(String name)
name
-
public Integer asInt(String name)
name
-
public Date asDate(String name)
name
-
public com.fatwire.assetapi.data.BlobObject asBlob(String name)
name
-
public Float asFloat(String name)
name
-
public Double asDouble(String name)
name
-
public Long asLong(String name)
name
-
public com.fatwire.assetapi.data.AssetId asAssetId(String name)
name
-
public String asString(String name)
name
-
public com.fatwire.assetapi.data.BlobObject.BlobAddress asBlobAddress(String name)
name
-
public List<String> getAttributeNames()
AssetData.getAttributeNames()
public com.fatwire.assetapi.def.AttributeTypeEnum getType(String name)
name
- the name of the attribute
public boolean isAttribute(String name)
name
- the name of trhe attributes.
public List<String> getMetaAttributeNames()
AssetData.getAttributeNames()
public List<com.fatwire.assetapi.data.AssetId> getImmediateParents(String name) throws com.fatwire.assetapi.common.AssetAccessException
name
-
com.fatwire.assetapi.common.AssetAccessException
AssetData.getImmediateParents(java.lang.String)
public List<com.fatwire.assetapi.data.AssetId> getParents() throws com.fatwire.assetapi.common.AssetAccessException
com.fatwire.assetapi.common.AssetAccessException
AssetData.getParents()
public com.fatwire.assetapi.data.AttributeData getAttributeData(String name, boolean meta)
name
- meta
- the asset attributes
AssetData.getAttributeData(java.lang.String,
boolean)
public com.fatwire.mda.Dimension getLocale()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |