Expand my Community achievements bar.

Asset reference

Avatar

Level 4

Hi,

My requirement is:

If i delete the asset from the DAM, it has to delete the asset from the referenced page as well.

So i found the API called: AssetReferenceResolver

and the method: getReferences()

i have written the below code but its shows "Method is not resolved"

Below is the code:

<% String path="/content/dam/verizon/banner-retro.png"; AssetReferenceResolver assetRef = new AssetReferenceResolver(); java.util.Map<java.lang.String,java.lang.String> map= assetRef.getReference(path,resourceResolver); for (java.util.Map.Entry<String, String> entry : map.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); out.println(value); } %>

 

Could you please help me.

Many thanks!!!

Michael

0 Replies