public void setName( String name ) { user.setLogin( name ); }
public IUser loadUserInfo( String login ) throws KettleException { // Create a UserInfo object IUser user = constructUser(); user.setLogin( login ); user.setName( login ); return user; }
/** * Normalizes {@code user}'s data. According to {@linkplain #checkUserInfo(IUser) common rules}, simply trims login * and name. * * @param user user * @return normalized instance * @throws NullPointerException if {@code user} is {@code null} or {@code user}'s login and name */ public static IUser normalizeUserInfo( IUser user ) { user.setLogin( user.getLogin().trim() ); user.setName( user.getName().trim() ); return user; } }
public static Set<IUser> getUsersForRole( String name, List<UserToRoleAssignment> assignments, IRoleSupportSecurityManager rsm ) { Set<IUser> users = new HashSet<IUser>(); for ( UserToRoleAssignment assignment : assignments ) { if ( name.equals( assignment.getRoleId() ) ) { IUser user = null; try { user = rsm.constructUser(); } catch ( KettleException e ) { // TODO Auto-generated catch block e.printStackTrace(); } user.setLogin( assignment.getUserId() ); users.add( user ); } } return users; }
public IUser loadUserInfo( String login, String password ) throws KettleException { // Create a UserInfo object IUser user = constructUser(); user.setLogin( login ); user.setPassword( password ); user.setName( login ); return user; }
public static IUser convertFromNonPentahoUser( String user, IRoleSupportSecurityManager rsm ) { IUser userInfo = null; try { userInfo = rsm.constructUser(); userInfo.setLogin( user ); userInfo.setName( user ); } catch ( KettleException e ) { // TODO Auto-generated catch block e.printStackTrace(); } return userInfo; }
public IUser getUserInfo() throws KettleException { IUser userInfo = rsm.constructUser(); userInfo.setDescription( description ); userInfo.setLogin( name ); userInfo.setName( name ); userInfo.setUsername( name ); userInfo.setPassword( password ); return userInfo; } }
private IUser createUserInfo( ProxyPentahoUser user ) { IUser userInfo = null; try { userInfo = this.rsm.constructUser(); userInfo.setDescription( user.getDescription() ); userInfo.setLogin( user.getName() ); userInfo.setName( user.getName() ); userInfo.setPassword( user.getPassword() ); } catch ( KettleException e ) { // TODO Auto-generated catch block e.printStackTrace(); } return userInfo; }
public static IUser convertToUserInfo( ProxyPentahoUser user, ProxyPentahoRole[] roles, 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() ); if ( userInfo instanceof IEEUser ) { ( (IEEUser) userInfo ).setRoles( convertToSetFromProxyPentahoRoles( roles, rsm ) ); } } catch ( KettleException ke ) { ke.printStackTrace(); } return userInfo; }
userinfo.setLogin( login ); userinfo.setPassword( wPassword.getText() ); userinfo.setUsername( wUsername.getText() );
public static IUser convertFromProxyPentahoUser( ProxyPentahoUser user, List<UserToRoleAssignment> assignments, 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() ); if ( userInfo instanceof IEEUser ) { ( (IEEUser) userInfo ).setRoles( getRolesForUser( user.getName(), assignments, rsm ) ); } } catch ( KettleException e ) { // TODO Auto-generated catch block e.printStackTrace(); } return userInfo; }
@Override public IUser getUserInfo() throws KettleException { IUser userInfo = rsm.constructUser(); userInfo.setDescription( getDescription() ); userInfo.setLogin( getName() ); userInfo.setName( getName() ); userInfo.setUsername( getName() ); userInfo.setPassword( getPassword() ); if ( userInfo instanceof IEEUser ) { for ( IUIRole role : getAssignedRoles() ) { ( (IEEUser) userInfo ).addRole( role.getRole() ); } } return userInfo; }
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 ) { // TODO Auto-generated catch block e.printStackTrace(); } } catch ( KettleException e1 ) { // TODO Auto-generated catch block e1.printStackTrace(); } return userInfo; }
public IUser loadUserInfo( IUser userInfo, String login ) throws KettleException { try { userInfo.setObjectId( getUserID( login ) ); if ( userInfo.getObjectId() != null ) { RowMetaAndData r = getUser( userInfo.getObjectId() ); if ( r != null ) { userInfo.setLogin( r.getString( "LOGIN", null ) ); userInfo.setPassword( Encr.decryptPassword( r.getString( "PASSWORD", null ) ) ); userInfo.setUsername( r.getString( "NAME", null ) ); userInfo.setDescription( r.getString( "DESCRIPTION", null ) ); userInfo.setEnabled( r.getBoolean( "ENABLED", false ) ); return userInfo; } else { throw new KettleDatabaseException( BaseMessages.getString( PKG, "UserInfo.Error.UserNotFound", login ) ); } } else { throw new KettleDatabaseException( BaseMessages.getString( PKG, "UserInfo.Error.UserNotFound", login ) ); } } catch ( KettleDatabaseException dbe ) { throw new KettleException( BaseMessages.getString( PKG, "UserInfo.Error.UserNotLoaded", login, "" ), dbe ); } }