public class DateAttributePredicate extends AbstractAttributePredicate
| Modifier and Type | Field and Description |
|---|---|
private String |
attributeName
Name of attribute to query for.
|
private DateTimeFormatter |
dateTimeFormatter
Formatter used to parse string-based date attribute values.
|
private Logger |
log
Class logger.
|
private Duration |
systemTimeOffset
Offset from system time used for date comparisons.
|
| Constructor and Description |
|---|
DateAttributePredicate(String attribute)
Creates a new instance that performs date comparisons against the given attribute
using ISO date/time format parser by default.
|
DateAttributePredicate(String attribute,
DateTimeFormatter formatter)
Creates a new instance that performs date comparisons against the given attribute
using the given date parser.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
hasMatch(Map<String,IdPAttribute> attributeMap)
Abstract implementation of the condition to evaluate.
|
void |
setSystemTimeOffset(Duration offset)
Sets the system time offset, which affects the reference date for comparisons.
|
allowNullAttributeContext, apply, setAttributeContextLookupStrategy, setUseUnfilteredAttributes@Nonnull private final DateTimeFormatter dateTimeFormatter
public DateAttributePredicate(String attribute)
attribute - Attribute name that provides candidate date values to test.public DateAttributePredicate(String attribute, DateTimeFormatter formatter)
attribute - Attribute name that provides candidate date values to test.formatter - Date/time parser.public void setSystemTimeOffset(@Nonnull Duration offset)
offset - System time offset. A negative value decreases the target date (sooner);
a positive value increases the target date (later).protected boolean hasMatch(Map<String,IdPAttribute> attributeMap)
AbstractAttributePredicatehasMatch in class AbstractAttributePredicateattributeMap - the attributes to evaluateCopyright © 1999–2015. All rights reserved.