Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Retrieving and Setting CUG's on a DAM asset programmatically

Avatar

Level 1

Hello All,

How can I retrieve and set the CUG's on an asset in the DAM programmatically in Java?  I am trying to use a workflow to get the CUG's on the parent folder in the DAM for a new asset that is created (uploaded), and apply those CUG's to that asset (essentially inheriting the CUG's from the parent folder).  

Thanks in advance for your help.

1 Accepted Solution

Avatar

Correct answer by
Employee

A CUG is just represented as a set of properties; there's no special API for reading these properties. Just use the JCR or Sling Resource APIs.

That said, what you are describing is both unnecessary and may lead to poor performance (at scale). In JCR, permissions are already inherited, so copying the CUG properties from parent to child isn't necessary.

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

A CUG is just represented as a set of properties; there's no special API for reading these properties. Just use the JCR or Sling Resource APIs.

That said, what you are describing is both unnecessary and may lead to poor performance (at scale). In JCR, permissions are already inherited, so copying the CUG properties from parent to child isn't necessary.