com.konakart.bl
Class BillingMgr

java.lang.Object
  extended by com.konakart.bl.BaseMgr
      extended by com.konakart.bl.BillingMgr
All Implemented Interfaces:
BillingMgrIf

public class BillingMgr
extends BaseMgr
implements BillingMgrIf

Manager for recurring billing


Field Summary
protected static org.apache.commons.logging.Log log
          the log
 
Fields inherited from class com.konakart.bl.BaseMgr
templateBaseDir
 
Constructor Summary
BillingMgr(KKEngIf eng)
          Constructor
 
Method Summary
 PaymentSchedule getPaymentSchedule(int id)
          Returns the payment schedule object for the id parameter, or Null if the payment schedule object doesn't exist in the DB.
 Subscription[] getSubscriptionsPerCustomer(java.lang.String sessionId)
          Returns an array of Subscription objects for a customer referred to by the sessionId parameter.
 int insertSubscription(java.lang.String sessionId, SubscriptionIf subscription)
          A Subscription object is inserted into the database.
 int insertSubscription(SubscriptionIf subscription)
          A Subscription object is inserted into the database.
protected  void setPaymentScheduleCriteriaWithStandardAttributes(KKCriteria c, int customerId)
          Set the attributes for reading a payment schedule object
protected  void setSubscriptionCriteriaWithStandardAttributes(KKCriteria c)
          Common code to avoid duplication
protected  void validateSubscription(SubscriptionIf subscription)
          Used to validate a subscription
 
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

BillingMgr

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

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

insertSubscription

public int insertSubscription(java.lang.String sessionId,
                              SubscriptionIf subscription)
                       throws java.lang.Exception
A Subscription object is inserted into the database. The following subscription attributes are compulsory: The customer id of the Subscription object is fetched from the sessionId. The id of the new object is returned.

Specified by:
insertSubscription in interface BillingMgrIf
Parameters:
sessionId -
subscription -
Returns:
Returns the id of the Subscription object
Throws:
java.lang.Exception

insertSubscription

public int insertSubscription(SubscriptionIf subscription)
                       throws java.lang.Exception
A Subscription object is inserted into the database. The following subscription attributes are compulsory: The id of the new object is returned.

Specified by:
insertSubscription in interface BillingMgrIf
Parameters:
subscription -
Returns:
Returns the id of the Subscription object
Throws:
java.lang.Exception

validateSubscription

protected void validateSubscription(SubscriptionIf subscription)
                             throws KKException,
                                    org.apache.torque.TorqueException,
                                    com.workingdogs.village.DataSetException
Used to validate a subscription

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

getPaymentSchedule

public PaymentSchedule getPaymentSchedule(int id)
                                   throws KKException,
                                          org.apache.torque.TorqueException,
                                          com.workingdogs.village.DataSetException
Returns the payment schedule object for the id parameter, or Null if the payment schedule object doesn't exist in the DB.

Specified by:
getPaymentSchedule in interface BillingMgrIf
Parameters:
id - The id of the payment schedule object
Returns:
Returns a payment schedule object
Throws:
KKException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

setPaymentScheduleCriteriaWithStandardAttributes

protected void setPaymentScheduleCriteriaWithStandardAttributes(KKCriteria c,
                                                                int customerId)
Set the attributes for reading a payment schedule object

Parameters:
c -
customerId -

getSubscriptionsPerCustomer

public Subscription[] getSubscriptionsPerCustomer(java.lang.String sessionId)
                                           throws java.lang.Exception
Returns an array of Subscription objects for a customer referred to by the sessionId parameter.

Specified by:
getSubscriptionsPerCustomer in interface BillingMgrIf
Parameters:
sessionId -
Returns:
Returns an array of subscription objects
Throws:
java.lang.Exception

setSubscriptionCriteriaWithStandardAttributes

protected void setSubscriptionCriteriaWithStandardAttributes(KKCriteria c)
Common code to avoid duplication

Parameters:
c -


Copyright © 2011 DS Data Systems UK Ltd.