ReverseReplicateProcess.java
1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.day.cq.replication.Agent
* com.day.cq.replication.AgentConfig
* com.day.cq.replication.AgentFilter
* com.day.cq.replication.ReplicationActionType
* com.day.cq.replication.ReplicationOptions
* com.day.cq.workflow.exec.WorkflowProcess
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Property
* org.apache.felix.scr.annotations.Service
*/
package com.day.cq.wcm.workflow.process;
import com.day.cq.replication.Agent;
import com.day.cq.replication.AgentConfig;
import com.day.cq.replication.AgentFilter;
import com.day.cq.replication.ReplicationActionType;
import com.day.cq.replication.ReplicationOptions;
import com.day.cq.wcm.workflow.process.ReplicatePageProcess;
import com.day.cq.workflow.exec.WorkflowProcess;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;
@Component
@Service(value={WorkflowProcess.class})
@Property(name="process.label", value={"Reverse Replicate Content"})
public class ReverseReplicateProcess
extends ReplicatePageProcess {
private static final AgentFilter MOD_DISTRIBUTE_FILTER = new AgentFilter(){
public boolean isIncluded(Agent agent) {
return agent.getConfiguration().isTriggeredOnDistribute();
}
};
@Override
public ReplicationActionType getReplicationType() {
return ReplicationActionType.ACTIVATE;
}
@Override
protected ReplicationOptions prepareOptions(ReplicationOptions opts) {
if (opts == null) {
opts = new ReplicationOptions();
}
opts.setFilter(MOD_DISTRIBUTE_FILTER);
opts.setSuppressStatusUpdate(true);
return opts;
}
}