com.starbase.starteam
Class AclEntry

java.lang.Object
  |
  +--com.starbase.starteam.AclEntry
Direct Known Subclasses:
EffectiveACE

public class AclEntry
extends java.lang.Object

An Access Control List entry. An AclEntry 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.getACL(), Project.getACL(), View.getACL(), Folder.getACL(), Item.getACL()

Constructor Summary
AclEntry(int id, boolean isGranted)
          Creates a new Access Control List entry.
AclEntry(int id, int permissions, boolean isGranted)
          Creates a new Access Control List entry.
 
Method Summary
 void addPermission(int permission)
          Adds the specified permission to this entry.
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 int getID()
          Returns the user or group ID for this entry.
 int getPermissionFlags()
          Returns the internal "bit set" representation of this entry's permissions.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean hasPermission(int 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 isGroupID()
          Returns true if the ID represents a group.
 void removePermission(int 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

AclEntry

public AclEntry(int id,
                boolean isGranted)
Creates a new Access Control List entry. No permissions are explicitly granted or denied.

Parameters:
id - The user or group ID for this entry.
isGranted - true if the permissions are to be granted; false if they are to be denied.
See Also:
AclEntry.addPermission(int)

AclEntry

public AclEntry(int id,
                int permissions,
                boolean isGranted)
Creates a new Access Control List entry.

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

getID

public int getID()
Returns the user or group ID for this entry.

Returns:
the user or group ID for this entry.

isGroupID

public boolean isGroupID()
Returns true if the ID represents a group.

Returns:
true if the ID represents a group.
See Also:
AclEntry.getID()

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.

getPermissionFlags

public int getPermissionFlags()
Returns the internal "bit set" representation of this entry's permissions. This is the bitwise OR of all added permissions.

Returns:
the internal "bit set" representation of this entry's permissions.

addPermission

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

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

removePermission

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

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

hasPermission

public boolean hasPermission(int 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

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.