Interface representing an Access Control List (ACL).
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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Owner\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOwner\n=====\n\n```\ninterface Owner\n```\n\n|------------------------------|\n| [java.security.acl.Owner](#) |\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [Acl](/reference/kotlin/java/security/acl/Acl) |------------------------------------------------|------------------------------------------------------| | [Acl](/reference/kotlin/java/security/acl/Acl) | Interface representing an Access Control List (ACL). | |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 33.**\n|\n| 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\nInterface 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.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [addOwner](#addOwner(java.security.Principal,%20java.security.Principal))`(`caller:` `[Principal](../Principal.html#)!`, `owner:` `[Principal](../Principal.html#)!`)` Adds an owner. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [deleteOwner](#deleteOwner(java.security.Principal,%20java.security.Principal))`(`caller:` `[Principal](../Principal.html#)!`, `owner:` `[Principal](../Principal.html#)!`)` Deletes an owner. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isOwner](#isOwner(java.security.Principal))`(`owner:` `[Principal](../Principal.html#)!`)` 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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun addOwner(\n caller: Principal!, \n owner: Principal!\n): Boolean\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nAdds 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.\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------|\n| `caller` | [Principal](../Principal.html#)!: the principal invoking this method. It must be an owner of the ACL. |\n| `owner` | [Principal](../Principal.html#)!: the owner that should be added to the list of owners. |\n\n| Return ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if successful, false if owner is already an owner. |\n\n| Exceptions ||\n|---------------------------------------|-----------------------------------------------------|\n| `java.security.acl.NotOwnerException` | if the caller principal is not an owner of the ACL. |\n\n### deleteOwner\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun deleteOwner(\n caller: Principal!, \n owner: Principal!\n): Boolean\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nDeletes an owner. If this is the last owner in the ACL, an exception is raised.\n\nThe caller principal must be an owner of the ACL in order to invoke this method.\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------|\n| `caller` | [Principal](../Principal.html#)!: the principal invoking this method. It must be an owner of the ACL. |\n| `owner` | [Principal](../Principal.html#)!: the owner to be removed from the list of owners. |\n\n| Return ||\n|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if the owner is removed, false if the owner is not part of the list of owners. |\n\n| Exceptions ||\n|----------------------------------------|--------------------------------------------------------------------------------------|\n| `java.security.acl.NotOwnerException` | if the caller principal is not an owner of the ACL. |\n| `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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun isOwner(owner: Principal!): Boolean\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns true if the given principal is an owner of the ACL.\n\n| Parameters ||\n|---------|-----------------------------------------------------------------------------------------------------------|\n| `owner` | [Principal](../Principal.html#)!: the principal to be checked to determine whether or not it is an owner. |\n\n| Return ||\n|------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if the passed principal is in the list of owners, false if not. |"]]