it.eng.spagobi.services.security.service
Class SecurityServiceImpl

java.lang.Object
  extended by it.eng.spagobi.services.common.AbstractServiceImpl
      extended by it.eng.spagobi.services.security.service.SecurityServiceImpl
All Implemented Interfaces:
it.eng.spagobi.services.security.SecurityService

public class SecurityServiceImpl
extends AbstractServiceImpl
implements it.eng.spagobi.services.security.SecurityService

This class create the user profile and implements the security check

Author:
Bernabei Angelo

Constructor Summary
SecurityServiceImpl()
          Instantiates a new security service impl.
 
Method Summary
 boolean checkAuthorization(java.lang.String token, java.lang.String userId, java.lang.String function)
          check if the user can execute the function.
 it.eng.spagobi.services.security.bo.SpagoBIUserProfile getUserProfile(java.lang.String token, java.lang.String userId)
          User profile creation.
 boolean isAuthorized(java.lang.String token, java.lang.String userId, java.lang.String idFolder, java.lang.String state)
          check if user can access to the folder "idFolder".
 
Methods inherited from class it.eng.spagobi.services.common.AbstractServiceImpl
validateTicket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityServiceImpl

public SecurityServiceImpl()
Instantiates a new security service impl.

Method Detail

getUserProfile

public it.eng.spagobi.services.security.bo.SpagoBIUserProfile getUserProfile(java.lang.String token,
                                                                             java.lang.String userId)
User profile creation.

Specified by:
getUserProfile in interface it.eng.spagobi.services.security.SecurityService
Parameters:
token - the token
userId - the user id
Returns:
the user profile

isAuthorized

public boolean isAuthorized(java.lang.String token,
                            java.lang.String userId,
                            java.lang.String idFolder,
                            java.lang.String state)
check if user can access to the folder "idFolder".

Specified by:
isAuthorized in interface it.eng.spagobi.services.security.SecurityService
Parameters:
token - the token
userId - the user id
idFolder - the id folder
state - the state
Returns:
true, if checks if is authorized

checkAuthorization

public boolean checkAuthorization(java.lang.String token,
                                  java.lang.String userId,
                                  java.lang.String function)
check if the user can execute the function.

Specified by:
checkAuthorization in interface it.eng.spagobi.services.security.SecurityService
Parameters:
token - the token
userId - the user id
function - the function
Returns:
true, if check authorization