Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
DocumentRouteHeaderValueActionListExtension |
|
| 1.3333333333333333;1.333 |
1 | /* | |
2 | * Copyright 2005-2008 The Kuali Foundation | |
3 | * | |
4 | * | |
5 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
6 | * you may not use this file except in compliance with the License. | |
7 | * You may obtain a copy of the License at | |
8 | * | |
9 | * http://www.opensource.org/licenses/ecl2.php | |
10 | * | |
11 | * Unless required by applicable law or agreed to in writing, software | |
12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | * See the License for the specific language governing permissions and | |
15 | * limitations under the License. | |
16 | */ | |
17 | package org.kuali.rice.kew.routeheader; | |
18 | ||
19 | import org.kuali.rice.kim.api.identity.principal.PrincipalContract; | |
20 | import org.kuali.rice.kim.api.services.KimApiServiceLocator; | |
21 | import org.kuali.rice.kim.bo.Person; | |
22 | ||
23 | import javax.persistence.MappedSuperclass; | |
24 | import javax.persistence.Transient; | |
25 | ||
26 | ||
27 | /** | |
28 | * An extension of {@link DocumentRouteHeaderValue} which is mapped to OJB to help | |
29 | * with optimization of the loading of a user's Action List. | |
30 | * | |
31 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
32 | */ | |
33 | //@Entity | |
34 | //@Table(name="KREW_DOC_HDR_T") | |
35 | @MappedSuperclass | |
36 | 0 | public class DocumentRouteHeaderValueActionListExtension extends DocumentRouteHeaderValue { |
37 | ||
38 | private static final long serialVersionUID = 8458532812557846684L; | |
39 | ||
40 | 0 | @Transient |
41 | private PrincipalContract actionListInitiatorPrincipal = null; | |
42 | ||
43 | public PrincipalContract getActionListInitiatorPrincipal() { | |
44 | 0 | return actionListInitiatorPrincipal; |
45 | } | |
46 | ||
47 | public void setActionListInitiatorPrincipal(PrincipalContract actionListInitiatorPrincipal) { | |
48 | 0 | this.actionListInitiatorPrincipal = actionListInitiatorPrincipal; |
49 | 0 | } |
50 | ||
51 | /** | |
52 | * Gets the initiator name, masked appropriately if restricted. | |
53 | */ | |
54 | public String getInitiatorName() { | |
55 | 0 | String initiatorName = null; |
56 | 0 | Person initiator = KimApiServiceLocator.getPersonService().getPerson(getActionListInitiatorPrincipal().getPrincipalId()); |
57 | 0 | if (initiator != null) { |
58 | 0 | initiatorName = initiator.getName(); |
59 | } | |
60 | 0 | return initiatorName; |
61 | } | |
62 | ||
63 | } | |
64 |