package test;
import com.opensymphony.*;

public class RegistrationAction {

	private String name, email, password, message;
	Admin ad = new Admin();
	
	private String parameters; //testing for interceptors: accessing input parameters
	
	public String execute() throws Exception{
		try {
			setMessage(ad.addUser(name, email, password));
			System.out.println(getParameters());
		}
		catch(Exception e) {
			return e.getMessage();
		}
		return "SUCCESS";
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	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 msg) {
		message = msg;
	}
	
	public String getParameters() {
		return parameters;
	}
	public void setParameters(String parameters) {
		this.parameters = parameters;
	}
}
