com.starteam
Class Principal.WebCachePrincipal

java.lang.Object
  extended by com.starteam.LiveObject.WebCacheLiveObject
      extended by com.starteam.TrackedObject.WebCacheTrackedObject
          extended by com.starteam.Principal.WebCachePrincipal
Direct Known Subclasses:
Group.WebCacheGroup, User.WebCacheUser
Enclosing class:
Principal

public static class Principal.WebCachePrincipal
extends TrackedObject.WebCacheTrackedObject

Base accessor for cached SDK objects encapsulating the statefulness of objects obtained from the artifact cache.


Method Summary
 boolean canAccessContainerForReading(ArtifactCacheManager.Securable s)
          returns true if this securable's container is accessible for reading by this Principal
 boolean canAccessForReading(ArtifactCacheManager.Securable s)
          returns true if this securable's container is accessible for reading by this Principal
 boolean canCreateArtifactType(ArtifactCacheManager.SecurableContainer sc, Type.WebCacheType t)
          true if this principal has the right to create types in the securable container for the type
 int getID()
          Returns this principal's server wide unique integer identifier.
 java.lang.String getName()
          Returns the name of this principal
 boolean hasContainerRight(ArtifactCacheManager.SecurableContainer sc, Type.WebCacheType t, Permission p)
          true if the securable container has the selected rights for this Principal and specified Type
 boolean hasContainerRight(ArtifactCacheManager.Securable s, Permission p)
          true if the securable's container has the selected right for this Principal
 boolean hasContainerRights(ArtifactCacheManager.Securable s, PermissionCollection pc)
          true if this securable's container has the selected rights for the specified Principal
 boolean hasRight(ArtifactCacheManager.Securable s, Permission p)
          returns true if this securable has the selected right for the specified Principal
 boolean hasRights(ArtifactCacheManager.Securable s, PermissionCollection pc)
          returns true if the securable has the selected rights for this Principal
 boolean isDeleted()
          Determines whether or not this item has been deleted.
 
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

canAccessContainerForReading

public boolean canAccessContainerForReading(ArtifactCacheManager.Securable s)
returns true if this securable's container is accessible for reading by this Principal

Parameters:
s - the securable whose container object (artifact) is being tested
Returns:
true if this principal can see the object

canAccessForReading

public boolean canAccessForReading(ArtifactCacheManager.Securable s)
returns true if this securable's container is accessible for reading by this Principal

Parameters:
s - the securable whose container object (artifact) is being tested
Returns:
true if this principal can see the object

canCreateArtifactType

public boolean canCreateArtifactType(ArtifactCacheManager.SecurableContainer sc,
                                     Type.WebCacheType t)
true if this principal has the right to create types in the securable container for the type

Parameters:
sc - the securable container being tested
t - the type to check create permissions for
Returns:
true if this principal has the right to create permissions in the securable container for the type

hasContainerRight

public boolean hasContainerRight(ArtifactCacheManager.Securable s,
                                 Permission p)
true if the securable's container has the selected right for this Principal

Parameters:
s - the securable whose container object (artifact) is being tested
p - the permission (access right) in question
Returns:
true if this principal has the specified right to the securable's container

hasContainerRights

public boolean hasContainerRights(ArtifactCacheManager.Securable s,
                                  PermissionCollection pc)
true if this securable's container has the selected rights for the specified Principal

Parameters:
principal - the principal whose rights are being checked
s - the securable whose container object (artifact) is being tested
pc - the permissions (access rights) in question
Returns:
true if the principal has the specified rights to the securable's container

hasContainerRight

public boolean hasContainerRight(ArtifactCacheManager.SecurableContainer sc,
                                 Type.WebCacheType t,
                                 Permission p)
true if the securable container has the selected rights for this Principal and specified Type

Parameters:
sc - the securable container being tested
t - the type to check permissions for in the securable container
p - the permission (access right) in question
Returns:
true if the principal has the specified rights to the type in the securable container

hasRight

public boolean hasRight(ArtifactCacheManager.Securable s,
                        Permission p)
returns true if this securable has the selected right for the specified Principal

Parameters:
s - the securable object (artifact) being tested
p - the permission (access right) in question
Returns:
true if the principal has the specified right to the securable

hasRights

public boolean hasRights(ArtifactCacheManager.Securable s,
                         PermissionCollection pc)
returns true if the securable has the selected rights for this Principal

Parameters:
s - the securable object (artifact) being tested
pc - the permissions (access rights) in question
Returns:
true if the principal has the specified rights to the securable

isDeleted

public boolean isDeleted()
Determines whether or not this item has been deleted.

As of StarTeam 9.0, we can determine from a ViewMember's properties whether or not it has been deleted.

Returns:
True if this view member is known to have been deleted; false otherwise.

getID

public int getID()
Returns this principal's server wide unique integer identifier.

Overrides:
getID in class LiveObject.WebCacheLiveObject
Returns:
this principal's server wide unique integer identifier.

getName

public java.lang.String getName()
Returns the name of this principal

Returns:
the name of this principal


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