Interface CommentService
- All Known Subinterfaces:
WarehousingCommentService
- All Known Implementing Classes:
AbstractWarehousingCommentService,DefaultAsnCommentService,DefaultCommentService,DefaultCommerceCommentService,DefaultConsignmentEntryCommentService,DefaultOrderEntryCommentService,DefaultStockLevelCommentService
public interface CommentService
Service for dealing with hybris comments.
- Spring Bean ID:
- commentService
-
Method Summary
Modifier and TypeMethodDescriptioncreateReply(UserModel author, AbstractCommentModel comment, String text) Creates and returns a new comment reply.getAvailableCommentTypes(ComponentModel component) Returns the available comment types for a given component.getComments(UserModel user, DomainModel domain, int offset, int count) Returns all comments in the specified domain whereuseris a participant.getComments(UserModel user, DomainModel domain, Collection<CommentTypeModel> types, int offset, int count) Returns all comments in the specified domain which are of the specified types and whereuseris a participant.getComments(UserModel user, Collection<ComponentModel> components, int offset, int count) Returns all comments in the specified domain components whereuseris a participant.getComments(UserModel user, Collection<ComponentModel> components, Collection<CommentTypeModel> types, int offset, int count) Returns all comments in the specified domain components which are of the specified types and whereuseris a participant.getCommentTypeByCode(ComponentModel component, String commentTypeCode) Deprecated, for removal: This API element is subject to removal in a future version.getCommentTypeForCode(ComponentModel component, String commentTypeCode) Returns the comment type with the specified code.getComponentByCode(DomainModel domain, String componentCode) Deprecated, for removal: This API element is subject to removal in a future version.since ages - UsegetComponentForCode(DomainModel, String)instead.getComponentForCode(DomainModel domain, String componentCode) Returns the domain component with the specified code.getDirectReplies(CommentModel comment, int offset, int count) Returns all direct comment replies for the specified comment.getDomainByCode(String domainCode) Deprecated, for removal: This API element is subject to removal in a future version.since ages - UsegetDomainForCode(String)instead.getDomainForCode(String domainCode) Returns the domain with specified code.getItemComments(ItemModel item, UserModel user, DomainModel domain, int offset, int count) Returns all item comments for the specified item, which are in the specified domain and whereuseris a participant.getItemComments(ItemModel item, UserModel user, DomainModel domain, Collection<CommentTypeModel> types, int offset, int count) Returns all item comments for the specified item, which are in the specified domain, of the specified types and whereuseris a participant.getItemComments(ItemModel item, UserModel user, Collection<ComponentModel> components, int offset, int count) Returns all item comments for the specified item, which are in the specified domain components and whereuseris a participant.getItemComments(ItemModel item, UserModel user, Collection<ComponentModel> components, Collection<CommentTypeModel> types, int offset, int count) Returns all item comments for the specified item, which are in the specified domain components, of the specified types and whereuseris a participant.getUserSetting(UserModel user, AbstractCommentModel commentItem) Returns the CommentUserSettingModel attached to the comment for the given user.
-
Method Details
-
getComments
Returns all comments in the specified domain whereuseris a participant.- Parameters:
user- comment participantdomain- comment domainoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getComments
List<CommentModel> getComments(UserModel user, Collection<ComponentModel> components, int offset, int count) Returns all comments in the specified domain components whereuseris a participant.- Parameters:
user- comment participantcomponents- domain componentsoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getComments
List<CommentModel> getComments(UserModel user, DomainModel domain, Collection<CommentTypeModel> types, int offset, int count) Returns all comments in the specified domain which are of the specified types and whereuseris a participant.- Parameters:
user- comment participantdomain- comment domaintypes- comment typesoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getComments
List<CommentModel> getComments(UserModel user, Collection<ComponentModel> components, Collection<CommentTypeModel> types, int offset, int count) Returns all comments in the specified domain components which are of the specified types and whereuseris a participant.- Parameters:
user- comment participantcomponents- domain componentstypes- comment typesoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getItemComments
List<CommentModel> getItemComments(ItemModel item, UserModel user, DomainModel domain, int offset, int count) Returns all item comments for the specified item, which are in the specified domain and whereuseris a participant.- Parameters:
item- related itemuser- comment participantdomain- comment domainoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getItemComments
List<CommentModel> getItemComments(ItemModel item, UserModel user, Collection<ComponentModel> components, int offset, int count) Returns all item comments for the specified item, which are in the specified domain components and whereuseris a participant.- Parameters:
item- related itemuser- comment participantcomponents- domain componentsoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getItemComments
List<CommentModel> getItemComments(ItemModel item, UserModel user, DomainModel domain, Collection<CommentTypeModel> types, int offset, int count) Returns all item comments for the specified item, which are in the specified domain, of the specified types and whereuseris a participant.- Parameters:
item- related itemuser- comment participantdomain- comment domaintypes- comment typesoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getItemComments
List<CommentModel> getItemComments(ItemModel item, UserModel user, Collection<ComponentModel> components, Collection<CommentTypeModel> types, int offset, int count) Returns all item comments for the specified item, which are in the specified domain components, of the specified types and whereuseris a participant.- Parameters:
item- related itemuser- comment participantcomponents- domain componentstypes- comment typesoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getDirectReplies
Returns all direct comment replies for the specified comment.- Parameters:
comment- the commentoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getDomainForCode
Returns the domain with specified code.- Parameters:
domainCode- domain code- Returns:
- domain with the specified code or
nullif no domain with the code could be found
-
getComponentForCode
Returns the domain component with the specified code.- Parameters:
domain- domaincomponentCode- domain component code- Returns:
- component in the specified domain with the specified code or
nullif component could not be found
-
getCommentTypeForCode
Returns the comment type with the specified code.- Parameters:
component- domain componentcommentTypeCode- comment type code- Returns:
- comment type in the specified domain component with the specified code or
nullif type could not be found
-
getDomainByCode
Deprecated, for removal: This API element is subject to removal in a future version.since ages - UsegetDomainForCode(String)instead. -
getComponentByCode
@Deprecated(since="ages", forRemoval=true) ComponentModel getComponentByCode(DomainModel domain, String componentCode) Deprecated, for removal: This API element is subject to removal in a future version.since ages - UsegetComponentForCode(DomainModel, String)instead. -
getCommentTypeByCode
@Deprecated(since="ages", forRemoval=true) CommentTypeModel getCommentTypeByCode(ComponentModel component, String commentTypeCode) Deprecated, for removal: This API element is subject to removal in a future version.since ages - UsegetCommentTypeForCode(ComponentModel, String)instead. -
getUserSetting
Returns the CommentUserSettingModel attached to the comment for the given user. Creates a new one, if none is present. -
createReply
Creates and returns a new comment reply.- Parameters:
author- reply authorcomment- comment to reply totext- reply content- Returns:
- created reply
-
getAvailableCommentTypes
Returns the available comment types for a given component.
-
getCommentTypeForCode(ComponentModel, String)instead.