1 | void setUserName(String userName) {↵ | | 1 | void setGroup(String groupName) {↵
|
2 | checkTarFileSetAttributesAllowed();↵ | | 2 | checkTarFileSetAttributesAllowed();↵
|
3 | userNameSet = true;↵ | | 3 | groupNameSet = true;↵
|
4 | this.userName = userName;↵ | | 4 | this.groupName = groupName;↵
|
5 | }↵ | | 5 | }↵
|
|
6 | /**↵ | | 6 | /**↵
|
7 | * @return the user name for the tar entry↵ | | 7 | * @return the group name string.↵
|
8 | */↵ | | 8 | */↵
|
9 | public String getUserName() {↵ | | 9 | public String getGroup() {↵
|
10 | if (isReference()) {↵ | | 10 | if (isReference()) {↵
|
11 | return ((TarFileSet) getCheckedRef()).getUserName();↵ | | 11 | return ((TarFileSet) getCheckedRef()).getGroup();↵
|
12 | }↵ | | 12 | }↵
|
13 | return userName;↵ | | 13 | return groupName;↵
|
14 | }↵ | | 14 | }↵
|
|
15 | /**↵ | | 15 | /**↵
|
16 | * @return whether the user name has been explicitly set.↵ | | 16 | * @return whether the group name has been explicitly set.↵
|
17 | */↵ | | 17 | */↵
|
18 | public boolean hasUserNameBeenSet() {↵ | | 18 | public boolean hasGroupBeenSet() {↵
|
19 | return userNameSet;↵ | | 19 | return groupNameSet;↵
|
20 | }↵ | | 20 | }↵
|
|
21 | /**↵ | | 21 | /**↵
|
22 | * The uid for the tar entry↵ | | 22 | * The GID for the tar entry; optional, default="0"↵
|
23 | * This is not the same as the User name.↵ | | 23 | * This is not the same as the group name.↵
|
24 | * @param uid the id of the user for the tar entry.↵ | | 24 | * @param gid the group id.↵
|
25 | */↵ | | 25 | */↵
|
26 | public void setUid(int uid) {↵ | | 26 | public void setGid(int gid) {↵
|
27 | checkTarFileSetAttributesAllowed();↵ | | 27 | checkTarFileSetAttributesAllowed();↵
|
28 | userIdSet = true;↵ | | 28 | groupIdSet = true;↵
|
29 | this.uid = uid;↵ | | 29 | this.gid = gid;↵
|
30 | }↵ | | 30 | }↵
|
|
31 | /**↵ | | 31 | /**↵
|
32 | * @return the uid for the tar entry↵ | | 32 | * @return the group identifier.↵
|
33 | */↵ | | 33 | */↵
|
34 | public int getUid() {↵ | | 34 | public int getGid() {↵
|
35 | if (isReference()) {↵ | | 35 | if (isReference()) {↵
|
36 | return ((TarFileSet) getCheckedRef()).getUid();↵ | | 36 | return ((TarFileSet) getCheckedRef()).getGid();↵
|
37 | }↵ | | 37 | }↵
|
38 | return uid;↵ | | 38 | return gid;↵
|
39 | | | 39 |
|