com.ibm.broker.config.proxy
Class AccessControlEntry

java.lang.Object
  extended by com.ibm.broker.config.proxy.AccessControlEntry

public final class AccessControlEntry
extends java.lang.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
 47371     2007-07-30  HDMPL           v6.1 Release (no changes)
 

Version:
Config/com/ibm/broker/config/proxy/AccessControlEntry.java, CMP, S000 1.6

Constructor Summary
AccessControlEntry(java.lang.String principalName, AccessControlEntryPrincipalType principalType, AccessControlEntryPermission permission)
          Creates a new AccessControlEntry instance.
 
Method Summary
 java.lang.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.
 java.lang.String toString()
          Returns a string representation of the AccessControlEntry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccessControlEntry

public AccessControlEntry(java.lang.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
Method Detail

getName

public java.lang.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.

getType

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.

getPermission

public AccessControlEntryPermission getPermission()
Describes the action that has been granted by this access control entry.

Returns:
permission The permission for this entry.

toString

public java.lang.String toString()
Returns a string representation of the AccessControlEntry.

Overrides:
toString in class java.lang.Object
Returns:
String