Interface java.security.acl.Owner
All Packages Class Hierarchy This Package Previous Next Index
Interface java.security.acl.Owner
- public interface Owner
- extends Object
Interface representing Owners of ACLs or ACL configurations. The
initial owner principal should be part of the constructor.
-
addOwner(Principal, Principal)
- Adds an owner.
-
deleteOwner(Principal, Principal)
-
Delete owner.
-
isOwner(Principal)
- returns if the given principal belongs to the owner list.
addOwner
public abstract boolean addOwner(Principal caller,
Principal owner) throws PrincipalNotOwnerException
- Adds an owner. Owners can modify ACL contents and can disassociate
ACLs from the objects they protect in the AclConfig interface.
The caller principal must be a part of the owners list of the ACL in
order to invoke this method. The initial owner is configured
at ACL construction time.
- Parameters:
- caller - the principal who is invoking this method.
- owner - The owner that should be added to the owners list.
- Returns:
- true if success, false if already an owner.
- Throws: PrincipalNotOwnerException
- if the caller principal is not on
the owners list of the Acl.
deleteOwner
public abstract boolean deleteOwner(Principal caller,
Principal owner) throws PrincipalNotOwnerException, LastOwnerPrincipalException
- Delete owner. If this is the last owner in the ACL, an exception is
raised.
The caller principal must be a part of the owners list of the ACL in
order to invoke this method.
- Parameters:
- caller - the principal who is invoking this method.
- owner - The owner to be removed from the owners list.
- Returns:
- true if the owner is removed, false if the owner is not part
of the owners list.
- Throws: PrincipalNotOwnerException
- if the caller principal is not on
the owners list of the Acl.
- Throws: LastOwnerPrincipalException
- if there is only one owner left in the group, then
deleteOwner would leave the ACL owner-less. This exception is raised in such a case.
isOwner
public abstract boolean isOwner(Principal owner)
- returns if the given principal belongs to the owner list.
- Parameters:
- owner - The owner to check if part of the owners list
- Returns:
- true if the passed principal is in the owner list, false if not.
All Packages Class Hierarchy This Package Previous Next Index