View Javadoc

1   package org.kuali.student.core.rice;
2   
3   //TODO: This class needs to be combined with org.kuali.student.StudentWorkflowConstants class found in ks-lum-rice
4   public class StudentWorkflowConstants {
5   	
6   	//FIXME: The workflow doc type needs to be removed from ProposalWorkflowFilter
7   	public static final String WORKFLOW_DOCUMENT_TYPE = "ProposalWorkflowFilter.DocumentType";
8   
9   	public static final String DEFAULT_WORKFLOW_DOCUMENT_START_NODE_NAME = "PreRoute";
10  
11  	public static final String ROLE_NAME_ADHOC_EDIT_PERMISSIONS_ROLE_NAMESPACE = "KS-SYS";
12  	public static final String ROLE_NAME_ADHOC_EDIT_PERMISSIONS_ROLE_NAME = "Adhoc Permissions: Edit Document";
13  	public static final String ROLE_NAME_ADHOC_ADD_COMMENT_PERMISSIONS_ROLE_NAMESPACE = "KS-SYS";
14  	public static final String ROLE_NAME_ADHOC_ADD_COMMENT_PERMISSIONS_ROLE_NAME = "Adhoc Permissions: Comment on Document";
15  	
16  	public enum ActionRequestType {
17  		COMPLETE("C", "Complete"), 
18  		APPROVE("A", "Approve"), 
19  		ACKNOWLEDGE("K", "Acknowledge"), 
20  		FYI("F", "FYI");
21  
22  		private String actionRequestCode;
23  		private String actionRequestLabel;
24  
25  		private ActionRequestType(String actionRequestCode, String actionRequestLabel) {
26  			this.actionRequestCode = actionRequestCode;
27  			this.actionRequestLabel = actionRequestLabel;
28  		}
29  
30  		public String getActionRequestCode() {
31          	return actionRequestCode;
32          }
33  
34  		public void setActionRequestCode(String actionRequestCode) {
35          	this.actionRequestCode = actionRequestCode;
36          }
37  
38  		public String getActionRequestLabel() {
39          	return actionRequestLabel;
40          }
41  
42  		public void setActionRequestLabel(String actionRequestLabel) {
43          	this.actionRequestLabel = actionRequestLabel;
44          }
45  
46  		public static ActionRequestType getByCode(String actionRequestCode) {
47  			for (ActionRequestType type : ActionRequestType.values()) {
48  				if (type.getActionRequestCode().equals(actionRequestCode)) {
49  					return type;
50  				}
51  			}
52  			return null;
53  		}
54  	}
55  	
56  }