|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.starbase.starteam.CacheRef
|
+--com.starbase.starteam.GroupAccount
This class represents a full StarTeam Group account. New groups can be added to a StarTeam Server and existing groups can be modified through this class. Whereas the Group class only provides access to a group's name and ID, the GroupAccount supports access to all information about a group. All users can obtain Group information but only users with the appropriate permissions can access GroupAccount information.
ServerAdministration.getGroupAccounts(),
Permission.SERVER_ADMIN_USER_ACCOUNTS,
Group| Field Summary | |
static int |
ID_ALL_USERS
The ID of the "All Users" group. |
| Constructor Summary | |
GroupAccount(Server server)
Creates a new StarTeam Group object. |
|
| Method Summary | |
void |
addPermission(int permission)
Add this permission to the set of permissions for this GroupAccount. |
boolean |
canRemove()
Returns true if this GroupAccount and all of its descendants can be deleted without leaving any "orphan" users (i.e., users with no group membership). |
GroupAccount |
copy()
Creates a copy of this GroupAccount object. |
boolean |
equals(java.lang.Object source)
returns true if this object instance is equal to the source |
java.lang.String |
getDescription()
Returns the group description. |
java.lang.String |
getFullName()
Returns a qualified name for the group, showing both the group and its parents. |
int |
getID()
Returns this group's integer indentifier. |
java.lang.String |
getName()
Returns the group name. |
GroupAccount |
getParent()
Returns this groups's parent GroupAccount. |
int |
getPermissionsFlags()
Returns the permissions flags for this group. |
Server |
getServer()
Returns the Server object to which this GroupAccount belongs. |
GroupAccount[] |
getSubGroupAccounts()
Returns all of the sub-GroupAccounts for which this GroupAccount is the parent. |
UserAccount[] |
getUserAccounts()
Returns a list of UserAccount objects that directly belong to this group. |
int |
hashCode()
returns a unique hash for all instances of this type |
boolean |
hasPermission(int permission)
Returns true if this GroupAccount has the specified permission. |
boolean |
isBuiltin()
Return true if this is a builtin GroupAccount. |
boolean |
isDeleted()
Returns true if the GroupAccount has been deleted. |
boolean |
isEqualTo(GroupAccount account)
Compares two GroupAccount objects. |
boolean |
isMember(int userID)
Return true if the specified user can be considered a member of this GroupAccount. |
boolean |
isNew()
Returns true if this GroupAccount has not yet been created on the Server. |
boolean |
isRoot()
Returns true if this is a top-level group with no parent group. |
void |
remove()
Removes this group from the StarTeam server, plus any direct or indirect subgroups of this group. |
void |
removePermission(int permission)
Removes the specified permission from this GroupAccount. |
void |
setDescription(java.lang.String description)
Changes the group description. |
void |
setName(java.lang.String name)
Changes the group name. |
void |
setParent(GroupAccount parent)
Change the parent GroupAccount for this group. |
void |
update()
Persistently saves the changes to this GroupAccount in the server. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ID_ALL_USERS
| Constructor Detail |
public GroupAccount(Server server)
setParent to change this. The name is initially the
empty string. To create this group in the StarTeam server you
must call update.
server - the StarTeam Server to which this group belongs.| Method Detail |
public GroupAccount copy()
GroupAccount.isEqualTo(GroupAccount)public boolean isNew()
public boolean isDeleted()
public int getID()
public java.lang.String getName()
GroupAccount.getFullName()public void setName(java.lang.String name)
update to
save this change.
name - the new name for the group.GroupAccount.update()public java.lang.String getFullName()
GroupAccount.getName(),
GroupAccount.getParent()public java.lang.String getDescription()
public void setDescription(java.lang.String description)
update to
save this change.
description - the new description for the group.GroupAccount.update()public boolean isRoot()
GroupAccount.getParent()public GroupAccount getParent()
GroupAccount.isRoot()public void setParent(GroupAccount parent)
parent - the new parent GroupAccount for this groupGroupAccount.isRoot()public int getPermissionsFlags()
Permissionpublic boolean hasPermission(int permission)
permission - the permission in question
Permissionpublic void addPermission(int permission)
permission - the permission to addPermissionpublic void removePermission(int permission)
permission - the permission to removePermissionpublic Server getServer()
public GroupAccount[] getSubGroupAccounts()
GroupAccount.setParent(com.starbase.starteam.GroupAccount)public UserAccount[] getUserAccounts()
UserAccount.addToGroupAccount(com.starbase.starteam.GroupAccount),
UserAccount.removeFromGroupAccount(com.starbase.starteam.GroupAccount)public boolean isMember(int userID)
userID - the user ID being checked for group membership
public void update()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this is a new GroupAccount with no Parent assigned.
public void remove()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this GroupAccount was never saved, if it is a builtin account, or if removing it would result in a user having no group membership.GroupAccount.isNew()public boolean canRemove()
public boolean isBuiltin()
public boolean isEqualTo(GroupAccount account)
account - The GroupAccount to be compared with this one.
GroupAccount.copy()public boolean equals(java.lang.Object source)
equals in class java.lang.Objectsource - Object the source to comapre with
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||