@Test public void convertFromProxyPentahoUser_RetunsNull_WhenErrorOccurs() throws Exception { IRoleSupportSecurityManager manager = mock( IRoleSupportSecurityManager.class ); when( manager.constructUser() ).thenThrow( new KettleException() ); IUser user = convertFromProxyPentahoUser( new ProxyPentahoUser(), Collections.<UserToRoleAssignment> emptyList(), manager ); assertNull( user ); }
public static IUser convertFromProxyPentahoUser( IUserRoleWebService userRoleWebService, ProxyPentahoUser user, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ) { IUser userInfo = null; try { userInfo = rsm.constructUser(); userInfo.setDescription( user.getDescription() ); userInfo.setPassword( user.getPassword() ); userInfo.setLogin( user.getName() ); userInfo.setName( user.getName() ); try { if ( userInfo instanceof IEEUser ) { ( (IEEUser) userInfo ).setRoles( convertToSetFromProxyPentahoRoles( userRoleWebService.getRolesForUser( user ), lookupCache ) ); } } catch ( UserRoleException e ) { e.printStackTrace(); } } catch ( KettleException e1 ) { e1.printStackTrace(); } return userInfo; }
UserRoleHelper implements java.io.Serializable { public static IUser convertFromProxyPentahoUser( IUserRoleWebService userRoleWebService, ProxyPentahoUser user, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ) { IUser userInfo = null; try { userInfo = rsm.constructUser(); userInfo.setDescription( user.getDescription() ); userInfo.setPassword( user.getPassword() ); userInfo.setLogin( user.getName() ); userInfo.setName( user.getName() ); try { if ( userInfo instanceof IEEUser ) { ( (IEEUser) userInfo ).setRoles( convertToSetFromProxyPentahoRoles( userRoleWebService.getRolesForUser( user ), lookupCache ) ); } } catch ( UserRoleException e ) { e.printStackTrace(); } } catch ( KettleException e1 ) { e1.printStackTrace(); } return userInfo; } }
UserRoleHelper implements java.io.Serializable { public static IUser convertFromProxyPentahoUser( IUserRoleWebService userRoleWebService, ProxyPentahoUser user, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ) { IUser userInfo = null; try { userInfo = rsm.constructUser(); userInfo.setDescription( user.getDescription() ); userInfo.setPassword( user.getPassword() ); userInfo.setLogin( user.getName() ); userInfo.setName( user.getName() ); try { if ( userInfo instanceof IEEUser ) { ( (IEEUser) userInfo ).setRoles( convertToSetFromProxyPentahoRoles( userRoleWebService.getRolesForUser( user ), lookupCache ) ); } } catch ( UserRoleException e ) { e.printStackTrace(); } } catch ( KettleException e1 ) { e1.printStackTrace(); } return userInfo; }  }
UserRoleHelper implements java.io.Serializable { public static IUser convertFromProxyPentahoUser( IUserRoleWebService userRoleWebService, ProxyPentahoUser user, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ) { IUser userInfo = null; try { userInfo = rsm.constructUser(); userInfo.setDescription( user.getDescription() ); userInfo.setPassword( user.getPassword() ); userInfo.setLogin( user.getName() ); userInfo.setName( user.getName() ); try { if ( userInfo instanceof IEEUser ) { ( (IEEUser) userInfo ).setRoles( convertToSetFromProxyPentahoRoles( userRoleWebService.getRolesForUser( user ), lookupCache ) ); } } catch ( UserRoleException e ) { e.printStackTrace(); } } catch ( KettleException e1 ) { e1.printStackTrace(); } return userInfo; }  static List<IUser> convertFromProxyPentahoUsers( UserRoleSecurityInfo info, IRoleSupportSecurityManager rsm ); static List<IUser> convertFromNonPentahoUsers( UserRoleInfo info, IRoleSupportSecurityManager rsm ); static List<IRole> convertToListFromProxyPentahoRoles( UserRoleSecurityInfo info,
      IRoleSupportSecurityManager rsm ); static List<IRole> convertToListFromNonPentahoRoles( UserRoleInfo info, IRoleSupportSecurityManager rsm ); static List<IRole> convertToListFromProxyPentahoDefaultRoles( UserRoleSecurityInfo info,
      IRoleSupportSecurityManager rsm ); static ProxyPentahoRole getProxyPentahoRole( IUserRoleWebService userRoleWebService, String name ); static List<IUser> convertToListFromProxyPentahoUsers( ProxyPentahoUser[] users,
      IUserRoleWebService userRoleWebService, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ); static List<IRole> convertToListFromProxyPentahoRoles( ProxyPentahoRole[] roles,
      IUserRoleWebService userRoleWebService, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ); static ProxyPentahoUser[] convertToPentahoProxyUsers( Set<IUser> users ); static ProxyPentahoUser[] convertToPentahoProxyUsers( List<IUser> users ); static ProxyPentahoUser convertToPentahoProxyUser( IUser userInfo ); static ProxyPentahoRole[] convertToPentahoProxyRoles( Set<IRole> roles ); static ProxyPentahoRole[] convertToPentahoProxyRoles( List<IRole> roles ); static ProxyPentahoRole convertToPentahoProxyRole( IRole roleInfo ); static IRole convertFromProxyPentahoRole( IUserRoleWebService userRoleWebService, ProxyPentahoRole role,
      UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ); static IUser convertFromProxyPentahoUser( IUserRoleWebService userRoleWebService, ProxyPentahoUser user,
      UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ); static IUser convertToUserInfo( ProxyPentahoUser user, ProxyPentahoRole[] roles,
      IRoleSupportSecurityManager rsm ); static IRole convertFromProxyPentahoRole( ProxyPentahoRole role, List<UserToRoleAssignment> assignments,
      IRoleSupportSecurityManager rsm ); static IRole convertFromNonPentahoRole( String role, IRoleSupportSecurityManager rsm ); static IUser convertFromProxyPentahoUser( ProxyPentahoUser user, List<UserToRoleAssignment> assignments,
      IRoleSupportSecurityManager rsm ); static IUser convertFromNonPentahoUser( String user, IRoleSupportSecurityManager rsm ); static Set<IUser> getUsersForRole( String name, List<UserToRoleAssignment> assignments,
      IRoleSupportSecurityManager rsm ); static Set<IRole> getRolesForUser( String name, List<UserToRoleAssignment> assignments,
      IRoleSupportSecurityManager rsm ); }
