org.apache.tools.ant.taskdefs.optional.windows

Class Attrib

Implemented Interfaces:
Cloneable

public class Attrib
extends ExecuteOn

Attrib equivalent for Win32 environments. Note: Attrib parameters /S and /D are not handled.
Since:
Ant 1.6

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.ExecuteOn

ExecuteOn.FileDirBoth

Field Summary

Fields inherited from class org.apache.tools.ant.taskdefs.ExecuteOn

destDir, filesets, mapper, mapperElement, srcFilePos, srcIsFirst, targetFilePos, type

Fields inherited from class org.apache.tools.ant.taskdefs.ExecTask

cmdl, failOnError, newEnvironment, redirector, redirectorElement

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

Attrib()
Constructor for Attrib.

Method Summary

protected void
checkConfiguration()
Check the attributes.
protected boolean
isValidOs()
Check if the os is valid.
void
setAddsourcefile(boolean b)
Add source file.
void
setArchive(boolean value)
Set the Archive file attribute.
void
setCommand(String e)
Set the executable.
void
setExecutable(String e)
Set the executable.
void
setFile(File src)
A file to be attribed.
void
setHidden(boolean value)
Set the Hidden file attribute.
void
setMaxParallel(int max)
Set max parallel.
void
setParallel(boolean parallel)
Set parallel.
void
setReadonly(boolean value)
Set the ReadOnly file attribute.
void
setSkipEmptyFilesets(boolean skip)
Set skip empty file sets.
void
setSystem(boolean value)
Set the System file attribute.

Methods inherited from class org.apache.tools.ant.taskdefs.ExecuteOn

add, add, addDirset, addFilelist, addFileset, checkConfiguration, createHandler, createMapper, createSrcfile, createTargetfile, getCommandline, getCommandline, getDirs, getFiles, getFilesAndDirs, runExec, runParallel, setAddsourcefile, setDest, setForce, setForwardslash, setIgnoremissing, setMaxParallel, setParallel, setRelative, setSkipEmptyFilesets, setType, setVerbose, setupRedirector

Methods inherited from class org.apache.tools.ant.taskdefs.ExecTask

addConfiguredRedirector, addEnv, checkConfiguration, createArg, createHandler, createWatchdog, execute, getResolveExecutable, isValidOs, logFlush, maybeSetResultPropertyValue, prepareExec, resolveExecutable, runExec, runExecute, setAppend, setCommand, setDir, setError, setErrorProperty, setExecutable, setFailIfExecutionFails, setFailonerror, setInput, setInputString, setLogError, setNewenvironment, setOs, setOsFamily, setOutput, setOutputproperty, setResolveExecutable, setResultProperty, setSearchPath, setSpawn, setTimeout, setTimeout, setVMLauncher, setupRedirector

Methods inherited from class org.apache.tools.ant.Task

bindToOwner, execute, 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, log, log, setDescription, setLocation, setProject

Constructor Details

Attrib

public Attrib()
Constructor for Attrib.

Method Details

checkConfiguration

protected void checkConfiguration()
Check the attributes.
Overrides:
checkConfiguration in interface ExecuteOn

isValidOs

protected boolean isValidOs()
Check if the os is valid. Always include windows
Overrides:
isValidOs in interface ExecTask
Returns:
true if the os is valid.

setAddsourcefile

public void setAddsourcefile(boolean b)
Add source file. This is not allowed, and it always throws a BuildException.
Overrides:
setAddsourcefile in interface ExecuteOn
Parameters:
b - ignored

setArchive

public void setArchive(boolean value)
Set the Archive file attribute.
Parameters:
value - a boolean value

setCommand

public void setCommand(String e)
Set the executable. This is not allowed, and it always throws a BuildException.
Parameters:
e - ignored

setExecutable

public void setExecutable(String e)
Set the executable. This is not allowed, and it always throws a BuildException.
Overrides:
setExecutable in interface ExecTask
Parameters:
e - ignored

setFile

public void setFile(File src)
A file to be attribed.
Parameters:
src - a file

setHidden

public void setHidden(boolean value)
Set the Hidden file attribute.
Parameters:
value - a boolean value

setMaxParallel

public void setMaxParallel(int max)
Set max parallel. This is not allowed, and it always throws a BuildException.
Overrides:
setMaxParallel in interface ExecuteOn
Parameters:
max - ignored

setParallel

public void setParallel(boolean parallel)
Set parallel. This is not allowed, and it always throws a BuildException.
Overrides:
setParallel in interface ExecuteOn
Parameters:
parallel - ignored

setReadonly

public void setReadonly(boolean value)
Set the ReadOnly file attribute.
Parameters:
value - a boolean value

setSkipEmptyFilesets

public void setSkipEmptyFilesets(boolean skip)
Set skip empty file sets. This is not allowed, and it always throws a BuildException.
Overrides:
setSkipEmptyFilesets in interface ExecuteOn
Parameters:
skip - ignored

setSystem

public void setSystem(boolean value)
Set the System file attribute.
Parameters:
value - a boolean value