package com.reallinkbilling.jspRedirect;


import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

public class SearchEmployeeForAccountJsp extends ActionSupport{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -109822499553219265L;
	private HttpSession session;
	private Map<String,String> employeeSearchOptionList = new HashMap<String,String>();
	private String employeeSearchOption;
	private String defaultValue;
	
	public String execute(){
		
		String result = "login";
		session=ServletActionContext.getRequest().getSession(false); 
		 
	        if(session==null || session.getAttribute("login")==null){ 
	        	addActionMessage("Please Login First !!!");
	        	result = "login";
	        }  
	        else{
	        	employeeSearchOptionList.put("BYNAME", "BY NAME");
	        	employeeSearchOptionList.put("BYMOBILE", "BY MOBILE");
	        	employeeSearchOptionList.put("BYADDRESS","BY ADDRESS");
				setDefaultValue("BYNAME");
				this.setEmployeeSearchOption("BYNAME");
	        	result = "success";
	        }
	      return result;
}
public HttpSession getSession() {
	return session;
}
public void setSession(HttpSession session) {
	this.session = session;
}
public Map<String, String> getEmployeeSearchOptionList() {
	return employeeSearchOptionList;
}
public void setEmployeeSearchOptionList(Map<String, String> employeeSearchOptionList) {
	this.employeeSearchOptionList = employeeSearchOptionList;
}
public String getEmployeeSearchOption() {
	return employeeSearchOption;
}
public void setEmployeeSearchOption(String employeeSearchOption) {
	this.employeeSearchOption = employeeSearchOption;
}
public static long getSerialversionuid() {
	return serialVersionUID;
}
public String getDefaultValue() {
	return defaultValue;
}
public void setDefaultValue(String defaultValue) {
	this.defaultValue = defaultValue;
}


}
