Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

asset metadata

Avatar

Level 1

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());
1 Accepted Solution

Avatar

Correct answer by
Level 4
1 Reply

Avatar

Correct answer by
Level 4