it.eng.spagobi.security
Class RoleSynchronizer

java.lang.Object
  extended by it.eng.spagobi.security.RoleSynchronizer

public class RoleSynchronizer
extends java.lang.Object

Contains methods to Syncronize the portal list of roles


Constructor Summary
RoleSynchronizer()
           
 
Method Summary
private  boolean exist(Role pRole, IRoleDAO aRoleDAO)
          Returns true if a role already exists into the role list, false if none.
private  java.lang.Integer findSBIDomainValueID(java.lang.String domainCode, java.lang.String valueCode)
          Gets the id for a Domain, given its code and value
 void synchronize()
          Syncronize the portal roles with SpagoBI roles importing roles missing in SpagoBI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleSynchronizer

public RoleSynchronizer()
Method Detail

synchronize

public void synchronize()
Syncronize the portal roles with SpagoBI roles importing roles missing in SpagoBI. if a role yet exist into SpagoBI table list, a tracing message is added and the list iteration goes on; if there is a new role, it is inserted into role database and another tracing message is added.


exist

private boolean exist(Role pRole,
                      IRoleDAO aRoleDAO)
Returns true if a role already exists into the role list, false if none. If the role name is found into the roles list, the loadByName method called doesn't throw any exception, so true is returned.

Parameters:
pRole - The input role to control
aRoleDAO - The interface role DAO object, used to call list roles loaded by name.
Returns:
A boolean value telling us if the role exists or not.

findSBIDomainValueID

private java.lang.Integer findSBIDomainValueID(java.lang.String domainCode,
                                               java.lang.String valueCode)
Gets the id for a Domain, given its code and value

Parameters:
domainCode - The Domain code String
valueCode - The domain Value Dtring
Returns:
The Domain ID