- Bisogna gestire l'eccezioni nell'input - Bisogna implementare l'ordinamento della lista delle offerte attive Corretta la visualizzazione grafica ddi LoginData
50 lines
1.1 KiB
Java
50 lines
1.1 KiB
Java
package it.unisa.info13d.Login;
|
|
|
|
import java.io.FileNotFoundException;
|
|
import java.io.IOException;
|
|
|
|
/**
|
|
* Created with MONSTER.
|
|
* User: xgiovio
|
|
* Date: 17/12/13
|
|
* Time: 1.47
|
|
*/
|
|
public class LoginData {
|
|
|
|
public LoginData () throws FileNotFoundException,IOException,ClassNotFoundException{
|
|
|
|
LoggedUser logged_user = new LoggedUser();
|
|
boolean AccountType = true;
|
|
AccountType = Access.get_access(logged_user);
|
|
|
|
type = convert_type (AccountType);
|
|
username = logged_user.logged_user;
|
|
|
|
}
|
|
|
|
protected String convert_type (boolean value){
|
|
if (value == false)
|
|
return "Admin";
|
|
return "Client";
|
|
}
|
|
|
|
public String getUsername() {
|
|
return username;
|
|
}
|
|
|
|
public String getType() {
|
|
return type;
|
|
}
|
|
|
|
public void getUserDataInfo (){
|
|
|
|
System.out.println("\n***************************************");
|
|
System.out.println("Utente Loggato : " + username);
|
|
System.out.println("AccoutType : " + type );
|
|
System.out.println("***************************************\n");
|
|
}
|
|
|
|
private String username;
|
|
private String type;
|
|
}
|