Most visited

Recently visited

Added in API level 1

Owner

public interface Owner

java.security.acl.Owner
Known Indirect Subclasses


用于管理访问控制列表(ACL)或ACL配置所有者的接口。 (请注意, java.security.acl包中的Acl接口扩展了此Owner接口。)应将初始所有者Principal指定为实现此接口的类的构造函数的参数。

也可以看看:

Summary

Public methods

abstract boolean addOwner(Principal caller, Principal owner)

添加一个所有者。

abstract boolean deleteOwner(Principal caller, Principal owner)

删除所有者。

abstract boolean isOwner(Principal owner)

如果给定主体是ACL的所有者,则返回true。

Public methods

addOwner

Added in API level 1
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.
Throws
NotOwnerException if the caller principal is not an owner of the ACL.

deleteOwner

Added in API level 1
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

Added in API level 1
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.

Hooray!