Stay organized with collections
Save and categorize content based on your preferences.
Owner
public
interface
Owner
Known indirect subclasses
Acl |
This interface was deprecated
in API level 33.
This class is deprecated and subject to removal in a future
version of Java SE. It has been replaced by java.security.Policy
and related classes since 1.2.
|
|
This interface was deprecated
in API level 33.
This class is deprecated and subject to removal in a future
version of Java SE. It has been replaced by java.security.Policy
and related classes since 1.2.
Interface for managing owners of Access Control Lists (ACLs) or ACL
configurations. (Note that the Acl interface in the
java.security.acl
package extends this Owner
interface.) The initial owner Principal should be specified as an
argument to the constructor of the class implementing this interface.
Summary
Public methods
addOwner
public abstract boolean addOwner (Principal caller,
Principal owner)
Adds an owner. Only owners can modify ACL contents. The caller
principal must be an owner of the ACL in order to invoke this method.
That is, only an owner can add another owner. The initial owner is
configured at ACL construction time.
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
public abstract boolean deleteOwner (Principal caller,
Principal owner)
Deletes an owner. If this is the last owner in the ACL, an exception is
raised.
The caller principal must be an owner of the ACL in order to invoke
this method.
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
public abstract boolean isOwner (Principal owner)
Returns true if the given principal is an owner of the ACL.
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. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Owner\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \n\nOwner\n=====\n\n\n`\npublic\n\n\ninterface\nOwner\n`\n\n\n`\n\n\n`\n\n|-------------------------|\n| java.security.acl.Owner |\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [Acl](/reference/java/security/acl/Acl) |-----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Acl](/reference/java/security/acl/Acl) | *This interface was deprecated in API level 33. This class is deprecated and subject to removal in a future version of Java SE. It has been replaced by `java.security.Policy` and related classes since 1.2.* | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface was deprecated\nin API level 33.** \n\nThis class is deprecated and subject to removal in a future\nversion of Java SE. It has been replaced by `java.security.Policy`\nand related classes since 1.2.\n\nInterface for managing owners of Access Control Lists (ACLs) or ACL\nconfigurations. (Note that the Acl interface in the\n`java.security.acl` package extends this Owner\ninterface.) The initial owner Principal should be specified as an\nargument to the constructor of the class implementing this interface. \n**See also:**\n\n- [Acl](/reference/java/security/acl/Acl)\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[addOwner](/reference/java/security/acl/Owner#addOwner(java.security.Principal,%20java.security.Principal))`(`[Principal](/reference/java/security/Principal)` caller, `[Principal](/reference/java/security/Principal)` owner) ` Adds an owner. |\n| ` abstract boolean` | ` `[deleteOwner](/reference/java/security/acl/Owner#deleteOwner(java.security.Principal,%20java.security.Principal))`(`[Principal](/reference/java/security/Principal)` caller, `[Principal](/reference/java/security/Principal)` owner) ` Deletes an owner. |\n| ` abstract boolean` | ` `[isOwner](/reference/java/security/acl/Owner#isOwner(java.security.Principal))`(`[Principal](/reference/java/security/Principal)` owner) ` Returns true if the given principal is an owner of the ACL. |\n\nPublic methods\n--------------\n\n### addOwner\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean addOwner (Principal caller, \n Principal owner)\n```\n\nAdds an owner. Only owners can modify ACL contents. The caller\nprincipal must be an owner of the ACL in order to invoke this method.\nThat is, only an owner can add another owner. The initial owner is\nconfigured at ACL construction time.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------|\n| `caller` | `Principal`: the principal invoking this method. It must be an owner of the ACL. \u003cbr /\u003e |\n| `owner` | `Principal`: the owner that should be added to the list of owners. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|----------------------------------------------------------------|\n| `boolean` | true if successful, false if owner is already an owner. \u003cbr /\u003e |\n\n| Throws ||\n|---------------------------------------------------------------------|-----------------------------------------------------|\n| [NotOwnerException](/reference/java/security/acl/NotOwnerException) | if the caller principal is not an owner of the ACL. |\n\n### deleteOwner\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean deleteOwner (Principal caller, \n Principal owner)\n```\n\nDeletes an owner. If this is the last owner in the ACL, an exception is\nraised.\n\n\nThe caller principal must be an owner of the ACL in order to invoke\nthis method.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------|\n| `caller` | `Principal`: the principal invoking this method. It must be an owner of the ACL. \u003cbr /\u003e |\n| `owner` | `Principal`: the owner to be removed from the list of owners. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------------------------------------------------------------------------------------------|\n| `boolean` | true if the owner is removed, false if the owner is not part of the list of owners. \u003cbr /\u003e |\n\n| Throws ||\n|-----------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n| [NotOwnerException](/reference/java/security/acl/NotOwnerException) | if the caller principal is not an owner of the ACL. |\n| [LastOwnerException](/reference/java/security/acl/LastOwnerException) | if there is only one owner left, so that deleteOwner would leave the ACL owner-less. |\n\n### isOwner\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean isOwner (Principal owner)\n```\n\nReturns true if the given principal is an owner of the ACL.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|---------------------------------------------------------------------------------------------|\n| `owner` | `Principal`: the principal to be checked to determine whether or not it is an owner. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|-----------------------------------------------------------------------------|\n| `boolean` | true if the passed principal is in the list of owners, false if not. \u003cbr /\u003e |"]]