Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Path Repication in AEM 6.2

Avatar

Level 4

Hi,

I am replicated the groups from Author to Publish.

As in AEM 6.2, when i creating group it is created as encrypted name. For example: want to create rahul_verma group name: /home/groups/rahul_verma but in crx/de/index.jsp it is like that : /home/groups/[encrpted name]

Now how to get it path name for replication when i trying to get node path from Node node =session.getNode("/home/groups/rahul_verma");

It throws a exception .

How to get it encrypted name?

Any other solution for it?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Employee

You could always run a query to get the group if you know it's name:

/jcr:root/home/groups//element(*, rep:Group)[rep:principalName = "mygroup"]

Regards,

Opkar

View solution in original post

4 Replies

Avatar

Level 10

I am not sure JCR API supports encrypted names. I will check further. 

Avatar

Correct answer by
Employee

You could always run a query to get the group if you know it's name:

/jcr:root/home/groups//element(*, rep:Group)[rep:principalName = "mygroup"]

Regards,

Opkar

Avatar

Level 10

Solution is:

They have to search for the node in their code like this:

/jcr:root/home/users/element(*,rep:Authorizable)[@rep:principalName="rahul_verma"]

 That will find them the node path that they can pass to Replicator.replicate.

Avatar

Level 4

Thanks, It works.

But Complexity is too high for using it

Thanks