1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.kew.actionlist;
18
19 import java.io.Serializable;
20
21 import org.kuali.rice.kew.actionitem.ActionItem;
22 import org.kuali.rice.kew.actionlist.DisplayParameters;
23 import org.kuali.rice.kew.actions.ActionSet;
24 import org.kuali.rice.kew.dto.ActionRequestDTO;
25 import org.kuali.rice.kew.dto.RouteHeaderDTO;
26 import org.kuali.rice.kew.mail.CustomEmailAttribute;
27 import org.kuali.rice.kew.notes.CustomNoteAttribute;
28 import org.kuali.rice.kew.notes.Note;
29 import org.kuali.rice.kew.web.session.UserSession;
30
31
32 public class TestCustomActionList implements CustomActionListAttribute, Serializable, CustomEmailAttribute, CustomNoteAttribute {
33
34 private static final long serialVersionUID = -7212208304658959134L;
35
36 private RouteHeaderDTO routeHeaderVO;
37 private ActionRequestDTO actionRequestVO;
38 private UserSession userSession;
39
40 public TestCustomActionList() {}
41
42 public boolean isAuthorizedToAddNotes() throws Exception {
43 return true;
44 }
45
46 public boolean isAuthorizedToEditNote(Note note) throws Exception {
47 return true;
48 }
49
50 public String getCustomEmailBody() throws Exception {
51 return "This is a test. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body." +
52 " This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body." +
53 " This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body. This is a Customized Email Body.";
54 }
55
56 public String getCustomEmailSubject() throws Exception {
57 return "Customized Email Subject";
58 }
59
60 public ActionSet getLegalActions(UserSession userSession, ActionItem actionItem) throws Exception {
61 ActionSet actionSet = new ActionSet();
62 actionSet.addAcknowledge();
63 actionSet.addApprove();
64 actionSet.addCancel();
65 actionSet.addDisapprove();
66 return actionSet;
67 }
68
69 public DisplayParameters getDocHandlerDisplayParameters(UserSession userSession, ActionItem actionItem) throws Exception {
70 return new DisplayParameters(new Integer(300));
71 }
72
73 public RouteHeaderDTO getRouteHeaderVO() {
74 return routeHeaderVO;
75 }
76
77 public void setRouteHeaderVO(RouteHeaderDTO routeHeaderVO) {
78 this.routeHeaderVO = routeHeaderVO;
79 }
80
81 public ActionRequestDTO getActionRequestVO() {
82 return actionRequestVO;
83 }
84
85 public void setActionRequestVO(ActionRequestDTO actionRequestVO) {
86 this.actionRequestVO = actionRequestVO;
87 }
88
89 public UserSession getUserSession() {
90 return userSession;
91 }
92
93 public void setUserSession(UserSession userSession) {
94 this.userSession = userSession;
95 }
96
97
98 }