package test;

public class LoginAction {

	private String email, password, message;
	private String test;
	private int abc;
	
	public String getTest() {
		return test;
	}

	public void setTest(String test) {
		this.test = test;
	}

	public int getAbc() {
		return abc;
	}

	public void setAbc(int abc) {
		this.abc = abc;
	}

	public Admin getAd() {
		return ad;
	}

	public void setAd(Admin ad) {
		this.ad = ad;
	}
	Admin ad = new Admin();
	public String execute() throws Exception{
	
		message = ad.getUser(email, password);
		
		if(message.startsWith("Sorry")) return "FAILURE"; 
		return "SUCCESS";
	}
	
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
}
