Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to create collection and add Assets folder in to collection programtically?

Avatar

Level 2

Hi Team,

How to create a collection and add Assets folder in to collection programmatically?

How to  add assets and assetsFolder to collection through code Ex servlet

kotireddy4b1_0-1626284821623.png

 

@Arun_Patidar
@Dipti_Chauhan 
@Ritesh_M
@Vijayalakshmi_S
@markus_bulla_adobe

Thanks
Kotireddy

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
3 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Employee Advisor

Hi @kotireddy4b1 

You need to write the custom code for the same and in order to create it you can make use of ResourceCollection api and ResourceCollectionManager.

 

Hope this helps

 

Avatar

Level 2

thanks @Kiran_Vedantam     @Bimmi_Soi  I am able to create a dam collection successfully

Can you please help me with how to read id(9wMp6sGyejwQn-rzopsh) based on the user login.
EX: If admin user login then need to display this id: 9wMp6sGyejwQn-rzopsh  
Screenshot 2021-07-18 at 9.32.52 PM.png