public class SpringExpressionPredicate extends Object implements Predicate<ProfileRequestContext<?,?>>
| Modifier and Type | Field and Description |
|---|---|
private Object |
customObject
A custom object to inject into the expression context.
|
private boolean |
hideExceptions
Whether to raise runtime exceptions if expression fails.
|
private org.slf4j.Logger |
log
Class logger.
|
private boolean |
returnOnError
Value to return from predicate when an error occurs.
|
private String |
springExpression
SpEL expression to evaluate.
|
| Constructor and Description |
|---|
SpringExpressionPredicate(String expression)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(ProfileRequestContext<?,?> input) |
void |
setCustomObject(Object object)
Set a custom (externally provided) object.
|
void |
setHideExceptions(boolean flag)
Set whether to hide exceptions in expression execution (default is false).
|
void |
setReturnOnError(boolean flag)
Set value to return if an error occurs (default is false).
|
@Nonnull private final org.slf4j.Logger log
@Nullable private Object customObject
private boolean hideExceptions
private boolean returnOnError
public SpringExpressionPredicate(@Nonnull@NotEmpty@ParameterName(name="expression") String expression)
expression - the expression to evaluatepublic void setCustomObject(@Nullable Object object)
object - the custom objectpublic void setHideExceptions(boolean flag)
flag - flag to setpublic void setReturnOnError(boolean flag)
flag - flag to setpublic boolean apply(@Nullable ProfileRequestContext<?,?> input)
apply in interface Predicate<ProfileRequestContext<?,?>>Copyright © 1999–2017 Shibboleth Consortium. All rights reserved.