001: /*
002: * Copyright 2005-2006 The Kuali Foundation.
003: *
004: *
005: * Licensed under the Educational Community License, Version 1.0 (the "License");
006: * you may not use this file except in compliance with the License.
007: * You may obtain a copy of the License at
008: *
009: * http://www.opensource.org/licenses/ecl1.php
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package edu.iu.uis.eden.routetemplate.web;
018:
019: import java.util.List;
020: import java.util.Map;
021:
022: import org.apache.struts.action.ActionForm;
023:
024: import edu.iu.uis.eden.EdenConstants;
025: import edu.iu.uis.eden.routetemplate.RuleDelegation;
026: import edu.iu.uis.eden.routetemplate.RuleTemplate;
027: import edu.iu.uis.eden.routetemplate.RuleTemplateAttribute;
028: import edu.iu.uis.eden.util.Utilities;
029:
030: /**
031: * A Struts ActionForm for the {@link RuleTemplateAction}.
032: *
033: * @author rkirkend
034: * @author bmcgough
035: * @author jhopf
036: */
037: public class RuleTemplateForm extends ActionForm {
038:
039: private static final long serialVersionUID = -3540750513624610628L;
040: private RuleTemplate ruleTemplate;
041: private RuleTemplateAttribute ruleTemplateAttribute;
042: private List ruleAttributes;
043: private Integer removeAttribute;
044: private Integer editAttribute;
045: private Integer moveAttribute;
046: private int ruleTemplateAttributeSize;
047: private String ruleAttributeName;
048: private String methodToCall = "";
049: private String instructionForCreateNew;
050: private String delegationTemplateName;
051: private String lookupableImplServiceName;
052: private String conversionFields;
053: private Long currentRuleTemplateId;
054: private WebRuleBaseValues rule = new WebRuleBaseValues();
055: private RuleDelegation ruleDelegation;
056: private Map actionRequestCodes;
057:
058: private boolean createDefaultRule;
059: private boolean createDefaultDelegateRule;
060:
061: public RuleTemplateForm() {
062: this .ruleDelegation = new RuleDelegation();
063: this .ruleTemplate = new RuleTemplate();
064: this .ruleTemplateAttribute = new RuleTemplateAttribute();
065: methodToCall = "";
066: instructionForCreateNew = Utilities
067: .getApplicationConstant(EdenConstants.RULE_TEMPLATE_CREATE_NEW_INSTRUCTION_KEY);
068: }
069:
070: public Integer getEditAttribute() {
071: return editAttribute;
072: }
073:
074: public void setEditAttribute(Integer editAttribute) {
075: this .editAttribute = editAttribute;
076: }
077:
078: public Integer getRemoveAttribute() {
079: return removeAttribute;
080: }
081:
082: public void setRemoveAttribute(Integer removeAttribute) {
083: this .removeAttribute = removeAttribute;
084: }
085:
086: public List getRuleAttributes() {
087: return ruleAttributes;
088: }
089:
090: public void setRuleAttributes(List ruleAttributes) {
091: this .ruleAttributes = ruleAttributes;
092: }
093:
094: public RuleTemplate getRuleTemplate() {
095: return ruleTemplate;
096: }
097:
098: public void setRuleTemplate(RuleTemplate ruleTemplate) {
099: this .ruleTemplate = ruleTemplate;
100: }
101:
102: public RuleTemplateAttribute getRuleTemplateAttribute() {
103: return ruleTemplateAttribute;
104: }
105:
106: public void setRuleTemplateAttribute(
107: RuleTemplateAttribute ruleTemplateAttribute) {
108: this .ruleTemplateAttribute = ruleTemplateAttribute;
109: }
110:
111: /**
112: * @return Returns the ruleTemplateAttributeSize.
113: */
114: public int getRuleTemplateAttributeSize() {
115: return ruleTemplateAttributeSize;
116: }
117:
118: /**
119: * @param ruleTemplateAttributeSize
120: * The ruleTemplateAttributeSize to set.
121: */
122: public void setRuleTemplateAttributeSize(
123: int ruleTemplateAttributeSize) {
124: this .ruleTemplateAttributeSize = ruleTemplateAttributeSize;
125: }
126:
127: /**
128: * @return Returns the moveAttribute.
129: */
130: public Integer getMoveAttribute() {
131: return moveAttribute;
132: }
133:
134: /**
135: * @param moveAttribute
136: * The moveAttribute to set.
137: */
138: public void setMoveAttribute(Integer moveAttribute) {
139: this .moveAttribute = moveAttribute;
140: }
141:
142: public String getRuleAttributeName() {
143: return ruleAttributeName;
144: }
145:
146: public void setRuleAttributeName(String ruleAttributeName) {
147: this .ruleAttributeName = ruleAttributeName;
148: }
149:
150: public String getMethodToCall() {
151: return methodToCall;
152: }
153:
154: public void setMethodToCall(String methodToCall) {
155: this .methodToCall = methodToCall;
156: }
157:
158: public String getInstructionForCreateNew() {
159: return instructionForCreateNew;
160: }
161:
162: public void setInstructionForCreateNew(
163: String instructionForCreateNew) {
164: this .instructionForCreateNew = instructionForCreateNew;
165: }
166:
167: public String getDelegationTemplateName() {
168: return delegationTemplateName;
169: }
170:
171: public void setDelegationTemplateName(String delegationTemplateName) {
172: this .delegationTemplateName = delegationTemplateName;
173: }
174:
175: public String getLookupableImplServiceName() {
176: return lookupableImplServiceName;
177: }
178:
179: public void setLookupableImplServiceName(
180: String lookupableImplServiceName) {
181: this .lookupableImplServiceName = lookupableImplServiceName;
182: }
183:
184: public String getConversionFields() {
185: return conversionFields;
186: }
187:
188: public void setConversionFields(String conversionFields) {
189: this .conversionFields = conversionFields;
190: }
191:
192: public Long getCurrentRuleTemplateId() {
193: return currentRuleTemplateId;
194: }
195:
196: public void setCurrentRuleTemplateId(Long currentRuleTemplateId) {
197: this .currentRuleTemplateId = currentRuleTemplateId;
198: }
199:
200: public WebRuleBaseValues getRule() {
201: return rule;
202: }
203:
204: public void setRule(WebRuleBaseValues rule) {
205: this .rule = rule;
206: }
207:
208: public RuleDelegation getRuleDelegation() {
209: return ruleDelegation;
210: }
211:
212: public void setRuleDelegation(RuleDelegation ruleDelegation) {
213: this .ruleDelegation = ruleDelegation;
214: }
215:
216: public boolean isCreateDefaultRule() {
217: return createDefaultRule;
218: }
219:
220: public void setCreateDefaultRule(boolean createDefaultRule) {
221: this .createDefaultRule = createDefaultRule;
222: }
223:
224: public boolean isCreateDefaultDelegateRule() {
225: return createDefaultDelegateRule;
226: }
227:
228: public void setCreateDefaultDelegateRule(
229: boolean createDefaultDelegateRule) {
230: this .createDefaultDelegateRule = createDefaultDelegateRule;
231: }
232:
233: public Map getActionRequestCodes() {
234: return actionRequestCodes;
235: }
236:
237: public void setActionRequestCodes(Map actionRequestCodes) {
238: this.actionRequestCodes = actionRequestCodes;
239: }
240: }
|