public class

OwnerImpl

extends Object
implements Owner
java.lang.Object
   ↳ sun.security.acl.OwnerImpl
Known Direct Subclasses

Class Overview

Class implementing the Owner interface. The initial owner principal is configured as part of the constructor.

Summary

Public Constructors
OwnerImpl(Principal owner)
Public Methods
synchronized boolean addOwner(Principal caller, Principal owner)
Adds an owner.
synchronized boolean deleteOwner(Principal caller, Principal owner)
Delete owner.
synchronized boolean isOwner(Principal owner)
returns if the given principal belongs to the owner list.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.security.acl.Owner

Public Constructors

public OwnerImpl (Principal owner)

Public Methods

public synchronized boolean addOwner (Principal caller, Principal owner)

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
NotOwnerException if the caller principal is not on the owners list of the Acl.

public synchronized boolean deleteOwner (Principal caller, Principal owner)

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
NotOwnerException if the caller principal is not on the owners list of the Acl.
LastOwnerException 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.

public synchronized 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.