org.apache.shale.test.mock
Class MockValueBinding

java.lang.Object
  extended by javax.faces.el.ValueBinding
      extended by org.apache.shale.test.mock.MockValueBinding
All Implemented Interfaces:
javax.faces.component.StateHolder

public class MockValueBinding
extends javax.faces.el.ValueBinding
implements javax.faces.component.StateHolder

Mock implementation of ValueBinding.


Constructor Summary
MockValueBinding()
          Construct a default instance.
MockValueBinding(javax.faces.application.Application application, String ref)
          Construct a new value binding for the specified expression.
 
Method Summary
 String getExpressionString()
          
 Class getType(javax.faces.context.FacesContext context)
          
 Object getValue(javax.faces.context.FacesContext context)
          
 boolean isReadOnly(javax.faces.context.FacesContext context)
          
 boolean isTransient()
          
 String ref()
          Return the expression string for this value binding.
 void restoreState(javax.faces.context.FacesContext context, Object state)
          
 Object saveState(javax.faces.context.FacesContext context)
          
 void setTransient(boolean transientFlag)
          
 void setValue(javax.faces.context.FacesContext context, Object value)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockValueBinding

public MockValueBinding()

Construct a default instance.


MockValueBinding

public MockValueBinding(javax.faces.application.Application application,
                        String ref)

Construct a new value binding for the specified expression.

Parameters:
application - Application instance to be wrapped
ref - Expression to be wrapped
Method Detail

ref

public String ref()

Return the expression string for this value binding.


getValue

public Object getValue(javax.faces.context.FacesContext context)
                throws javax.faces.el.EvaluationException,
                       javax.faces.el.PropertyNotFoundException

Specified by:
getValue in class javax.faces.el.ValueBinding
Throws:
javax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException

setValue

public void setValue(javax.faces.context.FacesContext context,
                     Object value)
              throws javax.faces.el.EvaluationException,
                     javax.faces.el.PropertyNotFoundException

Specified by:
setValue in class javax.faces.el.ValueBinding
Throws:
javax.faces.el.EvaluationException
javax.faces.el.PropertyNotFoundException

isReadOnly

public boolean isReadOnly(javax.faces.context.FacesContext context)
                   throws javax.faces.el.PropertyNotFoundException

Specified by:
isReadOnly in class javax.faces.el.ValueBinding
Throws:
javax.faces.el.PropertyNotFoundException

getType

public Class getType(javax.faces.context.FacesContext context)
              throws javax.faces.el.PropertyNotFoundException

Specified by:
getType in class javax.faces.el.ValueBinding
Throws:
javax.faces.el.PropertyNotFoundException

getExpressionString

public String getExpressionString()

Overrides:
getExpressionString in class javax.faces.el.ValueBinding

saveState

public Object saveState(javax.faces.context.FacesContext context)

Specified by:
saveState in interface javax.faces.component.StateHolder

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object state)

Specified by:
restoreState in interface javax.faces.component.StateHolder

isTransient

public boolean isTransient()

Specified by:
isTransient in interface javax.faces.component.StateHolder

setTransient

public void setTransient(boolean transientFlag)

Specified by:
setTransient in interface javax.faces.component.StateHolder


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.