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

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by com.ibm.di.api.remote.impl.APIRemoteObject
                  extended by com.ibm.di.api.remote.impl.SecurityRegistryImpl
All Implemented Interfaces:
SecurityRegistry, java.io.Serializable, java.rmi.Remote

public class SecurityRegistryImpl
extends APIRemoteObject
implements SecurityRegistry

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.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Method Summary
static SecurityRegistryImpl createInstance(SecurityRegistry aLocalSecurityRegistry, SessionImpl aSession)
          Creates new instance of this class.
 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.
 boolean userCanExecuteAll(java.lang.String aUserId)
          Returns whether specified user is allowed to execute everything.
 boolean userCanExecuteConfig(java.lang.String aUserId, java.lang.String aConfigId)
          Returns whether specified user is allowed to execute given configuration.
 boolean userCanExecuteConfigALs(java.lang.String aUserId, java.lang.String aConfigId)
          Returns whether specified user is allowed to execute assembly lines from a given configuration.
 boolean userCanReadAll(java.lang.String aUserId)
          Returns whether specified user is allowed to read everything.
 boolean userCanReadConfig(java.lang.String aUserId, java.lang.String aConfigId)
          Returns whether specified user is allowed to read given configuration.
 boolean userIsAdmin(java.lang.String aUserId)
          Returns whether specified user is granted admin role.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

userIsAdmin

public boolean userIsAdmin(java.lang.String aUserId)
                    throws DIException,
                           java.rmi.RemoteException
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
java.rmi.RemoteException - if a communication-related exception occurs.

userCanReadConfig

public boolean userCanReadConfig(java.lang.String aUserId,
                                 java.lang.String aConfigId)
                          throws DIException,
                                 java.rmi.RemoteException
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:
true only if aUserId is allowed to read aConfigId.
Throws:
DIException - if Runtime or Security exception occurs
java.rmi.RemoteException - if a communication-related exception occurs.

userCanExecuteAL

public boolean userCanExecuteAL(java.lang.String aUserId,
                                java.lang.String aConfigId,
                                java.lang.String aAssemblyLine)
                         throws DIException,
                                java.rmi.RemoteException
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
java.rmi.RemoteException - if a communication-related exception occurs.

userCanExecuteConfig

public boolean userCanExecuteConfig(java.lang.String aUserId,
                                    java.lang.String aConfigId)
                             throws DIException,
                                    java.rmi.RemoteException
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
java.rmi.RemoteException - if a communication-related exception occurs.

userCanExecuteConfigALs

public boolean userCanExecuteConfigALs(java.lang.String aUserId,
                                       java.lang.String aConfigId)
                                throws DIException,
                                       java.rmi.RemoteException
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
java.rmi.RemoteException - if a communication-related exception occurs.

userCanExecuteAll

public boolean userCanExecuteAll(java.lang.String aUserId)
                          throws DIException,
                                 java.rmi.RemoteException
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
java.rmi.RemoteException - if a communication-related exception occurs.

userCanReadAll

public boolean userCanReadAll(java.lang.String aUserId)
                       throws DIException,
                              java.rmi.RemoteException
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
java.rmi.RemoteException - if a communication-related exception occurs.

createInstance

public static SecurityRegistryImpl createInstance(SecurityRegistry aLocalSecurityRegistry,
                                                  SessionImpl aSession)
                                           throws DIException,
                                                  java.rmi.RemoteException
Creates new instance of this class.

Parameters:
aLocalSecurityRegistry - local sequrity registry
aSession - the SessionImpl object
Returns:
SecurityRegistryImpl object
Throws:
DIException - if Runtime or Security exception occurs.
java.rmi.RemoteException - if a communication-related exception occurs.