|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.xaj.support.AbstractSimpleParametersResolver net.sf.xaj.support.DateParametersResolver
public class DateParametersResolver
Resolve date strings.
This resolver will geneate a Map with a single String property of a
date formatted by the SimpleDateFormat
class. The dates will
"roll" over each iteration, based on the calendarIterationType
and calendarIterationAmount
properties. These default so that
the generated date iterates over one day for each iteration.
The dates are offset from the date this class is first instantiated,
unless the startDate
property is configured.
The configurable properties of this class are:
SimpleDateFormat
date pattern to use. Defaults to
yyyyMMdd
.Calendar
type constant to add
to the starting date.randomTimeJitterType
property. Defaults to zero.Calendar.MILLISECOND
.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_PARAM_NAME
The default value for the paramName property. |
Constructor Summary | |
---|---|
DateParametersResolver()
Default constructor. |
Method Summary | |
---|---|
float |
getCalendarIterationAmount()
|
int |
getCalendarIterationType()
|
java.lang.String |
getDatePattern()
|
int |
getRandomTimeJitter()
|
int |
getRandomTimeJitterDirection()
|
int |
getRandomTimeJitterType()
|
java.lang.String |
getStartDate()
|
java.util.Map<java.lang.String,?> |
resolveParameters(int iteration)
Resolve the parameters for a given iteration. |
void |
setCalendarIterationAmount(float calendarIterationAmount)
|
void |
setCalendarIterationType(int calendarIterationType)
|
void |
setDatePattern(java.lang.String datePattern)
|
void |
setRandomTimeJitter(int randomTimeJitter)
|
void |
setRandomTimeJitterDirection(int randomTimeJitterDirection)
|
void |
setRandomTimeJitterType(int randomTimeJitterType)
|
void |
setStartDate(java.lang.String startDate)
|
Methods inherited from class net.sf.xaj.support.AbstractSimpleParametersResolver |
---|
getParamName, resolveSimpleMap, resolveSimpleMap, setParamName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_PARAM_NAME
paramName
property.
Constructor Detail |
---|
public DateParametersResolver()
Method Detail |
---|
public java.util.Map<java.lang.String,?> resolveParameters(int iteration)
XAttack.IterationParametersResolver
iteration
- the iteration count
public float getCalendarIterationAmount()
public void setCalendarIterationAmount(float calendarIterationAmount)
calendarIterationAmount
- the calendarIterationAmount to setpublic int getCalendarIterationType()
public void setCalendarIterationType(int calendarIterationType)
calendarIterationType
- the calendarIterationType to setpublic java.lang.String getDatePattern()
public void setDatePattern(java.lang.String datePattern)
datePattern
- the datePattern to setpublic java.lang.String getStartDate()
public void setStartDate(java.lang.String startDate)
startDate
- the startDate to setpublic int getRandomTimeJitter()
public void setRandomTimeJitter(int randomTimeJitter)
randomTimeJitter
- the randomTimeJitter to setpublic int getRandomTimeJitterDirection()
public void setRandomTimeJitterDirection(int randomTimeJitterDirection)
randomTimeJitterDirection
- the randomTimeJitterDirection to setpublic int getRandomTimeJitterType()
public void setRandomTimeJitterType(int randomTimeJitterType)
randomTimeJitterType
- the randomTimeJitterType to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |