Coverage Report - org.kuali.student.common.ui.client.event.NavigationActionEvent
 
Classes in this File Line Coverage Branch Coverage Complexity
NavigationActionEvent
0%
0/19
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.common.ui.client.event;
 17  
 
 18  
 import org.kuali.student.common.ui.client.mvc.HasActionState;
 19  
 
 20  0
 public class NavigationActionEvent extends ActionEvent<NavigationActionHandler> implements HasActionState{
 21  0
     public static final Type<NavigationActionHandler> TYPE = new Type<NavigationActionHandler>();
 22  
     
 23  
     private ActionState actionState;
 24  
     private String navKey;
 25  
     private Enum<?> navEnum;
 26  
     
 27  0
     public NavigationActionEvent(String navKey){
 28  0
             this.navKey = navKey;
 29  0
     }
 30  
     
 31  0
     public NavigationActionEvent(Enum<?> navEnum){
 32  0
             this.navKey = navEnum.toString();
 33  0
             this.setNavEnum(navEnum);
 34  0
     }
 35  
    
 36  
         @Override
 37  
         protected void dispatch(NavigationActionHandler handler) {
 38  0
                 handler.processNavigation(this);
 39  0
         }
 40  
 
 41  
         @Override
 42  
         public Type<NavigationActionHandler> getAssociatedType() {
 43  0
                 return TYPE;
 44  
         }
 45  
         
 46  
 
 47  
     public void setActionState(ActionState state){
 48  0
         this.actionState = state;
 49  0
     }
 50  
     
 51  
     /**
 52  
      * @see org.kuali.student.common.ui.client.mvc.HasActionState#getActionState()
 53  
      */
 54  
     @Override
 55  
     public ActionState getActionState() {
 56  0
         return this.actionState;
 57  
     }
 58  
 
 59  
         public String getNavKey() {
 60  0
                 return navKey;
 61  
         }
 62  
 
 63  
         public void setNavEnum(Enum<?> navEnum) {
 64  0
                 this.navEnum = navEnum;
 65  0
         }
 66  
 
 67  
         public Enum<?> getNavEnum() {
 68  0
                 return navEnum;
 69  
         }
 70  
     
 71  
 }