Subversion Repositories SmartDukaan

Rev

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

Rev 23510 Rev 23568
Line 6... Line 6...
6
import javax.servlet.http.Cookie;
6
import javax.servlet.http.Cookie;
7
import javax.servlet.http.HttpServletRequest;
7
import javax.servlet.http.HttpServletRequest;
8
import javax.servlet.http.HttpServletResponse;
8
import javax.servlet.http.HttpServletResponse;
9
 
9
 
10
import org.apache.commons.lang3.StringUtils;
10
import org.apache.commons.lang3.StringUtils;
11
import org.slf4j.Logger;
11
import org.apache.logging.log4j.Logger;
12
import org.slf4j.LoggerFactory;
12
import org.apache.logging.log4j.LogManager;
13
import org.springframework.stereotype.Component;
13
import org.springframework.stereotype.Component;
14
 
14
 
15
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
15
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
16
import com.spice.profitmandi.common.model.ProfitMandiConstants;
16
import com.spice.profitmandi.common.model.ProfitMandiConstants;
17
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
17
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
18
import com.spice.profitmandi.web.model.LoginDetails;
18
import com.spice.profitmandi.web.model.LoginDetails;
19
 
19
 
20
@Component
20
@Component
21
public class CookiesProcessor {
21
public class CookiesProcessor {
22
	
22
	
23
	private static final Logger LOGGER = LoggerFactory.getLogger(CookiesProcessor.class);
23
	private static final Logger LOGGER = LogManager.getLogger(CookiesProcessor.class);
24
	
24
	
25
	public LoginDetails getCookiesObject(HttpServletRequest request) throws ProfitMandiBusinessException{
25
	public LoginDetails getCookiesObject(HttpServletRequest request) throws ProfitMandiBusinessException{
26
		Cookie[] cookies = request.getCookies();
26
		Cookie[] cookies = request.getCookies();
27
		if (cookies == null){
27
		if (cookies == null){
28
			throw new ProfitMandiBusinessException("", "", "");
28
			throw new ProfitMandiBusinessException("", "", "");