DAM Asset Usage Information
I want to get usage information of any DAM asset. That means suppose an Image is used in different content. I want that information or the location where the image has been used.
I want to get usage information of any DAM asset. That means suppose an Image is used in different content. I want that information or the location where the image has been used.
Hi @asifchowdhury ,
You can get the reference information from properties as suggest by @milind_bachani .
Also there is ReferenceSearch API to get reference in java as below.
You can pass asset or page path from servlet parameter and import ReferenceSearch.
import com.day.cq.wcm.commons.ReferenceSearch;
resourceResolver = request.getResourceResolver();
//Asset or Page Path
String pagePath = request.getParameter("pagePath");
/* Reference Search of Page
* Provide list of all pages where current page are being Used */
ReferenceSearch referenceSearch = new ReferenceSearch();
referenceSearch.setExact(true);
referenceSearch.setHollow(true);
referenceSearch.setMaxReferencesPerPage(-1);
Collection<ReferenceSearch.Info> resultSet = referenceSearch.search(resourceResolver, pagePath).values();
for (ReferenceSearch.Info info : resultSet) {
String currentPage = info.getPagePath();
//Custom code using reference page path
}
Regards
Shiv
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.