Package com.ibm.di.api.local.impl
Class SecurityRegistryImpl
- java.lang.Object
-
- com.ibm.di.api.local.impl.SecurityRegistryImpl
-
- All Implemented Interfaces:
SecurityRegistry
public class SecurityRegistryImpl extends java.lang.Object implements SecurityRegistry
This interface 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.
-
-
Constructor Summary
Constructors Constructor Description SecurityRegistryImpl(SessionImpl aSession)Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanuserCanExecuteAL(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.booleanuserCanExecuteAll(java.lang.String aUserId)Returns whether specified user is allowed to execute everything.booleanuserCanExecuteConfig(java.lang.String aUserId, java.lang.String aConfigId)Returns whether specified user is allowed to execute given configuration.booleanuserCanExecuteConfigALs(java.lang.String aUserId, java.lang.String aConfigId)Returns whether specified user is allowed to execute assembly lines from a given configuration.booleanuserCanReadAll(java.lang.String aUserId)Returns whether specified user is allowed to read everything.booleanuserCanReadConfig(java.lang.String aUserId, java.lang.String aConfigId)Returns whether specified user is allowed to read given configuration.booleanuserIsAdmin(java.lang.String aUserId)Returns whether specified user is granted admin role.
-
-
-
Constructor Detail
-
SecurityRegistryImpl
public SecurityRegistryImpl(SessionImpl aSession)
Class constructor.- Parameters:
aSession-SessionImplinstance
-
-
Method Detail
-
userIsAdmin
public boolean userIsAdmin(java.lang.String aUserId) throws DIExceptionReturns whether specified user is granted admin role.- Specified by:
userIsAdminin interfaceSecurityRegistry- Parameters:
aUserId- the id of the user- Returns:
trueif the user is granted the admin role- Throws:
DIException- if Runtime or Security exception occurs
-
userCanReadConfig
public boolean userCanReadConfig(java.lang.String aUserId, java.lang.String aConfigId) throws DIExceptionReturns whether specified user is allowed to read given configuration.- Specified by:
userCanReadConfigin interfaceSecurityRegistry- Parameters:
aUserId- the id of the useraConfigId- the id of the configuration- Returns:
- return true only if
aUserIdis allowed to readaConfigId. - Throws:
DIException- if Runtime or Security exception occurs
-
userCanExecuteAL
public boolean userCanExecuteAL(java.lang.String aUserId, java.lang.String aConfigId, java.lang.String aAssemblyLine) throws DIExceptionReturns whether specified user is allowed to execute given AL from a given configuration.- Specified by:
userCanExecuteALin interfaceSecurityRegistry- Parameters:
aUserId- the id of the useraConfigId- the id of the configurationaAssemblyLine- the name of the assembly line- Returns:
- return
trueonly ifaUserIdis allowed to executeaAssemblyLinefrom configurationaConfigId. - Throws:
DIException- if Runtime or Security exception occurs
-
userCanExecuteConfig
public boolean userCanExecuteConfig(java.lang.String aUserId, java.lang.String aConfigId) throws DIExceptionReturns whether specified user is allowed to execute given configuration.- Specified by:
userCanExecuteConfigin interfaceSecurityRegistry- Parameters:
aUserId- the id of the useraConfigId- the id of the configuration- Returns:
- return
trueonly ifaUserIdis allowed to execute configurationaConfigId. - Throws:
DIException- if Runtime or Security exception occurs
-
userCanExecuteConfigALs
public boolean userCanExecuteConfigALs(java.lang.String aUserId, java.lang.String aConfigId) throws DIExceptionReturns whether specified user is allowed to execute assembly lines from a given configuration.- Specified by:
userCanExecuteConfigALsin interfaceSecurityRegistry- Parameters:
aUserId- the id of the useraConfigId- the id of the configuration- Returns:
- return
trueonly ifaUserIdis allowed to execute assembly lines from configurationaConfigId. - Throws:
DIException- if Runtime or Security exception occurs
-
userCanExecuteAll
public boolean userCanExecuteAll(java.lang.String aUserId) throws DIExceptionReturns whether specified user is allowed to execute everything.- Specified by:
userCanExecuteAllin interfaceSecurityRegistry- Parameters:
aUserId- the id of the user- Returns:
- return
trueonly ifaUserIdis allowed to execute everything. - Throws:
DIException- if Runtime or Security exception occurs
-
userCanReadAll
public boolean userCanReadAll(java.lang.String aUserId) throws DIExceptionReturns whether specified user is allowed to read everything.- Specified by:
userCanReadAllin interfaceSecurityRegistry- Parameters:
aUserId- the id of the user- Returns:
- return
trueonly ifaUserIdis allowed to read everything. - Throws:
DIException- if Runtime or Security exception occurs
-
-