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.clientapp.vo;
018:
019: import java.util.Collection;
020: import java.util.Iterator;
021:
022: /**
023: * @workflow.webservice-object
024: */
025: public class RuleVO implements java.io.Serializable {
026:
027: private static final long serialVersionUID = -6559003022586974704L;
028:
029: private Long ruleTemplateId;
030: private Boolean activeInd;
031: private String description;
032: private String docTypeName;
033: private String fromDate;
034: private String toDate;
035: private Boolean ignorePrevious;
036: private RuleResponsibilityVO[] ruleResponsibilities;
037: private RuleExtensionVO[] ruleExtensions;
038: private String ruleTemplateName;
039:
040: public RuleVO() {
041: }
042:
043: public Boolean getActiveInd() {
044: return activeInd;
045: }
046:
047: public void setActiveInd(Boolean activeInd) {
048: this .activeInd = activeInd;
049: }
050:
051: public String getDescription() {
052: return description;
053: }
054:
055: public void setDescription(String description) {
056: this .description = description;
057: }
058:
059: public String getDocTypeName() {
060: return docTypeName;
061: }
062:
063: public void setDocTypeName(String docTypeName) {
064: this .docTypeName = docTypeName;
065: }
066:
067: public String getFromDate() {
068: return fromDate;
069: }
070:
071: public void setFromDate(String fromDate) {
072: this .fromDate = fromDate;
073: }
074:
075: public Boolean getIgnorePrevious() {
076: return ignorePrevious;
077: }
078:
079: public void setIgnorePrevious(Boolean ignorePrevious) {
080: this .ignorePrevious = ignorePrevious;
081: }
082:
083: public RuleExtensionVO[] getRuleExtensions() {
084: return ruleExtensions;
085: }
086:
087: public void setRuleExtensions(RuleExtensionVO[] ruleExtensions) {
088: this .ruleExtensions = ruleExtensions;
089: }
090:
091: public void addRuleExtensions(
092: Collection<RuleExtensionVO> additionalRuleExtensions) {
093: if (getRuleExtensions() == null) {
094: setRuleExtensions(new RuleExtensionVO[0]);
095: }
096: RuleExtensionVO[] newRuleExtensions = new RuleExtensionVO[getRuleExtensions().length
097: + additionalRuleExtensions.size()];
098: System.arraycopy(getRuleExtensions(), 0, newRuleExtensions, 0,
099: getRuleExtensions().length);
100: int i = getRuleExtensions().length;
101: for (Iterator iter = additionalRuleExtensions.iterator(); iter
102: .hasNext();) {
103: RuleExtensionVO ruleExtension = (RuleExtensionVO) iter
104: .next();
105: newRuleExtensions[i] = ruleExtension;
106: i++;
107: }
108: setRuleExtensions(newRuleExtensions);
109: }
110:
111: public RuleResponsibilityVO[] getRuleResponsibilities() {
112: return ruleResponsibilities;
113: }
114:
115: public void setRuleResponsibilities(
116: RuleResponsibilityVO[] ruleResponsibilities) {
117: this .ruleResponsibilities = ruleResponsibilities;
118: }
119:
120: public void addRuleResponsibility(
121: RuleResponsibilityVO ruleResponsibility) {
122: if (getRuleResponsibilities() == null) {
123: setRuleResponsibilities(new RuleResponsibilityVO[0]);
124: }
125: RuleResponsibilityVO[] newRuleResponsibilities = new RuleResponsibilityVO[getRuleResponsibilities().length + 1];
126: System.arraycopy(getRuleResponsibilities(), 0,
127: newRuleResponsibilities, 0,
128: getRuleResponsibilities().length);
129: newRuleResponsibilities[getRuleResponsibilities().length] = ruleResponsibility;
130: setRuleResponsibilities(newRuleResponsibilities);
131: }
132:
133: public Long getRuleTemplateId() {
134: return ruleTemplateId;
135: }
136:
137: public void setRuleTemplateId(Long ruleTemplateId) {
138: this .ruleTemplateId = ruleTemplateId;
139: }
140:
141: public String getRuleTemplateName() {
142: return ruleTemplateName;
143: }
144:
145: public void setRuleTemplateName(String ruleTemplateName) {
146: this .ruleTemplateName = ruleTemplateName;
147: }
148:
149: public String getToDate() {
150: return toDate;
151: }
152:
153: public void setToDate(String toDate) {
154: this.toDate = toDate;
155: }
156:
157: }
|