Coverage Report - org.seasar.teeda.core.el.ValueBindingBase
 
Classes in this File Line Coverage Branch Coverage Complexity
ValueBindingBase
100%
6/6
100%
4/4
1
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
 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,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.teeda.core.el;
 17  
 
 18  
 import java.util.Arrays;
 19  
 
 20  
 import javax.faces.component.StateHolder;
 21  
 import javax.faces.context.FacesContext;
 22  
 import javax.faces.el.ValueBinding;
 23  
 
 24  
 import org.seasar.teeda.core.JsfConstants;
 25  
 import org.seasar.teeda.core.managedbean.ManagedBeanFactory;
 26  
 import org.seasar.teeda.core.util.DIContainerUtil;
 27  
 
 28  
 /**
 29  
  * 
 30  
  * @author shot
 31  
  *
 32  
  */
 33  158
 public abstract class ValueBindingBase extends ValueBinding implements
 34  
         StateHolder {
 35  
 
 36  
     static {
 37  1
         Arrays.sort(JsfConstants.JSF_IMPLICIT_OBJECTS);
 38  159
     };
 39  
 
 40  
     protected abstract void setValueInScope(FacesContext context, String name,
 41  
             Object newValue);
 42  
 
 43  
     public abstract Object getExpression();
 44  
 
 45  
     protected final ManagedBeanFactory getManagedBeanFactory() {
 46  4
         return (ManagedBeanFactory) DIContainerUtil
 47  1
                 .getComponent(ManagedBeanFactory.class);
 48  
     }
 49  
 
 50  
     public static boolean isImplicitObject(String expressionString) {
 51  12
         return (Arrays.binarySearch(JsfConstants.JSF_IMPLICIT_OBJECTS,
 52  
                 expressionString) >= 0);
 53  
     }
 54  
 
 55  
 }