com.ibm.broker.config.proxy

Class WebUserProxy



  • public class WebUserProxy
    extends AdministeredObject

    This object represents a user account for Web Administration. Each account has password, role and profile information, all of which is available through this IBM Integration API (CMP) object.

    In order to use the WebUserProxy object, applications must first obtain a handle to it from the WebAdminProxy. Here is an example of how to do this:

         BrokerProxy b = BrokerProxy.getInstance(
             new IntegrationNodeConnectionParameters("localhost", 4414)); 
         WebAdminProxy wa = b.getWebAdminProxy();
         
         WebUserProxy wup = wa.getWebUser("myuserid");
         or:
         Enumerationwups = wa.getWebUsers();
               while(wups.hasMoreElements()) {
                     WebUserProxy wup = wups.nextElement();
                     ...
               }
     

    com.ibm.broker.config.proxy.WebUserProxy

    Responsibilities Represents a single entry from the web user table.
    Internal Collaborators None
    
     Change Activity:
     -------- ----------- -------------   ------------------------------------
     Reason:  Date:       Originator:     Comments:
     -------- ----------- -------------   ------------------------------------
     
    • Method Detail

      • getConfigurationObjectType

        public ConfigurationObjectType getConfigurationObjectType()
        Description copied from class: AdministeredObject
        Returns the ConfigurationObjectType associated with this AdministeredObject type. For example, for ExecutionGroupProxy, ConfigurationObjectType.executiongroup is returned.
        Specified by:
        getConfigurationObjectType in class AdministeredObject
        Returns:
        ConfigurationObjectType associated with this class.
      • getConfigurationObjectTypeOfParent

        public ConfigurationObjectType getConfigurationObjectTypeOfParent()
        Description copied from class: AdministeredObject
        Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type. For example, for ExecutionGroupProxy, ConfigurationObjectType.broker is returned.
        Specified by:
        getConfigurationObjectTypeOfParent in class AdministeredObject
        Returns:
        ConfigurationObjectType associated with this class.
      • getRole

        public java.lang.String getRole()
                                 throws ConfigManagerProxyPropertyNotInitializedException
        Returns the role which this user performs. The role is a system account under which the web user will perform IBM Integration API (CMP) actions. If Message Broker Administration Security is enabled, then the actions of the web user will be authorised based on the permissions of this role.
        Returns:
        The name of the role (account name) under which the web user will perform its actions
        Throws:
        ConfigManagerProxyPropertyNotInitializedException
      • getProfileProperties

        public java.util.Properties getProfileProperties()
                                                  throws ConfigManagerProxyPropertyNotInitializedException
        Returns the role which this user performs. The role is a system account under which the web user will perform IBM Integration API (CMP) actions. If Message Broker Administration Security is enabled, then the actions of the web user will be authorised based on the permissions of this role.
        Returns:
        The name of the role (account name) under which the web user will perform its actions
        Throws:
        ConfigManagerProxyPropertyNotInitializedException
      • setProfileProperty

        public void setProfileProperty(java.lang.String propertyName,
                                       java.lang.String propertyValue)
                                throws ConfigManagerProxyLoggedException
        Sets a profile property for the user. The profile properties are available for a web user to set particular preferences. These are primarily used from the web user interface, but are made available through CMP.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • changePassword

        public void changePassword(java.lang.String oldPassword,
                                   java.lang.String newPassword)
                            throws ConfigManagerProxyLoggedException
        Changes the password for the user. In order to use this method, you must provide the previous password for the user account, and have at least read authority on the broker if security is enabled.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • getAuthPermissions

        public java.util.Properties getAuthPermissions()
                                                throws ConfigManagerProxyLoggedException,
                                                       ConfigManagerProxyPropertyNotInitializedException
        Retrieves a list of the current authorisations available to this web user. If Broker security is enabled, then web users are restricted by the permissions granted to their role. The role is a system user account, which many web users can share for the purposes of broker access permissions. Message broker permissions are based on a read-write-execute permission set applied to one of 3 queues:- SYSTEM.BROKER.AUTH - top-level broker permissions SYSTEM.BROKER.AUTH.[eg] - per-execution group permissions SYSTEM.BROKER.DC.AUTH - Permissions granted to users for data capture (record-replay).
        Returns:
        Properties A list of detected permissions for the user. These permissions are checked during the execution of this request (they are not cached).
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker, or (only if synchronous updates have been enabled) the request was not successfully processed by the broker.
        ConfigManagerProxyRequestTimeoutException - if synchronous updates have been enabled and a response was not received by the broker before a timeout occurred. (Note that this exception type extends ConfigManagerProxyLoggedException).
        ConfigManagerProxyRequestFailureException - if synchronous updates have been enabled and the request was rejected by the broker. (Note that this exception type extends ConfigManagerProxyLoggedException).
        ConfigManagerProxyPropertyNotInitializedException
      • changePassword

        public void changePassword(java.lang.String newPassword)
                            throws ConfigManagerProxyLoggedException
        Changes the password for the user. In order to use this method, you must provide the previous password for the user account, and have at least read authority on the broker if security is enabled.
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • setRole

        public void setRole(java.lang.String newRole)
                     throws ConfigManagerProxyLoggedException
        Changes the role for the user. The role is a system user account that the web user "maps" on to. The purpose of this role property is that it represents the permissions which this web user has. When a web user logs into the Web Administration interface, any actions they perform will be authorised based on the permissions of the role (assuming Administration security is enabled).
        Throws:
        ConfigManagerProxyLoggedException - if the request could not be sent to the broker. If synchronous updates have been enabled using BrokerProxy.setSynchronous(), subclasses of this exception type will also be thrown if the request is rejected by the broker, or if the request is not processed before a timeout occurs.
      • setName

        public void setName(java.lang.String name)
                     throws ConfigManagerProxyLoggedException
        This method overrides the base class implementation, so that an exception is thrown if this method is invoked against this class. It is not possible to change the name of the admininistration queue.
        Overrides:
        setName in class AdministeredObject
        Parameters:
        name - (this is ignored)
        Throws:
        ConfigManagerProxyLoggedException - to indicate this method should not be called.
      • setShortDescription

        public void setShortDescription(java.lang.String desc)
                                 throws ConfigManagerProxyLoggedException
        This method overrides the base class implementation, so that an exception is thrown if this method is invoked against this class. It is not possible to change the short description of the admininistration queue.
        Overrides:
        setShortDescription in class AdministeredObject
        Parameters:
        desc - (this is ignored)
        Throws:
        ConfigManagerProxyLoggedException - to indicate this method should not be called.
      • setLongDescription

        public void setLongDescription(java.lang.String desc)
                                throws ConfigManagerProxyLoggedException
        This method overrides the base class implementation, so that an exception is thrown if this method is invoked against this class. It is not possible to change the long description of the admininistration queue.
        Overrides:
        setLongDescription in class AdministeredObject
        Parameters:
        desc - (this is ignored)
        Throws:
        ConfigManagerProxyLoggedException - to indicate this method should not be called.