Package net.sf.antcontrib.logic
Class TimestampSelector
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
net.sf.antcontrib.logic.TimestampSelector
- All Implemented Interfaces:
Cloneable
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
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
org.apache.tools.ant.types.Path
void
doFileSetExecute
(String[] paths) void
execute()
protected int
void
void
setCount
(int count) void
setOutputSetId
(String outputSetId) void
setPathRef
(org.apache.tools.ant.types.Reference ref) void
setPathSep
(char pathSep) void
setProperty
(String property) void
protected void
protected void
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
TimestampSelector
public TimestampSelector()Default Constructor
-
-
Method Details
-
doFileSetExecute
- Throws:
org.apache.tools.ant.BuildException
-
sort
-
sort
-
compare
-
partition
-
swap
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
execute
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
-
setProperty
-
setCount
public void setCount(int count) -
setAge
-
setPathSep
public void setPathSep(char pathSep) -
setOutputSetId
-
setPathRef
public void setPathRef(org.apache.tools.ant.types.Reference ref) throws org.apache.tools.ant.BuildException - Throws:
org.apache.tools.ant.BuildException
-
createPath
public org.apache.tools.ant.types.Path createPath() throws org.apache.tools.ant.BuildException- Throws:
org.apache.tools.ant.BuildException
-