1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.kew.actionitem; |
18 | |
|
19 | |
import org.kuali.rice.kew.actionlist.DisplayParameters; |
20 | |
import org.kuali.rice.kew.exception.WorkflowException; |
21 | |
import org.kuali.rice.kew.preferences.Preferences; |
22 | |
import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue; |
23 | |
import org.kuali.rice.kew.service.KEWServiceLocator; |
24 | |
import org.kuali.rice.kew.util.KEWConstants; |
25 | |
import org.kuali.rice.kim.api.group.Group; |
26 | |
import org.kuali.rice.kim.api.services.KimApiServiceLocator; |
27 | |
import org.kuali.rice.kim.bo.Person; |
28 | |
|
29 | |
import javax.persistence.MappedSuperclass; |
30 | |
import javax.persistence.Transient; |
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
@MappedSuperclass |
40 | 0 | public class ActionItemActionListExtension extends ActionItem { |
41 | |
|
42 | |
private static final long serialVersionUID = -8801104028828059623L; |
43 | |
|
44 | 0 | @Transient |
45 | |
private Person delegatorPerson = null; |
46 | 0 | @Transient |
47 | |
private String delegatorName = ""; |
48 | |
@Transient |
49 | |
private DisplayParameters displayParameters; |
50 | 0 | @Transient |
51 | |
private boolean isInitialized = false; |
52 | 0 | @Transient |
53 | |
private Group delegatorGroup = null; |
54 | 0 | @Transient |
55 | |
private Group group = null; |
56 | |
@Transient |
57 | |
private DocumentRouteHeaderValue routeHeader; |
58 | |
|
59 | |
public Person getDelegatorPerson() { |
60 | 0 | return delegatorPerson; |
61 | |
} |
62 | |
|
63 | |
public String getDelegatorName() { |
64 | 0 | return delegatorName; |
65 | |
} |
66 | |
|
67 | |
public void initialize(Preferences preferences) throws WorkflowException { |
68 | 0 | if (isInitialized) { |
69 | 0 | return; |
70 | |
} |
71 | 0 | if (getGroupId() != null) { |
72 | 0 | group = super.getGroup(); |
73 | |
} |
74 | 0 | if (getDelegatorWorkflowId() != null) { |
75 | 0 | delegatorPerson = KimApiServiceLocator.getPersonService().getPerson(getDelegatorWorkflowId()); |
76 | 0 | if (delegatorPerson != null) { |
77 | 0 | delegatorName = delegatorPerson.getName(); |
78 | |
} |
79 | |
} |
80 | |
|
81 | 0 | if (getDelegatorGroupId() != null) { |
82 | 0 | delegatorGroup = KimApiServiceLocator.getIdentityManagementService().getGroup(getDelegatorGroupId()); |
83 | 0 | if (delegatorGroup !=null) |
84 | 0 | delegatorName = delegatorGroup.getName(); |
85 | |
} |
86 | 0 | if (KEWConstants.PREFERENCES_YES_VAL.equals(preferences.getShowDateApproved())) { |
87 | 0 | setLastApprovedDate(KEWServiceLocator.getActionTakenService().getLastApprovedDate(getDocumentId())); |
88 | |
} |
89 | 0 | isInitialized = true; |
90 | 0 | } |
91 | |
|
92 | |
public boolean isInitialized() { |
93 | 0 | return isInitialized; |
94 | |
} |
95 | |
|
96 | |
public DisplayParameters getDisplayParameters() { |
97 | 0 | return displayParameters; |
98 | |
} |
99 | |
|
100 | |
public void setDisplayParameters(DisplayParameters displayParameters) { |
101 | 0 | this.displayParameters = displayParameters; |
102 | 0 | } |
103 | |
|
104 | |
|
105 | |
|
106 | |
|
107 | |
public Group getGroup() { |
108 | 0 | return this.group; |
109 | |
} |
110 | |
|
111 | |
|
112 | |
|
113 | |
|
114 | |
public void setGroup(Group group) { |
115 | 0 | this.group = group; |
116 | 0 | } |
117 | |
|
118 | |
|
119 | |
|
120 | |
|
121 | |
public Group getDelegatorGroup() { |
122 | 0 | return this.delegatorGroup; |
123 | |
} |
124 | |
|
125 | |
|
126 | |
|
127 | |
|
128 | |
public void setDelegatorGroup(Group delegatorGroup) { |
129 | 0 | this.delegatorGroup = delegatorGroup; |
130 | 0 | } |
131 | |
|
132 | |
public DocumentRouteHeaderValue getRouteHeader() { |
133 | 0 | return this.routeHeader; |
134 | |
} |
135 | |
|
136 | |
public void setRouteHeader(DocumentRouteHeaderValue routeHeader) { |
137 | 0 | this.routeHeader = routeHeader; |
138 | 0 | } |
139 | |
|
140 | |
} |
141 | |
|