I am fetching userGroups associated with it.
now, i need to generate a hashmap containing :
Client Name vs ArrayList of User Groups
Solved! Go to Solution.
Views
Replies
Total Likes
As you need to fetch all the folder path and as you said folder means multiple clients, assuming your client's folder will look like this:
So if we iterate the list of children for the path: "/content/dam/clients", we will get all its child folder paths within the given path.
You can resolve the parent path using a resource resolver. Then with that resource, you can get its children, it will be an iterator, and by each of the children, you can get the path.
Here is the code snippet:
Resource resource = resourceResolver.getResource("/content/{path}");
Iterator<Resource> resourceIterator = resource.listChildren();
while (resourceIterator.hasNext()){
String path = resourceIterator.next().getPath();
}
NB: You need read permission for the user. and have to identify the folders conditionally.
Views
Replies
Total Likes
hi
suppose my folder path is something like:
/content/dam/folders
Views
Replies
Total Likes
As you need to fetch all the folder path and as you said folder means multiple clients, assuming your client's folder will look like this:
So if we iterate the list of children for the path: "/content/dam/clients", we will get all its child folder paths within the given path.
thanks
@AsifChowdhury
its working fine now
actually the path we need to limit it so, that we can get the desired folder structure.
suppose the folder structure is like: /content/dam/client/brands
from here i need to fetch the client names.
anything to do so, that we can have the client names with us
You are most welcome @Mahima31144209xufe
Views
Likes
Replies
Views
Likes
Replies