Subversion Repositories SmartDukaan

Rev

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

Rev 2912 Rev 2936
Line 27... Line 27...
27
	private static final long serialVersionUID = 1L;
27
	private static final long serialVersionUID = 1L;
28
	private static Logger log = Logger.getLogger(TrackingInterceptor.class);
28
	private static Logger log = Logger.getLogger(TrackingInterceptor.class);
29
	
29
	
30
	private static final int SECONDS_IN_TWO_MONTHS = 60*60*24*60;
30
	private static final int SECONDS_IN_TWO_MONTHS = 60*60*24*60;
31
	private static final int SECONDS_IN_YEAR = 60*60*24*365;
31
	private static final int SECONDS_IN_YEAR = 60*60*24*365;
-
 
32
	private static final int SECONDS_IN_DAY = 60*60*24;
32
	public static final String TRACKER = "tracker";
33
	public static final String TRACKER = "tracker";
33
	public static final String AFF_COOKIE = "uafc";
34
	public static final String AFF_COOKIE = "uafc";
34
	public static final String SRC_COOKIE = "usrcc";
35
	public static final String SRC_COOKIE = "usrcc";
35
	public static final String SESSION_SRC_COOKIE = "sess_srcc";
36
	public static final String SESSION_SRC_COOKIE = "sess_srcc";
36
	public static final String SRC_TIME_COOKIE = "usrctc";
37
	public static final String SRC_TIME_COOKIE = "usrctc";
Line 220... Line 221...
220
                        return;
221
                        return;
221
                    }
222
                    }
222
                }
223
                }
223
                // create new aff cookie if affCookie ==null or affiliateId() != affCookie.
224
                // create new aff cookie if affCookie ==null or affiliateId() != affCookie.
224
                Cookie newAffCookie = new Cookie(AFF_COOKIE, String.valueOf(affiliateId));
225
                Cookie newAffCookie = new Cookie(AFF_COOKIE, String.valueOf(affiliateId));
225
                newAffCookie.setMaxAge(SECONDS_IN_TWO_MONTHS);
226
                newAffCookie.setMaxAge(SECONDS_IN_DAY * 5);
226
                newAffCookie.setPath("/");
227
                newAffCookie.setPath("/");
227
                if (!cookieDomain.isEmpty()) {
228
                if (!cookieDomain.isEmpty()) {
228
                    newAffCookie.setDomain(cookieDomain);
229
                    newAffCookie.setDomain(cookieDomain);
229
                }
230
                }
230
                cookiesMap.put(AFF_COOKIE, newAffCookie);
231
                cookiesMap.put(AFF_COOKIE, newAffCookie);