Top Description Fields Constructors Methods
org.apache.tools.ant.types

public Class TarFileSet

extends ArchiveFileSet
Class Inheritance
Known Direct Subclasses
org.apache.tools.ant.taskdefs.Tar.TarFileSet
Imports
org.apache.tools.ant.BuildException, .Project

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.

Field Summary

Modifier and TypeField and Description
private int
private boolean
private String
private boolean
private int
private boolean
private String
private boolean
Inherited from org.apache.tools.ant.types.ArchiveFileSet:
DEFAULT_DIR_MODEDEFAULT_FILE_MODE

Constructor Summary

AccessConstructor and Description
public
TarFileSet()

Constructor for TarFileSet

protected
TarFileSet(FileSet
the fileset to use
fileset
)

Constructor using a fileset argument.

protected
TarFileSet(TarFileSet
the tarfileset to use
fileset
)

Constructor using a tarfileset argument.

Method Summary

Modifier and TypeMethod and Description
private void
checkTarFileSetAttributesAllowed()

A check attributes for TarFileSet.

public Object

Returns:

the cloned tarFileSet
clone
()

Overrides org.apache.tools.ant.types.ArchiveFileSet.clone.

Return a TarFileSet that has the same properties as this one.
protected void
configureFileSet(ArchiveFileSet
the archive fileset to configure.
zfs
)

Overrides org.apache.tools.ant.types.ArchiveFileSet.configureFileSet.

Configure a fileset based on this fileset.
public int

Returns:

the group identifier.
getGid
()

public String

Returns:

the group name string.
getGroup
()

protected AbstractFileSet

Returns:

the abstract fileset instance
getRef
(Project
the project to use
p
)

Overrides org.apache.tools.ant.types.FileSet.getRef.

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

Returns:

the abstract fileset instance
getRef
()

Overrides org.apache.tools.ant.types.ArchiveFileSet.getRef.

A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute
public int

Returns:

the uid for the tar entry
getUid
()

public String

Returns:

the user name for the tar entry
getUserName
()

public boolean

Returns:

whether the group name has been explicitly set.
hasGroupBeenSet
()

public boolean

Returns:

whether the group id has been explicitly set.
hasGroupIdBeenSet
()

public boolean

Returns:

whether the user id has been explicitly set.
hasUserIdBeenSet
()

public boolean

Returns:

whether the user name has been explicitly set.
hasUserNameBeenSet
()

protected ArchiveScanner

Returns:

the created scanner.
newArchiveScanner
()

Implements abstract org.apache.tools.ant.types.ArchiveFileSet.newArchiveScanner.

Create a new scanner.
public void
setGid(int
the group id.
gid
)

The GID for the tar entry; optional, default="0" This is not the same as the group name.

public void
setGroup(String
the group name string.
groupName
)

The groupname for the tar entry; optional, default="" This is not the same as the GID.

public void
setRefid(Reference
the Reference to use.
r
)

Overrides org.apache.tools.ant.types.AbstractFileSet.setRefid.

Makes this instance in effect a reference to another instance.
public void
setUid(int
the id of the user for the tar entry.
uid
)

The uid for the tar entry This is not the same as the User name.

public void
setUserName(String
the user name for the tar entry.
userName
)

The username for the tar entry This is not the same as the UID.

Inherited from org.apache.tools.ant.types.ArchiveFileSet:
addConfigureddieOnCircularReferencegetDirectoryScannergetDirModegetDirModegetEncodinggetFileModegetFileModegetFullpathgetFullpathgetPrefixgetPrefixgetSrcgetSrchasDirModeBeenSethasFileModeBeenSetintegerSetDirModeintegerSetFileModeisFilesystemOnlyiteratorsetDirsetDirModesetEncodingsetErrorOnMissingArchivesetFileModesetFullpathsetPrefixsetSrcsetSrcResourcesizetoString

Field Detail

