public class ReviewServiceImpl extends java.lang.Object implements ReviewService
| Modifier and Type | Field and Description |
|---|---|
protected ProjectEndpoints |
endpoints |
protected org.codehaus.jackson.type.TypeReference<QueryResult<T>> |
queryResultTypeReference |
protected RequestFactory |
requestFactory |
protected org.codehaus.jackson.type.TypeReference<T> |
typeReference |
| Constructor and Description |
|---|
ReviewServiceImpl(RequestFactory requestFactory,
ProjectEndpoints endpoints) |
| Modifier and Type | Method and Description |
|---|---|
QueryRequest<Review> |
all()
Deprecated.
|
FetchRequest<Review> |
byId(java.lang.String id)
Finds a review by id.
|
protected CommandRequest<T> |
createCommandRequest(java.lang.String url,
Command command) |
CommandRequest<Review> |
createReview(java.lang.String productId,
java.lang.String customerId,
java.lang.String authorName,
java.lang.String title,
java.lang.String text,
java.lang.Double score)
Creates a review.
|
QueryRequest<Review> |
forCustomer(java.lang.String customerId)
Queries all reviews by given customer.
|
QueryRequest<Review> |
forCustomerAndProduct(java.lang.String customerId,
java.lang.String productId)
Queries all reviews for a specific product by given customer.
|
QueryRequest<Review> |
forProduct(java.lang.String productId)
Queries all reviews for a specific product.
|
QueryRequest<Review> |
query()
Queries reviews in current project.
|
protected QueryRequest<T> |
queryImpl(java.lang.String url) |
CommandRequest<Review> |
updateReview(VersionedId reviewId,
ReviewUpdate update)
Updates a review.
|
protected ProjectEndpoints endpoints
protected RequestFactory requestFactory
protected org.codehaus.jackson.type.TypeReference<T> typeReference
protected org.codehaus.jackson.type.TypeReference<QueryResult<T>> queryResultTypeReference
public ReviewServiceImpl(RequestFactory requestFactory, ProjectEndpoints endpoints)
public FetchRequest<Review> byId(java.lang.String id)
ReviewServicebyId in interface ReviewService@Deprecated public QueryRequest<Review> all()
ReviewServiceall in interface ReviewServicepublic QueryRequest<Review> query()
ReviewServicequery in interface ReviewServicepublic QueryRequest<Review> forCustomer(java.lang.String customerId)
ReviewServiceforCustomer in interface ReviewServicepublic QueryRequest<Review> forCustomerAndProduct(java.lang.String customerId, java.lang.String productId)
ReviewServiceforCustomerAndProduct in interface ReviewServicepublic QueryRequest<Review> forProduct(java.lang.String productId)
ReviewServiceforProduct in interface ReviewServicepublic CommandRequest<Review> createReview(java.lang.String productId, java.lang.String customerId, java.lang.String authorName, java.lang.String title, java.lang.String text, java.lang.Double score)
ReviewServicecreateReview in interface ReviewServicepublic CommandRequest<Review> updateReview(VersionedId reviewId, ReviewUpdate update)
ReviewServiceupdateReview in interface ReviewServiceprotected CommandRequest<T> createCommandRequest(java.lang.String url, Command command)
protected QueryRequest<T> queryImpl(java.lang.String url)