|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.TypedResource
com.starteam.LiveObject
com.starteam.TrackedObject
com.starteam.Principal
com.starteam.Group
public final class Group
This class represents a full StarTeam Group. New groups can be added to a StarTeam Server and existing groups can be modified through this class. All users can obtain Group information but only users with the appropriate permissions can access GroupAccount information.
ServerAdministration.getGroups(),
Permission.SERVER_ADMIN_USER_ACCOUNTS| Nested Class Summary | |
|---|---|
static class |
Group.GroupType
Defines the Types of a Group This property is new to 12.0+ servers |
static class |
Group.Type
The Type of Group. |
static class |
Group.WebCacheGroup
User accessor for cached SDK Users contained objects are obtained from the artifact cache |
| Nested classes/interfaces inherited from class com.starteam.Principal |
|---|
Principal.WebCachePrincipal |
| Nested classes/interfaces inherited from class com.starteam.TrackedObject |
|---|
TrackedObject.WebCacheTrackedObject |
| Nested classes/interfaces inherited from class com.starteam.LiveObject |
|---|
LiveObject.WebCacheLiveObject |
| Nested classes/interfaces inherited from class com.starteam.TypedResource |
|---|
TypedResource.BranchState |
| Field Summary | |
|---|---|
static Group |
ADMINISTRATORS
The built-in "Administrators" Group. |
static Group |
ALL_USERS
The built-in "All Users" group. |
| Constructor Summary | |
|---|---|
Group(Server server)
Creates a new StarTeam Group object. |
|
| Method Summary | |
|---|---|
void |
addPermission(Permission permission)
Add this permission to the set of permissions for this Group. |
Group |
copy()
Creates a copy of this GroupAccount object. |
boolean |
equals(java.lang.Object another)
tests two groups for equality |
User[] |
fetchMembers(boolean bDescendants)
Returns the users that belong to this group. |
boolean |
getCanRemove()
Returns true if this Group and all of its descendants can be deleted without leaving any "orphan" users (i.e., users with no group membership). |
java.lang.String |
getDescription()
Returns the group description. |
java.lang.String |
getDisplayName()
Gets a short string that can be used to refer to this Group in an application's user interface. |
java.lang.String |
getFullName()
Returns a qualified name for the group, showing both the group and its parents. |
Group.GroupType |
getGroupType()
Gets the type (Team, User, Unknown) of this Group. |
int |
getID()
Returns this group's integer identifier. |
java.lang.String |
getName()
Returns the group name. |
Group |
getParent()
Returns this groups's parent . |
PermissionCollection |
getPermissions()
Returns the permissions for this group. |
int |
getPresentationID()
Returns the unique integer identifier for this group. |
Group.Type.PropertyCollection |
getProperties()
Returns the properties for the Group Type |
Server |
getServer()
Returns the Server object to which this Group belongs. |
Group[] |
getSubGroups()
Returns all of the sub-Groups for which this Group is the parent. |
User[] |
getUsers()
Returns a list of User objects that directly belong to this group. |
java.lang.Object |
getValue(Property property)
Return the value for the specified property. |
int |
hashCode()
returns a unique hash for this instance |
boolean |
hasPermission(Permission permission)
Returns true if this Group has the specified permission. |
boolean |
isAdministrator()
Return true if this is the 'Administrators' Group. |
boolean |
isBuiltin()
Return true if this is a builtin Group. |
boolean |
isDeleted()
Returns true if the Group has been deleted. |
boolean |
isDirty()
Returns true if any property has been modified from the
original value (including properties set on new items). |
boolean |
isEqualTo(Group group)
Compares two Group objects, and their member User IDs. |
boolean |
isMember(User user)
Return true if the specified user can be considered a member of this Group. |
boolean |
isNew()
Returns true if this Group 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(Permission permission)
Removes the specified permission from this Group. |
void |
setDescription(java.lang.String description)
Changes the group description. |
void |
setGroupType(Group.GroupType type)
Sets the type of this Group. |
void |
setName(java.lang.String name)
Changes the group name. |
void |
setParent(Group parent)
Change/Assign the parent for this group. |
java.lang.Object |
setValue(Property property,
java.lang.Object value)
Sets the value of the specified property and return the old value. |
java.lang.String |
toString()
Returns the group name. |
void |
update()
Persistently saves the changes to this Group in the server. |
| Methods inherited from class com.starteam.TrackedObject |
|---|
getModifiedBy, getModifiedTime |
| Methods inherited from class com.starteam.LiveObject |
|---|
getCreatedBy, getCreatedTime, toStarTeamURL |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Group ALL_USERS
public static final Group ADMINISTRATORS
| Constructor Detail |
|---|
public Group(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 Group.Type.PropertyCollection getProperties()
public boolean isDirty()
true if any property has been modified from the
original value (including properties set on new items). Modified
properties are saved by a call to update().
isDirty in class Principalpublic User[] fetchMembers(boolean bDescendants)
bDescendants - true = plus all descendants of group; false = this group only
public Group copy()
Group.isEqualTo(Group)public boolean isNew()
isNew in class Principalpublic boolean isDeleted()
isDeleted in class Principalpublic java.lang.String toString()
toString in class TypedResourcepublic int getID()
getID in class Principalpublic int getPresentationID()
public java.lang.String getDisplayName()
getDisplayName in class TypedResourcepublic java.lang.String getName()
getName in class PrincipalGroup.getFullName()public void setName(java.lang.String name)
update to save this
change.
setName in class Principalname - the new name for the group.Group.update()public java.lang.String getFullName()
Group.getName(),
Group.getParent()public java.lang.String getDescription()
ServerAdministration.getGroups()public void setDescription(java.lang.String description)
update to save
this change.
description - the new description for the group.Group.update()public boolean isRoot()
Group.getParent()public Group getParent()
Group.isRoot()public void setParent(Group parent)
parent - the new parent for this groupGroup.isRoot()public PermissionCollection getPermissions()
Permissionpublic boolean hasPermission(Permission permission)
permission - the permission in question
Permissionpublic void addPermission(Permission permission)
permission - the permission to addPermissionpublic void removePermission(Permission permission)
permission - the permission to removePermissionpublic Server getServer()
getServer in class Principalpublic void setGroupType(Group.GroupType type)
type - The new status value for this project.public Group.GroupType getGroupType()
Group.GroupType,
Group.Type.TypeProperty,
Group.Type.PropertyCollection.TYPEpublic Group[] getSubGroups()
ServerException - if the logged in user does not have appropriate permissionsGroup.setParent(com.starteam.Group),
ServerAdministration.getGroups()public User[] getUsers()
ServerException - if the logged in user does not have appropriate permissionsUser.addTo(com.starteam.Group),
User.removeFrom(com.starteam.Group),
ServerAdministration.getGroups()public boolean isMember(User user)
user - the user being checked for group membership
public void update()
throws java.lang.IllegalStateException
update in class Principaljava.lang.IllegalStateException - if this is a new Group with no Parent assigned.
public void remove()
throws java.lang.IllegalStateException
remove in class Principaljava.lang.IllegalStateException - if this Group was never saved, if it is a builtin account, or
if removing it would result in a user having no group
membership.
ServerException - if the logged in user does not have appropriate permissionsServerAdministration.getGroups(),
Group.isNew()public boolean getCanRemove()
public boolean isAdministrator()
public boolean isBuiltin()
public java.lang.Object getValue(Property property)
throws NoSuchPropertyException
getValue in class Principalproperty - the name of property to be retrieved
NoSuchPropertyException - if the named property does not exist
public java.lang.Object setValue(Property property,
java.lang.Object value)
throws NoSuchPropertyException,
java.lang.ClassCastException
setValue in class Principalproperty - the property to setvalue - the new value to set for the specified property
NoSuchPropertyException - if the named property does not exist
java.lang.ClassCastException - if the value is of the wrong type for the specified propertypublic boolean isEqualTo(Group group)
The parent Servers are not compared.
group - The Group to be compared with this one.
Group.copy()public boolean equals(java.lang.Object another)
equals in class java.lang.Objectanother - the other group
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 | ||||||||