RolloutManagerBridge.java
5.95 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.day.cq.wcm.api.Page
* com.day.cq.wcm.api.WCMException
* com.day.cq.wcm.api.msm.LiveRelationship
* com.day.cq.wcm.api.msm.LiveRelationshipManager
* com.day.cq.wcm.api.msm.RolloutManager
* com.day.cq.wcm.api.msm.RolloutManager$Trigger
* com.day.cq.wcm.msm.api.LiveRelationship
* com.day.cq.wcm.msm.api.RolloutManager
* com.day.cq.wcm.msm.api.RolloutManager$RolloutParams
* com.day.cq.wcm.msm.api.RolloutManager$Trigger
* javax.jcr.Node
* javax.jcr.RepositoryException
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Reference
* org.apache.felix.scr.annotations.Service
* org.apache.sling.api.resource.ResourceResolver
*/
package com.day.cq.wcm.msm.impl.compat;
import com.day.cq.wcm.api.Page;
import com.day.cq.wcm.api.WCMException;
import com.day.cq.wcm.api.msm.LiveRelationshipManager;
import com.day.cq.wcm.api.msm.RolloutManager;
import com.day.cq.wcm.msm.api.LiveRelationship;
import com.day.cq.wcm.msm.api.RolloutManager;
import com.day.cq.wcm.msm.impl.compat.LiveRelationshipManagerBridge;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.resource.ResourceResolver;
@Component
@Service
public class RolloutManagerBridge
implements RolloutManager {
@Reference
private com.day.cq.wcm.msm.api.RolloutManager rolloutManager = null;
@Reference(referenceInterface=LiveRelationshipManager.class, target="(service.pid=com.day.cq.wcm.msm.impl.compat.LiveRelationshipManagerBridge)")
private LiveRelationshipManagerBridge liveRelationshipMgr;
protected void bindLiveRelationshipMgr(LiveRelationshipManager relationMgr) {
this.liveRelationshipMgr = (LiveRelationshipManagerBridge)relationMgr;
}
public boolean isReservedProperty(String propertyName) {
return this.rolloutManager.isReservedProperty(propertyName);
}
public boolean isExcludedProperty(String propertyName) {
return this.rolloutManager.isExcludedProperty(propertyName);
}
public void rollout(ResourceResolver resolver, com.day.cq.wcm.api.msm.LiveRelationship relation) throws WCMException {
this.rollout(resolver, relation, false);
}
public void rollout(ResourceResolver resolver, com.day.cq.wcm.api.msm.LiveRelationship relation, boolean reset) throws WCMException {
LiveRelationship adapted = this.liveRelationshipMgr.adapt(relation, resolver);
this.rolloutManager.rollout(resolver, adapted, reset);
}
public void rollout(Page master, boolean isDeep, RolloutManager.Trigger trigger, String[] targets) throws WCMException {
this.rollout(master, isDeep, trigger, false, targets);
}
public void rollout(Page master, boolean isDeep, RolloutManager.Trigger trigger, boolean reset, String[] targets) throws WCMException {
RolloutManager.RolloutParams params = new RolloutManager.RolloutParams();
params.master = master;
params.isDeep = isDeep;
params.trigger = RolloutManager.Trigger.fromName((String)trigger.name());
params.reset = reset;
params.targets = targets;
this.rolloutManager.rollout(params);
}
public void rollout(Page master, RolloutManager.Trigger trigger, String[] targets, String[] paragraphs) throws WCMException {
this.rollout(master, trigger, false, targets, paragraphs, false);
}
public void rollout(Page master, RolloutManager.Trigger trigger, boolean reset, String[] targets, String[] paragraphs) throws WCMException {
this.rollout(master, trigger, reset, targets, paragraphs, false);
}
public void rollout(Page master, RolloutManager.Trigger trigger, String[] targets, String[] paragraphs, boolean delete) throws WCMException {
this.rollout(master, trigger, false, targets, paragraphs, delete);
}
public void rollout(Page master, RolloutManager.Trigger trigger, boolean reset, String[] targets, String[] paragraphs, boolean delete) throws WCMException {
RolloutManager.RolloutParams params = new RolloutManager.RolloutParams();
params.master = master;
params.trigger = RolloutManager.Trigger.fromName((String)trigger.name());
params.reset = reset;
params.targets = targets;
params.paragraphs = paragraphs;
params.delete = delete;
this.rolloutManager.rollout(params);
}
public void updateRolloutInfo(Node node, boolean deepUpdate, boolean autoSave) throws WCMException {
this.rolloutManager.updateRolloutInfo(node, deepUpdate, autoSave);
}
public boolean isExcludedProperty(boolean isPage, String propertyName) {
return this.rolloutManager.isExcludedProperty(isPage, propertyName);
}
public boolean isExcludedPageProperty(String propertyName) {
return this.rolloutManager.isExcludedPageProperty(propertyName);
}
public boolean isExcludedParagraphProperty(String propertyName) {
return this.rolloutManager.isExcludedParagraphProperty(propertyName);
}
public boolean isExcludedNodeType(String nodeType) {
return this.rolloutManager.isExcludedNodeType(nodeType);
}
public boolean isExcludedNode(Node node) throws RepositoryException {
return this.rolloutManager.isExcludedNode(node);
}
protected void bindRolloutManager(com.day.cq.wcm.msm.api.RolloutManager rolloutManager) {
this.rolloutManager = rolloutManager;
}
protected void unbindRolloutManager(com.day.cq.wcm.msm.api.RolloutManager rolloutManager) {
if (this.rolloutManager == rolloutManager) {
this.rolloutManager = null;
}
}
protected void unbindLiveRelationshipMgr(LiveRelationshipManager liveRelationshipManager) {
if (this.liveRelationshipMgr == liveRelationshipManager) {
this.liveRelationshipMgr = null;
}
}
}