gidback to summary
private int gid
groupIdSetback to summary
private boolean groupIdSet
groupNameback to summary
private String groupName
groupNameSetback to summary
private boolean groupNameSet
uidback to summary
private int uid
userIdSetback to summary
private boolean userIdSet
userNameback to summary
private String userName
userNameSetback to summary
private boolean userNameSet

Constructor Detail

TarFileSetback to summary
public TarFileSet()

Constructor for TarFileSet

TarFileSetback to summary
protected TarFileSet(FileSet fileset)

Constructor using a fileset argument.

Parameters
fileset:FileSet

the fileset to use

TarFileSetback to summary
protected TarFileSet(TarFileSet fileset)

Constructor using a tarfileset argument.

Parameters
fileset:TarFileSet

the tarfileset to use

Method Detail

checkTarFileSetAttributesAllowedback to summary
private void checkTarFileSetAttributesAllowed()

A check attributes for TarFileSet. If there is a reference, and it is a TarFileSet, the tar fileset attributes cannot be used.

cloneback to summary
public Object clone()

Overrides org.apache.tools.ant.types.ArchiveFileSet.clone.

Return a TarFileSet that has the same properties as this one.

Returns:Object

the cloned tarFileSet

Annotations
@Override
configureFileSetback to summary
protected void configureFileSet(ArchiveFileSet zfs)

Overrides org.apache.tools.ant.types.ArchiveFileSet.configureFileSet.

Configure a fileset based on this fileset. If the fileset is a TarFileSet copy in the tarfileset specific attributes.

Parameters
zfs:ArchiveFileSet

the archive fileset to configure.

Annotations
@Override
getGidback to summary
public int getGid()
Returns:int

the group identifier.

getGroupback to summary
public String getGroup()
Returns:String

the group name string.

getRefback to summary
protected AbstractFileSet getRef(Project p)

Overrides org.apache.tools.ant.types.FileSet.getRef.

A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute

Parameters
p:Project

the project to use

Returns:AbstractFileSet

the abstract fileset instance

Annotations
@Override
getRefback to summary
protected AbstractFileSet getRef()

Overrides org.apache.tools.ant.types.ArchiveFileSet.getRef.

A TarFileset accepts another TarFileSet or a FileSet as reference FileSets are often used by the war task for the lib attribute

Returns:AbstractFileSet

the abstract fileset instance

Annotations
@Override
getUidback to summary
public int getUid()
Returns:int

the uid for the tar entry

getUserNameback to summary
public String getUserName()
Returns:String

the user name for the tar entry

hasGroupBeenSetback to summary
public boolean hasGroupBeenSet()
Returns:boolean

whether the group name has been explicitly set.

hasGroupIdBeenSetback to summary
public boolean hasGroupIdBeenSet()
Returns:boolean

whether the group id has been explicitly set.

hasUserIdBeenSetback to summary
public boolean hasUserIdBeenSet()
Returns:boolean

whether the user id has been explicitly set.

hasUserNameBeenSetback to summary
public boolean hasUserNameBeenSet()
Returns:boolean

whether the user name has been explicitly set.

newArchiveScannerback to summary
protected ArchiveScanner newArchiveScanner()

Implements abstract org.apache.tools.ant.types.ArchiveFileSet.newArchiveScanner.

Create a new scanner.

Returns:ArchiveScanner

the created scanner.

Annotations
@Override
setGidback to summary
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:int

the group id.

setGroupback to summary
public void setGroup(String groupName)

The groupname for the tar entry; optional, default="" This is not the same as the GID.

Parameters
groupName:String

the group name string.

setRefidback to summary
public void setRefid(Reference r) throws BuildException

Overrides org.apache.tools.ant.types.AbstractFileSet.setRefid.

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:Reference

the Reference to use.

Annotations
@Override
Exceptions
BuildException:
on error
setUidback to summary
public void setUid(int uid)

The uid for the tar entry This is not the same as the User name.

Parameters
uid:int

the id of the user for the tar entry.

setUserNameback to summary
public void setUserName(String userName)

The username for the tar entry This is not the same as the UID.

Parameters
userName:String

the user name for the tar entry.