com.sun.rave.web.ui.component.util.event
Class HandlerContextImpl

java.lang.Object
  extended by com.sun.rave.web.ui.component.util.event.HandlerContextImpl
All Implemented Interfaces:
HandlerContext

public class HandlerContextImpl
extends java.lang.Object
implements HandlerContext


Constructor Summary
HandlerContextImpl(javax.faces.context.FacesContext context, LayoutElement layoutDesc, java.util.EventObject event, java.lang.String eventType)
          Constructor
HandlerContextImpl(HandlerContext context)
           Constructor that gets all its values from the given HandlerContext.
 
Method Summary
 java.util.EventObject getEventObject()
           Accessor for the EventObject associated with this Handler.
 java.lang.String getEventType()
           This method provides access to the EventType.
 javax.faces.context.FacesContext getFacesContext()
           Accessor for the FacesContext.
 Handler getHandler()
           Accessor for the Handler descriptor for this Handler.
 HandlerDefinition getHandlerDefinition()
           Accessor for the Handler descriptor for this Handler.
 java.lang.Object getInputValue(java.lang.String name)
           This method returns the value for the named input.
 LayoutElement getLayoutElement()
           Accessor for the LayoutElement associated with this Handler.
 java.lang.Object getOutputValue(java.lang.String name)
           This method retrieves an Output value.
 void setHandler(Handler handler)
           Setter for the Handler descriptor for this Handler.
 void setOutputValue(java.lang.String name, java.lang.Object value)
           This method sets an Output value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlerContextImpl

public HandlerContextImpl(javax.faces.context.FacesContext context,
                          LayoutElement layoutDesc,
                          java.util.EventObject event,
                          java.lang.String eventType)
Constructor


HandlerContextImpl

public HandlerContextImpl(HandlerContext context)

Constructor that gets all its values from the given HandlerContext.

Parameters:
context - The HandlerContext to clone.
Method Detail

getFacesContext

public javax.faces.context.FacesContext getFacesContext()

Accessor for the FacesContext.

Specified by:
getFacesContext in interface HandlerContext
Returns:
FacesContext

getLayoutElement

public LayoutElement getLayoutElement()

Accessor for the LayoutElement associated with this Handler.

Specified by:
getLayoutElement in interface HandlerContext

getEventObject

public java.util.EventObject getEventObject()

Accessor for the EventObject associated with this Handler. This may be null if an EventObject was not created for this handler. An EventObject, if it does exist, may provide additional details describing the context in which this Event is invoked.

Specified by:
getEventObject in interface HandlerContext

getEventType

public java.lang.String getEventType()

This method provides access to the EventType. This is mostly helpful for diagnostics, but may be used in a handler to determine more information about the context in which the code is executing.

Specified by:
getEventType in interface HandlerContext

getHandler

public Handler getHandler()

Accessor for the Handler descriptor for this Handler. The Handler descriptor object contains specific meta information describing the invocation of this handler. This includes details such as input values, and where output values are to be set.

Specified by:
getHandler in interface HandlerContext

setHandler

public void setHandler(Handler handler)

Setter for the Handler descriptor for this Handler.

Specified by:
setHandler in interface HandlerContext
Parameters:
handler - The Handler

getHandlerDefinition

public HandlerDefinition getHandlerDefinition()

Accessor for the Handler descriptor for this Handler. The HandlerDefinition descriptor contains meta information about the actual Java handler that will handle the processing. This includes the inputs required, outputs produces, and the types for both.

Specified by:
getHandlerDefinition in interface HandlerContext

getInputValue

public java.lang.Object getInputValue(java.lang.String name)

This method returns the value for the named input. Input values are not stored in this HandlerContext itself, but in the Handler. If you are trying to set input values for a handler, you must create a new Handler object and set its input values.

This method attempts to resolve $...{...} expressions. It also will return the default value if the value is null. If you don't want these things to happen, look at Handler.getInputValue(String).

Specified by:
getInputValue in interface HandlerContext
Parameters:
name - The input name
Returns:
The value of the input (null if not found)

getOutputValue

public java.lang.Object getOutputValue(java.lang.String name)

This method retrieves an Output value. Output values must not be stored in this Context itself (remember HandlerContext objects are shared). Output values are stored according to what is specified in the HandlerDefintion.

Specified by:
getOutputValue in interface HandlerContext
Parameters:
name - The output name
Returns:
The value of the output (null if not found)

setOutputValue

public void setOutputValue(java.lang.String name,
                           java.lang.Object value)

This method sets an Output value. Output values must not be stored in this Context itself (remember HandlerContext objects are shared). Output values are stored according to what is specified in the HandlerDefintion.

Specified by:
setOutputValue in interface HandlerContext