com.starbase.starteam
Class Group

java.lang.Object
  |
  +--com.starbase.starteam.CacheRef
        |
        +--com.starbase.starteam.Group
All Implemented Interfaces:
java.lang.Cloneable

public class Group
extends CacheRef

Represents a StarTeam Group. Only a limited subset of the whole group information is available. The GroupAccount class has the full group information but it is only accessible to user's with the appropriate permissions.

See Also:
GroupAccount, Permission.SERVER_ADMIN_USER_ACCOUNTS

Method Summary
 Group copy()
          Creates a copy of this Group object.
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 int[] fetchMemberUserIDs(boolean bDescendants)
          Returns the IDs of all of the users that belong to this group.
 int getID()
          Returns the integer idenitifier for this group.
 java.lang.String getName()
          Returns the group's name.
 Server getServer()
          Returns the Server object to which this group belongs.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean isDeleted()
          Returns true if the Group has been deleted.
 boolean isEqualTo(Group group)
          Compares two Group objects, and their member User IDs.
 boolean isMember(int userID)
          Return true if the specified user can be considered a member of this Group.
 java.lang.String toString()
          Returns the group name.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

copy

public Group copy()
Creates a copy of this Group object. Useful to applications that want to save a snapshot of the group in a given state, for example, before calling Server.refreshGroups().

The copied group will have the same parent server as the original group. The Server object is not copied.

Returns:
A new copy of this Group object.
See Also:
Group.isEqualTo(Group)

isEqualTo

public boolean isEqualTo(Group group)
Compares two Group objects, and their member User IDs. Requires admin privileges on 5.2 and earlier servers.

The parent Servers are not compared.

Parameters:
group - The Group to be compared with this one.
Returns:
true if no differences were found.
See Also:
Group.copy()

getServer

public Server getServer()
Returns the Server object to which this group belongs.

Returns:
the Server object to which this group belongs.

getID

public int getID()
Returns the integer idenitifier for this group.

Returns:
the integer idenitifier for this group.

fetchMemberUserIDs

public int[] fetchMemberUserIDs(boolean bDescendants)
Returns the IDs of all of the users that belong to this group. The information is retrieved directly from the StarTeam Server, and is not cached. Requires admin privileges on 5.2 and earlier servers.

Parameters:
bDescendants - true = plus all descendants of group; false = this group only
Returns:
the IDs of all of the users that belong to this group.

isMember

public boolean isMember(int userID)
Return true if the specified user can be considered a member of this Group. A user is defined to be a member of a Group if it is directly a member of the Group or recusively of any sub-Group of this Group. This requires admin privileges on servers older than 5.3.033.

Parameters:
userID - the user ID being checked for group membership
Returns:
true if the specified user ID is a member of this or any sub group

getName

public java.lang.String getName()
Returns the group's name.

Returns:
the group's name.

isDeleted

public boolean isDeleted()
Returns true if the Group has been deleted.

Returns:
true if the Group has been deleted.

toString

public java.lang.String toString()
Returns the group name.

Overrides:
toString in class java.lang.Object
Returns:
the group name.

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.