Skip to content

Most visited

Recently visited

navigation
Added in API level 1

AclEntry

public interface AclEntry
implements Cloneable

java.security.acl.AclEntry


The Access Control List Entry interface definition.

An AclEntry is a list of the Permissions that are granted (positive) or denied (negative) to a Principal.

Summary

Public methods

abstract boolean addPermission(Permission permission)

Adds the specified permission to this ACL entry.

abstract boolean checkPermission(Permission permission)

Checks whether the specified permission is in this ACL entry.

abstract Object clone()

Clones this ACL entry instance.

abstract Principal getPrincipal()

Returns the principal of this ACL entry.

abstract boolean isNegative()

Returns whether this ACL entry is negative.

abstract Enumeration<Permission> permissions()

Returns the list of permissions of this ACL entry.

abstract boolean removePermission(Permission permission)

Removes the specified permission from this ACL entry.

abstract void setNegativePermissions()

Sets this ACL entry to be negative.

abstract boolean setPrincipal(Principal user)

Set the principal for this ACL entry.

abstract String toString()

Returns the string representation of this ACL entry.

Public methods

addPermission

Added in API level 1
boolean addPermission (Permission permission)

Adds the specified permission to this ACL entry.

Parameters
permission Permission: the permission to be added.
Returns
boolean true if the specified permission is added, false if the permission was already in this entry.

checkPermission

Added in API level 1
boolean checkPermission (Permission permission)

Checks whether the specified permission is in this ACL entry.

Parameters
permission Permission: the permission to check.
Returns
boolean true if the permission is in this entry, otherwise false.

clone

Added in API level 1
Object clone ()

Clones this ACL entry instance.

Returns
Object a copy of this entry.

getPrincipal

Added in API level 1
Principal getPrincipal ()

Returns the principal of this ACL entry.

Returns
Principal the principal of this ACL entry, or null if none is set.

isNegative

Added in API level 1
boolean isNegative ()

Returns whether this ACL entry is negative.

Returns
boolean true if this ACL entry is negative, false if it's positive.

permissions

Added in API level 1
Enumeration<Permission> permissions ()

Returns the list of permissions of this ACL entry.

Returns
Enumeration<Permission> the list of permissions of this ACL entry,

removePermission

Added in API level 1
boolean removePermission (Permission permission)

Removes the specified permission from this ACL entry.

Parameters
permission Permission: the permission to be removed.
Returns
boolean true if the permission is removed, false if the permission was not in this entry.

setNegativePermissions

Added in API level 1
void setNegativePermissions ()

Sets this ACL entry to be negative.

The permissions in this ACL entry will be denied to the principal associated with this entry.

Note: An ACL entry is positive by default and can only become negative by calling this method.

setPrincipal

Added in API level 1
boolean setPrincipal (Principal user)

Set the principal for this ACL entry.

The principal for an ACL entry can only be set once.

Parameters
user Principal: the principal for this ACL entry.
Returns
boolean true on success, false if there is a principal already set for this entry.

toString

Added in API level 1
String toString ()

Returns the string representation of this ACL entry.

Returns
String the string representation of this ACL entry.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.