public class AdminReviewMgr extends AdminBaseMgr implements AdminReviewMgrIf
AdminBaseMgr.StaticData
Modifier and Type | Field and Description |
---|---|
static int |
PRODUCT_REVIEW
Product review
|
static int |
VENDOR_REVIEW
Vendor review
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminReviewMgr(KKAdminIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
deleteReview(int reviewId)
Delete the review referenced to by reviewId.
|
void |
deleteReview(int reviewId,
int revType)
Delete the review referenced to by reviewId.
|
void |
deleteReviewsPerCustomer(int customerId)
Delete all the reviews written by a customer.
|
protected void |
deleteReviewsPerCustomer(int customerId,
int revType)
Delete all the reviews written by a customer.
|
void |
deleteReviewsPerProduct(int productId,
java.sql.Connection connection)
Delete the reviews for the product identified by productId.
|
void |
deleteReviewsPerProducts(int[] productIds,
java.sql.Connection connection)
Delete the reviews for the products identified by the productIds array.
|
void |
deleteReviewsPerVendor(int vendorId,
java.sql.Connection connection)
Delete the reviews for the vendor identified by the vendorId.
|
void |
deleteVendorReview(int reviewId)
Delete the review referenced to by reviewId.
|
void |
deleteVendorReviewsPerCustomer(int customerId)
Delete all the vendor reviews written by a customer.
|
void |
editReview(AdminReview review)
Edit a review
|
AdminReviews |
getAllReviews(AdminDataDescriptor dataDesc)
Calls the getReviewsPerProduct method with a negative productId value so that it is not
included in the Where clause of the query
|
protected int |
getCount(com.konakart.db.KKCriteria c)
This method is mainly used for paging.
|
protected com.konakart.db.KKCriteria |
getCriteria(int revType)
Returns a KKCriteria object based on the review type
|
protected AdminReview |
getLightReview(int reviewId,
int revType)
Returns a review just populated with the product and vendor IDs.
|
AdminReview |
getReview(int reviewId)
Returns a review for the given reviewId
|
AdminReview |
getReview(int reviewId,
int revType)
Returns a review for the given reviewId
|
AdminReviews |
getReviews(AdminDataDescriptor dataDesc,
AdminReviewSearch revSearch)
Returns an array of reviews for the given search criteria.
|
protected AdminReviews |
getReviews(AdminDataDescriptor dataDesc,
AdminReviewSearch revSearch,
int revType)
Returns an array of reviews for the given search criteria.
|
AdminReviews |
getReviewsPerProduct(AdminDataDescriptor dataDesc,
int productId)
Returns an array of reviews for the given productId
|
AdminReviews |
getReviewsPerVendor(AdminDataDescriptor dataDesc,
int vendorId)
Returns an array of reviews for the given vendorId
|
AdminReview |
getVendorReview(int reviewId)
Returns a vendor review for the given reviewId
|
AdminReviews |
getVendorReviews(AdminDataDescriptor dataDesc,
AdminReviewSearch revSearch)
Returns an array of reviews for the given search criteria.
|
int |
insertReview(AdminReview review)
A new review is inserted
|
protected void |
manageDataDescriptor(AdminDataDescriptor dataDesc,
com.konakart.db.KKCriteria c)
Provides common code to deal with the management of the DataDescriptor
|
protected void |
setCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c,
int revType)
Initialize criteria with review attributes
|
protected void |
validateReview(AdminReview review)
Validate the review
|
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 static final int PRODUCT_REVIEW
public static final int VENDOR_REVIEW
public AdminReviewMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic AdminReviews getAllReviews(AdminDataDescriptor dataDesc) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getAllReviews
in interface AdminReviewMgrIf
dataDesc
- the dataDescorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminReviews getReviewsPerProduct(AdminDataDescriptor dataDesc, int productId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getReviewsPerProduct
in interface AdminReviewMgrIf
dataDesc
- the dataDescproductId
- the productIdorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminReviews getReviews(AdminDataDescriptor dataDesc, AdminReviewSearch revSearch) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getReviews
in interface AdminReviewMgrIf
dataDesc
- the dataDescrevSearch
- the revSearchorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected AdminReviews getReviews(AdminDataDescriptor dataDesc, AdminReviewSearch revSearch, int revType) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
dataDesc
- the dataDescrevSearch
- the revSearchrevType
- the revTypeorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminReview getReview(int reviewId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getReview
in interface AdminReviewMgrIf
reviewId
- the reviewIdorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminReview getReview(int reviewId, int revType) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
reviewId
- the reviewIdrevType
- the revTypeorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected AdminReview getLightReview(int reviewId, int revType) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
reviewId
- the reviewIdrevType
- the revTypeorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void deleteReview(int reviewId) throws java.lang.Exception
deleteReview
in interface AdminReviewMgrIf
reviewId
- the reviewIdjava.lang.Exception
- an unexpected exceptionpublic void deleteReview(int reviewId, int revType) throws java.lang.Exception
reviewId
- the reviewIdrevType
- the revTypejava.lang.Exception
- an unexpected exceptionpublic void deleteReviewsPerCustomer(int customerId) throws java.lang.Exception
deleteReviewsPerCustomer
in interface AdminReviewMgrIf
customerId
- the id of the customer that wrote the reviewsjava.lang.Exception
- an unexpected exceptionpublic void deleteVendorReviewsPerCustomer(int customerId) throws java.lang.Exception
deleteVendorReviewsPerCustomer
in interface AdminReviewMgrIf
customerId
- the id of the customer that wrote the reviewsjava.lang.Exception
- an unexpected exceptionprotected void deleteReviewsPerCustomer(int customerId, int revType) throws java.lang.Exception
customerId
- the id of the customer that wrote the reviewsrevType
- the revTypejava.lang.Exception
- an unexpected exceptionpublic void deleteReviewsPerProduct(int productId, java.sql.Connection connection) throws java.lang.Exception
deleteReviewsPerProduct
in interface AdminReviewMgrIf
productId
- the productIdconnection
- the connectionjava.lang.Exception
- an unexpected exceptionpublic void deleteReviewsPerProducts(int[] productIds, java.sql.Connection connection) throws java.lang.Exception
deleteReviewsPerProducts
in interface AdminReviewMgrIf
productIds
- the productIdsconnection
- the connectionjava.lang.Exception
- an unexpected exceptionpublic void editReview(AdminReview review) throws java.lang.Exception
editReview
in interface AdminReviewMgrIf
review
- the reviewjava.lang.Exception
- an unexpected exceptionpublic int insertReview(AdminReview review) throws java.lang.Exception
insertReview
in interface AdminReviewMgrIf
review
- the reviewjava.lang.Exception
- an unexpected exceptionprotected void manageDataDescriptor(AdminDataDescriptor dataDesc, com.konakart.db.KKCriteria c)
dataDesc
- the dataDescc
- the cprotected void validateReview(AdminReview review) throws java.lang.Exception
review
- the reviewjava.lang.Exception
- an unexpected exceptionprotected int getCount(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 setCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c, int revType) throws KKAdminException
c
- the crevType
- the revTypeKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected com.konakart.db.KKCriteria getCriteria(int revType) throws KKAdminException
revType
- the revTypeKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminReview getVendorReview(int reviewId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getVendorReview
in interface AdminReviewMgrIf
reviewId
- the reviewIdorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminReviews getReviewsPerVendor(AdminDataDescriptor dataDesc, int vendorId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getReviewsPerVendor
in interface AdminReviewMgrIf
dataDesc
- the dataDescvendorId
- the vendorIdorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminReviews getVendorReviews(AdminDataDescriptor dataDesc, AdminReviewSearch revSearch) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getVendorReviews
in interface AdminReviewMgrIf
dataDesc
- the dataDescrevSearch
- the revSearchorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void deleteVendorReview(int reviewId) throws java.lang.Exception
deleteVendorReview
in interface AdminReviewMgrIf
reviewId
- the reviewIdjava.lang.Exception
- an unexpected exceptionpublic void deleteReviewsPerVendor(int vendorId, java.sql.Connection connection) throws java.lang.Exception
deleteReviewsPerVendor
in interface AdminReviewMgrIf
vendorId
- the vendorIdconnection
- the connectionjava.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.