View Javadoc

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  public class RuleResponsibilityDTO implements java.io.Serializable {
20  
21      private static final long serialVersionUID = -5253556415865901457L;
22  
23      private Long responsibilityId;
24      private String actionRequestedCd;
25      private Integer priority;
26      private String approvePolicy;
27  /* 
28   *  Below we have replaced the two fields below with
29   *  specific fields for what could be associated with
30   *  this rule responsibility:
31   *  
32   *  ruleResponsibilityName
33   *  ruleResponsibilityType
34   */
35      private String principalId;
36      private String groupId;
37      private String roleName;
38      
39      private RuleDelegationDTO[] delegationRules;
40      
41      public RuleResponsibilityDTO() {}
42  
43      public String getActionRequestedCd() {
44          return actionRequestedCd;
45      }
46  
47      public void setActionRequestedCd(String actionRequestedCd) {
48          this.actionRequestedCd = actionRequestedCd;
49      }
50  
51      public String getApprovePolicy() {
52          return approvePolicy;
53      }
54  
55      public void setApprovePolicy(String approvePolicy) {
56          this.approvePolicy = approvePolicy;
57      }
58  
59      public RuleDelegationDTO[] getDelegationRules() {
60          return delegationRules;
61      }
62  
63      public void setDelegationRules(RuleDelegationDTO[] delegationRules) {
64          this.delegationRules = delegationRules;
65      }
66      
67      public void addDelegationRule(RuleDelegationDTO delegationRule) {
68          if (getDelegationRules() == null) {
69              setDelegationRules(new RuleDelegationDTO[0]);
70          }
71          RuleDelegationDTO[] newDelegationRules = new RuleDelegationDTO[getDelegationRules().length+1];
72          System.arraycopy(getDelegationRules(), 0, newDelegationRules, 0, getDelegationRules().length);
73          newDelegationRules[getDelegationRules().length] = delegationRule;
74          setDelegationRules(newDelegationRules);
75      }
76  
77      public Integer getPriority() {
78          return priority;
79      }
80  
81      public void setPriority(Integer priority) {
82          this.priority = priority;
83      }
84  
85      public Long getResponsibilityId() {
86          return responsibilityId;
87      }
88  
89      public void setResponsibilityId(Long responsibilityId) {
90          this.responsibilityId = responsibilityId;
91      }
92  
93      public String getRoleName() {
94          return roleName;
95      }
96  
97      public void setRoleName(String roleName) {
98          this.roleName = roleName;
99      }
100 
101     public String getPrincipalId() {
102         return principalId;
103     }
104 
105     public void setPrincipalId(String principalId) {
106         this.principalId = principalId;
107     }
108 
109     public String getGroupId() {
110         return groupId;
111     }
112 
113     public void setGroupId(String groupId) {
114         this.groupId = groupId;
115     }
116 
117 }