it.eng.spagobi.services.proxy
Class SecurityServiceProxy

java.lang.Object
  extended by it.eng.spagobi.services.proxy.AbstractServiceProxy
      extended by it.eng.spagobi.services.proxy.SecurityServiceProxy

public final class SecurityServiceProxy
extends AbstractServiceProxy

Security Service Proxy. Use in engine component only


Field Summary
 
Fields inherited from class it.eng.spagobi.services.proxy.AbstractServiceProxy
isSecure, serviceUrl, userId
 
Constructor Summary
SecurityServiceProxy(java.lang.String user, javax.servlet.http.HttpSession session)
          Use this constructor.
 
Method Summary
 boolean checkAuthorization(java.security.Principal principal, java.lang.String function)
          Check if the user can execute the function ( user function ).
 boolean checkAuthorization(java.lang.String function)
          Check if the user can execute the function ( user function ).
 it.eng.spago.security.IEngUserProfile getUserProfile()
          Gets the user profile.
 boolean isAuthorized(java.lang.String folderId, java.lang.String mode)
          Check if the user is authorized to access the folder.
 
Methods inherited from class it.eng.spagobi.services.proxy.AbstractServiceProxy
init, readTicket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityServiceProxy

public SecurityServiceProxy(java.lang.String user,
                            javax.servlet.http.HttpSession session)
Use this constructor.

Parameters:
user - user ID
session - HttpSession
Method Detail

getUserProfile

public it.eng.spago.security.IEngUserProfile getUserProfile()
                                                     throws SecurityException
Gets the user profile.

Returns:
IEngUserProfile with user profile
Throws:
SecurityException - if the process has generated an error

isAuthorized

public boolean isAuthorized(java.lang.String folderId,
                            java.lang.String mode)
Check if the user is authorized to access the folder.

Parameters:
folderId - folder id
mode - mode
Returns:
true/false

checkAuthorization

public boolean checkAuthorization(java.lang.String function)
Check if the user can execute the function ( user function ).

Parameters:
function - function id
Returns:
true/false

checkAuthorization

public boolean checkAuthorization(java.security.Principal principal,
                                  java.lang.String function)
Check if the user can execute the function ( user function ).

Parameters:
function - function
principal - user principal
Returns:
true / false