1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.common.ui.client.mvc.dto; |
17 |
|
|
18 |
|
import java.util.HashMap; |
19 |
|
import java.util.Map; |
20 |
|
|
21 |
|
import org.kuali.student.common.ui.client.configurable.mvc.HasReferenceId; |
22 |
|
import org.kuali.student.common.ui.client.mvc.Model; |
23 |
|
import org.kuali.student.common.ui.client.mvc.ModelChangeEvent; |
24 |
|
import org.kuali.student.common.ui.client.mvc.ModelChangeHandler; |
25 |
|
import org.kuali.student.common.ui.client.mvc.ModelChangeEvent.Action; |
26 |
|
|
27 |
|
import com.google.gwt.event.shared.HandlerManager; |
28 |
|
import com.google.gwt.event.shared.HandlerRegistration; |
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
@author |
34 |
|
|
35 |
|
|
|
|
| 0% |
Uncovered Elements: 31 (31) |
Complexity: 12 |
Complexity Density: 0.67 |
|
36 |
|
public class ReferenceModel implements HasReferenceId, Model { |
37 |
|
String referenceId; |
38 |
|
String referenceTypeKey; |
39 |
|
String referenceType; |
40 |
|
String referenceState; |
41 |
|
Map<String, String> referenceAttributes; |
42 |
|
private HandlerManager handlers = new HandlerManager(this); |
43 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
44 |
0
|
@Override... |
45 |
|
public HandlerRegistration addModelChangeHandler( |
46 |
|
ModelChangeHandler handler) { |
47 |
0
|
return handlers.addHandler(ModelChangeEvent.TYPE, handler); |
48 |
|
} |
49 |
|
|
50 |
|
|
51 |
|
@see |
52 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
53 |
0
|
@Override... |
54 |
|
public void setReferenceId(String id) { |
55 |
0
|
this.referenceId = id; |
56 |
0
|
handlers.fireEvent(new ModelChangeEvent(Action.RELOAD, this)); |
57 |
|
} |
58 |
|
|
59 |
|
|
60 |
|
@see |
61 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
62 |
0
|
@Override... |
63 |
|
public String getReferenceId() { |
64 |
0
|
return referenceId; |
65 |
|
} |
66 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
67 |
0
|
@Override... |
68 |
|
public String getReferenceTypeKey() { |
69 |
0
|
return referenceTypeKey; |
70 |
|
} |
71 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
72 |
0
|
@Override... |
73 |
|
public void setReferenceTypeKey(String referenceTypeKey) { |
74 |
0
|
this.referenceTypeKey = referenceTypeKey; |
75 |
0
|
handlers.fireEvent(new ModelChangeEvent(Action.RELOAD, this)); |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
78 |
0
|
@Override... |
79 |
|
public String getReferenceType() { |
80 |
0
|
return referenceType; |
81 |
|
} |
82 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
83 |
0
|
@Override... |
84 |
|
public void setReferenceType(String referenceType) { |
85 |
0
|
this.referenceType = referenceType; |
86 |
0
|
handlers.fireEvent(new ModelChangeEvent(Action.RELOAD, this)); |
87 |
|
} |
88 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
89 |
0
|
@Override... |
90 |
|
public String getReferenceState() { |
91 |
0
|
return referenceState; |
92 |
|
} |
93 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
94 |
0
|
@Override... |
95 |
|
public void setReferenceState(String referenceState) { |
96 |
0
|
this.referenceState = referenceState; |
97 |
0
|
handlers.fireEvent(new ModelChangeEvent(Action.RELOAD, this)); |
98 |
|
} |
99 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
100 |
0
|
public Map<String, String> getReferenceAttributes(){... |
101 |
0
|
if(referenceAttributes!=null){ |
102 |
0
|
return referenceAttributes; |
103 |
|
} |
104 |
|
else{ |
105 |
0
|
return new HashMap<String,String>(); |
106 |
|
} |
107 |
|
} |
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
108 |
0
|
public void setReferenceAttributes(Map<String, String> referenceAttributes){... |
109 |
0
|
this.referenceAttributes = referenceAttributes; |
110 |
0
|
handlers.fireEvent(new ModelChangeEvent(Action.RELOAD, this)); |
111 |
|
} |
112 |
|
} |