com.raritantechnologies.utils.time
Class TimePeriodResultMatcher
java.lang.Object
com.raritantechnologies.utils.time.TimePeriodResultMatcher
- All Implemented Interfaces:
- IConfigurable, IResultMatcher
- public class TimePeriodResultMatcher
- extends java.lang.Object
- implements IResultMatcher
Result matcher that compares a date field value with a time interval using the DateTimePeriod object.
XML Configuration Template:
<ResultMatcher class="com.raritantechnologies.utils.time.TimePeriodResultMatcher"
resultTimeField="[ name of result field that has date/time information ]"
resultTimeFormat="[ time format e.g. 'MM/dd/yy hh:mm:ss' ]" >
<!-- A DateTimePeriod Can be a relative time period such as: -->
<DateTimePeriod
period="[ parsable time period string e.g. '4 to 7 days ago']" />
<!-- Alternate static time period format: -->
<DateTimePeriod
dateFormat="[ date format e.g. 'MM/dd/yyyy' ]"
from="[ from date (in dateFormat form) ]"
to="[ to date (in dateFormat form) ]" />
</ResultMatcher>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimePeriodResultMatcher
public TimePeriodResultMatcher()
TimePeriodResultMatcher
public TimePeriodResultMatcher(java.lang.String resultTimeField,
java.lang.String resultTimeFormat,
java.lang.String periodString)
equals
public boolean equals(ILoginInfo user,
IResult result)
- Specified by:
equals in interface IResultMatcher
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IConfigurable
- Initializes the object from an XML tag or element.
This method is called by the Framework as part of the application initializtion.
see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory.
Configurable objects that are owned or contained by other configurable objects will be initialized
in by the parent object.
- Specified by:
initialize in interface IConfigurable
getConfigurationXML
public java.lang.String getConfigurationXML()
- Specified by:
getConfigurationXML in interface IResultMatcher
getConfigurationXML
public java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
- Specified by:
getConfigurationXML in interface IResultMatcher
setResultTimeField
public void setResultTimeField(java.lang.String resultTimeField)
setResultTimeFormat
public void setResultTimeFormat(java.lang.String resultTimeFormat)
setFilterPeriod
public void setFilterPeriod(DateTimePeriod filterPeriod)
setFilterPeriod
public void setFilterPeriod(java.lang.String periodSt)