Methods 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.
if (getProject() == null
|| (isReference()
&& (getRefid().getReferencedObject(
getProject())
instanceof TarFileSet))) {
checkAttributesAllowed();
}
|
public java.lang.Object | clone()Return a TarFileSet that has the same properties
as this one.
if (isReference()) {
return ((TarFileSet) getRef(getProject())).clone();
} else {
return super.clone();
}
|
protected void | configureFileSet(ArchiveFileSet zfs)Configure a fileset based on this fileset.
If the fileset is a TarFileSet copy in the tarfileset
specific attributes.
super.configureFileSet(zfs);
if (zfs instanceof TarFileSet) {
TarFileSet tfs = (TarFileSet) zfs;
tfs.setUserName(userName);
tfs.setGroup(groupName);
tfs.setUid(uid);
tfs.setGid(gid);
}
|
public int | getGid()
if (isReference()) {
return ((TarFileSet) getCheckedRef()).getGid();
}
return gid;
|
public java.lang.String | getGroup()
if (isReference()) {
return ((TarFileSet) getCheckedRef()).getGroup();
}
return groupName;
|
protected AbstractFileSet | getRef(org.apache.tools.ant.Project p)A TarFileset accepts another TarFileSet or a FileSet as reference
FileSets are often used by the war task for the lib attribute
dieOnCircularReference(p);
Object o = getRefid().getReferencedObject(p);
if (o instanceof TarFileSet) {
return (AbstractFileSet) o;
} else if (o instanceof FileSet) {
TarFileSet zfs = new TarFileSet((FileSet) o);
configureFileSet(zfs);
return zfs;
} else {
String msg = getRefid().getRefId() + " doesn\'t denote a tarfileset or a fileset";
throw new BuildException(msg);
}
|
public int | getUid()
if (isReference()) {
return ((TarFileSet) getCheckedRef()).getUid();
}
return uid;
|
public java.lang.String | getUserName()
if (isReference()) {
return ((TarFileSet) getCheckedRef()).getUserName();
}
return userName;
|
public boolean | hasGroupBeenSet()
return groupNameSet;
|
public boolean | hasGroupIdBeenSet()
return groupIdSet;
|
public boolean | hasUserIdBeenSet()
return userIdSet;
|
public boolean | hasUserNameBeenSet()
return userNameSet;
|
protected ArchiveScanner | newArchiveScanner()Create a new scanner.
TarScanner zs = new TarScanner();
return zs;
|
public void | setGid(int gid)The GID for the tar entry; optional, default="0"
This is not the same as the group name.
checkTarFileSetAttributesAllowed();
groupIdSet = true;
this.gid = gid;
|
public void | setGroup(java.lang.String groupName)The groupname for the tar entry; optional, default=""
This is not the same as the GID.
checkTarFileSetAttributesAllowed();
groupNameSet = true;
this.groupName = groupName;
|
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.
if (userNameSet || userIdSet || groupNameSet || groupIdSet) {
throw tooManyAttributes();
}
super.setRefid(r);
|
public void | setUid(int uid)The uid for the tar entry
This is not the same as the User name.
checkTarFileSetAttributesAllowed();
userIdSet = true;
this.uid = uid;
|
public void | setUserName(java.lang.String userName)The username for the tar entry
This is not the same as the UID.
checkTarFileSetAttributesAllowed();
userNameSet = true;
this.userName = userName;
|