Class EventFactorySupport
java.lang.Object
org.springframework.webflow.action.EventFactorySupport
- Direct Known Subclasses:
ResultObjectBasedEventFactory,SuccessEventFactory
A convenience support class assisting in the creation of
Event objects.
This class can be used as a simple utility class when you need to create common event objects. Alternatively you could extend it as a base support class when creating custom event factories.
- Author:
- Keith Donald, Erwin Vervaet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an "error" event.Returns an "error" event caused by the provided exception.Returns an event to communicate an occurrence of a boolean expression.Returns a event with the specified identifier.Returns a result event with the specified identifier and a single attribute.event(Object source, String eventId, AttributeMap<Object> attributes) Returns a event with the specified identifier and the specified set of attributes.Returns a "no" result event.voidsetErrorEventId(String errorEventId) voidsetExceptionAttributeName(String exceptionAttributeName) voidsetNoEventId(String noEventId) voidsetNullEventId(String nullEventId) voidsetResultAttributeName(String resultAttributeName) voidsetSuccessEventId(String successEventId) voidsetYesEventId(String yesEventId) Returns a "success" event.Returns a "success" event with the provided result object as an attribute.Returns a "yes" event.
-
Constructor Details
-
EventFactorySupport
public EventFactorySupport()
-
-
Method Details
-
getSuccessEventId
-
setSuccessEventId
-
getErrorEventId
-
setErrorEventId
-
getYesEventId
-
setYesEventId
-
getNoEventId
-
setNoEventId
-
getNullEventId
-
setNullEventId
-
getExceptionAttributeName
-
setExceptionAttributeName
-
getResultAttributeName
-
setResultAttributeName
-
success
Returns a "success" event.- Parameters:
source- the source of the event
-
success
Returns a "success" event with the provided result object as an attribute. The result object is identified by the attribute namegetResultAttributeName().- Parameters:
source- the source of the eventresult- the action success result
-
error
Returns an "error" event.- Parameters:
source- the source of the event
-
error
Returns an "error" event caused by the provided exception.- Parameters:
source- the source of the evente- the exception that caused the error event, to be put as an event attribute under the namegetExceptionAttributeName()
-
yes
Returns a "yes" event.- Parameters:
source- the source of the event
-
no
Returns a "no" result event.- Parameters:
source- the source of the event
-
event
Returns an event to communicate an occurrence of a boolean expression.- Parameters:
source- the source of the eventbooleanResult- the boolean- Returns:
- yes or no
-
event
Returns a event with the specified identifier.- Parameters:
source- the source of the eventeventId- the result event identifier- Returns:
- the event
-
event
Returns a event with the specified identifier and the specified set of attributes.- Parameters:
source- the source of the eventeventId- the result event identifierattributes- the event payload attributes- Returns:
- the event
-
event
Returns a result event with the specified identifier and a single attribute.- Parameters:
source- the source of the eventeventId- the result idattributeName- the attribute nameattributeValue- the attribute value- Returns:
- the event
-