Coverage Report - org.kuali.rice.kew.routeheader.DocumentRouteHeaderValueActionListExtension
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentRouteHeaderValueActionListExtension
0%
0/10
0%
0/2
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 javax.persistence.Transient;
 20  
 
 21  
 import org.apache.commons.lang.StringUtils;
 22  
 import org.kuali.rice.kew.user.UserUtils;
 23  
 import org.kuali.rice.kew.web.session.UserSession;
 24  
 import org.kuali.rice.kim.bo.Person;
 25  
 import org.kuali.rice.kim.bo.entity.KimPrincipal;
 26  
 import org.kuali.rice.kim.bo.entity.dto.KimEntityDefaultInfo;
 27  
 import org.kuali.rice.kim.service.KIMServiceLocator;
 28  
 
 29  
 
 30  
 /**
 31  
  * An extension of {@link DocumentRouteHeaderValue} which is mapped to OJB to help
 32  
  * with optimization of the loading of a user's Action List.
 33  
  *
 34  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 35  
  */
 36  
 //@Entity
 37  
 //@Table(name="KREW_DOC_HDR_T")
 38  0
 public class DocumentRouteHeaderValueActionListExtension extends DocumentRouteHeaderValue {
 39  
 
 40  
         private static final long serialVersionUID = 8458532812557846684L;
 41  
 
 42  0
     @Transient
 43  
         private KimPrincipal actionListInitiatorPrincipal = null;
 44  
 
 45  
     public KimPrincipal getActionListInitiatorPrincipal() {
 46  0
         return actionListInitiatorPrincipal;
 47  
     }
 48  
 
 49  
     public void setActionListInitiatorPrincipal(KimPrincipal actionListInitiatorPrincipal) {
 50  0
         this.actionListInitiatorPrincipal = actionListInitiatorPrincipal;
 51  0
     }
 52  
 
 53  
     /**
 54  
      * Gets the initiator name, masked appropriately if restricted.
 55  
      */
 56  
     public String getInitiatorName() {
 57  0
         String initiatorName = null;
 58  0
         Person initiator = KIMServiceLocator.getPersonService().getPerson(getActionListInitiatorPrincipal().getPrincipalId());
 59  0
             if (initiator != null) {
 60  0
                 initiatorName = initiator.getName();
 61  
             }
 62  0
             return initiatorName;
 63  
     }
 64  
 
 65  
 }
 66