com.konakart.bl
Class CookieMgr

java.lang.Object
  extended by com.konakart.bl.BaseMgr
      extended by com.konakart.bl.CookieMgr
All Implemented Interfaces:
CookieMgrIf

public class CookieMgr
extends BaseMgr
implements CookieMgrIf

Manager that contains code for reading and writing KonaKart cookies.


Field Summary
protected static org.apache.commons.logging.Log log
          the log
 
Fields inherited from class com.konakart.bl.BaseMgr
templateBaseDir
 
Constructor Summary
CookieMgr(KKEngIf eng)
          Constructor
 
Method Summary
 void deleteCookie(java.lang.String customerUuid, java.lang.String attrId)
          Deletes the cookie object from the database that is referenced by the customerUuid and attrId parameters.
 KKCookie[] getAllCookies(java.lang.String customerUuid)
          Fetches all of the cookie object from the database that are referenced by the customerUuid parameter.
 KKCookie getCookie(java.lang.String customerUuid, java.lang.String attrId)
          Fetches the cookie object from the database that is referenced by the customerUuid and attrId parameters.
 void setCookie(KKCookieIf cookie)
          Saves the cookie in the database.
protected  void setCriteriaWithStandardAttributes(KKCriteria c)
          Put this code in one place
protected  void updateLastReadDate(KKCookieIf cookie)
          Update the last read date when a cookie is read.
 
Methods inherited from class com.konakart.bl.BaseMgr
addInsertAttr, addInsertAttr, checkRequired, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getLangMgr, getManuMgr, getMiscItemMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getPromMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, isEnterprise, isMultiStoreShareCustomers, isMultiStoreShareProducts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
the log

Constructor Detail

CookieMgr

public CookieMgr(KKEngIf eng)
          throws java.lang.Exception
Constructor

Parameters:
eng -
Throws:
java.lang.Exception
Method Detail

setCookie

public void setCookie(KKCookieIf cookie)
               throws org.apache.torque.TorqueException,
                      KKException,
                      com.workingdogs.village.DataSetException
Saves the cookie in the database. If it already exists, it is edited. The cookie object passed in as a parameter must have the following attributes set:

Specified by:
setCookie in interface CookieMgrIf
Parameters:
cookie -
Throws:
org.apache.torque.TorqueException
KKException
com.workingdogs.village.DataSetException

getCookie

public KKCookie getCookie(java.lang.String customerUuid,
                          java.lang.String attrId)
                   throws com.workingdogs.village.DataSetException,
                          KKException,
                          org.apache.torque.TorqueException
Fetches the cookie object from the database that is referenced by the customerUuid and attrId parameters.

Specified by:
getCookie in interface CookieMgrIf
Parameters:
customerUuid -
attrId -
Returns:
Returns a KKCookie object
Throws:
com.workingdogs.village.DataSetException
KKException
org.apache.torque.TorqueException

getAllCookies

public KKCookie[] getAllCookies(java.lang.String customerUuid)
                         throws com.workingdogs.village.DataSetException,
                                KKException,
                                org.apache.torque.TorqueException
Fetches all of the cookie object from the database that are referenced by the customerUuid parameter.

Specified by:
getAllCookies in interface CookieMgrIf
Parameters:
customerUuid -
Returns:
Returns an array of KKCookie objects
Throws:
com.workingdogs.village.DataSetException
KKException
org.apache.torque.TorqueException

deleteCookie

public void deleteCookie(java.lang.String customerUuid,
                         java.lang.String attrId)
                  throws com.workingdogs.village.DataSetException,
                         KKException,
                         org.apache.torque.TorqueException
Deletes the cookie object from the database that is referenced by the customerUuid and attrId parameters.

Specified by:
deleteCookie in interface CookieMgrIf
Parameters:
customerUuid -
attrId -
Throws:
com.workingdogs.village.DataSetException
KKException
org.apache.torque.TorqueException

setCriteriaWithStandardAttributes

protected void setCriteriaWithStandardAttributes(KKCriteria c)
Put this code in one place


updateLastReadDate

protected void updateLastReadDate(KKCookieIf cookie)
                           throws org.apache.torque.TorqueException,
                                  KKException,
                                  com.workingdogs.village.DataSetException
Update the last read date when a cookie is read.

Parameters:
cookie -
Throws:
org.apache.torque.TorqueException
KKException
com.workingdogs.village.DataSetException


Copyright © 2011 DS Data Systems UK Ltd.