1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.dto;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.rice.core.api.util.tree.Tree;
20 import org.kuali.rice.krad.web.form.UifFormBase;
21 import org.kuali.rice.krms.tree.node.CompareTreeNode;
22 import org.kuali.rice.krms.tree.node.RuleEditorTreeNode;
23 import org.kuali.rice.krms.tree.node.TreeNode;
24
25 import java.util.ArrayList;
26 import java.util.List;
27
28
29
30
31 public class RuleManagementWrapper extends UifFormBase {
32
33 private String refObjectId;
34 private String namespace;
35 private String refDiscriminatorType;
36
37 private List<AgendaEditor> agendas;
38 private RuleEditor ruleEditor;
39 private AgendaEditor agendaEditor;
40 private boolean hasOptimisticLockingError;
41
42 private Tree<CompareTreeNode, String> compareTree;
43
44 private String compareLightBoxHeader;
45
46 public String getRefObjectId() {
47 return refObjectId;
48 }
49
50 public void setRefObjectId(String refObjectId) {
51 this.refObjectId = refObjectId;
52 }
53
54 public List<AgendaEditor> getAgendas() {
55 if(agendas==null){
56 agendas = new ArrayList<AgendaEditor>();
57 }
58 return agendas;
59 }
60
61 public void setAgendas(List<AgendaEditor> agendas) {
62 this.agendas = agendas;
63 }
64
65 public Tree<CompareTreeNode, String> getCompareTree() {
66 return compareTree;
67 }
68
69 public void setCompareTree(Tree<CompareTreeNode, String> compareTree) {
70 this.compareTree = compareTree;
71 }
72
73 public RuleEditor getRuleEditor() {
74 return ruleEditor;
75 }
76
77 public void setRuleEditor(RuleEditor ruleEditor) {
78 this.ruleEditor = ruleEditor;
79 }
80
81 public AgendaEditor getAgendaEditor() {
82 return agendaEditor;
83 }
84
85 public void setAgendaEditor(AgendaEditor agendaEditor) {
86 this.agendaEditor = agendaEditor;
87 }
88
89 public Tree<RuleEditorTreeNode, String> getEditTree() {
90 return this.getRuleEditor().getEditTree();
91 }
92
93 public Tree<TreeNode, String> getPreviewTree() {
94 return this.getRuleEditor().getPreviewTree();
95 }
96
97 public Tree<TreeNode, String> getViewTree() {
98 return this.getRuleEditor().getViewTree();
99 }
100
101 public void setActiveSelections(List<String> activeSelections) {
102 this.getRuleEditor().setActiveSelections(activeSelections);
103 }
104
105 public List<String> getActiveSelections(){
106 return this.getRuleEditor().getActiveSelections();
107 }
108
109 public String getSelectedKey() {
110 if(this.getRuleEditor() == null) {
111 return StringUtils.EMPTY;
112 }
113 return this.getRuleEditor().getSelectedKey();
114 }
115
116 public void setSelectedKey(String selectedKey) {
117 this.getRuleEditor().setSelectedKey(selectedKey);
118 }
119
120 public String getCutKey() {
121 if(this.getRuleEditor() == null) {
122 return StringUtils.EMPTY;
123 }
124 return this.getRuleEditor().getCutKey();
125 }
126
127 public void setCutKey(String cutKey) {
128 this.getRuleEditor().setCutKey(cutKey);
129 }
130
131 public String getCopyKey() {
132 if(this.getRuleEditor() == null) {
133 return StringUtils.EMPTY;
134 }
135 return this.getRuleEditor().getCopyKey();
136 }
137
138 public void setCopyKey(String copyKey) {
139 this.getRuleEditor().setCopyKey(copyKey);
140 }
141
142 public String getLogicArea() {
143 if(this.getRuleEditor() == null) {
144 return StringUtils.EMPTY;
145 }
146 return this.getRuleEditor().getLogicArea();
147 }
148
149 public void setLogicArea(String logicArea) {
150 this.getRuleEditor().setLogicArea(logicArea);
151 }
152
153 public String getNamespace() {
154 return namespace;
155 }
156
157 public void setNamespace(String namespace) {
158 this.namespace = namespace;
159 }
160
161 public String getRefDiscriminatorType() {
162 return refDiscriminatorType;
163 }
164
165 public void setRefDiscriminatorType(String refDiscriminatorType) {
166 this.refDiscriminatorType = refDiscriminatorType;
167 }
168
169 public String getCompareLightBoxHeader(){
170 return compareLightBoxHeader;
171 }
172
173 public void setCompareLightBoxHeader( String compareLightBoxHeader){
174 this.compareLightBoxHeader = compareLightBoxHeader;
175 }
176
177 public boolean hasOptimisticLockingError() {
178 return hasOptimisticLockingError;
179 }
180
181 public void setHasOptimisticLockingError(boolean hasOptimisticLockingError) {
182 this.hasOptimisticLockingError = hasOptimisticLockingError;
183 }
184 }