Expand my Community achievements bar.

ReplicationPathTransformer in AEM 6.1

Avatar

Level 2

Hi,

We have requirement where source & destination path are different in author & publisher.

eg:

Author                                        Publisher

/content/dam/abc/a.png ----> /content/dam/bcd/a.png

I got to know in 6.3 we have ReplicationPathTransformer which exactly does what I am looking for. Is there any feature available in AEM 6.1?

Regards

Guru

4 Replies

Avatar

Level 7

Hello Guru,

To achieve this functionality you in 6.1 you need to implement your custom TransportHandler.

Something like: public class MyTranHandler implements TransportHandler {.....}

And override the canHandle method as per your requirement.

Thanks

Tuhin

Avatar

Level 7

I agree. You would need to overwrite "ReplicationAction" object to set path that you want and then user "Agent" Service to trigger replication.

ReplicationPathTransformer in 6.3 is on these lines:

So build the replication object like:

new ReplicationAction(type, actionPaths, 0L, session.getUserID(), rev);

where actionPaths is an array of all paths after transformation...

and then loop over agents to do:

agent.replicate(<youe transformed action>, content, options);