T
- class to be returned based on asset mapperpublic class MappedAssetAccessTemplate<T> extends AssetAccessTemplate
Modifier and Type | Field and Description |
---|---|
protected COM.FutureTense.Interfaces.ICS |
ics |
protected AssetMapper<T> |
mapper |
Constructor and Description |
---|
MappedAssetAccessTemplate(COM.FutureTense.Interfaces.ICS ics,
AssetMapper<T> mapper) |
Modifier and Type | Method and Description |
---|---|
com.fatwire.assetapi.data.AssetId |
currentId() |
Iterable<T> |
query(com.fatwire.assetapi.query.Query query)
Queries the asset repository with the provided query.
|
Iterable<T> |
query(String assetType,
String subType,
String query)
Queries for a list of scattered assets.
|
Iterable<T> |
query(String assetType,
String subType,
String query,
String... attributes)
Queries for a list of scattered assets.
|
T |
read(com.fatwire.assetapi.data.AssetId id) |
T |
read(com.fatwire.assetapi.data.AssetId id,
String... attributes)
Reads the attributes of an asset.
|
Collection<com.fatwire.assetapi.data.AssetId> |
readAssociatedAssetIds(String associationType)
Reads the list of associated assets based on the current c and cid cs
variables.
|
Collection<T> |
readAssociatedAssets(com.fatwire.assetapi.data.AssetId id,
String associationType)
Reads the associated assets of an asset and returns them as a
ScatteredAsset.
|
Collection<T> |
readAssociatedAssets(com.fatwire.assetapi.data.AssetId id,
String associationType,
String... attributes)
Reads the associated assets of an asset and returns them as a
ScatteredAsset.
|
T |
readCurrent()
Reads the asset attributes of the asset identified by the current c and
cid variables on the ics scope.
|
T |
readCurrent(String... attributes)
Reads the mentioned asset attributes of the asset identified by the
current c and cid variables on the ics scope.
|
Collection<com.fatwire.assetapi.data.AssetId> |
readParentAssetIds(com.fatwire.assetapi.data.AssetId id,
String... associationName)
Read the assets that are parents of the current asset given the specified
association name or names.
|
Collection<com.fatwire.assetapi.data.AssetId> |
readParentAssetIds(String... associationName)
Read the assets that are parents of the current asset given the specified
association name or names.
|
createAssetId, createAssetId, createNameQuery, findByName, findByName, getAssetDataManager, query, query, readAsset, readAsset, readAsset, readAsset, readAsset, readAsset, readAsset, readAsset, readAsset, readAsset, readAssets, readAssets, readAssets, readAssociatedAssetIds, readAssociatedAssets, readSite, readSiteInfo
protected final AssetMapper<T> mapper
protected final COM.FutureTense.Interfaces.ICS ics
public MappedAssetAccessTemplate(COM.FutureTense.Interfaces.ICS ics, AssetMapper<T> mapper)
ics
- Content Server context objectmapper
- asset mapperpublic T read(com.fatwire.assetapi.data.AssetId id)
id
- asset idpublic T read(com.fatwire.assetapi.data.AssetId id, String... attributes)
id
- asset idattributes
- array of attribute namespublic Collection<T> readAssociatedAssets(com.fatwire.assetapi.data.AssetId id, String associationType)
id
- asset idassociationType
- associated typepublic Collection<com.fatwire.assetapi.data.AssetId> readAssociatedAssetIds(String associationType)
associationType
- associated typepublic Collection<com.fatwire.assetapi.data.AssetId> readParentAssetIds(com.fatwire.assetapi.data.AssetId id, String... associationName)
id
- the child assetassociationName
- the association name or names to be used to filter parent query.public Collection<com.fatwire.assetapi.data.AssetId> readParentAssetIds(String... associationName)
associationName
- the association name or names to be used to filter parent query.public Collection<T> readAssociatedAssets(com.fatwire.assetapi.data.AssetId id, String associationType, String... attributes)
id
- the parent assetassociationType
- the name of the association or '-' for an unnamed
associationattributes
- the list of attributes to loadpublic T readCurrent()
public com.fatwire.assetapi.data.AssetId currentId()
public T readCurrent(String... attributes)
attributes
- array of attribute namespublic Iterable<T> query(com.fatwire.assetapi.query.Query query)
query
- query objectpublic Iterable<T> query(String assetType, String subType, String query)
Sample queries are:
assetType
- string value for asset typesubType
- string value for sub-typequery
- query objectpublic Iterable<T> query(String assetType, String subType, String query, String... attributes)
assetType
- string value of asset typesubType
- string value of subtypequery
- string value of queryattributes
- string array of attributesCopyright © 2010–2017. All rights reserved.