Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.antcontrib.logic
Class TimestampSelector

    java.lang.Object
      |
      +--org.apache.tools.ant.ProjectComponent
            |
            +--org.apache.tools.ant.Task
                  |
                  +--net.sf.antcontrib.logic.TimestampSelector

public class TimestampSelector
extends org.apache.tools.ant.Task

Task definition for the foreach task. The foreach task iterates over a list, a list of filesets, or both.

     Usage:

       Task declaration in the project:

         <taskdef name="latesttimestamp" classname="net.sf.antcontrib.logic.TimestampSelector" />

       Call Syntax:

         <timestampselector
                     [property="prop" | outputsetref="id"]
                     [count="num"]
                     [age="eldest|youngest"]
                     [pathSep=","]
                     [pathref="ref"] >
           <path>
              ...
           </path>
         </latesttimestamp>

       Attributes:
             outputsetref --> The reference of the output Path set which will contain the
                              files with the latest timestamps.
             property  --> The name of the property to set with file having the latest
                           timestamp.  If you specify the "count" attribute, you will get
                           the lastest N files.  These will be the absolute pathnames
             count     --> How many of the latest files do you wish to find
             pathSep   --> What to use as the path separator when using the "property"
                           attribute, in conjunction with the "count" attribute
             pathref   --> The reference of the path which is the input set of files.

Author:
  Matthew Inger

Field Summary

Fields inherited from class org.apache.tools.ant.Task
`description, location, target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

Constructor Summary
`TimestampSelector()` Default Constructor

Method Summary
`protected int` | `compare(java.io.File a, java.io.File b)`
`org.apache.tools.ant.types.Path` | `createPath()`
`void` | `doFileSetExecute(java.lang.String[] paths)`
`void` | `execute()`
`protected int` | `partition(java.util.Vector array, int start, int end)`
`void` | `setAge(java.lang.String age)`
`void` | `setCount(int count)`
`void` | `setOutputSetId(java.lang.String outputSetId)`
`void` | `setPathRef(org.apache.tools.ant.types.Reference ref)`
`void` | `setPathSep(char pathSep)`
`void` | `setProperty(java.lang.String property)`
`void` | `sort(java.util.Vector array)`
`protected void` | `sort(java.util.Vector array, int start, int end)`
`protected void` | `swap(java.util.Vector array, int i, int j)`

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject, setProject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TimestampSelector

    public TimestampSelector()

  Default Constructor

Method Detail

### doFileSetExecute

    public void doFileSetExecute(java.lang.String[] paths)
                          throws org.apache.tools.ant.BuildException

    `org.apache.tools.ant.BuildException`

### sort

    public void sort(java.util.Vector array)

### sort

    protected void sort(java.util.Vector array,
                        int start,
                        int end)

### compare

    protected int compare(java.io.File a,
                          java.io.File b)

### partition

    protected int partition(java.util.Vector array,
                            int start,
                            int end)

### swap

    protected void swap(java.util.Vector array,
                        int i,
                        int j)

### execute

    public void execute()
                 throws org.apache.tools.ant.BuildException

  Overrides:
    `execute` in class `org.apache.tools.ant.Task`
    `org.apache.tools.ant.BuildException`

### setProperty

    public void setProperty(java.lang.String property)

### setCount

    public void setCount(int count)

### setAge

    public void setAge(java.lang.String age)

### setPathSep

    public void setPathSep(char pathSep)

### setOutputSetId

    public void setOutputSetId(java.lang.String outputSetId)

### setPathRef

    public void setPathRef(org.apache.tools.ant.types.Reference ref)
                    throws org.apache.tools.ant.BuildException

    `org.apache.tools.ant.BuildException`

### createPath

    public org.apache.tools.ant.types.Path createPath()
                                               throws org.apache.tools.ant.BuildException

    `org.apache.tools.ant.BuildException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD