com.ibm.di.api.local.impl
Class SecurityRegistryImpl

java.lang.Object
  extended by com.ibm.di.api.local.impl.SecurityRegistryImpl
All Implemented Interfaces:
SecurityRegistry

public class SecurityRegistryImpl
extends 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
SecurityRegistryImpl(SessionImpl aSession)
          Class constructor.
 
Method Summary
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityRegistryImpl

public SecurityRegistryImpl(SessionImpl aSession)
Class constructor.

Parameters:
aSession - SessionImpl instance
Method Detail

userIsAdmin

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

Specified by:
userIsAdmin in interface SecurityRegistry
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 SecurityRegistry
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 SecurityRegistry
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 SecurityRegistry
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 SecurityRegistry
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 SecurityRegistry
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 SecurityRegistry
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