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