ajanta.security.acl
Class OwnerImpl

java.lang.Object
  |
  +--ajanta.security.acl.OwnerImpl
All Implemented Interfaces:
java.security.acl.Owner, java.io.Serializable
Direct Known Subclasses:
AclImpl

public class OwnerImpl
extends java.lang.Object
implements java.security.acl.Owner, java.io.Serializable

OwnerImpl implements java.security.acl.Owner

See Also:
Owner, Serialized Form

Constructor Summary
OwnerImpl()
          Constructs OwnerImpl object
OwnerImpl(java.security.Principal owner)
          Constructs OwnerImpl object
 
Method Summary
 boolean addOwner(java.security.Principal caller, java.security.Principal owner)
          Adds an owner.
 boolean deleteOwner(java.security.Principal caller, java.security.Principal owner)
          Deletes an owner.
 boolean isOwner(java.security.Principal owner)
          Returns true if the given principal is an owner of the ACL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwnerImpl

public OwnerImpl()
Constructs OwnerImpl object


OwnerImpl

public OwnerImpl(java.security.Principal owner)
Constructs OwnerImpl object

Method Detail

addOwner

public boolean addOwner(java.security.Principal caller,
                        java.security.Principal owner)
                 throws java.security.acl.NotOwnerException
Adds an owner. Only owners can modify ACL contents. The caller principal must be an owner of the ACL in order to invoke this method. That is, only an owner can add another owner. The initial owner is configured at ACL construction time.

Specified by:
addOwner in interface java.security.acl.Owner
Parameters:
caller - - the principal invoking this method. It must be an owner of the ACL.
owner - - the owner that should be added to the list of owners.
Returns:
true if successful, false if owner is already an owner.
java.security.acl.NotOwnerException

deleteOwner

public boolean deleteOwner(java.security.Principal caller,
                           java.security.Principal owner)
                    throws java.security.acl.NotOwnerException,
                           java.security.acl.LastOwnerException
Deletes an owner. If this is the last owner in the ACL, an exception is raised. The caller principal must be an owner of the ACL in order to invoke this method.

Specified by:
deleteOwner in interface java.security.acl.Owner
Parameters:
caller - - the principal invoking this method. It must be an owner of the ACL.
Returns:
true if the owner is removed, false if the owner is not part of the list of owners.
java.security.acl.NotOwnerException
java.security.acl.LastOwnerException

isOwner

public boolean isOwner(java.security.Principal owner)
Returns true if the given principal is an owner of the ACL.

Specified by:
isOwner in interface java.security.acl.Owner
Parameters:
owner - - the principal to be checked to determine whether or not it is an owner.
Returns:
true if the passed principal is in the list of owners, false if not.