Exemple #1
0
 public static int getCustomerId() {
   String strCustomerId =
       instance.cookieManager.getCookieValues(
           ServletActionContext.getRequest(), StateName.P2P_CUSTOMER_ID);
   if (StringHelper.canConvertToNumber(strCustomerId))
     return Integer.parseInt(EncodeHelper.extractRandomCustomerId(strCustomerId));
   else return 0;
 }
Exemple #2
0
 public static void setCustomerId(int customerId) {
   instance.cookieManager.setCookie(
       ServletActionContext.getResponse(),
       StateName.P2P_CUSTOMER_ID,
       String.valueOf(EncodeHelper.generateRandomCustomerId(customerId)));
 }