InboundMessageType - type of in-bound messageOutboundMessageType - type of out-bound message@ThreadSafe public abstract class AbstractProfileAction<InboundMessageType,OutboundMessageType> extends AbstractConditionalProfileAction<InboundMessageType,OutboundMessageType> implements Action, MessageSource, MessageSourceAware
This base class takes care of the following:
ProfileRequestContext from the current request environmentRequestContext into the profile context treeMetricContext in the treeAction implementations may override doExecute(RequestContext, ProfileRequestContext)
if they require SWF functionality, but most should override AbstractProfileAction.doExecute(ProfileRequestContext)
instead.
| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Class logger.
|
private MessageSource |
messageSource
MessageSource injected by Spring, typically the parent ApplicationContext itself.
|
private Function<RequestContext,ProfileRequestContext> |
profileContextLookupStrategy
Strategy used to lookup the
ProfileRequestContext from a given WebFlow RequestContext. |
| Constructor and Description |
|---|
AbstractProfileAction()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Event |
doExecute(RequestContext springRequestContext,
ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
Spring-aware actions can override this method to fully control the execution of an Action
by the Web Flow engine.
|
Event |
execute(RequestContext springRequestContext) |
String |
getMessage(MessageSourceResolvable resolvable,
Locale locale) |
String |
getMessage(String code,
Object[] args,
Locale locale) |
String |
getMessage(String code,
Object[] args,
String defaultMessage,
Locale locale) |
Function<RequestContext,ProfileRequestContext> |
getProfileContextLookupStrategy()
Get the strategy used to lookup the
ProfileRequestContext from a given WebFlow RequestContext. |
protected RequestContext |
getRequestContext(ProfileRequestContext profileRequestContext)
Gets the Spring
RequestContext from a SpringRequestContext stored in the context tree. |
protected Event |
getResult(ProfileAction action,
ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
Examines the profile context for an event to return, or signals a successful outcome if
no
EventContext is located; the EventContext will be removed upon completion. |
void |
setMessageSource(MessageSource source) |
void |
setProfileContextLookupStrategy(Function<RequestContext,ProfileRequestContext> strategy)
Set the strategy used to lookup the
ProfileRequestContext from a given WebFlow RequestContext. |
doPreExecute, getActivationCondition, setActivationConditiondoExecute, doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull private final org.slf4j.Logger log
@Nonnull private Function<RequestContext,ProfileRequestContext> profileContextLookupStrategy
ProfileRequestContext from a given WebFlow RequestContext.@Nonnull private MessageSource messageSource
public AbstractProfileAction()
profileContextLookupStrategy to
WebflowRequestContextProfileRequestContextLookup.@Nonnull public Function<RequestContext,ProfileRequestContext> getProfileContextLookupStrategy()
ProfileRequestContext from a given WebFlow RequestContext.public void setProfileContextLookupStrategy(@Nonnull Function<RequestContext,ProfileRequestContext> strategy)
ProfileRequestContext from a given WebFlow RequestContext.strategy - lookup strategy@Nonnull public Event execute(@Nonnull RequestContext springRequestContext)
@Nonnull protected Event doExecute(@Nonnull RequestContext springRequestContext, @Nonnull ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
Alternatively they may override AbstractProfileAction.doExecute(ProfileRequestContext) and access
Spring information via a SpringRequestContext attached to the profile request context.
The default implementation attaches the Spring Web Flow request context to the profile
request context tree to "narrow" the execution signature to the basic OpenSAML ProfileAction
interface. After execution, an EventContext is sought, and used to return a result back to
the Web Flow engine. If no context exists, a "proceed" event is signaled.
springRequestContext - the Spring request contextprofileRequestContext - a profile request context@Nonnull protected Event getResult(@Nonnull ProfileAction action, @Nonnull ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
EventContext is located; the EventContext will be removed upon completion.
The EventContext must contain a Spring Web Flow Event or a String.
Any other type of context data will be ignored.
action - the action signaling the eventprofileRequestContext - the profile request context to examinepublic void setMessageSource(MessageSource source)
setMessageSource in interface MessageSourceAwarepublic String getMessage(String code, Object[] args, String defaultMessage, Locale locale)
getMessage in interface MessageSourcepublic String getMessage(String code, Object[] args, Locale locale)
getMessage in interface MessageSourcepublic String getMessage(MessageSourceResolvable resolvable, Locale locale)
getMessage in interface MessageSource@Nullable protected RequestContext getRequestContext(@Nonnull ProfileRequestContext profileRequestContext)
RequestContext from a SpringRequestContext stored in the context tree.profileRequestContext - Profile request context.Copyright © 1999–2017 Shibboleth Consortium. All rights reserved.