com.starteam
Class Group.WebCacheGroup

java.lang.Object
  extended by com.starteam.LiveObject.WebCacheLiveObject
      extended by com.starteam.TrackedObject.WebCacheTrackedObject
          extended by com.starteam.Principal.WebCachePrincipal
              extended by com.starteam.Group.WebCacheGroup
Enclosing class:
Group

public static class Group.WebCacheGroup
extends Principal.WebCachePrincipal

User accessor for cached SDK Users contained objects are obtained from the artifact cache


Method Summary
static Group.WebCacheGroup create(ArtifactCacheManager.Context cntxt)
          Create a new Group
 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.
 Group.GroupType getGroupType()
          Gets the type (Team, User, Unknown) of this Group.
 java.lang.String getName()
          Returns the group name.
 Group.WebCacheGroup getParent()
          Returns this groups's parent .
 int getPresentationID()
          Returns the unique integer identifier for this group.
 Group.WebCacheGroup[] getSubGroups()
          Returns all of the sub-Groups for which this Group is the parent.
 User.WebCacheUser[] getUsers()
          Returns a list of User objects that directly belong to this group.
 boolean isAdministrator()
          Return true if this is the 'Administrators' Group.
 boolean isBuiltin()
          Return true if this is a builtin Group.
 boolean isMember(User.WebCacheUser user)
          Return true if the specified user can be considered a member of this Group.
 boolean isRoot()
          Returns true if this is a top-level group with no parent 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.WebCacheGroup parent)
          Change/Assign the parent for this group.
 
Methods inherited from class com.starteam.Principal.WebCachePrincipal
canAccessContainerForReading, canAccessForReading, canCreateArtifactType, getID, hasContainerRight, hasContainerRight, hasContainerRights, hasRight, hasRights, isDeleted
 
Methods inherited from class com.starteam.TrackedObject.WebCacheTrackedObject
getModifiedBy, getModifiedTime
 
Methods inherited from class com.starteam.LiveObject.WebCacheLiveObject
addTo, equals, getContext, getCreatedBy, getCreatedTime, getDisplayName, getObjectID, getServer, getType, getValue, getValue, hashCode, hasValue, isDirty, isNew, refresh, remove, removeFrom, setValue, setValue, toStarTeamURL, update
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Group.WebCacheGroup create(ArtifactCacheManager.Context cntxt)
Create a new Group

Parameters:
cntxt - the User Web Session Context
Returns:
a newly created group in the context of the ArtifactCacheManager'

setParent

public void setParent(Group.WebCacheGroup parent)
Change/Assign the parent for this group. A newly created group requires a parent even if the parent is the All_USERS group. Subsequent modifications of the group may assign a NULL parent, in which case ,the group gets 'promoted' to be a root group

Parameters:
parent - the new parent for this group

getParent

public Group.WebCacheGroup getParent()
Returns this groups's parent . If the group is a top-level group then this may return null.

Returns:
the parent for this group.
See Also:
Group.WebCacheGroup.isRoot()

getUsers

public User.WebCacheUser[] getUsers()
Returns a list of User objects that directly belong to this group. The only way to change this list is through the User methods for adding and removing the User to a Group.

Returns:
the User objects directly belonging to this group.

getSubGroups

public Group.WebCacheGroup[] getSubGroups()
Returns all of the sub-Groups for which this Group is the parent. The list may be empty but will never be null. The only way to change this list of sub groups is by modifying the parent Group of one of the children.

Returns:
the sub Groups of this Group
Throws:
ServerException - if the logged in user does not have appropriate permissions
See Also:
Group.WebCacheGroup.setParent(com.starteam.Group.WebCacheGroup), ServerAdministration.getGroups()

isMember

public boolean isMember(User.WebCacheUser user)
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 recursively of any sub-Group of this Group., i.e. membership is implied

Parameters:
user - the user 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 name.

Overrides:
getName in class Principal.WebCachePrincipal
Returns:
the group name.
See Also:
Group.WebCacheGroup.getFullName()

getPresentationID

public int getPresentationID()
Returns the unique integer identifier for this group. on pre 14.0 servers, it returns the groupID

Returns:
the unique integer identifier for this group.

getFullName

public java.lang.String getFullName()
Returns a qualified name for the group, showing both the group and its parents.

Returns:
A qualified name for the group, showing both the group and its parents.
See Also:
Group.WebCacheGroup.getName(), Group.WebCacheGroup.getParent()

setName

public void setName(java.lang.String name)
Changes the group name. You must call update to save this change.

Parameters:
name - the new name for the group.
See Also:
LiveObject.WebCacheLiveObject.update()

getDescription

public java.lang.String getDescription()
Returns the group description.

Returns:
the group description.
See Also:
ServerAdministration.getGroups()

setDescription

public void setDescription(java.lang.String description)
Changes the group description. You must call update to save this change.

Parameters:
description - the new description for the group.
See Also:
LiveObject.WebCacheLiveObject.update()

getGroupType

public Group.GroupType getGroupType()
Gets the type (Team, User, Unknown) of this Group. This property is new to 12.0+ servers

Returns:
type (Team, User, Unknown) of this Group
See Also:
Group.GroupType, Group.Type.TypeProperty, Group.Type.PropertyCollection.TYPE

setGroupType

public void setGroupType(Group.GroupType type)
Sets the type of this Group. This property is new to 12.0+ servers

Parameters:
type - The new status value for this project.

isRoot

public boolean isRoot()
Returns true if this is a top-level group with no parent group.

Returns:
true if this is a top-level group with no parent group.
See Also:
Group.WebCacheGroup.getParent()

isBuiltin

public boolean isBuiltin()
Return true if this is a builtin Group.

Returns:
true if this is a builtin Group.

isAdministrator

public boolean isAdministrator()
Return true if this is the 'Administrators' Group.

Returns:
true if this is the 'Administrators' Group.


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.