View Javadoc

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