Package java.security.acl
Interface Owner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddOwner(Principal caller, Principal owner)Adds a principal to the list of owners.booleandeleteOwner(Principal caller, Principal owner)Removes a principal from the list of owners.booleanisOwner(Principal owner)Checks whether the specified principal is an owner of this object.
-
-
-
Method Detail
-
addOwner
boolean addOwner(Principal caller, Principal owner) throws NotOwnerException
Adds a principal to the list of owners.- Parameters:
caller- the invoking principal.owner- the owner to added.- Returns:
trueif the owner was added,falseif it was already an owner.- Throws:
NotOwnerException- if the invoking principal is not an owner.
-
deleteOwner
boolean deleteOwner(Principal caller, Principal owner) throws NotOwnerException, LastOwnerException
Removes a principal from the list of owners.- Parameters:
caller- the invoking principal.owner- the owner to be removed.- Returns:
trueif the owner was removed,falseif it was not an owner.- Throws:
NotOwnerException- if the invoking principal is not an owner.LastOwnerException- if the owner to be removed is the last owner and hence removing it would make this object owner-less.
-
isOwner
boolean isOwner(Principal owner)
Checks whether the specified principal is an owner of this object.- Parameters:
owner- the principal to check.- Returns:
trueif the specified principal is an owner, otherwisefalse.
-
-