public class CommentServiceImpl extends java.lang.Object implements CommentService
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 |
---|
CommentServiceImpl(RequestFactory requestFactory,
ProjectEndpoints endpoints) |
Modifier and Type | Method and Description |
---|---|
QueryRequest<Comment> |
all()
Deprecated.
|
FetchRequest<Comment> |
byId(java.lang.String id)
Finds a comment by id.
|
protected CommandRequest<T> |
createCommandRequest(java.lang.String url,
Command command) |
CommandRequest<Comment> |
createComment(java.lang.String productId,
java.lang.String customerId,
java.lang.String authorName,
java.lang.String title,
java.lang.String text)
Creates a comment.
|
QueryRequest<Comment> |
forCustomer(java.lang.String customerId)
Queries all comments by given customer.
|
QueryRequest<Comment> |
forProduct(java.lang.String productId)
Queries all comments for a specific product.
|
QueryRequest<Comment> |
query()
Queries comments.
|
protected QueryRequest<T> |
queryImpl(java.lang.String url) |
CommandRequest<Comment> |
updateComment(VersionedId commentId,
CommentUpdate update)
Updates a comment.
|
protected ProjectEndpoints endpoints
protected RequestFactory requestFactory
protected org.codehaus.jackson.type.TypeReference<T> typeReference
protected org.codehaus.jackson.type.TypeReference<QueryResult<T>> queryResultTypeReference
public CommentServiceImpl(RequestFactory requestFactory, ProjectEndpoints endpoints)
public FetchRequest<Comment> byId(java.lang.String id)
CommentService
byId
in interface CommentService
@Deprecated public QueryRequest<Comment> all()
CommentService
all
in interface CommentService
public QueryRequest<Comment> query()
CommentService
query
in interface CommentService
public QueryRequest<Comment> forCustomer(java.lang.String customerId)
CommentService
forCustomer
in interface CommentService
public QueryRequest<Comment> forProduct(java.lang.String productId)
CommentService
forProduct
in interface CommentService
public CommandRequest<Comment> createComment(java.lang.String productId, java.lang.String customerId, java.lang.String authorName, java.lang.String title, java.lang.String text)
CommentService
createComment
in interface CommentService
public CommandRequest<Comment> updateComment(VersionedId commentId, CommentUpdate update)
CommentService
updateComment
in interface CommentService
protected CommandRequest<T> createCommandRequest(java.lang.String url, Command command)
protected QueryRequest<T> queryImpl(java.lang.String url)