|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fatwire.gst.foundation.facade.assetapi.AssetAccessTemplate
public class AssetAccessTemplate
This class is a one-stop-shop for all read-only access to AssetData. It acts
as a helper class to facilitate AssetDataManager use in a simplified
way in delivery ContentServer templates.
| Constructor Summary | |
|---|---|
AssetAccessTemplate(COM.FutureTense.Interfaces.ICS ics)
Constructor that accepts ICS as an argument. |
|
AssetAccessTemplate(com.fatwire.system.Session session)
|
|
| Method Summary | ||
|---|---|---|
com.fatwire.assetapi.data.AssetId |
createAssetId(String c,
long cid)
Helper method to create an AssetId from c and cid as string values. |
|
com.fatwire.assetapi.data.AssetId |
createAssetId(String c,
String cid)
Helper method to create an AssetId from c and cid as string values. |
|
com.fatwire.assetapi.query.SimpleQuery |
createNameQuery(String assetType,
String assetName)
Creates a Query to retrieve the asset by it's name. |
|
com.fatwire.assetapi.data.AssetId |
findByName(COM.FutureTense.Interfaces.ICS ics,
String assetType,
String name)
Finds the assetid by the name of the asset. |
|
com.fatwire.assetapi.data.AssetId |
findByName(COM.FutureTense.Interfaces.ICS ics,
String assetType,
String name,
long siteid)
Finds the assetid by the name of the asset in a particular site. |
|
protected com.fatwire.assetapi.data.AssetDataManager |
getAssetDataManager()
|
|
|
query(String assetType,
String subType,
String query,
AssetMapper<T> mapper)
Queries for a list of objects as mapped by the AssetMapper. |
|
|
query(String assetType,
String subType,
String query,
AssetMapper<T> mapper,
String... attributes)
Queries for a list of objects as mapped by the AssetMapper. |
|
com.fatwire.assetapi.data.AssetData |
readAsset(com.fatwire.assetapi.data.AssetId id)
|
|
void |
readAsset(com.fatwire.assetapi.data.AssetId id,
AssetClosure closure)
Method to read an asset and pass the results to the closure for further handling. |
|
void |
readAsset(com.fatwire.assetapi.data.AssetId id,
AssetClosure closure,
String... attributes)
Method to read an asset and provide the AssetClosure with the AssetData. |
|
|
readAsset(com.fatwire.assetapi.data.AssetId id,
AssetMapper<T> mapper)
Method to read an asset and use the AssetMapper to transform the AssetData into another object as specified by the AssetMapper. |
|
|
readAsset(com.fatwire.assetapi.data.AssetId id,
AssetMapper<T> mapper,
String... attributes)
Method to read an asset and use the AssetMapper to transform the AssetData into another object as specified by the AssetMapper. |
|
com.fatwire.assetapi.data.AssetData |
readAsset(com.fatwire.assetapi.data.AssetId id,
String... attributes)
Reads an asset based on the listed attribute names TODO: do we need to load the attribute values and prevent access to non-listed attributes (prevent lazy loading) |
|
void |
readAsset(Iterable<com.fatwire.assetapi.data.AssetId> ids,
AssetClosure closure,
String... attributes)
Method to read an asset and pass the results to the closure for further handling. |
|
void |
readAsset(List<com.fatwire.assetapi.data.AssetId> ids,
AssetClosure closure)
Method to read an asset and pass the results to the closure for further handling. |
|
|
readAsset(String c,
long cid,
AssetMapper<T> mapper)
Method to read an asset and use the AssetMapper to transform the AssetData into another object as specified by the AssetMapper. |
|
|
readAsset(String c,
String cid,
AssetMapper<T> mapper)
Method to read an asset and use the AssetMapper to transform the AssetData into another object as specified by the AssetMapper interface.. |
|
Iterable<com.fatwire.assetapi.data.AssetData> |
readAssets(com.fatwire.assetapi.query.Query query)
|
|
void |
readAssets(com.fatwire.assetapi.query.Query query,
AssetClosure closure)
Invokes the work(asset) method on the provided Closure for assets returned by the Query. |
|
|
readAssets(com.fatwire.assetapi.query.Query query,
AssetMapper<T> mapper)
Reading assets with the Query and using the mapper to transform the AssetData into another object, as specified by T. |
|
Collection<com.fatwire.assetapi.data.AssetId> |
readAssociatedAssetIds(com.fatwire.assetapi.data.AssetId id,
String associationType)
Reads the associated assets of the asset and returns the AssetIds. |
|
void |
readAssociatedAssets(com.fatwire.assetapi.data.AssetId id,
String associationType,
AssetClosure closure,
String... attributes)
Reads the associated assets of an asset and returns them as a ScatteredAsset. |
|
com.fatwire.assetapi.site.Site |
readSite(String name)
Finds the Site object by the given name. |
|
com.fatwire.assetapi.site.SiteInfo |
readSiteInfo(String name)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AssetAccessTemplate(com.fatwire.system.Session session)
session - public AssetAccessTemplate(COM.FutureTense.Interfaces.ICS ics)
ics - | Method Detail |
|---|
public com.fatwire.assetapi.data.AssetId createAssetId(String c,
String cid)
c - cid -
public com.fatwire.assetapi.data.AssetId createAssetId(String c,
long cid)
c - cid -
public <T> T readAsset(com.fatwire.assetapi.data.AssetId id,
AssetMapper<T> mapper)
T - id - mapper -
public <T> T readAsset(String c,
String cid,
AssetMapper<T> mapper)
T - c - the assetTypecid - the asset idmapper -
public <T> T readAsset(String c,
long cid,
AssetMapper<T> mapper)
T - c - the assetTypecid - the asset idmapper -
public <T> T readAsset(com.fatwire.assetapi.data.AssetId id,
AssetMapper<T> mapper,
String... attributes)
T - id - mapper - attributes -
public void readAsset(com.fatwire.assetapi.data.AssetId id,
AssetClosure closure,
String... attributes)
id - closure - attributes -
public void readAsset(com.fatwire.assetapi.data.AssetId id,
AssetClosure closure)
id - the assetid to readclosure - the closure
public void readAsset(List<com.fatwire.assetapi.data.AssetId> ids,
AssetClosure closure)
ids - a list of AssetIdsclosure - the closure
public void readAsset(Iterable<com.fatwire.assetapi.data.AssetId> ids,
AssetClosure closure,
String... attributes)
ids - a list of AssetIdsclosure - the closure
public com.fatwire.assetapi.data.AssetData readAsset(com.fatwire.assetapi.data.AssetId id,
String... attributes)
id - the assetidattributes - the list of attributes to return
protected com.fatwire.assetapi.data.AssetDataManager getAssetDataManager()
public com.fatwire.assetapi.data.AssetData readAsset(com.fatwire.assetapi.data.AssetId id)
id - the assetid to read
public Iterable<com.fatwire.assetapi.data.AssetData> readAssets(com.fatwire.assetapi.query.Query query)
query -
public void readAssets(com.fatwire.assetapi.query.Query query,
AssetClosure closure)
query - the queryclosure - the closure
public <T> Iterable<T> readAssets(com.fatwire.assetapi.query.Query query,
AssetMapper<T> mapper)
T - query - mapper -
public com.fatwire.assetapi.data.AssetId findByName(COM.FutureTense.Interfaces.ICS ics,
String assetType,
String name,
long siteid)
ics - assetType - the type of the asset.name - the name of the asset.siteid - the Site id.
public com.fatwire.assetapi.data.AssetId findByName(COM.FutureTense.Interfaces.ICS ics,
String assetType,
String name)
ics - assetType - the type of the asset.name - the name of the asset.
public com.fatwire.assetapi.query.SimpleQuery createNameQuery(String assetType,
String assetName)
assetType - assetName -
public com.fatwire.assetapi.site.Site readSite(String name)
name - the name of the site.
public com.fatwire.assetapi.site.SiteInfo readSiteInfo(String name)
name -
public Collection<com.fatwire.assetapi.data.AssetId> readAssociatedAssetIds(com.fatwire.assetapi.data.AssetId id,
String associationType)
id - associationType -
public void readAssociatedAssets(com.fatwire.assetapi.data.AssetId id,
String associationType,
AssetClosure closure,
String... attributes)
id - the parent assetassociationType - the name of the association or '-' for an unnamed
associationclosure - the AssetClosure to work on.attributes - the list of attributes to load
public <T> Iterable<T> query(String assetType,
String subType,
String query,
AssetMapper<T> mapper,
String... attributes)
T - assetType - subType - query - mapper - attributes -
query(String, String, String, AssetMapper,
String...)
public <T> Iterable<T> query(String assetType,
String subType,
String query,
AssetMapper<T> mapper)
T - assetType - subType - query - mapper -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||