View Javadoc

1   /**
2    * Copyright 2005-2012 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.kew.rule;
17  
18  import java.io.Serializable;
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  import org.kuali.rice.kew.actionrequest.ActionRequestValue;
23  import org.kuali.rice.kew.api.identity.Id;
24  
25  /**
26   * The resolution of a qualified role (role name + data) to a List of recipient
27   * {@link Id}s.  In addition to the Ids of the recipients, a ResolvedQualifiedRole 
28   * can also contain a label for the role (to be displayed on the Route Log) and
29   * an annotation (to be displayed on the generated {@link ActionRequestValue}).
30   * 
31   * @see Id
32   * @see ActionRequestValue
33   *
34   * @author Kuali Rice Team (rice.collab@kuali.org)
35   */
36  public class ResolvedQualifiedRole implements Serializable {
37  
38  	private static final long serialVersionUID = 5397269690550273869L;
39  	
40  	private List<Id> recipients = new ArrayList<Id>();
41      private String qualifiedRoleLabel;
42      private String annotation;
43  
44      public ResolvedQualifiedRole() {
45      }
46  
47      public ResolvedQualifiedRole(String qualifiedRoleLabel, List<Id> recipients) {
48          this(qualifiedRoleLabel, recipients, "");
49      }
50      
51      public ResolvedQualifiedRole(String qualifiedRoleLabel, List<Id> recipients, String annotation) {
52          this.qualifiedRoleLabel = qualifiedRoleLabel;
53          this.recipients = recipients;
54          this.annotation = annotation;
55      }
56      
57      public List<Id> getRecipients() {
58          return recipients;
59      }
60      public void setRecipients(List<Id> users) {
61          this.recipients = users;
62      }
63      public String getQualifiedRoleLabel() {
64          return qualifiedRoleLabel;
65      }
66      public void setQualifiedRoleLabel(String qualifiedRoleLabel) {
67          this.qualifiedRoleLabel = qualifiedRoleLabel;
68      }
69      public String getAnnotation() {
70          return annotation;
71      }
72      public void setAnnotation(String annotation) {
73          this.annotation = annotation;
74      }
75      
76  }