com.konakartadmin.bl
Class AdminBillingMgr

java.lang.Object
  extended by com.konakartadmin.bl.AdminBaseMgr
      extended by com.konakartadmin.bl.AdminBillingMgr
All Implemented Interfaces:
AdminBillingMgrIf

public class AdminBillingMgr
extends AdminBaseMgr
implements AdminBillingMgrIf

The AdminBillingMgr - for Managing recurring billing


Nested Class Summary
 
Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr
AdminBaseMgr.StaticData
 
Field Summary
protected static org.apache.commons.logging.Log log
          the log
 
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
 
Constructor Summary
AdminBillingMgr(KKAdminIf eng)
          Constructor
 
Method Summary
protected  void addPaymentScheduleOrderBy(com.konakart.bl.KKCriteria c, AdminPaymentScheduleSearch search)
          Add order by constraints for payment schedules
protected  int addPaymentScheduleSearchCriteria(com.konakart.bl.KKCriteria c, AdminPaymentScheduleSearch search)
          Add search criteria for payment schedule objects
protected  void addSubscriptionOrderBy(com.konakart.bl.KKCriteria c, AdminSubscriptionSearch search)
          Add order by constraints for subscriptions
protected  void addSubscriptionSearchCriteria(com.konakart.bl.KKCriteria c, AdminSubscriptionSearch search)
          Add search criteria for subscription objects
 int deletePaymentSchedule(int id)
          Delete a Payment Schedule Object
 int deleteSubscription(int id)
          Delete a Subscription Object
 AdminPaymentSchedule 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.
protected  int getPaymentScheduleCount(AdminPaymentScheduleSearch search)
          Returns a count of the number of PaymentSchedules
 AdminPaymentScheduleSearchResult getPaymentSchedules(AdminPaymentScheduleSearch search, int offset, int size)
          This returns an AdminPaymentScheduleSearchResult object.
 AdminSubscription getSubscription(int id)
          Returns the subscription object for the id parameter, or Null if the subscription object doesn't exist in the DB.
protected  int getSubscriptionCount(AdminSubscriptionSearch search)
          Returns a count of the number of Subscriptions
 AdminSubscriptionSearchResult getSubscriptions(AdminSubscriptionSearch search, int offset, int size)
          This returns an AdminSubscriptionSearchResult object.
 int insertPaymentSchedule(AdminPaymentSchedule ps)
          An AdminPaymentSchedule object is inserted into the database.
 int insertSubscription(AdminSubscription subscription)
          An AdminSubscription object is inserted into the database.
protected  void setPaymentScheduleCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c, int customerId)
          Common code to avoid duplication
protected  void setSubscriptionCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
          Common code to avoid duplication
 int updatePaymentSchedule(AdminPaymentSchedule ps)
          Update an AdminPaymentSchedule object.
 int updateSubscription(AdminSubscription subscription)
          Update an AdminSubscription object.
protected  void validatePaymentSchedule(AdminPaymentSchedule ps)
          Common code used for inserting and for editing
protected  void validateSubscription(AdminSubscription subscription)
          Common code used for inserting and for editing
 
Methods inherited from class com.konakartadmin.bl.AdminBaseMgr
addInsertAttr, addInsertAttr, checkIntIsSet, checkRequired, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminHtmlMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminPublishProdMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getExportXMLData, getIntFromString, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getPostSearchText, getPreSearchText, getPropertyValue, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, manageException, refreshConfigs, removeCData, setAdminEng, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr
 
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

AdminBillingMgr

public AdminBillingMgr(KKAdminIf eng)
                throws java.lang.Exception
Constructor

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

deletePaymentSchedule

public int deletePaymentSchedule(int id)
                          throws KKAdminException,
                                 org.apache.torque.TorqueException
Delete a Payment Schedule Object

Specified by:
deletePaymentSchedule in interface AdminBillingMgrIf
Parameters:
id - The id of the payment schedule object to delete
Returns:
Returns the id of the deleted payment schedule object
Throws:
KKAdminException
org.apache.torque.TorqueException

deleteSubscription

public int deleteSubscription(int id)
                       throws KKAdminException,
                              org.apache.torque.TorqueException
Delete a Subscription Object

Specified by:
deleteSubscription in interface AdminBillingMgrIf
Parameters:
id - The id of the subscription object to delete
Returns:
Returns the id of the deleted subscription object
Throws:
KKAdminException
org.apache.torque.TorqueException

getPaymentSchedule

public AdminPaymentSchedule getPaymentSchedule(int id)
                                        throws KKAdminException,
                                               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 AdminBillingMgrIf
Parameters:
id - The id of the payment schedule object
Returns:
Returns a payment schedule object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getSubscription

public AdminSubscription getSubscription(int id)
                                  throws KKAdminException,
                                         org.apache.torque.TorqueException,
                                         com.workingdogs.village.DataSetException
Returns the subscription object for the id parameter, or Null if the subscription object doesn't exist in the DB.

Specified by:
getSubscription in interface AdminBillingMgrIf
Parameters:
id - The id of the subscription object
Returns:
Returns a subscription object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getPaymentScheduleCount

protected int getPaymentScheduleCount(AdminPaymentScheduleSearch search)
                               throws org.apache.torque.TorqueException,
                                      com.workingdogs.village.DataSetException,
                                      KKAdminException
Returns a count of the number of PaymentSchedules

