saurabh
I'm new here

Is there any function in FirstSpirit API to get the UID Path

Jump to solution

Hi,

Is there any function in FirstSprit API from which i can get the UID Path.

Example :

If Inside the Site Store having foder Internet.

Inside the Internet folder having folder parts

inside the parts folder having folder  specification

inside the specification having folder about

i want  UID Path of folder " about"  like this root/Internet/parts/specification/about

i didt get any function in API  since i have one requirement where i have to show UID path of each folder

0 Kudos
1 Solution

Accepted Solutions
rednoss
I'm new here

Hello Saurabh,

if you got your folder you can use a combination of getParent() and getUid() and build the uid_path with a StringBuilder. For example:

uid_path = uid_path.append(element.getUid());

while(element.getParent() != null) {

     element = element.getParent();

     uid_path = uid_path.insert(0,"/");

     uid_path = uid_path.insert(0,idp.getUid());

}

Best regards,

René Rednoß

View solution in original post

0 Kudos
2 Replies
rednoss
I'm new here

Hello Saurabh,

if you got your folder you can use a combination of getParent() and getUid() and build the uid_path with a StringBuilder. For example:

uid_path = uid_path.append(element.getUid());

while(element.getParent() != null) {

     element = element.getParent();

     uid_path = uid_path.insert(0,"/");

     uid_path = uid_path.insert(0,idp.getUid());

}

Best regards,

René Rednoß

0 Kudos
pavone
I'm new here

Hello Saurabh,

do you need further help or did René's reply already help you? If so, it would be great if you marked his reply as "correct answer" so that other community users find the solution easily. If you have already found a solution by yourself, it would be very kind of you, if you posted it here.

Best regards

Tim