Coverage Report - org.kuali.rice.kew.dto.RuleDTO
 
Classes in this File Line Coverage Branch Coverage Complexity
RuleDTO
0%
0/50
0%
0/6
1.13
 
 1  
 /*
 2  
  * Copyright 2005-2008 The Kuali Foundation
 3  
  * 
 4  
  * 
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  * 
 9  
  * http://www.opensource.org/licenses/ecl2.php
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.kuali.rice.kew.dto;
 18  
 
 19  
 import java.util.Collection;
 20  
 import java.util.Iterator;
 21  
 
 22  
 public class RuleDTO implements java.io.Serializable {
 23  
     
 24  
     private static final long serialVersionUID = -6559003022586974704L;
 25  
 
 26  
     private String ruleTemplateId;
 27  
     private Boolean activeInd;
 28  
     private String description;
 29  
     private String docTypeName;
 30  
     private String fromDate;
 31  
     private String toDate;
 32  
     private Boolean forceAction;
 33  
     private RuleResponsibilityDTO[] ruleResponsibilities;
 34  
     private RuleExtensionDTO[] ruleExtensions;
 35  
     private String ruleTemplateName;
 36  
     
 37  0
     public RuleDTO() {}
 38  
 
 39  
     public Boolean getActiveInd() {
 40  0
         return activeInd;
 41  
     }
 42  
 
 43  
     public void setActiveInd(Boolean activeInd) {
 44  0
         this.activeInd = activeInd;
 45  0
     }
 46  
 
 47  
     public String getDescription() {
 48  0
         return description;
 49  
     }
 50  
 
 51  
     public void setDescription(String description) {
 52  0
         this.description = description;
 53  0
     }
 54  
 
 55  
     public String getDocTypeName() {
 56  0
         return docTypeName;
 57  
     }
 58  
 
 59  
     public void setDocTypeName(String docTypeName) {
 60  0
         this.docTypeName = docTypeName;
 61  0
     }
 62  
 
 63  
     public String getFromDate() {
 64  0
         return fromDate;
 65  
     }
 66  
 
 67  
     public void setFromDate(String fromDate) {
 68  0
         this.fromDate = fromDate;
 69  0
     }
 70  
 
 71  
     public Boolean getForceAction() {
 72  0
         return forceAction;
 73  
     }
 74  
 
 75  
     public void setForceAction(Boolean forceAction) {
 76  0
         this.forceAction = forceAction;
 77  0
     }
 78  
 
 79  
     public RuleExtensionDTO[] getRuleExtensions() {
 80  0
         return ruleExtensions;
 81  
     }
 82  
 
 83  
     public void setRuleExtensions(RuleExtensionDTO[] ruleExtensions) {
 84  0
         this.ruleExtensions = ruleExtensions;
 85  0
     }
 86  
 
 87  
     public void addRuleExtensions(Collection<RuleExtensionDTO> additionalRuleExtensions) {
 88  0
         if (getRuleExtensions() == null) {
 89  0
             setRuleExtensions(new RuleExtensionDTO[0]);
 90  
         }
 91  0
         RuleExtensionDTO[] newRuleExtensions = new RuleExtensionDTO[getRuleExtensions().length+additionalRuleExtensions.size()];
 92  0
         System.arraycopy(getRuleExtensions(), 0, newRuleExtensions, 0, getRuleExtensions().length);
 93  0
         int i = getRuleExtensions().length;
 94  0
         for (Iterator iter = additionalRuleExtensions.iterator(); iter.hasNext();) {
 95  0
             RuleExtensionDTO ruleExtension = (RuleExtensionDTO) iter.next();
 96  0
             newRuleExtensions[i] = ruleExtension;
 97  0
             i++;
 98  0
         }
 99  0
         setRuleExtensions(newRuleExtensions);
 100  0
     }
 101  
     
 102  
     public RuleResponsibilityDTO[] getRuleResponsibilities() {
 103  0
         return ruleResponsibilities;
 104  
     }
 105  
 
 106  
     public void setRuleResponsibilities(RuleResponsibilityDTO[] ruleResponsibilities) {
 107  0
         this.ruleResponsibilities = ruleResponsibilities;
 108  0
     }
 109  
 
 110  
     public void addRuleResponsibility(RuleResponsibilityDTO ruleResponsibility) {
 111  0
         if (getRuleResponsibilities() == null) {
 112  0
             setRuleResponsibilities(new RuleResponsibilityDTO[0]);
 113  
         }
 114  0
         RuleResponsibilityDTO[] newRuleResponsibilities = new RuleResponsibilityDTO[getRuleResponsibilities().length+1];
 115  0
         System.arraycopy(getRuleResponsibilities(), 0, newRuleResponsibilities, 0, getRuleResponsibilities().length);
 116  0
         newRuleResponsibilities[getRuleResponsibilities().length] = ruleResponsibility;
 117  0
         setRuleResponsibilities(newRuleResponsibilities);
 118  0
     }
 119  
     
 120  
     public String getRuleTemplateId() {
 121  0
         return ruleTemplateId;
 122  
     }
 123  
 
 124  
     public void setRuleTemplateId(String ruleTemplateId) {
 125  0
         this.ruleTemplateId = ruleTemplateId;
 126  0
     }
 127  
 
 128  
     public String getRuleTemplateName() {
 129  0
         return ruleTemplateName;
 130  
     }
 131  
 
 132  
     public void setRuleTemplateName(String ruleTemplateName) {
 133  0
         this.ruleTemplateName = ruleTemplateName;
 134  0
     }
 135  
 
 136  
     public String getToDate() {
 137  0
         return toDate;
 138  
     }
 139  
 
 140  
     public void setToDate(String toDate) {
 141  0
         this.toDate = toDate;
 142  0
     }
 143  
     
 144  
     
 145  
 }