public class AddSOAPFault extends AbstractProfileAction
Fault object in the outbound message context.
Options allow for the creation of a FaultString either explicitly,
or via lookup strategy.
| Modifier and Type | Class and Description |
|---|---|
static class |
AddSOAPFault.FaultCodeMappingFunction
A default method to map event IDs to faultcode QName based on
EventContext. |
| Modifier and Type | Field and Description |
|---|---|
private javax.xml.namespace.QName |
defaultFaultCode
Default fault codes to insert.
|
private boolean |
detailedErrors
Whether to include detailed status information.
|
private com.google.common.base.Predicate<ProfileRequestContext> |
detailedErrorsCondition
Predicate determining whether detailed error information is permitted.
|
private com.google.common.base.Function<ProfileRequestContext,javax.xml.namespace.QName> |
faultCodeLookupStrategy
Optional method to obtain fault code.
|
private java.lang.String |
faultString
A default fault string to include.
|
private com.google.common.base.Function<ProfileRequestContext,java.lang.String> |
faultStringLookupStrategy
Optional method to obtain a fault string.
|
private org.slf4j.Logger |
log
Class logger.
|
| Constructor and Description |
|---|
AddSOAPFault()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
buildFaultString(Fault fault,
java.lang.String message)
Build and attach
FaultString element. |
protected void |
doExecute(ProfileRequestContext profileRequestContext)
Performs this action.
|
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext)
Called prior to execution, actions may override this method to perform pre-processing for a request.
|
void |
setDetailedErrorsCondition(com.google.common.base.Predicate<ProfileRequestContext> condition)
Set the predicate used to determine the detailed errors condition.
|
void |
setFaultCode(javax.xml.namespace.QName code)
Set the default faultcode to insert.
|
void |
setFaultCodeLookupStrategy(com.google.common.base.Function<ProfileRequestContext,javax.xml.namespace.QName> strategy)
Set the optional strategy used to obtain a faultcode to include.
|
void |
setFaultString(java.lang.String message)
Set a default faultstring to use in the event that error detail is off,
or no specific message is obtained.
|
void |
setFaultStringLookupStrategy(com.google.common.base.Function<ProfileRequestContext,java.lang.String> strategy)
Set the optional strategy used to obtain a faultstring to include.
|
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized@Nonnull private org.slf4j.Logger log
@Nonnull private com.google.common.base.Predicate<ProfileRequestContext> detailedErrorsCondition
@Nullable private com.google.common.base.Function<ProfileRequestContext,javax.xml.namespace.QName> faultCodeLookupStrategy
@Nullable private com.google.common.base.Function<ProfileRequestContext,java.lang.String> faultStringLookupStrategy
@Nonnull @NonnullElements private javax.xml.namespace.QName defaultFaultCode
@Nullable private java.lang.String faultString
private boolean detailedErrors
public void setDetailedErrorsCondition(@Nonnull
com.google.common.base.Predicate<ProfileRequestContext> condition)
condition - predicate for detailed errors conditionpublic void setFaultCodeLookupStrategy(@Nullable
com.google.common.base.Function<ProfileRequestContext,javax.xml.namespace.QName> strategy)
strategy - strategy used to obtain faultcodepublic void setFaultStringLookupStrategy(@Nullable
com.google.common.base.Function<ProfileRequestContext,java.lang.String> strategy)
strategy - strategy used to obtain a fault stringpublic void setFaultCode(@Nonnull
javax.xml.namespace.QName code)
code - faultcodepublic void setFaultString(@Nullable
java.lang.String message)
message - default faultstringprotected boolean doPreExecute(@Nonnull
ProfileRequestContext profileRequestContext)
If false is returned, execution will not proceed, and the action should attach an
EventContext to 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.
doPreExecute in class AbstractProfileActionprofileRequestContext - the current IdP profile request contextprotected void doExecute(@Nonnull
ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileActionprofileRequestContext - the current IdP profile request contextprivate void buildFaultString(@Nonnull
Fault fault,
@Nonnull @NotEmpty
java.lang.String message)
FaultString element.fault - the element to attach tomessage - the message to set