


Hi,
Can anyone add a Java code snippet to retrieve asset metadata? I've been trying now for a few days to retrieve the description and tags, but no success. Title for some reason is easy and straight forward .getTitle(); , see code below:
Resource childImage = (Resource)childImagesItr.next(); ImageResource imgResource = new ImageResource(childImage);Image image = new Image(childImage); //media is an internally used classmedia = new MediaVariables();media.setImageSrc(imgResource.getSrc());media.setTitle(imgResource.getTitle());
media.setTitle(image.getTitle());
but description, although method exists, returns null, such as:
media.setDescription(image.getDescription());
or
media.setDescrioption(imgResource.getDescription());
Views
Replies
Sign in to like this content
Total Likes
You should use following Assets API.
https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/com/day/cq/dam/api/Asset.html#getMetadata()
Here is the sample: http://adobeaemclub.com/servlet-to-get-all-tags-assigned-to-a-dam-asset-in-json-format/
Views
Replies
Sign in to like this content
Total Likes
You should use following Assets API.
https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/com/day/cq/dam/api/Asset.html#getMetadata()
Here is the sample: http://adobeaemclub.com/servlet-to-get-all-tags-assigned-to-a-dam-asset-in-json-format/
Views
Replies
Sign in to like this content
Total Likes