| java.lang.Object org.iscreen.impl.ContextBean
ContextBean | public class ContextBean (Code) | | This class represents the JavaBean that's used to evaluate OGNL
expressions. Failure messages and documentation may reference
this JavaBean to reference its properties. Note that certain
properties are certain lifecycles (meaning, they are valid at
certain times). For example, the failure property is only
available during runtime, after a validation has been performed
(and a failure has been discovered). Therefore, it's not "valid"
to reference it within documentation. Note the lifecycles of
each property on the getters/setters.
author: Shellman, Dan |
Constructor Summary | |
public | ContextBean() Default constructor. |
Method Summary | |
public Object | getBean() The JavaBean being validated can be retrieved by failure
messages, since the bean is set prior to validation (prior
to any validators being called). | public Object | getFailure() The failure object, which represents an object associated with
a particular failure (and failure message), is available to
failure messages, as it's set prior to them being evaluated. | public Collection | getFields() Returns the fields, which are OGNL 'getter' expressions. | public Integer | getIndex() Gets the index of this OGNL root. | public String | getLabel() The label is available during runtime, prior to any validators
being called (prior to validation). | public Validator | getValidator() The Validator is available during runtime, prior to
any validators being called (prior to validation). | public void | setBean(Object theBean) The JavaBean being validated is set during runtime, prior to
any validators being called (prior to validation). | public void | setFailure(Object theFailure) The failure object, which represents an object associated with
a particular failure (and failure message), is set during
validation, when a validator reports the failure. | public void | setFields(Collection theFields) The fields, which are a collection of OGNL 'getter' expressions meant
to map from the JavaBean (or object) being validated to the validation
bean used by the Validator, are set prior to validation. | public void | setIndex(int theIndex) Sets the index of this OGNL root. | public void | setLabel(String theLabel) The label is set during runtime, prior to any validators
being called (prior to validation). | public void | setValidator(Validator theValidator) The Validator is set during runtime, prior to any
validators being called (prior to validation). |
ContextBean | public ContextBean()(Code) | | Default constructor.
|
getBean | public Object getBean()(Code) | | The JavaBean being validated can be retrieved by failure
messages, since the bean is set prior to validation (prior
to any validators being called).
Returns the JavaBean being validated. |
getFailure | public Object getFailure()(Code) | | The failure object, which represents an object associated with
a particular failure (and failure message), is available to
failure messages, as it's set prior to them being evaluated.
Return the failure object set by a Validator duringvalidation (associated with a failure message). |
getFields | public Collection getFields()(Code) | | Returns the fields, which are OGNL 'getter' expressions. These are
set prior to validation.
Returns the fields (OGNL 'getter' expressions) being validated. |
getIndex | public Integer getIndex()(Code) | | Gets the index of this OGNL root. This index is used when a JavaBean/Object
has a property that is some form of array/Collection that is being
validated across. The index represents the particular object within
the array/Collection that is being validated. If a JavaBean/Object is
NOT being used in this way (such as the parent JavaBean), then this
method will return null (note that null is NOT the same as zero, since
zero is the first index in an array/Collection, where null means that
there is no array/Collection being validated).
Returns the index of the JavaBean property being validated. |
getLabel | public String getLabel()(Code) | | The label is available during runtime, prior to any validators
being called (prior to validation). In fact, the label is
set during configuration of the ValidationService.
Returns the label associated with a particular validation. |
getValidator | public Validator getValidator()(Code) | | The Validator is available during runtime, prior to
any validators being called (prior to validation). It has
the same lifecycle as the label.
Returns the Validator that is currently being called. |
setBean | public void setBean(Object theBean)(Code) | | The JavaBean being validated is set during runtime, prior to
any validators being called (prior to validation).
Parameters: theBean - The JavaBean being validated. |
setFailure | public void setFailure(Object theFailure)(Code) | | The failure object, which represents an object associated with
a particular failure (and failure message), is set during
validation, when a validator reports the failure.
Parameters: theFailure - The failure object set by a Validator duringvalidation (associated with a failure message). |
setFields | public void setFields(Collection theFields)(Code) | | The fields, which are a collection of OGNL 'getter' expressions meant
to map from the JavaBean (or object) being validated to the validation
bean used by the Validator, are set prior to validation.
Parameters: theFields - The Collection of fields (or OGNL 'getter' expressions). |
setIndex | public void setIndex(int theIndex)(Code) | | Sets the index of this OGNL root. This index is used when a JavaBean/Object
has a property that is some form of array/Collection that is being
validated across. The index represents the particular object within
the array/Collection that is being validated. This property is set
prior to validation of the indexed property (but not necessarily before
the parent is validated).
Parameters: theIndex - The index of the JavaBean property being validated. |
setLabel | public void setLabel(String theLabel)(Code) | | The label is set during runtime, prior to any validators
being called (prior to validation). In fact, the label is
set during configuration of the ValidationService.
Parameters: theLabel - The label associated with a particular validation. |
setValidator | public void setValidator(Validator theValidator)(Code) | | The Validator is set during runtime, prior to any
validators being called (prior to validation). It has the
same lifecycle as the label.
Parameters: theValidator - The validator being used. |
|
|