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:
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
-
Method Summary
Modifier and TypeMethodDescriptioncreateResultEvent
(Object source, Object resultObject, RequestContext context) Create an event instance from the result object.boolean
isMappedValueType
(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
-
Constructor Details
-
ResultObjectBasedEventFactory
public ResultObjectBasedEventFactory()
-
-
Method Details
-
createResultEvent
Description copied from interface:ResultEventFactory
Create an event instance from the result object.- Specified by:
createResultEvent
in interfaceResultEventFactory
- Parameters:
source
- the source of the eventresultObject
- the result object, typically the return value of a bean methodcontext
- a flow execution request context- Returns:
- the event
-
isMappedValueType
Check whether or not given type is mapped to a corresponding event using special mapping rules.
-