|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.cinecolombia.component.Security.ejb.SecurityEJB
Session Stateful EJB for cinecolombia module
Field Summary | |
private java.lang.String |
companyId
current company |
private javax.ejb.SessionContext |
context
session context |
private Debug |
debug
for debugging |
private SecurityDAO |
securityDao
SecurityDAO object for interacting with the database |
private java.lang.Long |
userId
current user |
Constructor Summary | |
SecurityEJB()
Constructor |
Method Summary | |
void |
ejbActivate()
Actions after swapping |
void |
ejbCreate()
ejbCreate |
void |
ejbPassivate()
Actions before swapping |
void |
ejbRemove()
Action before removing EJB instance |
private SecurityDAO |
getDao()
Obtains a DAO instance assigning to securityDao attribute |
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 of 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)
Revoke every especial permissions of user |
void |
setSessionContext(javax.ejb.SessionContext sc)
Set session context |
void |
setState(java.lang.String companyId,
java.lang.Long userId)
Set state of EJB |
void |
storePermisosUsuario(long idUsuario,
AccionPermisoEspecial accionesPermisoEspecial)
Save new especial permissions of 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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String companyId
private java.lang.Long userId
private javax.ejb.SessionContext context
private SecurityDAO securityDao
private Debug debug
Constructor Detail |
public SecurityEJB()
Method Detail |
public void setSessionContext(javax.ejb.SessionContext sc)
setSessionContext
in interface javax.ejb.SessionBean
sc
- The new sessionContext valuepublic void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
public void ejbCreate()
public void ejbRemove()
ejbRemove
in interface javax.ejb.SessionBean
public java.util.ArrayList getUserProfile(java.lang.String userName, java.lang.String companyNumber) throws DAOException
userName
- Description of the ParametercompanyNumber
- Description of the Parameter
DAOException
public java.util.Hashtable getUsersRoles() throws DAOException
DAOException
public void setState(java.lang.String companyId, java.lang.Long userId) throws DAOException
companyId
- userId
-
DAOException
public java.util.ArrayList loadUsers() throws DAOException
DAOException
public java.util.ArrayList loadSystemProfiles() throws DAOException
DAOException
public User loadUser(long idUsuario) throws DAOException
idUsuario
- Description of the Parameter
DAOException
public java.util.ArrayList loadUserProfiles(long idUsuario) throws DAOException
idUsuario
- Description of the Parameter
DAOException
public void storeUser(User user, long[] userProfilesCodes) throws DAOException
user
- data of the useruserProfilesCodes
- profiles of the user
DAOException
public void inactivateUser(long idUsuario) throws DAOException
idUsuario
- identifier of the user
DAOException
public void updatePassword(java.lang.String newPassword) throws DAOException
newPassword
- new password of the user
DAOException
public Profile loadProfile(long idProfile) throws DAOException
idProfile
- code of Profile
DAOException
public void storeProfile(long idProfile, java.lang.String profileName, long[] allowedActions) throws DAOException
idProfile
- Code of ProfileprofileName
- Name of PerfilallowedActions
- List of actions allowed
DAOException
public void removeProfile(long idProfile) throws DAOException
idProfile
- Code of Profile
DAOException
public ParametrosGlobalesModel loadCompany() throws DAOException
DAOException
public void updateCompany(ParametrosGlobalesValue value) throws DAOException
value
- ParametrosGlobalesValue Object.
DAOException
public java.util.ArrayList loadUserModulosConPermisos(long idUsuario) throws DAOException
idUsuario
- Code of user
DAOException
public void revokePermisosUsuario(long idUsuario, long[] codigosRevocados) throws DAOException
idUsuario
- User codecodigosRevocados
- List of revoked especial permissions
DAOException
public void storePermisosUsuario(long idUsuario, AccionPermisoEspecial accionesPermisoEspecial) throws DAOException
idUsuario
- User codeaccionesPermisoEspecial
- Set of new especial permissions
DAOException
private SecurityDAO getDao() throws DAOException
DAOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |