public class DateAttributePredicate extends AbstractAttributePredicate
| Modifier and Type | Field and Description |
|---|---|
private String |
attributeName
Name of attribute to query for.
|
private org.joda.time.format.DateTimeFormatter |
dateTimeFormatter
Formatter used to parse string-based date attribute values.
|
private org.slf4j.Logger |
log
Class logger.
|
private boolean |
resultIfMissing
Result of predicate if attribute is missing or has no values.
|
private org.joda.time.Duration |
systemTimeOffset
Offset from system time used for date comparisons.
|
| Constructor and Description |
|---|
DateAttributePredicate(String attribute)
Create a new instance that performs date comparisons against the given attribute
using ISO date/time format parser by default.
|
DateAttributePredicate(String attribute,
org.joda.time.format.DateTimeFormatter formatter)
Deprecated.
|
DateAttributePredicate(String attribute,
String formatString)
Create a new instance that performs date comparisons against the given attribute
using the given date parser.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allowNullAttributeContext()
Get the result of the predicate in the case the attribute context is null.
|
protected boolean |
hasMatch(Map<String,IdPAttribute> attributeMap)
Abstract implementation of the condition to evaluate.
|
void |
setOffset(long offset)
Set the system time offset, which affects the reference date for comparisons.
|
void |
setResultIfMissing(boolean flag)
Set the result to return if the attribute to check is missing or has no values.
|
void |
setSystemTimeOffset(org.joda.time.Duration offset)
Deprecated.
|
apply, getAttributeContextLookupStrategy, isUseUnfilteredAttributes, setAttributeContextLookupStrategy, setUseUnfilteredAttributes@Nonnull private final org.slf4j.Logger log
@Nonnull private final org.joda.time.format.DateTimeFormatter dateTimeFormatter
@Nullable private org.joda.time.Duration systemTimeOffset
private boolean resultIfMissing
public DateAttributePredicate(@Nonnull@NotEmpty@ParameterName(name="attribute") String attribute)
attribute - Attribute name that provides candidate date values to test.@Deprecated public DateAttributePredicate(@Nonnull@NotEmpty@ParameterName(name="attribute") String attribute, @Nonnull@ParameterName(name="formatter") org.joda.time.format.DateTimeFormatter formatter)
attribute - Attribute name that provides candidate date values to test.formatter - Date/time parser.public DateAttributePredicate(@Nonnull@NotEmpty@ParameterName(name="attribute") String attribute, @Nonnull@NotEmpty@ParameterName(name="formatString") String formatString)
attribute - Attribute name that provides candidate date values to test.formatString - date/time parsing string, currently based on DateTimeFormatter@Deprecated public void setSystemTimeOffset(@Nonnull org.joda.time.Duration offset)
offset - System time offset. A negative value decreases the target date (sooner);
a positive value increases the target date (later).@Duration public void setOffset(@Duration long offset)
offset - System time offset. A negative value decreases the target date (sooner);
a positive value increases the target date (later).public void setResultIfMissing(boolean flag)
flag - flag to setprotected boolean allowNullAttributeContext()
allowNullAttributeContext in class AbstractAttributePredicateprotected boolean hasMatch(@Nonnull@NonnullElements Map<String,IdPAttribute> attributeMap)
hasMatch in class AbstractAttributePredicateattributeMap - the attributes to evaluateCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.