Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.webflow.action
Class ResultObjectBasedEventFactory

    java.lang.Object
      org.springframework.webflow.action.EventFactorySupport
          org.springframework.webflow.action.ResultObjectBasedEventFactory

All Implemented Interfaces:
  ResultEventFactory

    public class ResultObjectBasedEventFactory

extends EventFactorySupport
implements ResultEventFactory

Result object-to-event adapter interface that tries to do a sensible conversion of the result object into a web flow event. It uses the following conversion table:

Result object type | Event id | Remarks
--- | --- | ---
null | `EventFactorySupport.getNullEventId()` |
`Boolean` or boolean | `EventFactorySupport.getYesEventId()`/ `EventFactorySupport.getNoEventId()` |
`Enum` | `Enum.name()` | The result object will included in the event as an attribute named "result".
`String` | The string. |
`Event` | The resulting event object. |

Author:
  Keith Donald, Erwin Vervaet

Constructor Summary
`ResultObjectBasedEventFactory()`

Method Summary
`Event` | `createResultEvent(java.lang.Object source, java.lang.Object resultObject, RequestContext context)` Create an event instance from the result object.
`boolean` | `isMappedValueType(java.lang.Class type)` Check whether or not given type is mapped to a corresponding event using special mapping rules.

Methods inherited from class org.springframework.webflow.action.EventFactorySupport
`error, error, event, event, event, event, getErrorEventId, getExceptionAttributeName, getNoEventId, getNullEventId, getResultAttributeName, getSuccessEventId, getYesEventId, no, setErrorEventId, setExceptionAttributeName, setNoEventId, setNullEventId, setResultAttributeName, setSuccessEventId, setYesEventId, success, success, yes`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResultObjectBasedEventFactory

    public ResultObjectBasedEventFactory()

Method Detail

### createResultEvent

    public Event createResultEvent(java.lang.Object source,
                                   java.lang.Object resultObject,
                                   RequestContext context)

  Description copied from interface: `ResultEventFactory`
  Create an event instance from the result object.

  Specified by:
    `createResultEvent` in interface `ResultEventFactory`
  Parameters:
    `source` - the source of the event
    `resultObject` - the result object, typically the return value of a bean method
    `context` - a flow execution request context
  Returns:
    the event

### isMappedValueType

    public boolean isMappedValueType(java.lang.Class type)

  Check whether or not given type is mapped to a corresponding event using special mapping rules.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD