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.web;
18  
19  import java.io.Serializable;
20  import java.util.Map;
21  
22  import org.kuali.rice.kew.util.CodeTranslator;
23  
24  
25  /**
26   * A bean for the web-tier when represents the recipient of an Ad Hoc request.
27   *
28   * @author Kuali Rice Team (rice.collab@kuali.org)
29   */
30  public class AppSpecificRouteRecipient implements Serializable {
31  
32  	private static final long serialVersionUID = 6587140192756322878L;
33  
34  	private static Map actionRequestCds = CodeTranslator.arLabels;
35  
36      protected String type;
37      protected String actionRequested;
38      protected String id;  //can be networkId or groupId (although, currently, it's being treated as principal name or group name)
39      protected String namespaceCode; // Can be a group namespace code or a person name
40      protected Long actionRequestId; // The action request ID of the AdHoc route action that was sent for this app specific recipient, if any.
41  
42      public String getActionRequested() {
43          return actionRequested;
44      }
45      public void setActionRequested(String actionRequested) {
46          this.actionRequested = actionRequested;
47      }
48      public String getId() {
49          return id;
50      }
51      public void setId(String id) {
52          this.id = id;
53      }
54      public String getType() {
55          return type;
56      }
57      public void setType(String type) {
58          this.type = type;
59      }
60      
61      public String getNamespaceCode() {
62      	return namespaceCode;
63      }
64      public void setNamespaceCode(String namespaceCode) {
65      	this.namespaceCode = namespaceCode;
66      }
67  
68      public Long getActionRequestId() {
69      	return actionRequestId;
70      }
71      
72      public void setActionRequestId(Long actionRequestId) {
73      	this.actionRequestId = actionRequestId;
74      }
75      
76      public String getActionRequestedValue(){
77          if(getActionRequested() != null && !getActionRequested().trim().equals("")){
78              return (String) actionRequestCds.get(getActionRequested());
79          }
80          return null;
81      }
82      
83  }