コード例 #1
0
ファイル: BaseAction.java プロジェクト: vrushalib/MeatRootDev
 /**
  * Utility method to read a KKCookie when we have the CustomerUuid
  *
  * @param customerUuid
  * @param attrId
  * @param kkAppEng
  * @return the value of the cookie
  * @throws KKException
  */
 protected String getKKCookie(String customerUuid, String attrId, KKAppEng kkAppEng)
     throws KKException {
   if (customerUuid == null) {
     return null;
   }
   KKCookieIf kkCookie = kkAppEng.getEng().getCookie(customerUuid, attrId);
   if (kkCookie != null) {
     return kkCookie.getAttributeValue();
   }
   return null;
 }
コード例 #2
0
  /**
   * Utility method to read a KKCookie when we have the CustomerUuid
   *
   * @param customerUuid the customer UUID
   * @param attrId the attribute to save
   * @param kkAppEng the konakart engine.
   * @return the value of the cookie
   * @throws org.hippoecm.hst.core.component.HstComponentException .
   */
  @Nullable
  private String getKKCookie(String customerUuid, String attrId, KKAppEng kkAppEng)
      throws HstComponentException {
    try {
      KKCookieIf kkCookie = kkAppEng.getEng().getCookie(customerUuid, attrId);
      if (kkCookie != null) {
        return kkCookie.getAttributeValue();
      }

      return null;
    } catch (KKException e) {
      throw new HstComponentException(e);
    }
  }