LoopbackRoute.java
2.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
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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.granite.workflow.exec.Route
* com.adobe.granite.workflow.exec.WorkItem
* com.adobe.granite.workflow.metadata.MetaDataMap
* com.adobe.granite.workflow.model.WorkflowNode
* com.adobe.granite.workflow.model.WorkflowTransition
*/
package com.adobe.granite.workflow.console.servlet;
import com.adobe.granite.workflow.exec.Route;
import com.adobe.granite.workflow.exec.WorkItem;
import com.adobe.granite.workflow.metadata.MetaDataMap;
import com.adobe.granite.workflow.model.WorkflowNode;
import com.adobe.granite.workflow.model.WorkflowTransition;
import java.util.ArrayList;
import java.util.List;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
class LoopbackRoute
implements Route {
private WorkItem item;
private List<WorkflowTransition> transitions = new ArrayList<WorkflowTransition>();
LoopbackRoute(WorkItem item) {
this.item = item;
this.transitions.add(()new WorkflowTransition(){
public WorkflowNode getFrom() {
return LoopbackRoute.this.item.getNode();
}
public void setFrom(WorkflowNode workflowNode) {
throw new UnsupportedOperationException("operation not supported in loopback route");
}
public WorkflowNode getTo() {
return LoopbackRoute.this.item.getNode();
}
public void setTo(WorkflowNode workflowNode) {
throw new UnsupportedOperationException("operation not supported in loopback route");
}
public String getRule() {
return null;
}
public void setRule(String s) {
throw new UnsupportedOperationException("operation not supported in loopback route");
}
public MetaDataMap getMetaDataMap() {
return null;
}
});
}
public String getId() {
String result = "";
for (WorkflowTransition transition : this.transitions) {
result = result + transition.getFrom().getId();
result = result + transition.getTo().getId();
}
return String.valueOf(result.hashCode());
}
public String getName() {
String result = "";
String separator = "";
for (WorkflowTransition transition : this.transitions) {
result = result + separator + transition.getTo().getTitle();
separator = " & ";
}
return result;
}
public boolean hasDefault() {
return false;
}
public List<WorkflowTransition> getDestinations() {
return this.transitions;
}
public boolean isBackRoute() {
return false;
}
}