Owner
public interface Owner
Known Indirect Subclasses
|
用于管理访问控制列表(ACL)或ACL配置所有者的接口。 (请注意, java.security.acl
包中的Acl接口扩展了此Owner接口。)应将初始所有者Principal指定为实现此接口的类的构造函数的参数。
Summary
Public methods
addOwner
boolean addOwner (Principal caller,
Principal owner)
添加一个所有者。 只有所有者可以修改ACL内容。 调用者主体必须是ACL的所有者才能调用此方法。 也就是说,只有所有者才能添加其他所有者。 最初的所有者在ACL构建时配置。
Parameters |
caller |
Principal : the principal invoking this method. It must be an owner of the ACL. |
owner |
Principal : the owner that should be added to the list of owners. |
Returns |
boolean |
true if successful, false if owner is already an owner. |
deleteOwner
boolean deleteOwner (Principal caller,
Principal owner)
删除所有者。 如果这是ACL中的最后一个所有者,则会引发异常。
调用者主体必须是ACL的所有者才能调用此方法。
Parameters |
caller |
Principal : the principal invoking this method. It must be an owner of the ACL. |
owner |
Principal : the owner to be removed from the list of owners. |
Returns |
boolean |
true if the owner is removed, false if the owner is not part of the list of owners. |
Throws |
NotOwnerException |
if the caller principal is not an owner of the ACL. |
LastOwnerException |
if there is only one owner left, so that deleteOwner would leave the ACL owner-less. |
isOwner
boolean isOwner (Principal owner)
如果给定主体是ACL的所有者,则返回true。
Parameters |
owner |
Principal : the principal to be checked to determine whether or not it is an owner. |
Returns |
boolean |
true if the passed principal is in the list of owners, false if not. |