Interface Owner

  • All Known Subinterfaces:
    Acl

    public interface Owner
    The interface to manage owners of objects that require ownership.
    See Also:
    Acl, Principal
    • 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:
        true if the owner was added, false if 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:
        true if the owner was removed, false if 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:
        true if the specified principal is an owner, otherwise false.