package com.mx.dla.global.actions;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.SessionAware;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionSupport;

@Controller
@Scope("request")
public class BaseAction extends ActionSupport implements SessionAware,ServletRequestAware,DisposableBean{
	
	private static final long serialVersionUID = 1L;
	
	protected Logger logger =  LoggerFactory.getLogger("app");
	
	private Map<String,Object> session;
	private HttpServletRequest servletRequest;
	
	protected String pmn = "0";
	protected String pmnReturn = "0";
	
	@Override
	public void setSession(Map<String, Object> session) {
		this.session=session;		
	}

	public Map<String, Object> getSession() {
		return session;
	}


	public HttpServletRequest getServletRequest() {
		return servletRequest;
	}

	public void setServletRequest(HttpServletRequest servletRequest) {
		this.servletRequest = servletRequest;
	}

	@Override
	public void destroy()  {		
		
	}

	public String getPmn() {
		return pmn;
	}

	public void setPmn(String pmn) {
		this.pmn = pmn;
	}

	public String getPmnReturn() {
		return pmnReturn;
	}

	public void setPmnReturn(String pmnReturn) {
		this.pmnReturn = pmnReturn;
	}
	
}