Subversion Repositories SmartDukaan

Rev

Rev 7747 | Rev 19707 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7747 Rev 19706
Line 11... Line 11...
11
 
11
 
12
import javax.servlet.http.HttpServletRequest;
12
import javax.servlet.http.HttpServletRequest;
13
import javax.servlet.http.HttpServletResponse;
13
import javax.servlet.http.HttpServletResponse;
14
import javax.servlet.http.HttpSession;
14
import javax.servlet.http.HttpSession;
15
 
15
 
-
 
16
import org.apache.commons.lang.StringUtils;
16
import org.apache.log4j.Logger;
17
import org.apache.log4j.Logger;
17
import org.apache.shiro.SecurityUtils;
18
import org.apache.shiro.SecurityUtils;
18
import org.apache.struts2.interceptor.ServletRequestAware;
19
import org.apache.struts2.interceptor.ServletRequestAware;
19
import org.apache.struts2.interceptor.ServletResponseAware;
20
import org.apache.struts2.interceptor.ServletResponseAware;
20
import org.apache.struts2.interceptor.SessionAware;
21
import org.apache.struts2.interceptor.SessionAware;
Line 46... Line 47...
46
    protected HttpServletRequest request;
47
    protected HttpServletRequest request;
47
    protected HttpSession session;
48
    protected HttpSession session;
48
    protected Map<String, Object> sessionMap;
49
    protected Map<String, Object> sessionMap;
49
    protected long sourceId = -1;
50
    protected long sourceId = -1;
50
    protected Map<String, String> htmlSnippets;
51
    protected Map<String, String> htmlSnippets;
-
 
52
    private boolean OCRSession = false;
51
    
53
    
52
    protected Long storeId;
54
    protected Long storeId;
53
    protected static boolean showTestMessage = false;
55
    protected static boolean showTestMessage = false;
54
    
56
    
55
 
57
 
Line 61... Line 63...
61
        }
63
        }
62
    }
64
    }
63
    
65
    
64
    public BaseController() {
66
    public BaseController() {
65
		htmlSnippets = new HashMap<String, String>();
67
		htmlSnippets = new HashMap<String, String>();
-
 
68
		OCRSession = StringUtils.isNotEmpty((String)request.getSession().getAttribute("OCR_SESSION"));
66
	}
69
	}
67
 
70
 
68
    public void setServletResponse(HttpServletResponse response) {
71
    public void setServletResponse(HttpServletResponse response) {
69
        this.response = response;
72
        this.response = response;
70
    }
73
    }
Line 130... Line 133...
130
    }
133
    }
131
 
134
 
132
    public static boolean shouldShowTestMessage() {
135
    public static boolean shouldShowTestMessage() {
133
        return showTestMessage;
136
        return showTestMessage;
134
    }
137
    }
-
 
138
 
-
 
139
	public void setOCRSession(boolean oCRSession) {
-
 
140
		OCRSession = oCRSession;
-
 
141
	}
-
 
142
 
-
 
143
	public boolean isOCRSession() {
-
 
144
		return OCRSession;
-
 
145
	}
135
}
146
}