com.ibm.di.api.jmx.mbeans
Class SecurityRegistry

java.lang.Object
  extended by com.ibm.di.api.jmx.mbeans.BaseAdmin
      extended by com.ibm.di.api.jmx.mbeans.SecurityRegistry
All Implemented Interfaces:
BaseAdminMBean, BaseMBean, SecurityRegistryMBean

public class SecurityRegistry
extends BaseAdmin
implements SecurityRegistryMBean

This class provides information about various restrictions a user may have. It lets you query what rights a user is granted and whether he/she is authorized to execute a specific action.


Field Summary
static String MBEAN_ID
          Id of the MBean.
static String MBEAN_TYPE
          Type of the MBean.
 
Constructor Summary
SecurityRegistry(SecurityRegistry aSecurityRegistry)
          Class constructor SecurityRegistry
 
Method Summary
 String getId()
          Reads attribute "Id".
 String getType()
          Reads attribute "Type".
 Boolean userCanExecuteAL(String aUserId, String aConfigId, String aAssemblyLine)
          Returns whether specified user is allowed to execute given AL from a given configuration.
 Boolean userCanExecuteAll(String aUserId)
          Returns whether specified user is allowed to execute everything.
 Boolean userCanExecuteConfig(String aUserId, String aConfigId)
          Returns whether specified user is allowed to execute given configuration.
 Boolean userCanExecuteConfigALs(String aUserId, String aConfigId)
          Returns whether specified user is allowed to execute assembly lines from a given configuration.
 Boolean userCanReadAll(String aUserId)
          Returns whether specified user is allowed to read everything.
 Boolean userCanReadConfig(String aUserId, String aConfigId)
          Returns whether specified user is allowed to read given configuration.
 Boolean userIsAdmin(String aUserId)
          Returns whether specified user is granted admin role.
 
Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin
getCurrentUserId, getKeyPropertyList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_TYPE

public static final String MBEAN_TYPE
Type of the MBean.

See Also:
Constant Field Values

MBEAN_ID

public static final String MBEAN_ID
Id of the MBean.

See Also:
Constant Field Values
Constructor Detail

SecurityRegistry

public SecurityRegistry(SecurityRegistry aSecurityRegistry)
Class constructor SecurityRegistry

Parameters:
aSecurityRegistry -
Method Detail

getType

public String getType()
Reads attribute "Type".

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getType in interface BaseMBean
Returns:
the type of this MBean.

getId

public String getId()
Reads attribute "Id". The "Id" value should be different for different MBeans of the same type.

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getId in interface BaseMBean
Returns:
the Id of this MBean.

userIsAdmin

public Boolean userIsAdmin(String aUserId)
                    throws DIException
Returns whether specified user is granted admin role.

Specified by:
userIsAdmin in interface SecurityRegistryMBean
Parameters:
aUserId - the id of the user
Returns:
true if the user is granted the admin role
Throws:
DIException - if Runtime or Security exception occurs

userCanReadConfig

public Boolean userCanReadConfig(String aUserId,
                                 String aConfigId)
                          throws DIException
Returns whether specified user is allowed to read given configuration.

Specified by:
userCanReadConfig in interface SecurityRegistryMBean
Parameters:
aUserId - the id of the user
aConfigId - the id of the configuration
Returns:
return true only if aUserId is allowed to read aConfigId.
Throws:
DIException - if Runtime or Security exception occurs

userCanExecuteAL

public Boolean userCanExecuteAL(String aUserId,
                                String aConfigId,
                                String aAssemblyLine)
                         throws DIException
Returns whether specified user is allowed to execute given AL from a given configuration.

Specified by:
userCanExecuteAL in interface SecurityRegistryMBean
Parameters:
aUserId - the id of the user
aConfigId - the id of the configuration
aAssemblyLine - the name of the assembly line
Returns:
return true only if aUserId is allowed to execute aAssemblyLine from configuration aConfigId.
Throws:
DIException - if Runtime or Security exception occurs

userCanExecuteConfig

public Boolean userCanExecuteConfig(String aUserId,
                                    String aConfigId)
                             throws DIException
Returns whether specified user is allowed to execute given configuration.

Specified by:
userCanExecuteConfig in interface SecurityRegistryMBean
Parameters:
aUserId - the id of the user
aConfigId - the id of the configuration
Returns:
return true only if aUserId is allowed to execute configuration aConfigId.
Throws:
DIException - if Runtime or Security exception occurs

userCanExecuteConfigALs

public Boolean userCanExecuteConfigALs(String aUserId,
                                       String aConfigId)
                                throws DIException
Returns whether specified user is allowed to execute assembly lines from a given configuration.

Specified by:
userCanExecuteConfigALs in interface SecurityRegistryMBean
Parameters:
aUserId - the id of the user
aConfigId - the id of the configuration
Returns:
return true only if aUserId is allowed to execute assembly lines from configuration aConfigId.
Throws:
DIException - if Runtime or Security exception occurs

userCanExecuteAll

public Boolean userCanExecuteAll(String aUserId)
                          throws DIException
Returns whether specified user is allowed to execute everything.

Specified by:
userCanExecuteAll in interface SecurityRegistryMBean
Parameters:
aUserId - the id of the user
Returns:
return true only if aUserId is allowed to execute everything.
Throws:
DIException - if Runtime or Security exception occurs

userCanReadAll

public Boolean userCanReadAll(String aUserId)
                       throws DIException
Returns whether specified user is allowed to read everything.

Specified by:
userCanReadAll in interface SecurityRegistryMBean
Parameters:
aUserId - the id of the user
Returns:
return true only if aUserId is allowed to read everything.
Throws:
DIException - if Runtime or Security exception occurs