Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
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