1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.notes;
17
18 import org.kuali.rice.kew.api.document.Document;
19 import org.kuali.rice.krad.UserSession;
20
21
22
23
24
25
26 public class WorkflowNoteAttributeImpl implements CustomNoteAttribute {
27
28 private Document routeHeaderVO;
29
30 private UserSession userSession;
31
32 @Override
33 public boolean isAuthorizedToAddNotes() throws Exception {
34 return true;
35 }
36
37
38
39
40 @Override
41 public boolean isAuthorizedToEditNote(Note note) throws Exception {
42 return note.getNoteAuthorWorkflowId().equalsIgnoreCase(userSession.getPrincipalId());
43 }
44
45 @Override
46 public Document getRouteHeaderVO() {
47 return routeHeaderVO;
48 }
49
50 @Override
51 public void setRouteHeaderVO(Document routeHeaderVO) {
52 this.routeHeaderVO = routeHeaderVO;
53 }
54
55 @Override
56 public UserSession getUserSession() {
57 return userSession;
58 }
59
60 @Override
61 public void setUserSession(UserSession userSession) {
62 this.userSession = userSession;
63 }
64
65 @Override
66 public boolean isAuthorizedToRetrieveAttachments() throws Exception {
67 return true;
68 }
69 }