Home » apache-ant-1.8.1 » org.apache.tools » ant » types » selectors » [javadoc | source]
public class: DateSelector [javadoc | source]

All Implemented Interfaces:
    ExtendFileSelector, FileSelector, Cloneable

Selector that chooses files based on their last modified date.
Nested Class Summary:
public static class  DateSelector.TimeComparisons  Enumerated attribute with the values for time comparison.


Field Summary
public static final  String MILLIS_KEY    Key to used for parameterized custom selector 
public static final  String DATETIME_KEY    Key to used for parameterized custom selector 
public static final  String CHECKDIRS_KEY    Key to used for parameterized custom selector 
public static final  String GRANULARITY_KEY    Key to used for parameterized custom selector 
public static final  String WHEN_KEY    Key to used for parameterized custom selector 
public static final  String PATTERN_KEY    Key to used for parameterized custom selector 
Fields inherited from org.apache.tools.ant.types.selectors.BaseExtendSelector:
Fields inherited from org.apache.tools.ant.types.DataType:
ref,  checked
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
 public DateSelector() 
Method from org.apache.tools.ant.types.selectors.DateSelector Summary:
getMillis,   isSelected,   setCheckdirs,   setDatetime,   setGranularity,   setMillis,   setParameters,   setPattern,   setWhen,   setWhen,   toString,   verifySettings
Methods from org.apache.tools.ant.types.selectors.BaseExtendSelector:
getParameters,   isSelected,   setParameters
Methods from org.apache.tools.ant.types.selectors.BaseSelector:
getError,   isSelected,   setError,   validate,   verifySettings
Methods from org.apache.tools.ant.types.DataType:
checkAttributesAllowed,   checkChildrenAllowed,   circularReference,   clone,   dieOnCircularReference,   dieOnCircularReference,   dieOnCircularReference,   getCheckedRef,   getCheckedRef,   getCheckedRef,   getCheckedRef,   getDataTypeName,   getRefid,   invokeCircularReferenceCheck,   isChecked,   isReference,   noChildrenAllowed,   pushAndInvokeCircularReferenceCheck,   setChecked,   setRefid,   toString,   tooManyAttributes
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.types.selectors.DateSelector Detail:
 public long getMillis() 
    Returns the millisecond value the selector is set for.
 public boolean isSelected(File basedir,
    String filename,
    File file) 
    The heart of the matter. This is where the selector gets to decide on the inclusion of a file in a particular fileset.
 public  void setCheckdirs(boolean includeDirs) 
    Set whether to check dates on directories.
 public  void setDatetime(String dateTime) 
    Sets the date. The user must supply it in MM/DD/YYYY HH:MM AM_PM format, unless an alternate pattern is specified via the pattern attribute.
 public  void setGranularity(int granularity) 
    Sets the number of milliseconds leeway we will give before we consider a file not to have matched a date.
 public  void setMillis(long millis) 
    Set the time; for users who prefer to express time in ms since 1970.
 public  void setParameters(Parameter[] parameters) 
    When using this as a custom selector, this method will be called. It translates each parameter into the appropriate setXXX() call.
 public  void setPattern(String pattern) 
    Sets the pattern to be used for the SimpleDateFormat.
 public  void setWhen(TimeComparisons tcmp) 
    Sets the type of comparison to be done on the file's last modified date.
 public  void setWhen(TimeComparison t) 
    Set the comparison type.
 public String toString() 
 public  void verifySettings() 
    This is a consistency check to ensure the selector's required values have been set.