public interface ReplicationPathTransformer
#accepts(javax.jcr.Session, ReplicationAction, Agent)
, whether to map/transform given replication path
in the context of the current replication request.Modifier and Type | Method and Description |
---|---|
boolean |
accepts(Session session,
ReplicationAction action,
Agent agent)
Returns
true if Transformer can transform replication path for given replication request. |
java.lang.String |
transform(Session session,
java.lang.String replicationPath,
ReplicationAction action,
Agent agent)
Transforms the replication path.
|
java.lang.String transform(Session session, java.lang.String replicationPath, ReplicationAction action, Agent agent)
replicationPath
in case of error
or if it can not be transform. i.e. an implementation map a given replication path
(i.e. /content/dam/skiing/images/Banner.JPG) to new target replication path (i.e. /content/dam/campaigns/skiing/images/Banner.JPG)
or vice versa, depending on the current replication context i.e. replication vs reverse replication
Implementations can choose using #accepts(javax.jcr.Session, ReplicationAction, Agent)
, whether to map/transform given replication path
in the context of the current replication request.
Replication Agent agent
and Replication Action action
is also available, based on the context in which
the transform is called.
i.e. in case of reverse replication, agent will not be null. So based on agent, transform method implementation may choose to do
reverse mapping by identifying that it is a reverse replication.session
- jcr sessionreplicationPath
- replication path that needs to be transformedaction
- replication action if availableagent
- replication agent if available in the current context. i.e. Replication agent is not available while importing
a replication content package.boolean accepts(Session session, ReplicationAction action, Agent agent)
true
if Transformer can transform replication path for given replication request.
This allows implementation to choose which requests to intercept i.e. replicate request in case of reverse replication, would have the
Agent
, so the implementation can check if it is the agent that implementation is interested in.
Or using Session
, implementation can look at the current user context and decide whether a transformation is needed or not.session
- jcr sessionaction
- replication action if availableagent
- replication agent if available in the current context. i.e. Replication agent is not available while importing
a replication content package.true
if it can transform
false
if it can not transform"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"