Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.AbstractFileSet
org.apache.tools.ant.types.FileSet
org.apache.tools.ant.types.ArchiveFileSet
public abstract class ArchiveFileSet
extends FileSet
Field Summary | |
static int |
|
static int |
|
Fields inherited from class org.apache.tools.ant.ProjectComponent | |
description , location , project |
Constructor Summary | |
| |
| |
|
Method Summary | |
void |
|
Object |
|
protected void |
|
int |
|
int |
|
DirectoryScanner |
|
int |
|
int |
|
String |
|
String |
|
String |
|
String | |
File |
|
File | |
boolean |
|
boolean |
|
void |
|
void |
|
boolean |
|
Iterator |
|
protected abstract ArchiveScanner |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
int |
|
String |
|
Methods inherited from class org.apache.tools.ant.types.FileSet | |
clone , isFilesystemOnly , iterator , size |
Methods inherited from class org.apache.tools.ant.types.DataType | |
checkAttributesAllowed , checkChildrenAllowed , circularReference , clone , dieOnCircularReference , dieOnCircularReference , dieOnCircularReference , getCheckedRef , getCheckedRef , getCheckedRef , getCheckedRef , getDataTypeName , getRefid , invokeCircularReferenceCheck , isChecked , isReference , noChildrenAllowed , setChecked , setRefid , toString , tooManyAttributes |
Methods inherited from class org.apache.tools.ant.ProjectComponent | |
clone , getDescription , getLocation , getProject , log , log , setDescription , setLocation , setProject |
public static final int DEFAULT_DIR_MODE
Default value for the dirmode attribute.
- Field Value:
- 16877
- Since:
- Ant 1.5.2
public static final int DEFAULT_FILE_MODE
Default value for the filemode attribute.
- Field Value:
- 33188
- Since:
- Ant 1.5.2
public ArchiveFileSet()
Constructor for ArchiveFileSet
protected ArchiveFileSet(ArchiveFileSet fileset)
Constructor using a archive fileset arguement.
- Parameters:
fileset
- the archivefileset to use
protected ArchiveFileSet(FileSet fileset)
Constructor using a fileset arguement.
- Parameters:
fileset
- the fileset to use
public void addConfigured(ResourceCollection a)
Set the source Archive file for the archivefileset. Prevents both "dir" and "src" from being specified.
- Parameters:
a
- the archive as a single element Resource collection.
public Object clone()
Return a ArchiveFileSet that has the same properties as this one.
- Returns:
- the cloned archiveFileSet
- Since:
- Ant 1.6
protected void configureFileSet(ArchiveFileSet zfs)
A ArchiveFileset accepts another ArchiveFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute
- Parameters:
zfs
- the project to use
public int getDirMode()
Deprecated. since 1.7.
- Returns:
- the dir mode.
public int getDirMode(Project p)
Get the dir mode of the archive fileset
- Parameters:
p
- the project to use
- Returns:
- the mode
public DirectoryScanner getDirectoryScanner(Project p)
Return the DirectoryScanner associated with this FileSet. If the ArchiveFileSet defines a source Archive file, then a ArchiveScanner is returned instead.
- Overrides:
- getDirectoryScanner in interface AbstractFileSet
- Parameters:
p
- the project to use
- Returns:
- a directory scanner
public int getFileMode()
Deprecated. since 1.7.
- Returns:
- the file mode.
public int getFileMode(Project p)
Get the mode of the archive fileset
- Parameters:
p
- the project to use
- Returns:
- the mode
public String getFullpath()
Deprecated. since 1.7.
Return the full pathname of the single entryZ in this fileset.
- Returns:
- the full pathname.
public String getFullpath(Project p)
Return the full pathname of the single entry in this fileset.
- Parameters:
p
- the project to use
- Returns:
- the full path
public String getPrefix()
Deprecated. since 1.7.
Return the prefix prepended to entries in the archive file.
- Returns:
- the prefix.
public String getPrefix(Project p)
Return the prefix prepended to entries in the archive file.
- Parameters:
p
- the project to use
- Returns:
- the prefix
public File getSrc()
Get the archive file from which entries will be extracted.
- Returns:
- the archive in case the archive is a file, null otherwise.
public File getSrc(Project p)
Get the archive from which entries will be extracted.
- Parameters:
p
- the project to use
- Returns:
- the source file
public boolean hasDirModeBeenSet()
Whether the user has specified the mode explicitly.
- Returns:
- true if it has been set
public boolean hasFileModeBeenSet()
Whether the user has specified the mode explicitly.
- Returns:
- true if it has been set
public void integerSetDirMode(int mode)
specify the user, group and other modes in the standard Unix fashion; optional, default=0755 We use the strange name so this method doesn't appear in IntrospectionHelpers list of attribute setters.
- Parameters:
mode
- aint
value
- Since:
- Ant 1.7
public void integerSetFileMode(int mode)
specify the user, group and other modes in the standard Unix fashion; optional, default=0644 We use the strange name so this method doesn't appear in IntrospectionHelpers list of attribute setters.
- Parameters:
mode
- aint
value
- Since:
- Ant 1.7
public boolean isFilesystemOnly()
Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions. If true, all Resources returned from this ResourceCollection should be instances of FileResource.
- Specified by:
- isFilesystemOnly in interface ResourceCollection
- Overrides:
- isFilesystemOnly in interface FileSet
- Returns:
- whether this is a filesystem-only resource collection.
- Since:
- Ant 1.7
public Iterator iterator()
Fulfill the ResourceCollection contract.
- Specified by:
- iterator in interface ResourceCollection
- Returns:
- Iterator of Resources.
- Since:
- Ant 1.7
protected abstract ArchiveScanner newArchiveScanner()
Creates a scanner for this type of archive.
- Returns:
- the scanner.
public void setDir(File dir) throws BuildException
Set the directory for the fileset.
- Overrides:
- setDir in interface AbstractFileSet
- Parameters:
dir
- the directory for the fileset
- Throws:
BuildException
- on error
public void setDirMode(String octalString)
A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0755
- Parameters:
octalString
- aString
value
public void setFileMode(String octalString)
A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644
- Parameters:
octalString
- aString
value
public void setFullpath(String fullpath)
Set the full pathname of the single entry in this fileset. Prevents both prefix and fullpath from being specified
- Parameters:
fullpath
- the full pathname of the single entry in this fileset.
public void setPrefix(String prefix)
Prepend this prefix to the path for each archive entry. Prevents both prefix and fullpath from being specified
- Parameters:
prefix
- The prefix to prepend to entries in the archive file.
public void setSrc(File srcFile)
Set the source Archive file for the archivefileset. Prevents both "dir" and "src" from being specified.
- Parameters:
srcFile
- The archive from which to extract entries.
public void setSrcResource(Resource src)
Set the source Archive file for the archivefileset. Prevents both "dir" and "src" from being specified.
- Parameters:
src
- The archive from which to extract entries.
public int size()
Fulfill the ResourceCollection contract.
- Specified by:
- size in interface ResourceCollection
- Returns:
- size of the collection as int.
- Since:
- Ant 1.7
public String toString()
for file based zipfilesets, return the same as for normal filesets else just return the path of the zip
- Overrides:
- toString in interface AbstractFileSet
- Returns:
- for file based archivefilesets, included files as a list of semicolon-separated filenames. else just the name of the zip.