org.apache.tools.ant.types

Class TarFileSet

public class TarFileSet extends ArchiveFileSet

A TarFileSet is a FileSet with extra attributes useful in the context of Tar/Jar tasks. A TarFileSet extends FileSets with the ability to extract a subset of the entries of a Tar file for inclusion in another Tar file. It also includes a prefix attribute which is prepended to each entry in the output Tar file.
Constructor Summary
TarFileSet()
Constructor for TarFileSet
protected TarFileSet(FileSet fileset)
Constructor using a fileset arguement.
protected TarFileSet(TarFileSet fileset)
Constructor using a tarfileset arguement.
Method Summary
Objectclone()
Return a TarFileSet that has the same properties as this one.
protected voidconfigureFileSet(ArchiveFileSet zfs)
Configure a fileset based on this fileset.
intgetGid()
StringgetGroup()
protected AbstractFileSetgetRef(Project p)
A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute
intgetUid()
StringgetUserName()
booleanhasGroupBeenSet()
booleanhasGroupIdBeenSet()
booleanhasUserIdBeenSet()
booleanhasUserNameBeenSet()
protected ArchiveScannernewArchiveScanner()
Create a new scanner.
voidsetGid(int gid)
The GID for the tar entry; optional, default="0" This is not the same as the group name.
voidsetGroup(String groupName)
The groupname for the tar entry; optional, default="" This is not the same as the GID.
voidsetRefid(Reference r)
Makes this instance in effect a reference to another instance.
voidsetUid(int uid)
The uid for the tar entry This is not the same as the User name.
voidsetUserName(String userName)
The username for the tar entry This is not the same as the UID.

Constructor Detail

TarFileSet

public TarFileSet()
Constructor for TarFileSet

TarFileSet

protected TarFileSet(FileSet fileset)
Constructor using a fileset arguement.

Parameters: fileset the fileset to use

TarFileSet

protected TarFileSet(TarFileSet fileset)
Constructor using a tarfileset arguement.

Parameters: fileset the tarfileset to use

Method Detail

clone

public Object clone()
Return a TarFileSet that has the same properties as this one.

Returns: the cloned tarFileSet

configureFileSet

protected void configureFileSet(ArchiveFileSet zfs)
Configure a fileset based on this fileset. If the fileset is a TarFileSet copy in the tarfileset specific attributes.

Parameters: zfs the archive fileset to configure.

getGid

public int getGid()

Returns: the group identifier.

getGroup

public String getGroup()

Returns: the group name string.

getRef

protected AbstractFileSet getRef(Project p)
A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute

Parameters: p the project to use

Returns: the abstract fileset instance

getUid

public int getUid()

Returns: the uid for the tar entry

getUserName

public String getUserName()

Returns: the user name for the tar entry

hasGroupBeenSet

public boolean hasGroupBeenSet()

Returns: whether the group name has been explicitly set.

hasGroupIdBeenSet

public boolean hasGroupIdBeenSet()

Returns: whether the group id has been explicitly set.

hasUserIdBeenSet

public boolean hasUserIdBeenSet()

Returns: whether the user id has been explicitly set.

hasUserNameBeenSet

public boolean hasUserNameBeenSet()

Returns: whether the user name has been explicitly set.

newArchiveScanner

protected ArchiveScanner newArchiveScanner()
Create a new scanner.

Returns: the created scanner.

setGid

public void setGid(int gid)
The GID for the tar entry; optional, default="0" This is not the same as the group name.

Parameters: gid the group id.

setGroup

public void setGroup(String groupName)
The groupname for the tar entry; optional, default="" This is not the same as the GID.

Parameters: groupName the group name string.

setRefid

public void setRefid(Reference r)
Makes this instance in effect a reference to another instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

Parameters: r the Reference to use.

Throws: BuildException on error

setUid

public void setUid(int uid)
The uid for the tar entry This is not the same as the User name.

Parameters: uid the id of the user for the tar entry.

setUserName

public void setUserName(String userName)
The username for the tar entry This is not the same as the UID.

Parameters: userName the user name for the tar entry.