InboundMessageType - type of in-bound messageOutboundMessageType - type of out-bound message@ThreadSafe public abstract class AbstractProfileAction<InboundMessageType,OutboundMessageType> extends org.opensaml.profile.action.AbstractConditionalProfileAction<InboundMessageType,OutboundMessageType> implements org.springframework.webflow.execution.Action, MessageSource, MessageSourceAware
ProfileRequestContext from the current request environmentHttpServletRequest and HttpServletResponse are
available on the ProfileRequestContext, if they existdoExecute(RequestContext, ProfileRequestContext).| Modifier and Type | Field and Description |
|---|---|
private Logger |
log
Class logger.
|
private MessageSource |
messageSource
MessageSource injected by Spring, typically the parent ApplicationContext itself.
|
private com.google.common.base.Function<org.springframework.webflow.execution.RequestContext,org.opensaml.profile.context.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 org.springframework.webflow.execution.Event |
doExecute(org.springframework.webflow.execution.RequestContext springRequestContext,
org.opensaml.profile.context.ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
Spring-aware actions can override this method to fully control the execution of an Action
by the Web Flow engine.
|
org.springframework.webflow.execution.Event |
execute(org.springframework.webflow.execution.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) |
com.google.common.base.Function<org.springframework.webflow.execution.RequestContext,org.opensaml.profile.context.ProfileRequestContext> |
getProfileContextLookupStrategy()
Get the strategy used to lookup the
ProfileRequestContext from a given WebFlow RequestContext. |
protected org.springframework.webflow.execution.Event |
getResult(org.opensaml.profile.action.ProfileAction action,
org.opensaml.profile.context.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(com.google.common.base.Function<org.springframework.webflow.execution.RequestContext,org.opensaml.profile.context.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, isInitialized@Nonnull private com.google.common.base.Function<org.springframework.webflow.execution.RequestContext,org.opensaml.profile.context.ProfileRequestContext> profileContextLookupStrategy
ProfileRequestContext from a given WebFlow RequestContext.@Nonnull private MessageSource messageSource
public AbstractProfileAction()
profileContextLookupStrategy to
WebflowRequestContextProfileRequestContextLookup.@Nonnull public com.google.common.base.Function<org.springframework.webflow.execution.RequestContext,org.opensaml.profile.context.ProfileRequestContext> getProfileContextLookupStrategy()
ProfileRequestContext from a given WebFlow RequestContext.public void setProfileContextLookupStrategy(@Nonnull com.google.common.base.Function<org.springframework.webflow.execution.RequestContext,org.opensaml.profile.context.ProfileRequestContext> strategy)
ProfileRequestContext from a given WebFlow RequestContext.strategy - lookup strategy@Nonnull public org.springframework.webflow.execution.Event execute(@Nonnull org.springframework.webflow.execution.RequestContext springRequestContext)
execute in interface org.springframework.webflow.execution.Action@Nonnull protected org.springframework.webflow.execution.Event doExecute(@Nonnull org.springframework.webflow.execution.RequestContext springRequestContext, @Nonnull org.opensaml.profile.context.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 org.springframework.webflow.execution.Event getResult(@Nonnull org.opensaml.profile.action.ProfileAction action, @Nonnull org.opensaml.profile.context.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 MessageSourceCopyright © 1999–2014. All rights reserved.