java.lang.Object com.ibm.broker.config.proxy.AccessControlEntry
public final class AccessControlEntry
extends Object
A small data structure consisting of a user name or group, and a permission granted to it. AccessControlEntry instances are created as required and returned from the AdministeredObject.getAccessControlEntries() method. They describe the set of users and groups that have the authority to perform various actions on the described object. Access control lists are modified using the AdministeredObject.setAccessControlEntries() method.
Here is an example of how to get and manipulate an AccessControlEntry object.
ConfigManagerConnectionParameters cmcp = new MQConfigManagerConnectionParameters("localhost", 1414, "QMGR"); ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp); AccessControlEntry[] ace = cmp.getAccessControlEntries(); for (int i=0; i<ace.length; i++) { System.out.println(ace[i].getType() + " " + ace[i].getName() + " has " + ace[i].getPermission()); }
Note that if a user does not appear in the access control list for a given object, authority may still be granted through an inherited control on the object's parent.
com.ibm.broker.config.proxy.AccessControlEntry
|
|
Responsibilities | Represents an entry in an AdministeredObject's access control table. |
Internal Collaborators |
com.ibm.broker.config.proxy.AccessControlEntryPrincipalType
com.ibm.broker.config.proxy.AccessControlEntryPermission |
Change Activity: --------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: --------- ----------- ------------- ------------------------------------ 19590.5.5 2004-07-20 martynh v6 Release
Constructor | Description |
---|---|
AccessControlEntry(String, AccessControlEntryPrincipalType, AccessControlEntryPermission) | Creates a new AccessControlEntry instance. |
Method | Description |
---|---|
String getName() | Returns the principal name for this entry, which may be a user or a group. |
AccessControlEntryPermission getPermission() | Describes the action that has been granted by this access control entry. |
AccessControlEntryPrincipalType getType() | Describes whether the getName() method describes a user or an operating system group. |
String toString() | Returns a string representation of the AccessControlEntry. |
public AccessControlEntry(String principalName, AccessControlEntryPrincipalType principalType, AccessControlEntryPermission permission)Creates a new AccessControlEntry instance. A newly created AccessControlEntry is not automatically associated with any AdministeredObject access control list; use the setAccessControlEntries() to overwrite the access control list for an AdministeredObject.
- Parameters
- principalName -
- principalType - Principal type (AccessControlEntryPrincipalType.user or AccessControlEntryPrincipalType.group) for this entry
- permission - Permission for this entry
public String getName()Returns the principal name for this entry, which may be a user or a group.
- Returns
- principalName The user or group to which this entry refers.
public AccessControlEntryPermission getPermission()Describes the action that has been granted by this access control entry.
- Returns
- permission The permission for this entry.
public AccessControlEntryPrincipalType getType()Describes whether the getName() method describes a user or an operating system group.
- Returns
- principalType The principal type (AccessControlEntryPrincipalType.user or AccessControlEntryPrincipalType.group) for this entry.
public String toString()Returns a string representation of the AccessControlEntry.
- Returns
- String
- Overrides
- toString in class Object