Interface CommentService
-
- All Known Subinterfaces:
WarehousingCommentService
- All Known Implementing Classes:
AbstractWarehousingCommentService,DefaultAsnCommentService,DefaultCommentService,DefaultCommerceCommentService,DefaultConsignmentEntryCommentService,DefaultOrderEntryCommentService,DefaultStockLevelCommentService
public interface CommentServiceService for dealing with hybris comments.- Spring Bean ID:
- commentService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ReplyModelcreateReply(UserModel author, AbstractCommentModel comment, java.lang.String text)Creates and returns a new comment reply.java.util.Collection<CommentTypeModel>getAvailableCommentTypes(ComponentModel component)Returns the available comment types for a given component.java.util.List<CommentModel>getComments(UserModel user, DomainModel domain, int offset, int count)Returns all comments in the specified domain whereuseris a participant.java.util.List<CommentModel>getComments(UserModel user, DomainModel domain, java.util.Collection<CommentTypeModel> types, int offset, int count)Returns all comments in the specified domain which are of the specified types and whereuseris a participant.java.util.List<CommentModel>getComments(UserModel user, java.util.Collection<ComponentModel> components, int offset, int count)Returns all comments in the specified domain components whereuseris a participant.java.util.List<CommentModel>getComments(UserModel user, java.util.Collection<ComponentModel> components, java.util.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.CommentTypeModelgetCommentTypeByCode(ComponentModel component, java.lang.String commentTypeCode)Deprecated.since ages - UsegetCommentTypeForCode(ComponentModel, String)instead.CommentTypeModelgetCommentTypeForCode(ComponentModel component, java.lang.String commentTypeCode)Returns the comment type with the specified code.ComponentModelgetComponentByCode(DomainModel domain, java.lang.String componentCode)Deprecated.since ages - UsegetComponentForCode(DomainModel, String)instead.ComponentModelgetComponentForCode(DomainModel domain, java.lang.String componentCode)Returns the domain component with the specified code.java.util.List<ReplyModel>getDirectReplies(CommentModel comment, int offset, int count)Returns all direct comment replies for the specified comment.DomainModelgetDomainByCode(java.lang.String domainCode)Deprecated.since ages - UsegetDomainForCode(String)instead.DomainModelgetDomainForCode(java.lang.String domainCode)Returns the domain with specified code.java.util.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.java.util.List<CommentModel>getItemComments(ItemModel item, UserModel user, DomainModel domain, java.util.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.java.util.List<CommentModel>getItemComments(ItemModel item, UserModel user, java.util.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.java.util.List<CommentModel>getItemComments(ItemModel item, UserModel user, java.util.Collection<ComponentModel> components, java.util.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.CommentUserSettingModelgetUserSetting(UserModel user, AbstractCommentModel commentItem)Returns the CommentUserSettingModel attached to the comment for the given user.
-
-
-
Method Detail
-
getComments
java.util.List<CommentModel> getComments(UserModel user, DomainModel domain, int offset, int count)
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
java.util.List<CommentModel> getComments(UserModel user, java.util.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
java.util.List<CommentModel> getComments(UserModel user, DomainModel domain, java.util.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
java.util.List<CommentModel> getComments(UserModel user, java.util.Collection<ComponentModel> components, java.util.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
java.util.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
java.util.List<CommentModel> getItemComments(ItemModel item, UserModel user, java.util.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
java.util.List<CommentModel> getItemComments(ItemModel item, UserModel user, DomainModel domain, java.util.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
java.util.List<CommentModel> getItemComments(ItemModel item, UserModel user, java.util.Collection<ComponentModel> components, java.util.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
java.util.List<ReplyModel> getDirectReplies(CommentModel comment, int offset, int count)
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
DomainModel getDomainForCode(java.lang.String domainCode)
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
ComponentModel getComponentForCode(DomainModel domain, java.lang.String componentCode)
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
CommentTypeModel getCommentTypeForCode(ComponentModel component, java.lang.String commentTypeCode)
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 DomainModel getDomainByCode(java.lang.String domainCode)
Deprecated.since ages - UsegetDomainForCode(String)instead.
-
getComponentByCode
@Deprecated ComponentModel getComponentByCode(DomainModel domain, java.lang.String componentCode)
Deprecated.since ages - UsegetComponentForCode(DomainModel, String)instead.
-
getCommentTypeByCode
@Deprecated CommentTypeModel getCommentTypeByCode(ComponentModel component, java.lang.String commentTypeCode)
Deprecated.since ages - UsegetCommentTypeForCode(ComponentModel, String)instead.
-
getUserSetting
CommentUserSettingModel getUserSetting(UserModel user, AbstractCommentModel commentItem)
Returns the CommentUserSettingModel attached to the comment for the given user. Creates a new one, if none is present.
-
createReply
ReplyModel createReply(UserModel author, AbstractCommentModel comment, java.lang.String text)
Creates and returns a new comment reply.- Parameters:
author- reply authorcomment- comment to reply totext- reply content- Returns:
- created reply
-
getAvailableCommentTypes
java.util.Collection<CommentTypeModel> getAvailableCommentTypes(ComponentModel component)
Returns the available comment types for a given component.
-
-