Class AbstractProfileAction
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction
- Direct Known Subclasses:
AbstractConditionalProfileAction,AbstractDecryptAction,AbstractMessageChannelSecurity,AbstractResponseShellAction,AddNameIdentifierToSubjects,AddNameIDToSubjects,AddResponseShell,AddSOAPFault,AddStatusResponseShell,AddStatusToResponse,AddStatusToResponse,AddSubjectConfirmationToSubjects,AddSubjectConfirmationToSubjects,CheckAccess,CopyNameIdentifierFromRequest,CopyNameIDFromRequest,DecodeMessage,EncodeMessage,LoadClientStorageServices,LogEvent,LogLocalStorageSaveResults,PopulateClientStorageLoadContext,PopulateClientStorageSaveContext,PopulateClientTLSValidationParameters,PopulateMetricContext,ResolveArtifact,ResolveArtifacts,SaveCookieBackedClientStorageServices,SetProfileId,SignAssertions,ValidateAssertions,VerifyChannelBindings
Prototype to indicate that it is stateful.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate NonnullSupplier<javax.servlet.http.HttpServletRequest>Supplier for the Current HTTP request, if available.private NonnullSupplier<javax.servlet.http.HttpServletResponse>Current HTTP response, if available.private final org.slf4j.LoggerLogger.private StringCached log prefix. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) Performs this action.protected voiddoPostExecute(ProfileRequestContext profileRequestContext) Called after execution, actions may override this method to perform post-processing for a request.protected voiddoPostExecute(ProfileRequestContext profileRequestContext, Exception e) Called after execution, actions may override this method to perform post-processing for a request.protected booleandoPreExecute(ProfileRequestContext profileRequestContext) Called prior to execution, actions may override this method to perform pre-processing for a request.voidexecute(ProfileRequestContext profileRequestContext) Performs this action.javax.servlet.http.HttpServletRequestGet the current HTTP request if available.NonnullSupplier<javax.servlet.http.HttpServletRequest>Get the supplier for HTTP request if available.javax.servlet.http.HttpServletResponseGet the current HTTP response if available.NonnullSupplier<javax.servlet.http.HttpServletResponse>Get the current HTTP response supplier if available.protected StringReturn a prefix for logging messages for this component.voidsetHttpServletRequest(javax.servlet.http.HttpServletRequest request) Deprecated, for removal: This API element is subject to removal in a future version.voidsetHttpServletRequestSupplier(NonnullSupplier<javax.servlet.http.HttpServletRequest> requestSupplier) Set the current HTTP request Supplier.voidsetHttpServletResponse(javax.servlet.http.HttpServletResponse response) Deprecated, for removal: This API element is subject to removal in a future version.voidsetHttpServletResponseSupplier(NonnullSupplier<javax.servlet.http.HttpServletResponse> supplier) Set the supplier of the current HTTP response.Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
private final org.slf4j.Logger logLogger. -
logPrefix
Cached log prefix. -
httpServletRequestSupplier
Supplier for the Current HTTP request, if available. -
httpServletResponseSupplier
@Nullable private NonnullSupplier<javax.servlet.http.HttpServletResponse> httpServletResponseSupplierCurrent HTTP response, if available.
-
-
Constructor Details
-
AbstractProfileAction
public AbstractProfileAction()
-
-
Method Details
-
getHttpServletRequest
@Nullable public javax.servlet.http.HttpServletRequest getHttpServletRequest()Get the current HTTP request if available.- Returns:
- current HTTP request
-
getHttpServletRequestSupplier
@Nullable public NonnullSupplier<javax.servlet.http.HttpServletRequest> getHttpServletRequestSupplier()Get the supplier for HTTP request if available.- Returns:
- current HTTP request
-
setHttpServletRequest
@Deprecated(since="4.3", forRemoval=true) public void setHttpServletRequest(@Nullable javax.servlet.http.HttpServletRequest request) Deprecated, for removal: This API element is subject to removal in a future version.Set the current HTTP request.- Parameters:
request- current HTTP request
-
setHttpServletRequestSupplier
public void setHttpServletRequestSupplier(@Nullable NonnullSupplier<javax.servlet.http.HttpServletRequest> requestSupplier) Set the current HTTP request Supplier.- Parameters:
requestSupplier- Supplier for the current HTTP request
-
getHttpServletResponse
@Nullable public javax.servlet.http.HttpServletResponse getHttpServletResponse()Get the current HTTP response if available.- Returns:
- current HTTP response or null
-
getHttpServletResponseSupplier
@Nullable public NonnullSupplier<javax.servlet.http.HttpServletResponse> getHttpServletResponseSupplier()Get the current HTTP response supplier if available.- Returns:
- current HTTP response supplier or null
-
setHttpServletResponse
@Deprecated(since="4.3", forRemoval=true) public void setHttpServletResponse(@Nullable javax.servlet.http.HttpServletResponse response) Deprecated, for removal: This API element is subject to removal in a future version.Set the current HTTP response.- Parameters:
response- current HTTP response
-
setHttpServletResponseSupplier
public void setHttpServletResponseSupplier(@Nullable NonnullSupplier<javax.servlet.http.HttpServletResponse> supplier) Set the supplier of the current HTTP response.- Parameters:
supplier- what to set
-
execute
Performs this action.- Specified by:
executein interfaceProfileAction- Parameters:
profileRequestContext- the current IdP profile request context
-
doPreExecute
Called prior to execution, actions may override this method to perform pre-processing for a request.If false is returned, execution will not proceed, and the action should attach an
EventContextto the context tree to signal how to continue with overall workflow processing.If returning successfully, the last step should be to return the result of the superclass version of this method.
- Parameters:
profileRequestContext- the current IdP profile request context- Returns:
- true iff execution should proceed
-
doExecute
Performs this action. Actions must override this method to perform their work.- Parameters:
profileRequestContext- the current IdP profile request context
-
doPostExecute
Called after execution, actions may override this method to perform post-processing for a request.Actions must not "fail" during this step and will not have the opportunity to signal events at this stage. This method will not be called if
doPreExecute(org.opensaml.profile.context.ProfileRequestContext)fails, but is called if an exception is raised bydoExecute(org.opensaml.profile.context.ProfileRequestContext).- Parameters:
profileRequestContext- the current IdP profile request context
-
doPostExecute
protected void doPostExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull Exception e) Called after execution, actions may override this method to perform post-processing for a request.Actions must not "fail" during this step and will not have the opportunity to signal events at this stage. This method will not be called if
doPreExecute(org.opensaml.profile.context.ProfileRequestContext)fails, but is called if an exception is raised bydoExecute(org.opensaml.profile.context.ProfileRequestContext).This version of the method will be called if an exception is raised during execution of the action. The overall action result will be to raise this error, so any errors inadvertently raised by this method will be logged and superseded.
The default implementation simply calls the error-less version of this method.
- Parameters:
profileRequestContext- the current IdP profile request contexte- an exception raised by thedoExecute(org.opensaml.profile.context.ProfileRequestContext)method
-
getLogPrefix
Return a prefix for logging messages for this component.- Returns:
- a string for insertion at the beginning of any log messages
-