Parameters:
search - Search criteria
Returns:
A count of the number of PaymentSchedule objects
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getSubscriptionCount

protected int getSubscriptionCount(AdminSubscriptionSearch search)
                            throws org.apache.torque.TorqueException,
                                   com.workingdogs.village.DataSetException,
                                   KKAdminException
Returns a count of the number of Subscriptions

Parameters:
search - Search criteria
Returns:
A count of the number of Subscription objects
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getPaymentSchedules

public AdminPaymentScheduleSearchResult getPaymentSchedules(AdminPaymentScheduleSearch search,
                                                            int offset,
                                                            int size)
                                                     throws org.apache.torque.TorqueException,
                                                            com.workingdogs.village.DataSetException,
                                                            KKAdminException
This returns an AdminPaymentScheduleSearchResult object.

Specified by:
getPaymentSchedules in interface AdminBillingMgrIf
Parameters:
search - The object containing the search constraints
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminPaymentScheduleSearchResult object
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException

getSubscriptions

public AdminSubscriptionSearchResult getSubscriptions(AdminSubscriptionSearch search,
                                                      int offset,
                                                      int size)
                                               throws org.apache.torque.TorqueException,
                                                      com.workingdogs.village.DataSetException,
                                                      KKAdminException
This returns an AdminSubscriptionSearchResult object.

Specified by:
getSubscriptions in interface AdminBillingMgrIf
Parameters:
search - The object containing the search constraints
offset - the offset in the db
size - the number of records from the specified offset
Returns:
Returns an AdminSubscriptionSearchResult object
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKAdminException

insertPaymentSchedule

public int insertPaymentSchedule(AdminPaymentSchedule ps)
                          throws KKAdminException,
                                 org.apache.torque.TorqueException
An AdminPaymentSchedule object is inserted into the database. The following payment schedule attributes are compulsory: The id of the new object is returned.

Specified by:
insertPaymentSchedule in interface AdminBillingMgrIf
Parameters:
ps -
Returns:
Returns the id of the PaymentSchedule object
Throws:
KKAdminException
org.apache.torque.TorqueException

insertSubscription

public int insertSubscription(AdminSubscription subscription)
                       throws KKAdminException,
                              org.apache.torque.TorqueException
An AdminSubscription 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 AdminBillingMgrIf
Parameters:
subscription -
Returns:
Returns the id of the Subscription object
Throws:
KKAdminException
org.apache.torque.TorqueException

updatePaymentSchedule

public int updatePaymentSchedule(AdminPaymentSchedule ps)
                          throws KKAdminException,
                                 org.apache.torque.TorqueException,
                                 com.workingdogs.village.DataSetException
Update an AdminPaymentSchedule object. If the value of an attribute is null, the current value is not updated.

Specified by:
updatePaymentSchedule in interface AdminBillingMgrIf
Parameters:
ps - An AdminPaymentSchedule object
Returns:
Returns the id of the updated AdminPaymentSchedule object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

updateSubscription

public int updateSubscription(AdminSubscription subscription)
                       throws KKAdminException,
                              org.apache.torque.TorqueException,
                              com.workingdogs.village.DataSetException
Update an AdminSubscription object. If the value of an attribute is null, the current value is not updated.

Specified by:
updateSubscription in interface AdminBillingMgrIf
Parameters:
subscription - An AdminSubscription object
Returns:
Returns the id of the updated AdminSubscription object
Throws:
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

validatePaymentSchedule

protected void validatePaymentSchedule(AdminPaymentSchedule ps)
                                throws KKAdminException
Common code used for inserting and for editing

Parameters:
ps -
Throws:
KKAdminException

validateSubscription

protected void validateSubscription(AdminSubscription subscription)
                             throws KKAdminException,
                                    org.apache.torque.TorqueException
Common code used for inserting and for editing

Parameters:
subscription -
Throws:
KKAdminException
org.apache.torque.TorqueException

setPaymentScheduleCriteriaWithStandardAttributes

protected void setPaymentScheduleCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c,
                                                                int customerId)
Common code to avoid duplication

Parameters:
c -
customerId -

setSubscriptionCriteriaWithStandardAttributes

protected void setSubscriptionCriteriaWithStandardAttributes(com.konakart.bl.KKCriteria c)
Common code to avoid duplication

Parameters:
c -

addPaymentScheduleSearchCriteria

protected int addPaymentScheduleSearchCriteria(com.konakart.bl.KKCriteria c,
                                               AdminPaymentScheduleSearch search)
Add search criteria for payment schedule objects

Parameters:
c -
search -
Returns:
Returns the number of constraints added

addSubscriptionSearchCriteria

protected void addSubscriptionSearchCriteria(com.konakart.bl.KKCriteria c,
                                             AdminSubscriptionSearch search)
Add search criteria for subscription objects

Parameters:
c -
search -

addPaymentScheduleOrderBy

protected void addPaymentScheduleOrderBy(com.konakart.bl.KKCriteria c,
                                         AdminPaymentScheduleSearch search)
Add order by constraints for payment schedules

Parameters:
c -
search -

addSubscriptionOrderBy

protected void addSubscriptionOrderBy(com.konakart.bl.KKCriteria c,
                                      AdminSubscriptionSearch search)
Add order by constraints for subscriptions

Parameters:
c -
search -


Copyright © 2011 DS Data Systems UK Ltd.