|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
A ArchiveFileSet is a FileSet with extra attributes useful in the context of archiving tasks. It includes a prefix attribute which is prepended to each entry in the output archive file as well as a fullpath ttribute. It also supports Unix file permissions for files and directories.
Field Summary | |
---|---|
static int |
DEFAULT_DIR_MODE
Default value for the dirmode attribute. |
static int |
DEFAULT_FILE_MODE
Default value for the filemode attribute. |
Fields inherited from class org.apache.tools.ant.types.DataType |
---|
checked, ref |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
|
ArchiveFileSet()
Constructor for ArchiveFileSet |
protected |
ArchiveFileSet(ArchiveFileSet fileset)
Constructor using a archive fileset arguement. |
protected |
ArchiveFileSet(FileSet fileset)
Constructor using a fileset arguement. |
Method Summary | |
---|---|
void |
addConfigured(ResourceCollection a)
Set the source Archive file for the archivefileset. |
java.lang.Object |
clone()
Return a ArchiveFileSet that has the same properties as this one. |
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 |
DirectoryScanner |
getDirectoryScanner(Project p)
Return the DirectoryScanner associated with this FileSet. |
int |
getDirMode()
Deprecated. since 1.7. |
int |
getDirMode(Project p)
Get the dir mode of the archive fileset |
int |
getFileMode()
Deprecated. since 1.7. |
int |
getFileMode(Project p)
Get the mode of the archive fileset |
java.lang.String |
getFullpath()
Deprecated. since 1.7. |
java.lang.String |
getFullpath(Project p)
Return the full pathname of the single entry in this fileset. |
java.lang.String |
getPrefix()
Deprecated. since 1.7. |
java.lang.String |
getPrefix(Project p)
Return the prefix prepended to entries in the archive file. |
java.io.File |
getSrc()
Get the archive file from which entries will be extracted. |
java.io.File |
getSrc(Project p)
Get the archive from which entries will be extracted. |
boolean |
hasDirModeBeenSet()
Whether the user has specified the mode explicitly. |
boolean |
hasFileModeBeenSet()
Whether the user has specified the mode explicitly. |
void |
integerSetDirMode(int mode)
specify the user, group and other modes in the standard Unix fashion; optional, default=0755 |
void |
integerSetFileMode(int mode)
specify the user, group and other modes in the standard Unix fashion; optional, default=0644 |
boolean |
isFilesystemOnly()
Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions. |
java.util.Iterator |
iterator()
Fulfill the ResourceCollection contract. |
protected abstract ArchiveScanner |
newArchiveScanner()
Creates a scanner for this type of archive. |
void |
setDir(java.io.File dir)
Set the directory for the fileset. |
void |
setDirMode(java.lang.String octalString)
A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0755 |
void |
setFileMode(java.lang.String octalString)
A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion; optional, default=0644 |
void |
setFullpath(java.lang.String fullpath)
Set the full pathname of the single entry in this fileset. |
void |
setPrefix(java.lang.String prefix)
Prepend this prefix to the path for each archive entry. |
void |
setSrc(java.io.File srcFile)
Set the source Archive file for the archivefileset. |
void |
setSrcResource(Resource src)
Set the source Archive file for the archivefileset. |
int |
size()
Fulfill the ResourceCollection contract. |
java.lang.String |
toString()
for file based zipfilesets, return the same as for normal filesets else just return the path of the zip |
Methods inherited from class org.apache.tools.ant.types.DataType |
---|
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, setChecked, tooManyAttributes |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_DIR_MODE
public static final int DEFAULT_FILE_MODE
Constructor Detail |
---|
public ArchiveFileSet()
protected ArchiveFileSet(FileSet fileset)
fileset
- the fileset to useprotected ArchiveFileSet(ArchiveFileSet fileset)
fileset
- the archivefileset to useMethod Detail |
---|
public void setDir(java.io.File dir) throws BuildException
setDir
in class AbstractFileSet
dir
- the directory for the fileset
BuildException
- on errorpublic void addConfigured(ResourceCollection a)
a
- the archive as a single element Resource collection.public void setSrc(java.io.File srcFile)
srcFile
- The archive from which to extract entries.public void setSrcResource(Resource src)
src
- The archive from which to extract entries.public java.io.File getSrc(Project p)
p
- the project to use
public java.io.File getSrc()
public void setPrefix(java.lang.String prefix)
prefix
- The prefix to prepend to entries in the archive file.public java.lang.String getPrefix(Project p)
p
- the project to use
public void setFullpath(java.lang.String fullpath)
fullpath
- the full pathname of the single entry in this fileset.public java.lang.String getFullpath(Project p)
p
- the project to use
protected abstract ArchiveScanner newArchiveScanner()
public DirectoryScanner getDirectoryScanner(Project p)
getDirectoryScanner
in class AbstractFileSet
p
- the project to use
public java.util.Iterator iterator()
iterator
in interface ResourceCollection
iterator
in class FileSet
public int size()
size
in interface ResourceCollection
size
in class FileSet
public boolean isFilesystemOnly()
isFilesystemOnly
in interface ResourceCollection
isFilesystemOnly
in class FileSet
public void setFileMode(java.lang.String octalString)
octalString
- a String
valuepublic void integerSetFileMode(int mode)
We use the strange name so this method doesn't appear in IntrospectionHelpers list of attribute setters.
mode
- a int
valuepublic int getFileMode(Project p)
p
- the project to use
public boolean hasFileModeBeenSet()
public void setDirMode(java.lang.String octalString)
octalString
- a String
valuepublic void integerSetDirMode(int mode)
We use the strange name so this method doesn't appear in IntrospectionHelpers list of attribute setters.
mode
- a int
valuepublic int getDirMode(Project p)
p
- the project to use
public boolean hasDirModeBeenSet()
protected void configureFileSet(ArchiveFileSet zfs)
zfs
- the project to usepublic java.lang.Object clone()
clone
in class FileSet
public java.lang.String toString()
toString
in class AbstractFileSet
public java.lang.String getPrefix()
public java.lang.String getFullpath()
public int getFileMode()
public int getDirMode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |