CQWorkflowNodeWrapper.java
3.83 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.granite.workflow.metadata.MetaDataMap
* com.adobe.granite.workflow.model.WorkflowNode
* com.adobe.granite.workflow.model.WorkflowTransition
* com.day.cq.workflow.metadata.MetaDataMap
* com.day.cq.workflow.model.WorkflowNode
* com.day.cq.workflow.model.WorkflowTransition
*/
package com.day.cq.workflow.impl.model;
import com.adobe.granite.workflow.metadata.MetaDataMap;
import com.adobe.granite.workflow.model.WorkflowNode;
import com.adobe.granite.workflow.model.WorkflowTransition;
import com.day.cq.workflow.impl.metadata.CQMetaDataMap;
import com.day.cq.workflow.impl.model.CQWorkflowTransitionWrapper;
import com.day.cq.workflow.impl.util.LegacyMetaDataWrapperImpl;
import java.util.ArrayList;
import java.util.Dictionary;
import java.util.List;
public class CQWorkflowNodeWrapper
implements com.day.cq.workflow.model.WorkflowNode {
public static final String PROCESS_ARGS = "PROCESS_ARGS";
private WorkflowNode graniteNode;
private ArrayList<com.day.cq.workflow.model.WorkflowTransition> transitions = null;
private ArrayList<com.day.cq.workflow.model.WorkflowTransition> incomingTransitions = null;
private CQMetaDataMap metaDataMap = null;
public CQWorkflowNodeWrapper(WorkflowNode graniteNode) {
if (graniteNode == null) {
throw new RuntimeException("Workflow Wrappers cannot be instantiated with null values");
}
this.graniteNode = graniteNode;
}
public String getId() {
return this.graniteNode.getId();
}
public String getType() {
return this.graniteNode.getType();
}
public void setType(String type) {
this.graniteNode.setType(type);
}
public String getDescription() {
return this.graniteNode.getDescription();
}
public void setDescription(String description) {
this.graniteNode.setDescription(description);
}
public List<com.day.cq.workflow.model.WorkflowTransition> getTransitions() {
if (this.transitions == null) {
this.transitions = new ArrayList(this.graniteNode.getTransitions().size());
for (WorkflowTransition transition : this.graniteNode.getTransitions()) {
if (transition == null) continue;
this.transitions.add(new CQWorkflowTransitionWrapper(transition));
}
}
return this.transitions;
}
public List<com.day.cq.workflow.model.WorkflowTransition> getIncomingTransitions() {
if (this.graniteNode.getIncomingTransitions() != null) {
if (this.incomingTransitions == null) {
this.incomingTransitions = new ArrayList(this.graniteNode.getIncomingTransitions().size());
for (WorkflowTransition transition : this.graniteNode.getIncomingTransitions()) {
if (transition == null) continue;
this.incomingTransitions.add(new CQWorkflowTransitionWrapper(transition));
}
}
return this.incomingTransitions;
}
return null;
}
public String getTitle() {
return this.graniteNode.getTitle();
}
public void setTitle(String title) {
this.graniteNode.setTitle(title);
}
public Dictionary<String, String> getMetaData() {
if (this.graniteNode.getMetaDataMap() != null) {
return new LegacyMetaDataWrapperImpl(this.graniteNode.getMetaDataMap());
}
return null;
}
public com.day.cq.workflow.metadata.MetaDataMap getMetaDataMap() {
if (this.metaDataMap == null && this.graniteNode.getMetaDataMap() != null) {
this.metaDataMap = new CQMetaDataMap(this.graniteNode.getMetaDataMap());
}
return this.metaDataMap;
}
public WorkflowNode getNode() {
return this.graniteNode;
}
}