@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface CurrentAsset
Annotation to read the current asset from the ICS context along with the specified attribute values,
then inject the resulting object onto the annotated field.
Usage:
"@CurrentAsset(attributes={"title", "body", "headline"}) TemplateAsset currentTemplateAsset;"
or
"@CurrentAsset(attributes={"title", "body", "headline"}) ScatteredAsset currentScatteredAsset;"
or
"@CurrentAsset(attributes={"title", "body", "headline"}) AssetData currentAssetData;"
VERY IMPORTANT: in Groovy, arrays are enclosed inside [], not {}. Using {} will throw a compilation error.
- Since:
- 2016-08-24
- Author:
- Tony Field