public class CustomerReviewManager extends GeneratedCustomerReviewManager
Extension.RestrictedLanguagesProvider, Extension.RightsProviderManager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreatorDEFAULT_INITIAL_ATTRIBUTES, REVIEWTOPRODUCTRELPRODUCTREVIEWSHANDLER, REVIEWTOUSERRELCUSTOMERREVIEWSHANDLER| Constructor and Description |
|---|
CustomerReviewManager() |
| Modifier and Type | Method and Description |
|---|---|
CustomerReview |
createCustomerReview(Double rating,
String headline,
String comment,
User user,
Product product)
Creates a new CustomerReview item
|
void |
createEssentialData(Map params,
JspContext jspc)
Creates the essential data for CustomerReview.
|
List<CustomerReview> |
getAllReviews(Product item)
Get a list of all reviews for the given product using the current session context
|
List<CustomerReview> |
getAllReviews(SessionContext ctx,
Product item)
Get a list of all reviews for the given product
|
Double |
getAverageRating(SessionContext ctx,
Product item)
Calculates the average rating for a product
|
static CustomerReviewManager |
getInstance()
Gets the valid instance of this manager.
|
Integer |
getNumberOfReviews(SessionContext ctx,
Product item)
Get the number of reviews for the given product
|
addToCustomerReviews, addToCustomerReviews, addToProductReviews, addToProductReviews, createCustomerReview, createCustomerReview, getAverageRating, getAverageRatingAsPrimitive, getAverageRatingAsPrimitive, getCustomerReviews, getCustomerReviews, getDefaultAttributeModes, getName, getNumberOfReviews, getNumberOfReviewsAsPrimitive, getNumberOfReviewsAsPrimitive, getProductReviews, getProductReviews, removeFromCustomerReviews, removeFromCustomerReviews, removeFromProductReviews, removeFromProductReviews, setCustomerReviews, setCustomerReviews, setProductReviews, setProductReviewscheckBeforeItemRemoval, createProjectData, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, isCreatorDisabled, notifyInitializationEnd, notifyInitializationStart, notifyItemRemoval, onFirstSessionCreation, writeReplaceafterItemCreation, beforeItemCreation, destroy, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, unwrap, unwrap, wrappublic static CustomerReviewManager getInstance()
public void createEssentialData(Map params, JspContext jspc)
createEssentialData in class Extensionparams - Ignoredjspc - Ignoredpublic CustomerReview createCustomerReview(Double rating, String headline, String comment, User user, Product product)
rating - The rating for this reviewheadline - The optional headline for this reviewcomment - The optional comment for this reviewuser - The user, who created the reviewproduct - The product for which the review is givenpublic Double getAverageRating(SessionContext ctx, Product item)
getAverageRating in class GeneratedCustomerReviewManagerctx - The contextitem - The Product for which the average rating shall be calculatedpublic Integer getNumberOfReviews(SessionContext ctx, Product item)
getNumberOfReviews in class GeneratedCustomerReviewManagerctx - The contextitem - The Product for which the number of review shall be retrievedpublic List<CustomerReview> getAllReviews(Product item)
item - The Product for which the list of review shall be retrievedpublic List<CustomerReview> getAllReviews(SessionContext ctx, Product item)
ctx - The contextitem - The Product for which the list of review shall be retrievedCopyright © 2017 SAP SE. All Rights Reserved.