JAFS API v2

org.openafs.jafs
Class Group

java.lang.Object
  |
  +--org.openafs.jafs.Group
All Implemented Interfaces:
Comparable, PTSEntry, Serializable

public class Group
extends Object
implements PTSEntry, Serializable, Comparable

An abstract representation of an AFS group. It holds information about the group, such as what groups it owns.

Constructing an instance of a Group does not mean an actual AFS group is created in a cell -- usually a Group object is a representation of an already existing AFS group. If, however, the Group is constructed with the name of a group that does not exist in the cell represented by the provided Cell, a new group with that name can be created in that cell by calling the create(String, int) or create(String) method. If such a group does already exist when one of these methods is called, an exception will be thrown.

Each Group object has its own individual set of Groups that it owns and Users that belong to it. These represents the properties and attributes of an actual AFS group.

Associated with an AFS group are many attributes, such as whether or not who is allowed to list the members of this group. The Group class has many "set" methods to indicate values for these attributes (i.e. setListMembership(int). However, in order for these values to be written to the actual AFS group, the flushInfo() method needs to be called. This writes all user attributes set through this API to AFS. This is done to minimize calls through JNI.

The following is a simple example of how to construct and use a Group object. It lists the name and owner of a specified group.

 import org.openafs.jafs.Cell;
 import org.openafs.jafs.AFSException;
 import org.openafs.jafs.Partition;
 import org.openafs.jafs.Group;
 ...
 public class ...
 {
   ...
   private Cell cell;
   private Group group;
   ...
   public static void main(String[] args) throws Exception
   {
     String username   = arg[0];
     String password   = arg[1];
     String cellName   = arg[2];
     String groupName  = arg[3];
 
     token = new Token(username, password, cellName);
     cell   = new Cell(token);
     group = new Group(groupName, cell);
     
     System.out.println("Owner of group " + group.getName() + " is " 
                        + group.getOwnerName());
     ...
   }
   ...
 }
 

See Also:
Serialized Form

Field Summary
protected  boolean cachedInfo
          Whether or not the information fields of this group have been filled.
protected  Cell cell
           
protected  int cellHandle
           
protected  String creator
           
protected  int creatorUID
           
static int GROUP_ANYUSER_ACCESS
          Any user has access
static int GROUP_GROUP_ACCESS
          Members of the group have access
static int GROUP_OWNER_ACCESS
          Only the owner of the group has access
protected  ArrayList groupsOwned
           
protected  ArrayList groupsOwnedNames
           
protected  int listAdd
          who is allowed to execute PTS adduser for this group.
protected  int listDelete
          who is allowed to execute PTS removeuser for this group.
protected  int listGroupsOwned
          who is allowed to execute PTS examine for this group.
protected  int listMembership
          who is allowed to execute PTS listowned for this group.
protected  int listStatus
          who is allowed to execute PTS examine for this group.
protected  ArrayList memberNames
           
protected  ArrayList members
           
protected  int membershipCount
           
protected  String name
           
protected  int nameUID
           
protected  String owner
           
protected  int ownerUID
           
 
Fields inherited from interface org.openafs.jafs.PTSEntry
PTS_GROUP, PTS_USER
 
Constructor Summary
(package private) Group(Cell cell)
          Creates a blank Group given the cell to which the group belongs.
  Group(String name, Cell cell)
          Constructs a new Group object instance given the name of the AFS group and the AFS cell, represented by cell, to which it belongs.
  Group(String name, Cell cell, boolean preloadAllMembers)
          Constructs a new Group object instance given the name of the AFS group and the AFS cell, represented by cell, to which it belongs.
 
Method Summary
protected static void addMember(int cellHandle, String groupName, String userName)
          Adds a user to the specified group.
 void addMember(User theUser)
          Add the specified member to this group.
 void changeOwner(Group theOwner)
          Change the owner of this group.
protected static void changeOwner(int cellHandle, String groupName, String ownerName)
          Change the owner of the specified group.
 void changeOwner(User theOwner)
          Change the owner of this group.
 int compareTo(Group group)
          Compares two Group objects respective to their names and does not factor any other attribute.
 int compareTo(Object obj)
          Comparable interface method.
protected static void create(int cellHandle, String groupName, String ownerName, int gid)
          Creates the PTS entry for a new group.
 void create(String ownerName)
          Creates the PTS entry for a new group in this cell.
 void create(String ownerName, int gid)
          Creates the PTS entry for a new group in this cell.
 void delete()
          Deletes the PTS entry for a group in this cell.
protected static void delete(int cellHandle, String groupName)
          Deletes the PTS entry for a group.
 boolean equals(Group otherGroup)
          Tests whether two Group objects are equal, based on their names.
 void flushInfo()
          Flushes the current information of this Group object to disk.
 Cell getCell()
          Returns the Cell this group belongs to.
 PTSEntry getCreator()
          PTS: Returns the creator of this group in the form of a PTSEntry.
protected static void getGroupInfo(int cellHandle, String name, Group group)
          Fills in the information fields of the provided Group.
protected static int getGroupMembersBegin(int cellHandle, String name)
          Begin the process of getting the users that belong to the group.
protected static void getGroupMembersDone(int iterationId)
          Signals that the iteration is complete and will not be accessed anymore.
protected static int getGroupMembersNext(int cellHandle, int iterationId, User theUser)
          Fills the next user object belonging to that group.
protected static String getGroupMembersNextString(int iterationId)
          Returns the next members that belongs to the group.
 Group[] getGroupsOwned()
          Returns an array of the Group objects this group owns.
 String[] getGroupsOwnedNames()
          Returns an array of the group names this group owns.
protected  String getInfo()
          Returns a String representation of this Group.
 int getListAdd()
          Returns who can add members (pts adduser) to this group.
 int getListDelete()
          Returns who can delete members (pts removemember) from this group.
 int getListGroupsOwned()
          Returns who can list the groups owned (pts listowned) by this group.
 int getListMembership()
          Returns who can list the users (pts membership) that belong to this group.
 int getListStatus()
          Returns who can list the status (pts examine) of this group.
 String[] getMemberNames()
          Returns an array of the member names of this group.
 User[] getMembers()
          Returns an array of the User object members of this group.
 int getMembershipCount()
          Returns the number of members of this group.
 String getName()
          Returns the name of this group.
 PTSEntry getOwner()
          PTS: Returns the owner of this group in the form of a PTSEntry.
 short getType()
          Returns the type of PTSEntry this object represents.
 int getUID()
          Returns the numeric AFS id of this group.
protected static void reclaimGroupMemory()
          Reclaims all memory being saved by the group portion of the native library.
 void refresh()
          Refreshes the properties of this Group object instance with values from the AFS group it represents.
protected  void refresh(boolean all)
          Refreshes the properties of this Group object instance with values from the AFS group it represents.
protected  void refreshGroupsOwned()
          Refreshes the current information about the Group objects the group owns.
protected  void refreshGroupsOwnedNames()
          Refreshes the current information about the names of groups the group owns.
protected  void refreshInfo()
          Refreshes the information fields of this Group to reflect the current state of the AFS group.
protected  void refreshMemberNames()
          Refreshes the current information about the names of members belonging to this group.
protected  void refreshMembers()
          Refreshes the current information about the User objects belonging to this group.
protected static void removeMember(int cellHandle, String groupName, String userName)
          Removes a user from the specified group.
 void removeMember(User theUser)
          Remove the specified member from this group.
protected static void rename(int cellHandle, String oldGroupName, String newGroupName)
          Change the name of the specified group.
 void rename(String newName)
          Change the name of this group.
protected static void setGroupInfo(int cellHandle, String name, Group theGroup)
          Sets the information values of this AFS group to be the parameter values.
 void setListAdd(int value)
          Sets who can add members (pts adduser) to this group.
 void setListDelete(int value)
          Sets who can delete members (pts removemember) from this group.
 void setListGroupsOwned(int value)
          Sets who can list the groups owned (pts listowned) by this group.
 void setListMembership(int value)
          Sets who can list the users (pts membership) that belong to this group.
 void setListStatus(int value)
          Sets who can list the status (pts examine) of this group.
 String toString()
          Returns the name of this Group
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GROUP_OWNER_ACCESS

public static final int GROUP_OWNER_ACCESS
Only the owner of the group has access

See Also:
Constant Field Values

GROUP_GROUP_ACCESS

public static final int GROUP_GROUP_ACCESS
Members of the group have access

See Also:
Constant Field Values

GROUP_ANYUSER_ACCESS

public static final int GROUP_ANYUSER_ACCESS
Any user has access

See Also:
Constant Field Values

cell

protected Cell cell

cellHandle

protected int cellHandle

name

protected String name

membershipCount

protected int membershipCount

nameUID

protected int nameUID

ownerUID

protected int ownerUID

creatorUID

protected int creatorUID

owner

protected String owner

creator

protected String creator

listStatus

protected int listStatus
who is allowed to execute PTS examine for this group. Valid values are:


listGroupsOwned

protected int listGroupsOwned
who is allowed to execute PTS examine for this group. Valid values are:


listMembership

protected int listMembership
who is allowed to execute PTS listowned for this group. Valid values are:


listAdd

protected int listAdd
who is allowed to execute PTS adduser for this group. Valid values are:


listDelete

protected int listDelete
who is allowed to execute PTS removeuser for this group. Valid values are:


members

protected ArrayList members

memberNames

protected ArrayList memberNames

groupsOwned

protected ArrayList groupsOwned

groupsOwnedNames

protected ArrayList groupsOwnedNames

cachedInfo

protected boolean cachedInfo
Whether or not the information fields of this group have been filled.

Constructor Detail

Group

public Group(String name,
             Cell cell)
      throws AFSException
Constructs a new Group object instance given the name of the AFS group and the AFS cell, represented by cell, to which it belongs. This does not actually create a new AFS group, it just represents one. If name is not an actual AFS group, exceptions will be thrown during subsequent method invocations on this object, unless the create(String, int) or create(String) method is explicitly called to create it.

Parameters:
name - the name of the group to represent
cell - the cell to which the group belongs.
Throws:
AFSException - If an error occurs in the native code

Group

public Group(String name,
             Cell cell,
             boolean preloadAllMembers)
      throws AFSException
Constructs a new Group object instance given the name of the AFS group and the AFS cell, represented by cell, to which it belongs. This does not actually create a new AFS group, it just represents one. If name is not an actual AFS group, exceptions will be thrown during subsequent method invocations on this object, unless the create(String, int) or create(String) method is explicitly called to create it. Note that if the process doesn't exist and preloadAllMembers is true, an exception will be thrown.

This constructor is ideal for point-in-time representation and transient applications. It ensures all data member values are set and available without calling back to the filesystem at the first request for them. Use the refresh() method to address any coherency concerns.

Parameters:
name - the name of the group to represent
cell - the cell to which the group belongs.
preloadAllMembers - true will ensure all object members are set upon construction; otherwise members will be set upon access, which is the default behavior.
Throws:
AFSException - If an error occurs in the native code
See Also:
refresh()

Group

Group(Cell cell)
throws AFSException
Creates a blank Group given the cell to which the group belongs. Other methods cvan then be used to fill the fields of this blank object.

Parameters:
cell - the cell to which the group belongs.
Throws:
AFSException - If an error occurs in the native code
Method Detail

create

public void create(String ownerName)
            throws AFSException
Creates the PTS entry for a new group in this cell. Automatically assigns a group id.

Parameters:
ownerName - the owner of this group
AFSException

create

public void create(String ownerName,
                   int gid)
            throws AFSException
Creates the PTS entry for a new group in this cell.

Parameters:
ownerName - the owner of this group
gid - the group id to assign to the new group
Throws:
AFSException - If an error occurs in the native code

delete

public void delete()
            throws AFSException
Deletes the PTS entry for a group in this cell. Deletes this group from the membership list of the user that belonged to it, but does not delete the groups owned by this group. Also nullifies the Java object.

Throws:
AFSException - If an error occurs in the native code

flushInfo

public void flushInfo()
               throws AFSException
Flushes the current information of this Group object to disk. This will update the information of the actual AFS group to match the settings that have been modified in this Group object. This function must be called before any changes made to the information fields of this group will be seen by the AFS system.

Throws:
AFSException - If an error occurs in the native code

addMember

public void addMember(User theUser)
               throws AFSException
Add the specified member to this group.

Throws:
AFSException - If an error occurs in the native code

removeMember

public void removeMember(User theUser)
                  throws AFSException
Remove the specified member from this group.

Throws:
AFSException - If an error occurs in the native code

changeOwner

public void changeOwner(User theOwner)
                 throws AFSException
Change the owner of this group.

Throws:
AFSException - If an error occurs in the native code

changeOwner

public void changeOwner(Group theOwner)
                 throws AFSException
Change the owner of this group.

Throws:
AFSException - If an error occurs in the native code

rename

public void rename(String newName)
            throws AFSException
Change the name of this group.

Parameters:
newName - the new name for this group
Throws:
AFSException - If an error occurs in the native code

refresh

public void refresh()
             throws AFSException
Refreshes the properties of this Group object instance with values from the AFS group it represents. All properties that have been initialized and/or accessed will be renewed according to the values of the AFS group this Group object instance represents.

Since in most environments administrative changes can be administered from an AFS command-line program or an alternate GUI application, this method provides a means to refresh the Java object representation and thereby ascertain any possible modifications that may have been made from such alternate administrative programs. Using this method before an associated instance accessor will ensure the highest level of representative accuracy, accommodating changes made external to the Java application space. If administrative changes to the underlying AFS system are only allowed via this API, then the use of this method is unnecessary.

Throws:
AFSException - If an error occurs in the native code

refresh

protected void refresh(boolean all)
                throws AFSException
Refreshes the properties of this Group object instance with values from the AFS group it represents. If all is true then all of the properties of this Group object instance will be set, or renewed, according to the values of the AFS group it represents, disregarding any previously set properties.

Thus, if all is false then properties that are currently set will be refreshed and properties that are not set will remain uninitialized. See refresh() for more information.

Parameters:
all - if true set or renew all object properties; otherwise renew all set properties
Throws:
AFSException - If an error occurs in the native code
See Also:
refresh()

refreshInfo

protected void refreshInfo()
                    throws AFSException
Refreshes the information fields of this Group to reflect the current state of the AFS group. Does not refresh the members that belong to the group, nor the groups the group owns.

Throws:
AFSException - If an error occurs in the native code

refreshMembers

protected void refreshMembers()
                       throws AFSException
Refreshes the current information about the User objects belonging to this group. Does not refresh the information fields of the group or groups owned.

Throws:
AFSException - If an error occurs in the native code

refreshMemberNames

protected void refreshMemberNames()
                           throws AFSException
Refreshes the current information about the names of members belonging to this group. Does not refresh the information fields of the group or groups owned.

Throws:
AFSException - If an error occurs in the native code

refreshGroupsOwned

protected void refreshGroupsOwned()
                           throws AFSException
Refreshes the current information about the Group objects the group owns. Does not refresh the information fields of the group or members.

Throws:
AFSException - If an error occurs in the native code

refreshGroupsOwnedNames

protected void refreshGroupsOwnedNames()
                                throws AFSException
Refreshes the current information about the names of groups the group owns. Does not refresh the information fields of the group or members.

Throws:
AFSException - If an error occurs in the native code

getName

public String getName()
Returns the name of this group.

Specified by:
getName in interface PTSEntry
Returns:
the name of this group

getUID

public int getUID()
           throws AFSException
Returns the numeric AFS id of this group.

Specified by:
getUID in interface PTSEntry
Returns:
the AFS id of this group
Throws:
AFSException - If an error occurs in the native code

getCell

public Cell getCell()
Returns the Cell this group belongs to.

Specified by:
getCell in interface PTSEntry
Returns:
the Cell this group belongs to

getMembers

public User[] getMembers()
                  throws AFSException
Returns an array of the User object members of this group.

Returns:
an array of the members of this group
Throws:
AFSException - If an error occurs in the native code

getMemberNames

public String[] getMemberNames()
                        throws AFSException
Returns an array of the member names of this group.

Returns:
an array of the member names of this group
Throws:
AFSException - If an error occurs in the native code

getGroupsOwned

public Group[] getGroupsOwned()
                       throws AFSException
Returns an array of the Group objects this group owns.

Returns:
an array of the Groups this group owns
Throws:
AFSException - If an error occurs in the native code

getGroupsOwnedNames

public String[] getGroupsOwnedNames()
                             throws AFSException
Returns an array of the group names this group owns. Contains String objects.

Returns:
an array of the group names this group owns
Throws:
AFSException - If an error occurs in the native code

getMembershipCount

public int getMembershipCount()
                       throws AFSException
Returns the number of members of this group.

Returns:
the membership count
Throws:
AFSException - If an error occurs in the native code

getOwner

public PTSEntry getOwner()
                  throws AFSException
PTS: Returns the owner of this group in the form of a PTSEntry.

The returning object could be either a User or Group; to determine what type of object the PTSEntry represents, call the PTSEntry.getType() method.

Specified by:
getOwner in interface PTSEntry
Returns:
the owner of this group
Throws:
AFSException - If an error occurs in the native code
See Also:
PTSEntry, PTSEntry.getType(), refresh()

getCreator

public PTSEntry getCreator()
                    throws AFSException
PTS: Returns the creator of this group in the form of a PTSEntry.

The returning object could be either a User or Group; to determine what type of object the PTSEntry represents, call the PTSEntry.getType() method.

Specified by:
getCreator in interface PTSEntry
Returns:
the creator of this group
Throws:
AFSException - If an error occurs in the native code
See Also:
PTSEntry, PTSEntry.getType(), refresh()

getType

public short getType()
Returns the type of PTSEntry this object represents.

This method will always return PTSEntry.PTS_GROUP.

Specified by:
getType in interface PTSEntry
Returns:
the type of PTSEntry this object represents (will always return PTSEntry.PTS_GROUP)
See Also:
PTSEntry, PTSEntry.getType()

getListStatus

public int getListStatus()
                  throws AFSException
Returns who can list the status (pts examine) of this group. Valid values are:

Returns:
the status listing permission
Throws:
AFSException - If an error occurs in the native code

getListGroupsOwned

public int getListGroupsOwned()
                       throws AFSException
Returns who can list the groups owned (pts listowned) by this group. Valid values are:

Returns:
the groups owned listing permission
Throws:
AFSException - If an error occurs in the native code

getListMembership

public int getListMembership()
                      throws AFSException
Returns who can list the users (pts membership) that belong to this group. Valid values are:

Returns:
the membership listing permission
Throws:
AFSException - If an error occurs in the native code

getListAdd

public int getListAdd()
               throws AFSException
Returns who can add members (pts adduser) to this group. Valid values are:

Returns:
the member adding permission
Throws:
AFSException - If an error occurs in the native code

getListDelete

public int getListDelete()
                  throws AFSException
Returns who can delete members (pts removemember) from this group. Valid values are:

Returns:
the member deleting permission
Throws:
AFSException - If an error occurs in the native code

setListStatus

public void setListStatus(int value)
                   throws AFSException
Sets who can list the status (pts examine) of this group. Valid values are:

Parameters:
value - the value of the new list membership permission
Throws:
AFSException - if an error occurs in the native code
IllegalArgumentException - if an invalud argument is provided

setListGroupsOwned

public void setListGroupsOwned(int value)
                        throws AFSException
Sets who can list the groups owned (pts listowned) by this group. Valid values are:

Parameters:
value - the value of the new list membership permission
Throws:
AFSException - if an error occurs in the native code
IllegalArgumentException - if an invalud argument is provided

setListMembership

public void setListMembership(int value)
                       throws AFSException
Sets who can list the users (pts membership) that belong to this group. Valid values are:

Parameters:
value - the value of the new list membership permission
Throws:
AFSException - if an error occurs in the native code
IllegalArgumentException - if an invalud argument is provided

setListAdd

public void setListAdd(int value)
                throws AFSException
Sets who can add members (pts adduser) to this group. Valid values are:

Parameters:
value - the value of the new list membership permission
Throws:
AFSException - if an invalid value is provided

setListDelete

public void setListDelete(int value)
                   throws AFSException
Sets who can delete members (pts removemember) from this group. Valid values are:

Parameters:
value - the value of the new list membership permission
Throws:
AFSException - if an invalid value is provided

getInfo

protected String getInfo()
Returns a String representation of this Group. Contains the information fields and members.

Returns:
a String representation of the Group

compareTo

public int compareTo(Group group)
Compares two Group objects respective to their names and does not factor any other attribute. Alphabetic case is significant in comparing names.

Parameters:
group - The Group object to be compared to this Group instance
Returns:
Zero if the argument is equal to this Group's name, a value less than zero if this Group's name is lexicographically less than the argument, or a value greater than zero if this Group's name is lexicographically greater than the argument

compareTo

public int compareTo(Object obj)
Comparable interface method.

Specified by:
compareTo in interface Comparable
See Also:
compareTo(Group)

equals

public boolean equals(Group otherGroup)
Tests whether two Group objects are equal, based on their names.

Parameters:
otherGroup - the Group to test
Returns:
whether the specifed Group is the same as this Group

toString

public String toString()
Returns the name of this Group

Overrides:
toString in class Object
Returns:
the name of this Group

create

protected static void create(int cellHandle,
                             String groupName,
                             String ownerName,
                             int gid)
                      throws AFSException
Creates the PTS entry for a new group. Pass in 0 for the uid if PTS is to automatically assign the group id.

Parameters:
cellHandle - the handle of the cell to which the group belongs
groupName - the name of the group to create
ownerName - the owner of this group
gid - the group id to assign to the group (0 to have one automatically assigned)
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle()

delete

protected static void delete(int cellHandle,
                             String groupName)
                      throws AFSException
Deletes the PTS entry for a group. Deletes this group from the membership list of the users that belonged to it, but does not delete the groups owned by this group.

Parameters:
cellHandle - the handle of the cell to which the group belongs
groupName - the name of the group to delete
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle()

getGroupInfo

protected static void getGroupInfo(int cellHandle,
                                   String name,
                                   Group group)
                            throws AFSException
Fills in the information fields of the provided Group. Fills in values based on the current PTS information of the group.

Parameters:
cellHandle - the handle of the cell to which the group belongs
name - the name of the group for which to get the information
group - the Group object in which to fill in the information
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle(), Group

setGroupInfo

protected static void setGroupInfo(int cellHandle,
                                   String name,
                                   Group theGroup)
                            throws AFSException
Sets the information values of this AFS group to be the parameter values.

Parameters:
cellHandle - the handle of the cell to which the user belongs
name - the name of the user for which to set the information
theGroup - the group object containing the desired information
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle()

getGroupMembersBegin

protected static int getGroupMembersBegin(int cellHandle,
                                          String name)
                                   throws AFSException
Begin the process of getting the users that belong to the group. Returns an iteration ID to be used by subsequent calls to getGroupMembersNext and getGroupMembersDone.

Parameters:
cellHandle - the handle of the cell to which the group belongs
name - the name of the group for which to get the members
Returns:
an iteration ID
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle()

getGroupMembersNextString

protected static String getGroupMembersNextString(int iterationId)
                                           throws AFSException
Returns the next members that belongs to the group. Returns null if there are no more members.

Parameters:
iterationId - the iteration ID of this iteration
Returns:
the name of the next member
Throws:
AFSException - If an error occurs in the native code
See Also:
getGroupMembersBegin(int, java.lang.String)

getGroupMembersNext

protected static int getGroupMembersNext(int cellHandle,
                                         int iterationId,
                                         User theUser)
                                  throws AFSException
Fills the next user object belonging to that group. Returns 0 if there are no more users, != 0 otherwise.

Parameters:
cellHandle - the handle of the cell to which the users belong
iterationId - the iteration ID of this iteration
theUser - a User object to be populated with the values of the next user
Returns:
0 if there are no more users, != 0 otherwise
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle(), getGroupMembersBegin(int, java.lang.String)

getGroupMembersDone

protected static void getGroupMembersDone(int iterationId)
                                   throws AFSException
Signals that the iteration is complete and will not be accessed anymore.

Parameters:
iterationId - the iteration ID of this iteration
Throws:
AFSException - If an error occurs in the native code
See Also:
getGroupMembersBegin(int, java.lang.String)

addMember

protected static void addMember(int cellHandle,
                                String groupName,
                                String userName)
                         throws AFSException
Adds a user to the specified group.

Parameters:
cellHandle - the handle of the cell to which the group belongs
groupName - the name of the group to which to add a member
userName - the name of the user to add
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle()

removeMember

protected static void removeMember(int cellHandle,
                                   String groupName,
                                   String userName)
                            throws AFSException
Removes a user from the specified group.

Parameters:
cellHandle - the handle of the cell to which the group belongs
groupName - the name of the group from which to remove a member
userName - the name of the user to remove
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle()

changeOwner

protected static void changeOwner(int cellHandle,
                                  String groupName,
                                  String ownerName)
                           throws AFSException
Change the owner of the specified group.

Parameters:
cellHandle - the handle of the cell to which the group belongs
groupName - the name of the group of which to change the owner
ownerName - the name of the new owner
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle()

rename

protected static void rename(int cellHandle,
                             String oldGroupName,
                             String newGroupName)
                      throws AFSException
Change the name of the specified group.

Parameters:
cellHandle - the handle of the cell to which the group belongs
oldGroupName - the old name of the group
newGroupName - the new name for the group
Throws:
AFSException - If an error occurs in the native code
See Also:
Cell.getCellHandle()

reclaimGroupMemory

protected static void reclaimGroupMemory()
Reclaims all memory being saved by the group portion of the native library. This method should be called when no more Groups are expected to be used.


JAFS API v2