Coverage Report - org.kuali.rice.krad.uif.modifier.ComponentModifierBase
 
Classes in this File Line Coverage Branch Coverage Complexity
ComponentModifierBase
0%
0/16
N/A
1
 
 1  
 /*
 2  
  * Copyright 2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl1.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.krad.uif.modifier;
 17  
 
 18  
 import org.kuali.rice.krad.uif.UifConstants;
 19  
 import org.kuali.rice.krad.uif.container.View;
 20  
 import org.kuali.rice.krad.uif.core.Component;
 21  
 
 22  
 /**
 23  
  * Base class for <code>ComponentModifier</code> implementations
 24  
  * 
 25  
  * <p>
 26  
  * Holds run phase property and defaults to the INITIALIZE phase, and the order
 27  
  * property for setting the order in which the component modifier will be
 28  
  * invoked
 29  
  * </p>
 30  
  * 
 31  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 32  
  */
 33  
 public abstract class ComponentModifierBase implements ComponentModifier {
 34  
         private static final long serialVersionUID = -8284332412469942130L;
 35  
 
 36  
         private String runPhase;
 37  
         private String runCondition;
 38  
         private int order;
 39  
 
 40  0
         public ComponentModifierBase() {
 41  0
                 runPhase = UifConstants.ViewPhases.INITIALIZE;
 42  0
                 order = 0;
 43  0
         }
 44  
         
 45  
     /**
 46  
      * Default implementation of the overloaded performModification method that
 47  
      * calls the version that does not take the model (more commonly
 48  
      * implemented)
 49  
      * 
 50  
      * @see org.kuali.rice.krad.uif.modifier.ComponentModifier#performModification(org.kuali.rice.krad.uif.container.View,
 51  
      *      java.lang.Object, org.kuali.rice.krad.uif.core.Component)
 52  
      */
 53  
     @Override
 54  
     public void performModification(View view, Object model, Component component) {
 55  0
         performModification(view, component);
 56  0
     }
 57  
     
 58  
     /**
 59  
      * @see org.kuali.rice.krad.uif.modifier.ComponentModifier#performModification(org.kuali.rice.krad.uif.container.View,
 60  
      *      org.kuali.rice.krad.uif.core.Component)
 61  
      */
 62  
     @Override
 63  
     public void performModification(View view, Component component) {
 64  
         // do nothing
 65  0
     }
 66  
 
 67  
     /**
 68  
          * @see org.kuali.rice.krad.uif.modifier.ComponentModifier#getRunPhase()
 69  
          */
 70  
         public String getRunPhase() {
 71  0
                 return this.runPhase;
 72  
         }
 73  
 
 74  
         /**
 75  
          * Setter for the component initializer run phase
 76  
          * 
 77  
          * @param runPhase
 78  
          */
 79  
         public void setRunPhase(String runPhase) {
 80  0
                 this.runPhase = runPhase;
 81  0
         }
 82  
 
 83  
         /**
 84  
          * @see org.kuali.rice.krad.uif.modifier.ComponentModifier#getRunCondition()
 85  
          */
 86  
         public String getRunCondition() {
 87  0
                 return this.runCondition;
 88  
         }
 89  
 
 90  
         /**
 91  
          * Setter for the component modifiers run condition
 92  
          * 
 93  
          * @param runCondition
 94  
          */
 95  
         public void setRunCondition(String runCondition) {
 96  0
                 this.runCondition = runCondition;
 97  0
         }
 98  
 
 99  
         /**
 100  
          * @see org.springframework.core.Ordered#getOrder()
 101  
          */
 102  
         public int getOrder() {
 103  0
                 return this.order;
 104  
         }
 105  
 
 106  
         /**
 107  
          * @see org.kuali.rice.krad.uif.core.Ordered#setOrder(int)
 108  
          */
 109  
         public void setOrder(int order) {
 110  0
                 this.order = order;
 111  0
         }
 112  
 
 113  
 }