com.cinecolombia.component.Security.ejb
Interface Security

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface Security
extends javax.ejb.EJBObject

Business interface of Security EJB: list of services for cinecolombia module (Session Stateful EJB)

Author:
CincoSOFT
Created:
Junio 2003

Method Summary
 java.util.ArrayList getUserProfile(java.lang.String userName, java.lang.String companyNumber)
          Loads user profile: global data and security user actions
 java.util.Hashtable getUsersRoles()
          Loads users and associated roles of the system
 void inactivateUser(long idUsuario)
          set user to inactive state
 ParametrosGlobalesModel loadCompany()
          Get global parameters of current company
 Profile loadProfile(long idProfile)
          Get complete data of a profile
 java.util.ArrayList loadSystemProfiles()
          Get list of system profiles ordered by nombre_perfil
 User loadUser(long idUsuario)
          Get data of selected user
 java.util.ArrayList loadUserModulosConPermisos(long idUsuario)
          Get list of system modules and the permissions per each user.
 java.util.ArrayList loadUserProfiles(long idUsuario)
          Get list of user profiles (for a specific user) ordered by nombre_perfil
 java.util.ArrayList loadUsers()
          Get list of active users ordered by codigoUsuario
 void removeProfile(long idProfile)
          Remove complete data of a profile
 void revokePermisosUsuario(long idUsuario, long[] codigosRevocados)
          Get list of system modules and the permissions per each user.
 void setState(java.lang.String companyId, java.lang.Long userId)
          Set state of EJB
 void storePermisosUsuario(long idUsuario, AccionPermisoEspecial accionesPermisoEspecial)
          Get list of system modules and the permissions per each user.
 void storeProfile(long idProfile, java.lang.String profileName, long[] allowedActions)
          Set complete data of a profile
 void storeUser(User user, long[] userProfilesCodes)
          Store user
 void updateCompany(ParametrosGlobalesValue value)
          Set global parameters of current company
 void updatePassword(java.lang.String newPassword)
          Update the password of the user
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getUserProfile

public java.util.ArrayList getUserProfile(java.lang.String userName,
                                          java.lang.String companyNumber)
                                   throws java.rmi.RemoteException,
                                          DAOException
Loads user profile: global data and security user actions

Parameters:
userName - Description of the Parameter
companyNumber - Description of the Parameter
Returns:
ArrayList with 2 elements: userGlobals: String[] composed of: companyName, userId, companySessionTime, companyId, password userActions: Hashtable of: (usecase, useCaseActions) where useCaseActions is an ArrayList of actions and each action is a String
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

getUsersRoles

public java.util.Hashtable getUsersRoles()
                                  throws java.rmi.RemoteException,
                                         DAOException
Loads users and associated roles of the system

Returns:
Hashtable of: (user, userRoles) where user is a String (codigo_usuario), userRoles is an ArrayList of roles and each role is a String
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

setState

public void setState(java.lang.String companyId,
                     java.lang.Long userId)
              throws java.rmi.RemoteException,
                     DAOException
Set state of EJB

Parameters:
companyId -
userId -
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

loadUsers

public java.util.ArrayList loadUsers()
                              throws java.rmi.RemoteException,
                                     DAOException
Get list of active users ordered by codigoUsuario

Returns:
ArrayList where each element is a User
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

loadSystemProfiles

public java.util.ArrayList loadSystemProfiles()
                                       throws java.rmi.RemoteException,
                                              DAOException
Get list of system profiles ordered by nombre_perfil

Returns:
ArrayList where each element is a CodeDescription composed by: (codigo_perfil, nombre_perfil)
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

loadUser

public User loadUser(long idUsuario)
              throws java.rmi.RemoteException,
                     DAOException
Get data of selected user

Parameters:
idUsuario - Description of the Parameter
Returns:
User with data of user
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

loadUserProfiles

public java.util.ArrayList loadUserProfiles(long idUsuario)
                                     throws java.rmi.RemoteException,
                                            DAOException
Get list of user profiles (for a specific user) ordered by nombre_perfil

Parameters:
idUsuario - Description of the Parameter
Returns:
ArrayList where each element is a CodeDescription composed by: (codigo_perfil, nombre_perfil)
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

storeUser

public void storeUser(User user,
                      long[] userProfilesCodes)
               throws java.rmi.RemoteException,
                      DAOException
Store user

Parameters:
user - data of the user
userProfilesCodes - profiles of the user
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

inactivateUser

public void inactivateUser(long idUsuario)
                    throws java.rmi.RemoteException,
                           DAOException
set user to inactive state

Parameters:
idUsuario - identifier of the user
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

updatePassword

public void updatePassword(java.lang.String newPassword)
                    throws java.rmi.RemoteException,
                           DAOException
Update the password of the user

Parameters:
newPassword - new password of the user
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

loadProfile

public Profile loadProfile(long idProfile)
                    throws java.rmi.RemoteException,
                           DAOException
Get complete data of a profile

Parameters:
idProfile - Code of Profile
Returns:
profile Object composed by profiles' information(Profile Module, UseCase and Action).
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

storeProfile

public void storeProfile(long idProfile,
                         java.lang.String profileName,
                         long[] allowedActions)
                  throws java.rmi.RemoteException,
                         DAOException
Set complete data of a profile

Parameters:
idProfile - Code of Profile
profileName - Name of Perfil
allowedActions - List of actions allowed
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

removeProfile

public void removeProfile(long idProfile)
                   throws java.rmi.RemoteException,
                          DAOException
Remove complete data of a profile

Parameters:
idProfile - Code of Profile
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

loadCompany

public ParametrosGlobalesModel loadCompany()
                                    throws java.rmi.RemoteException,
                                           DAOException
Get global parameters of current company

Returns:
ParametrosGlobalesModel Object.
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

updateCompany

public void updateCompany(ParametrosGlobalesValue value)
                   throws java.rmi.RemoteException,
                          DAOException
Set global parameters of current company

Parameters:
value - ParametrosGlobalesValue Object.
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

loadUserModulosConPermisos

public java.util.ArrayList loadUserModulosConPermisos(long idUsuario)
                                               throws java.rmi.RemoteException,
                                                      DAOException
Get list of system modules and the permissions per each user.

Parameters:
idUsuario - Description of the Parameter
Returns:
ArrayList where each element is a ModuloConPermisos
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

revokePermisosUsuario

public void revokePermisosUsuario(long idUsuario,
                                  long[] codigosRevocados)
                           throws java.rmi.RemoteException,
                                  DAOException
Get list of system modules and the permissions per each user.

Parameters:
idUsuario - Description of the Parameter
codigosRevocados - Description of the Parameter
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception

storePermisosUsuario

public void storePermisosUsuario(long idUsuario,
                                 AccionPermisoEspecial accionesPermisoEspecial)
                          throws java.rmi.RemoteException,
                                 DAOException
Get list of system modules and the permissions per each user.

Parameters:
idUsuario - Description of the Parameter
accionesPermisoEspecial - Description of the Parameter
Throws:
DAOException
java.rmi.RemoteException - Description of the Exception