Home » Mojarra-2.0.1 » javax » faces » el » [javadoc | source]

    1   /*
    2    * $Id: ValueBinding.java,v 1.15 2007/04/27 22:00:08 ofung Exp $
    3    */
    4   
    5   /*
    6    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    7    * 
    8    * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    9    * 
   10    * The contents of this file are subject to the terms of either the GNU
   11    * General Public License Version 2 only ("GPL") or the Common Development
   12    * and Distribution License("CDDL") (collectively, the "License").  You
   13    * may not use this file except in compliance with the License. You can obtain
   14    * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
   15    * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
   16    * language governing permissions and limitations under the License.
   17    * 
   18    * When distributing the software, include this License Header Notice in each
   19    * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
   20    * Sun designates this particular file as subject to the "Classpath" exception
   21    * as provided by Sun in the GPL Version 2 section of the License file that
   22    * accompanied this code.  If applicable, add the following below the License
   23    * Header, with the fields enclosed by brackets [] replaced by your own
   24    * identifying information: "Portions Copyrighted [year]
   25    * [name of copyright owner]"
   26    * 
   27    * Contributor(s):
   28    * 
   29    * If you wish your version of this file to be governed by only the CDDL or
   30    * only the GPL Version 2, indicate your decision by adding "[Contributor]
   31    * elects to include this software in this distribution under the [CDDL or GPL
   32    * Version 2] license."  If you don't indicate a single choice of license, a
   33    * recipient has the option to distribute your version of this file under
   34    * either the CDDL, the GPL Version 2 or to extend the choice of license to
   35    * its licensees as provided above.  However, if you add GPL Version 2 code
   36    * and therefore, elected the GPL Version 2 license, then the option applies
   37    * only if the new code is made subject to such option by the copyright
   38    * holder.
   39    */
   40   
   41   
   42   package javax.faces.el;
   43   
   44   
   45   import javax.faces.context.FacesContext;
   46   
   47   
   48   /**
   49    * <p><strong>ValueBinding</strong> is an object that can be used
   50    * to access the property represented by an action or value binding
   51    * expression.  An immutable {@link ValueBinding} for a particular value binding
   52    * can be acquired by calling the <code>createValueBinding()</code> method of
   53    * the {@link javax.faces.application.Application} instance for this web
   54    * application.</p>
   55    *
   56    * @deprecated This has been replaced by {@link javax.el.ValueExpression}.
   57    */
   58   
   59   public abstract class ValueBinding {
   60   
   61   
   62       /**
   63        * <p>Return the value of the property represented by this
   64        * {@link ValueBinding}, relative to the specified {@link FacesContext}.
   65        * </p>
   66        *
   67        * @param context {@link FacesContext} for the current request
   68        *
   69        * @throws EvaluationException if an exception is thrown while getting
   70        *  the value (the thrown exception must be included as the
   71        *  <code>cause</code> property of this exception)
   72        * @throws NullPointerException if <code>context</code>
   73        *  is <code>null</code>
   74        * @throws PropertyNotFoundException if a specified property name
   75        *  does not exist, or is not readable
   76        */
   77       public abstract Object getValue(FacesContext context)
   78           throws EvaluationException, PropertyNotFoundException;
   79   
   80   
   81       /**
   82        * <p>Set the value of the property represented by this
   83        * {@link ValueBinding}, relative to the specified {@link FacesContext}.
   84        * </p>
   85        *
   86        * @param context {@link FacesContext} for the current request
   87        * @param value The new value to be set
   88        *
   89        * @throws EvaluationException if an exception is thrown while setting
   90        *  the value (the thrown exception must be included as the
   91        *  <code>cause</code> property of this exception)
   92        * @throws NullPointerException if <code>context</code>
   93        *  is <code>null</code>
   94        * @throws PropertyNotFoundException if a specified property name
   95        *  does not exist, or is not writeable
   96        */
   97       public abstract void setValue(FacesContext context, Object value)
   98           throws EvaluationException, PropertyNotFoundException;
   99   
  100   
  101       /**
  102        * <p>Return <code>true</code> if the specified property of the specified
  103        * property is known to be immutable; otherwise, return
  104        * <code>false</code>.</p>
  105        *
  106        * @param context {@link FacesContext} for the current request
  107        *
  108        * @throws EvaluationException if an exception is thrown while getting
  109        *  the description of the property (the thrown exception must be
  110        *  included as the <code>cause</code> property of this exception)
  111        * @throws NullPointerException if <code>context</code>
  112        *  is <code>null</code>
  113        * @throws PropertyNotFoundException if a specified property name
  114        *  does not exist
  115        */
  116       public abstract boolean isReadOnly(FacesContext context)
  117           throws EvaluationException, PropertyNotFoundException;
  118   
  119   
  120       /**
  121        * <p>Return the type of the property represented by this
  122        * {@link ValueBinding}, relative to the specified {@link FacesContext}.
  123        * </p>
  124        *
  125        * @param context {@link FacesContext} for the current request
  126        *
  127        * @throws EvaluationException if an exception is thrown while getting
  128        *  the description of the property (the thrown exception must be
  129        *  included as the <code>cause</code> property of this exception)
  130        * @throws NullPointerException if <code>context</code>
  131        *  is <code>null</code>
  132        * @throws PropertyNotFoundException if a specified property name
  133        *  does not exist
  134        */
  135       public abstract Class getType(FacesContext context)
  136           throws EvaluationException, PropertyNotFoundException;
  137   
  138   
  139       /**
  140        * <p>Return the (possibly <code>null</code>) expression String,
  141        * including the delimiters, from which this
  142        * <code>ValueBinding</code> was built.</p>
  143        *
  144        */
  145       public String getExpressionString() {
  146   	return null;
  147       }
  148   
  149   
  150   
  151   
  152   }

Home » Mojarra-2.0.1 » javax » faces » el » [javadoc | source]