Class Overview
This is a class that describes one entry that associates users
or groups with permissions in the ACL.
The entry may be used as a way of granting or denying permissions.
Summary
Public Constructors |
|
AclEntryImpl(Principal user)
Construct an ACL entry that associates a user with permissions
in the ACL.
|
|
AclEntryImpl()
Construct a null ACL entry
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
From interface
java.security.acl.AclEntry
abstract
boolean
|
addPermission(Permission permission)
Adds the specified permission to this ACL entry.
|
abstract
boolean
|
checkPermission(Permission permission)
Checks if the specified permission is part of the
permission set in this entry.
|
abstract
Object
|
clone()
Clones this ACL entry.
|
abstract
Principal
|
getPrincipal()
Returns the principal for which permissions are granted or denied by
this ACL entry.
|
abstract
boolean
|
isNegative()
Returns true if this is a negative ACL entry (one denying the
associated principal the set of permissions in the entry), false
otherwise.
|
abstract
Enumeration<Permission>
|
permissions()
Returns an enumeration of the permissions in 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 a negative one.
|
abstract
boolean
|
setPrincipal(Principal user)
Specifies the principal for which permissions are granted or denied
by this ACL entry.
|
abstract
String
|
toString()
Returns a string representation of the contents of this ACL entry.
|
|
Public Constructors
public
AclEntryImpl
(Principal user)
Construct an ACL entry that associates a user with permissions
in the ACL.
Parameters
user
| The user that is associated with this entry.
|
public
AclEntryImpl
()
Construct a null ACL entry
Public Methods
public
boolean
addPermission
(Permission permission)
A principal or a group can be associated with multiple
permissions. This method adds a permission to the ACL entry.
Parameters
permission
| The permission to be associated with
the principal or the group in the entry. |
Returns
- true if the permission was added, false if the
permission was already part of the permission set.
public
boolean
checkPermission
(Permission permission)
Checks if the passed permission is part of the allowed
permission set in this entry.
Parameters
permission
| The permission that has to be part of
the permission set in the entry. |
Returns
- true if the permission passed is part of the
permission set in the entry, false otherwise.
public
synchronized
Object
clone
()
Returns
- a clone of this instance.
public
Principal
getPrincipal
()
Return the Principal associated in this ACL entry.
The method returns null if the entry uses a group
instead of a principal.
Returns
- the principal associated with this entry.
public
boolean
isNegative
()
Returns true if this is a negative ACL.
Returns
- true if this is a negative ACL entry, false if it's not.
return an enumeration of the permissions in this ACL entry.
Returns
- an enumeration of the permissions in this ACL entry.
public
boolean
removePermission
(Permission permission)
The method disassociates the permission from the Principal
or the Group in this ACL entry.
Parameters
permission
| The permission to be disassociated with
the principal or the group in the entry. |
Returns
- true if the permission is removed, false if the
permission is not part of the permission set.
public
void
setNegativePermissions
()
This method sets the ACL to have negative permissions.
That is the user or group is denied the permission set
specified in the entry.
public
boolean
setPrincipal
(Principal user)
Sets the principal in the entity. If a group or a
principal had already been set, a false value is
returned, otherwise a true value is returned.
Parameters
user
| The user that is associated with this entry. |
Returns
- true if the principal is set, false if there is
one already.
public
String
toString
()
Return a string representation of the contents of the ACL entry.
Returns
- a string representation of the object.