|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.dam.asset.functions.DamTemplatingFunctions
@Singleton public class DamTemplatingFunctions
Dam templating function exposed in FTL's as "damfn". This class exposed useful methods for FTL's and Model Class.
In order to use this template function, create a new contextAttributes in your renderers configuration. For example stk add the following configuration in order to expose damfn in FTL's: under config/modules/standard-temlating-kit/renderers/stk/contextAttributes add a configuration Node damfn with the following Node properties: componentClass=info.magnolia.dam.asset.functions.DamTemplatingFunctions name=damfn
Constructor Summary | |
---|---|
DamTemplatingFunctions(DamManager damManager)
|
Method Summary | |
---|---|
Asset |
getAssetForId(String assetIdentifier)
Retrieve an Asset based on an Asset identifier. |
Asset |
getAssetForPath(String assetPath)
Retrieve an Asset based on an Asset path. |
String |
getAssetLinkForId(String assetIdentifier)
Return the Link to the specified Asset for a given assetIdentifier. |
String |
getAssetLinkForId(String assetIdentifier,
String renditionName)
Return the Link to the specified Asset rendition for a given assetIdentifier. |
AssetMap |
getAssetMap(Asset asset)
Return the AssetMap representation of the Asset. |
AssetMap |
getAssetMapForAssetId(String assetIdentifier)
Return the AssetMap representation of the Asset defined by the
assetIdentifier. |
Asset |
getAssetRendition(Asset asset,
String renditionName)
Return the specified Asset Rendition. |
Asset |
getAssetRenditionForAssetId(String assetIdentifier,
String renditionName)
Return the specified Asset Rendition based on the assetIdentifier. |
List<Asset> |
getAssetsForFilter(AssetFilter assetFilter)
Retrieve an Asset List based on an AssetFilter. |
List<Asset> |
getAssetsFromFolderId(String folderIdentifier)
Retrieve an Asset List based on a folder identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
@Inject public DamTemplatingFunctions(DamManager damManager)
Method Detail |
---|
public List<Asset> getAssetsFromFolderId(String folderIdentifier)
DamManager.getAssetsFromFolderId(String)
public AssetMap getAssetMap(Asset asset)
AssetMap
representation of the Asset.
DamManager.getAssetMap(Asset)
public AssetMap getAssetMapForAssetId(String assetIdentifier)
AssetMap
representation of the Asset defined by the
assetIdentifier.
DamManager.getAssetMap(Asset)
public Asset getAssetForPath(String assetPath)
DamManager.getAssetForPath(String)
public Asset getAssetForId(String assetIdentifier)
DamManager.getAssetForId(String)
public Asset getAssetRendition(Asset asset, String renditionName)
public Asset getAssetRenditionForAssetId(String assetIdentifier, String renditionName)
getAssetRendition(Asset, String)
public String getAssetLinkForId(String assetIdentifier)
public String getAssetLinkForId(String assetIdentifier, String renditionName)
public List<Asset> getAssetsForFilter(AssetFilter assetFilter)
DamManager.getAssetsForFilter(AssetFilter assetFilter)
,
AssetFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |