Package com.ibm.di.api.jmx.mbeans
Class SecurityRegistry
- java.lang.Object
-
- com.ibm.di.api.jmx.mbeans.BaseAdmin
-
- 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
Fields Modifier and Type Field Description static java.lang.String
MBEAN_ID
Id of the MBean.static java.lang.String
MBEAN_TYPE
Type of the MBean.
-
Constructor Summary
Constructors Constructor Description SecurityRegistry(SecurityRegistry aSecurityRegistry)
Class constructorSecurityRegistry
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getId()
Reads attribute "Id".java.lang.String
getType()
Reads attribute "Type".java.lang.Boolean
userCanExecuteAL(java.lang.String aUserId, java.lang.String aConfigId, java.lang.String aAssemblyLine)
Returns whether specified user is allowed to execute given AL from a given configuration.java.lang.Boolean
userCanExecuteAll(java.lang.String aUserId)
Returns whether specified user is allowed to execute everything.java.lang.Boolean
userCanExecuteConfig(java.lang.String aUserId, java.lang.String aConfigId)
Returns whether specified user is allowed to execute given configuration.java.lang.Boolean
userCanExecuteConfigALs(java.lang.String aUserId, java.lang.String aConfigId)
Returns whether specified user is allowed to execute assembly lines from a given configuration.java.lang.Boolean
userCanReadAll(java.lang.String aUserId)
Returns whether specified user is allowed to read everything.java.lang.Boolean
userCanReadConfig(java.lang.String aUserId, java.lang.String aConfigId)
Returns whether specified user is allowed to read given configuration.java.lang.Boolean
userIsAdmin(java.lang.String aUserId)
Returns whether specified user is granted admin role.-
Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin
getCurrentUserId, getKeyPropertyList
-
-
-
-
Field Detail
-
MBEAN_TYPE
public static final java.lang.String MBEAN_TYPE
Type of the MBean.- See Also:
- Constant Field Values
-
MBEAN_ID
public static final java.lang.String MBEAN_ID
Id of the MBean.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SecurityRegistry
public SecurityRegistry(SecurityRegistry aSecurityRegistry)
Class constructorSecurityRegistry
- Parameters:
aSecurityRegistry
-
-
-
Method Detail
-
getType
public java.lang.String getType()
Reads attribute "Type".getType()
andgetId()
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".
-
getId
public java.lang.String getId()
Reads attribute "Id". The "Id" value should be different for different MBeans of the same type.getType()
andgetId()
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".
-
userIsAdmin
public java.lang.Boolean userIsAdmin(java.lang.String aUserId) throws DIException
Returns whether specified user is granted admin role.- Specified by:
userIsAdmin
in interfaceSecurityRegistryMBean
- 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 java.lang.Boolean userCanReadConfig(java.lang.String aUserId, java.lang.String aConfigId) throws DIException
Returns whether specified user is allowed to read given configuration.- Specified by:
userCanReadConfig
in interfaceSecurityRegistryMBean
- Parameters:
aUserId
- the id of the useraConfigId
- the id of the configuration- Returns:
- return
true
only ifaUserId
is allowed to readaConfigId
. - Throws:
DIException
- if Runtime or Security exception occurs
-
userCanExecuteAL
public java.lang.Boolean userCanExecuteAL(java.lang.String aUserId, java.lang.String aConfigId, java.lang.String aAssemblyLine) throws DIException
Returns whether specified user is allowed to execute given AL from a given configuration.- Specified by:
userCanExecuteAL
in interfaceSecurityRegistryMBean
- Parameters:
aUserId
- the id of the useraConfigId
- the id of the configurationaAssemblyLine
- the name of the assembly line- Returns:
- return
true
only ifaUserId
is allowed to executeaAssemblyLine
from configurationaConfigId
. - Throws:
DIException
- if Runtime or Security exception occurs
-
userCanExecuteConfig
public java.lang.Boolean userCanExecuteConfig(java.lang.String aUserId, java.lang.String aConfigId) throws DIException
Returns whether specified user is allowed to execute given configuration.- Specified by:
userCanExecuteConfig
in interfaceSecurityRegistryMBean
- Parameters:
aUserId
- the id of the useraConfigId
- the id of the configuration- Returns:
- return
true
only ifaUserId
is allowed to execute configurationaConfigId
. - Throws:
DIException
- if Runtime or Security exception occurs
-
userCanExecuteConfigALs
public java.lang.Boolean userCanExecuteConfigALs(java.lang.String aUserId, java.lang.String aConfigId) throws DIException
Returns whether specified user is allowed to execute assembly lines from a given configuration.- Specified by:
userCanExecuteConfigALs
in interfaceSecurityRegistryMBean
- Parameters:
aUserId
- the id of the useraConfigId
- the id of the configuration- Returns:
- return
true
only ifaUserId
is allowed to execute assembly lines from configurationaConfigId
. - Throws:
DIException
- if Runtime or Security exception occurs
-
userCanExecuteAll
public java.lang.Boolean userCanExecuteAll(java.lang.String aUserId) throws DIException
Returns whether specified user is allowed to execute everything.- Specified by:
userCanExecuteAll
in interfaceSecurityRegistryMBean
- Parameters:
aUserId
- the id of the user- Returns:
- return
true
only ifaUserId
is allowed to execute everything. - Throws:
DIException
- if Runtime or Security exception occurs
-
userCanReadAll
public java.lang.Boolean userCanReadAll(java.lang.String aUserId) throws DIException
Returns whether specified user is allowed to read everything.- Specified by:
userCanReadAll
in interfaceSecurityRegistryMBean
- Parameters:
aUserId
- the id of the user- Returns:
- return
true
only ifaUserId
is allowed to read everything. - Throws:
DIException
- if Runtime or Security exception occurs
-
-