UserRoleHelper implements java.io.Serializable { public static IUser convertFromProxyPentahoUser( IUserRoleWebService userRoleWebService, ProxyPentahoUser user, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ) { IUser userInfo = null; try { userInfo = rsm.constructUser(); userInfo.setDescription( user.getDescription() ); userInfo.setPassword( user.getPassword() ); userInfo.setLogin( user.getName() ); userInfo.setName( user.getName() ); try { if ( userInfo instanceof IEEUser ) { ( (IEEUser) userInfo ).setRoles( convertToSetFromProxyPentahoRoles( userRoleWebService.getRolesForUser( user ), lookupCache ) ); } } catch ( UserRoleException e ) { e.printStackTrace(); } } catch ( KettleException e1 ) { e1.printStackTrace(); } return userInfo; }  static List<IUser> convertFromProxyPentahoUsers( UserRoleSecurityInfo info, IRoleSupportSecurityManager rsm ); static List<IUser> convertFromNonPentahoUsers( UserRoleInfo info, IRoleSupportSecurityManager rsm ); static List<IRole> convertToListFromProxyPentahoRoles( UserRoleSecurityInfo info,
      IRoleSupportSecurityManager rsm ); static List<IRole> convertToListFromNonPentahoRoles( UserRoleInfo info, IRoleSupportSecurityManager rsm ); static List<IRole> convertToListFromProxyPentahoDefaultRoles( UserRoleSecurityInfo info,
      IRoleSupportSecurityManager rsm ); static ProxyPentahoRole getProxyPentahoRole( IUserRoleWebService userRoleWebService, String name ); static List<IUser> convertToListFromProxyPentahoUsers( ProxyPentahoUser[] users,
      IUserRoleWebService userRoleWebService, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ); static List<IRole> convertToListFromProxyPentahoRoles( ProxyPentahoRole[] roles,
      IUserRoleWebService userRoleWebService, UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ); static ProxyPentahoUser[] convertToPentahoProxyUsers( Set<IUser> users ); static ProxyPentahoUser[] convertToPentahoProxyUsers( List<IUser> users ); static ProxyPentahoUser convertToPentahoProxyUser( IUser userInfo ); static ProxyPentahoRole[] convertToPentahoProxyRoles( Set<IRole> roles ); static ProxyPentahoRole[] convertToPentahoProxyRoles( List<IRole> roles ); static ProxyPentahoRole convertToPentahoProxyRole( IRole roleInfo ); static IRole convertFromProxyPentahoRole( IUserRoleWebService userRoleWebService, ProxyPentahoRole role,
      UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ); static IUser convertFromProxyPentahoUser( IUserRoleWebService userRoleWebService, ProxyPentahoUser user,
      UserRoleLookupCache lookupCache, IRoleSupportSecurityManager rsm ); static IUser convertToUserInfo( ProxyPentahoUser user, ProxyPentahoRole[] roles,
      IRoleSupportSecurityManager rsm ); static IRole convertFromProxyPentahoRole( ProxyPentahoRole role, List<UserToRoleAssignment> assignments,
      IRoleSupportSecurityManager rsm ); static IRole convertFromNonPentahoRole( String role, IRoleSupportSecurityManager rsm ); static IUser convertFromProxyPentahoUser( ProxyPentahoUser user, List<UserToRoleAssignment> assignments,
      IRoleSupportSecurityManager rsm ); static IUser convertFromNonPentahoUser( String user, IRoleSupportSecurityManager rsm ); static Set<IUser> getUsersForRole( String name, List<UserToRoleAssignment> assignments,
      IRoleSupportSecurityManager rsm ); static Set<IRole> getRolesForUser( String name, List<UserToRoleAssignment> assignments,
      IRoleSupportSecurityManager rsm );  }