com.starteam
Class ACE

java.lang.Object
  extended by com.starteam.ACE
Direct Known Subclasses:
EffectiveACE

public class ACE
extends java.lang.Object

An Access Control List entry. An ACE specifies a set of permissions that are either granted or denied to a particular user or group. A collection of such entries makes an ACL or Access Control List.

See Also:
Permission, ServerAdministration.getRights(), Project.getRights(com.starteam.Type), View.getRights(), Folder.getRights(com.starteam.Type), ViewMember.getRights()

Nested Class Summary
static class ACE.WebCacheACE
          Base accessor for cached SDK ACEs
 
Constructor Summary
ACE(Principal prncpl, boolean isGranted)
          Creates a new Access Control Entry (ACE).
ACE(Principal prncpl, PermissionCollection permissions, boolean isGranted)
          Creates a new Access Control Entry (ACE).
 
Method Summary
 void addPermission(Permission permission)
          Adds the specified permission to this entry.
 boolean equals(java.lang.Object o)
          Return true if the object is an ACE and is equal to this ACE.
 PermissionCollection getPermissions()
          Returns the permissions for this ACE.
 Principal getPrincipal()
          Returns the principal (user or group) for this entry.
 int hashCode()
          Return a hashcode for this ACE.
 boolean hasPermission(Permission permission)
          Returns true if the specified permission is a part of this entry.
 boolean isGranted()
          Returns true if the permissions are granted and false if denied.
 boolean isGroup()
          Returns true if this ACE represents a group.
 void removePermission(Permission permission)
          Removes the specified permission from this entry.
 void setGranted(boolean value)
          Modifies this entry to be granted or denied.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACE

public ACE(Principal prncpl,
           boolean isGranted)
Creates a new Access Control Entry (ACE). No permissions are explicitly granted or denied.

Parameters:
prncpl - The user or group for this entry.
isGranted - true if the permissions are to be granted; false if they are to be denied.
See Also:
ACE.addPermission(com.starteam.Permission)

ACE

public ACE(Principal prncpl,
           PermissionCollection permissions,
           boolean isGranted)
Creates a new Access Control Entry (ACE).

Parameters:
prncpl - The user or group for this entry.
permissions - The permissions to be granted or denied.
isGranted - true if the permissions are to be granted; false if they are to be denied.
Method Detail

equals

public boolean equals(java.lang.Object o)
Return true if the object is an ACE and is equal to this ACE.

Overrides:
equals in class java.lang.Object
Parameters:
o - an Object to compare with this ACE.
Returns:
true if object is an ACE equal to this one.

hashCode

public int hashCode()
Return a hashcode for this ACE. *

Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for this ACE.

getPrincipal

public Principal getPrincipal()
Returns the principal (user or group) for this entry. Note that a web application running in the context of the ArtifactCacheManager is encouraged to use the alternate api getWebCachePrincipal instead This api will throw an IllegalStateException if used from the WebCache context

Returns:
the principal(user or group) for this entry.

isGroup

public boolean isGroup()
Returns true if this ACE represents a group.

Returns:
true if this ACE represents a group.

getPermissions

public PermissionCollection getPermissions()
Returns the permissions for this ACE.

Returns:
the permissions for this ACE.
See Also:
Permission

setGranted

public void setGranted(boolean value)
Modifies this entry to be granted or denied.

Parameters:
value - true if this the permissions are granted and false if denied

isGranted

public boolean isGranted()
Returns true if the permissions are granted and false if denied.

Returns:
true if the permissions are granted and false if denied.

addPermission

public void addPermission(Permission permission)
Adds the specified permission to this entry.

Parameters:
permission - the permission to be added
See Also:
Permission

removePermission

public void removePermission(Permission permission)
Removes the specified permission from this entry.

Parameters:
permission - the permission code to be removed
See Also:
Permission

hasPermission

public boolean hasPermission(Permission permission)
Returns true if the specified permission is a part of this entry.

Parameters:
permission - the permission code to be checked
Returns:
true if the specified permission if a part of this entry.
See Also:
Permission


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