public void getData() { if ( userinfo.getLogin() != null ) { wLogin.setText( userinfo.getLogin() ); } if ( userinfo.getPassword() != null ) { wPassword.setText( userinfo.getPassword() ); } if ( userinfo.getUsername() != null ) { wUsername.setText( userinfo.getUsername() ); } if ( userinfo.getDescription() != null ) { wDescription.setText( userinfo.getDescription() ); // WANTED: Add enabled option from UserInfo here!!!! } }
/** * copy constructor * * @param copyFrom */ public UserInfo( IUser copyFrom ) { this.id = copyFrom.getObjectId(); this.login = copyFrom.getLogin(); this.password = copyFrom.getPassword(); this.username = copyFrom.getUsername(); this.description = copyFrom.getDescription(); this.enabled = copyFrom.isEnabled(); this.admin = copyFrom.isAdmin(); }
public RowMetaAndData fillTableRow( IUser userInfo ) { RowMetaAndData r = new RowMetaAndData(); r.addValue( new ValueMetaInteger( "ID_USER" ), userInfo.getObjectId() ); r.addValue( new ValueMetaString( "LOGIN" ), userInfo.getLogin() ); r.addValue( new ValueMetaString( "PASSWORD" ), Encr.encryptPassword( userInfo .getPassword() ) ); r.addValue( new ValueMetaString( "NAME" ), userInfo.getUsername() ); r.addValue( new ValueMetaString( "DESCRIPTION" ), userInfo.getDescription() ); r.addValue( new ValueMetaBoolean( "ENABLED" ), Boolean.valueOf( userInfo.isEnabled() ) ); return r; }