View Javadoc

1   /**
2    * Copyright 2005-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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   * @author Kuali Student Team
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  
41      private Tree<CompareTreeNode, String> compareTree;
42  
43      private String compareLightBoxHeader;
44  
45      public String getRefObjectId() {
46          return refObjectId;
47      }
48  
49      public void setRefObjectId(String refObjectId) {
50          this.refObjectId = refObjectId;
51      }
52  
53      public List<AgendaEditor> getAgendas() {
54          return agendas;
55      }
56  
57      public void setAgendas(List<AgendaEditor> agendas) {
58          this.agendas = agendas;
59      }
60  
61      public Tree<CompareTreeNode, String> getCompareTree() {
62          return compareTree;
63      }
64  
65      public void setCompareTree(Tree<CompareTreeNode, String> compareTree) {
66          this.compareTree = compareTree;
67      }
68  
69      public RuleEditor getRuleEditor() {
70          return ruleEditor;
71      }
72  
73      public void setRuleEditor(RuleEditor ruleEditor) {
74          this.ruleEditor = ruleEditor;
75      }
76  
77      public AgendaEditor getAgendaEditor() {
78          return agendaEditor;
79      }
80  
81      public void setAgendaEditor(AgendaEditor agendaEditor) {
82          this.agendaEditor = agendaEditor;
83      }
84  
85      public Tree<RuleEditorTreeNode, String> getEditTree() {
86          return this.getRuleEditor().getEditTree();
87      }
88  
89      public Tree<TreeNode, String> getPreviewTree() {
90          return this.getRuleEditor().getPreviewTree();
91      }
92  
93      public Tree<TreeNode, String> getViewTree() {
94         return this.getRuleEditor().getViewTree();
95      }
96  
97      public void setActiveSelections(List<String> activeSelections) {
98          this.getRuleEditor().setActiveSelections(activeSelections);
99      }
100 
101     public List<String> getActiveSelections(){
102         return this.getRuleEditor().getActiveSelections();
103     }
104 
105     public String getSelectedKey() {
106         if(this.getRuleEditor() == null) {
107             return StringUtils.EMPTY;
108         }
109         return this.getRuleEditor().getSelectedKey();
110     }
111 
112     public void setSelectedKey(String selectedKey) {
113         this.getRuleEditor().setSelectedKey(selectedKey);
114     }
115 
116     public String getCutKey() {
117         if(this.getRuleEditor() == null) {
118             return StringUtils.EMPTY;
119         }
120         return this.getRuleEditor().getCutKey();
121     }
122 
123     public void setCutKey(String cutKey) {
124         this.getRuleEditor().setCutKey(cutKey);
125     }
126 
127     public String getCopyKey() {
128         if(this.getRuleEditor() == null) {
129             return StringUtils.EMPTY;
130         }
131         return this.getRuleEditor().getCopyKey();
132     }
133 
134     public void setCopyKey(String copyKey) {
135         this.getRuleEditor().setCopyKey(copyKey);
136     }
137 
138     public String getLogicArea() {
139         if(this.getRuleEditor() == null) {
140             return StringUtils.EMPTY;
141         }
142         return this.getRuleEditor().getLogicArea();
143     }
144 
145     public void setLogicArea(String logicArea) {
146         this.getRuleEditor().setLogicArea(logicArea);
147     }
148 
149     public String getNamespace() {
150         return namespace;
151     }
152 
153     public void setNamespace(String namespace) {
154         this.namespace = namespace;
155     }
156 
157     public String getRefDiscriminatorType() {
158         return refDiscriminatorType;
159     }
160 
161     public void setRefDiscriminatorType(String refDiscriminatorType) {
162         this.refDiscriminatorType = refDiscriminatorType;
163     }
164 
165     public String getCompareLightBoxHeader(){
166         return compareLightBoxHeader;
167     }
168 
169     public void setCompareLightBoxHeader( String compareLightBoxHeader){
170         this.compareLightBoxHeader = compareLightBoxHeader;
171     }
172 }