public class AdminRewardPointMgr extends AdminBaseMgr implements AdminRewardPointMgrIf
AdminBaseMgr.StaticData
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
the log
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminRewardPointMgr(KKAdminIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addPoints(int customerId,
int points,
java.lang.String code,
java.lang.String description)
Adds a number of reward points to the total for customer identified by the
sessionId parameter. |
protected void |
addRewardPointConstraints(com.konakart.db.KKCriteria c,
AdminRewardPointSearch search)
Used to add constraints to the query
|
protected void |
addRewardPointOrderBy(com.konakart.db.KKCriteria c,
AdminRewardPointSearch search)
Used to add sort order to the query
|
int |
deletePoints(int customerId,
int points,
java.lang.String code,
java.lang.String description)
Deletes a number of reward points from the total for the customer identified by the
sessionId parameter. |
void |
deleteReservedPoints(int customerId,
int reservationId,
java.lang.String code,
java.lang.String description)
Verifies that the
reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. |
int |
freeReservedPoints(int customerId,
int reservationId)
Verifies that the
reservationId parameter exists and that it belongs to the
customer identified by the sessionId parameter. |
protected int |
getReservationId()
Get a unique reservation id from the counter table
|
protected int |
getRewardPointCount(com.konakart.db.KKCriteria c)
This method is mainly used for paging.
|
AdminRewardPointSearchResult |
getRewardPoints(AdminRewardPointSearch search,
int offset,
int size)
Used to search for reward points belonging to a customer.
|
int |
pointsAvailable(int customerId)
Calculates the number of reward points available for the customer identified by the
sessionId parameter. |
int |
reservePoints(int customerId,
int points)
Removes a number of reward points from the total for the customer identified by the
sessionId parameter. |
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, refreshConfigs, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
public AdminRewardPointMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic int pointsAvailable(int customerId) throws java.lang.Exception
sessionId
parameter.pointsAvailable
in interface AdminRewardPointMgrIf
customerId
- the customerIdjava.lang.Exception
- an unexpected exceptionpublic int addPoints(int customerId, int points, java.lang.String code, java.lang.String description) throws java.lang.Exception
sessionId
parameter.addPoints
in interface AdminRewardPointMgrIf
customerId
- the customerIdpoints
- the pointscode
- An optional code to categorize the reason for awarding the pointsdescription
- An optional description describing why the points were awardedjava.lang.Exception
- an unexpected exceptionpublic int deletePoints(int customerId, int points, java.lang.String code, java.lang.String description) throws java.lang.Exception
sessionId
parameter.deletePoints
in interface AdminRewardPointMgrIf
customerId
- the customerIdpoints
- the pointscode
- An optional code to categorize the reason for redeeming the pointsdescription
- An optional description describing how the points were redeemedjava.lang.Exception
- an unexpected exceptionpublic int reservePoints(int customerId, int points) throws java.lang.Exception
sessionId
parameter. The removed points are not deleted but reserved, so that
they are no longer available for spending but may be deleted once the order has been paid for
or shipped. If the order is never fulfilled, then the reserved points may be freed and
returned to the available total.reservePoints
in interface AdminRewardPointMgrIf
customerId
- the customerIdpoints
- the pointsjava.lang.Exception
- an unexpected exceptionpublic void deleteReservedPoints(int customerId, int reservationId, java.lang.String code, java.lang.String description) throws java.lang.Exception
reservationId
parameter exists and that it belongs to the
customer identified by the sessionId
parameter. The reserved points are normally
deleted once the order has been paid for or shipped. If the order is never fulfilled, then
the reserved points may be freed and returned to the available total. Once deleted. the
points can no longer be returned to the total.deleteReservedPoints
in interface AdminRewardPointMgrIf
customerId
- the customerIdreservationId
- the reservationIdcode
- An optional code to categorize the reason for redeeming the pointsdescription
- An optional description describing how the points were redeemedjava.lang.Exception
- an unexpected exceptionpublic int freeReservedPoints(int customerId, int reservationId) throws java.lang.Exception
reservationId
parameter exists and that it belongs to the
customer identified by the sessionId
parameter. The reserved points may be freed
and returned to the available total using this API call. The method checks to see whether
some or all of the points have expired while they were in the reserved state.freeReservedPoints
in interface AdminRewardPointMgrIf
customerId
- the customerIdreservationId
- the reservationIdjava.lang.Exception
- an unexpected exceptionprotected int getReservationId() throws java.lang.Exception
org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionjava.lang.Exception
public AdminRewardPointSearchResult getRewardPoints(AdminRewardPointSearch search, int offset, int size) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getRewardPoints
in interface AdminRewardPointMgrIf
search
- the searchoffset
- the offsetsize
- the sizeKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected int getRewardPointCount(com.konakart.db.KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c
- the corg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected void addRewardPointOrderBy(com.konakart.db.KKCriteria c, AdminRewardPointSearch search)
c
- the csearch
- the searchprotected void addRewardPointConstraints(com.konakart.db.KKCriteria c, AdminRewardPointSearch search)
c
- the csearch
- the searchCopyright © 2018 DS Data Systems UK Ltd.