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 Details

    • getComments

      List<CommentModel> getComments(UserModel user, DomainModel domain, int offset, int count)
      Returns all comments in the specified domain where user is a participant.
      Parameters:
      user - comment participant
      domain - comment domain
      offset - search offset
      count - 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 where user is a participant.
      Parameters:
      user - comment participant
      components - domain components
      offset - search offset
      count - 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 where user is a participant.
      Parameters:
      user - comment participant
      domain - comment domain
      types - comment types
      offset - search offset
      count - 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 where user is a participant.
      Parameters:
      user - comment participant
      components - domain components
      types - comment types
      offset - search offset
      count - 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 where user is a participant.
      Parameters:
      item - related item
      user - comment participant
      domain - comment domain
      offset - search offset
      count - 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 where user is a participant.
      Parameters:
      item - related item
      user - comment participant
      components - domain components
      offset - search offset
      count - 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 where user is a participant.
      Parameters:
      item - related item
      user - comment participant
      domain - comment domain
      types - comment types
      offset - search offset
      count - 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 where user is a participant.
      Parameters:
      item - related item
      user - comment participant
      components - domain components
      types - comment types
      offset - search offset
      count - max hit count
      Returns:
      all found comments in the specified range
    • getDirectReplies

      List<ReplyModel> getDirectReplies(CommentModel comment, int offset, int count)
      Returns all direct comment replies for the specified comment.
      Parameters:
      comment - the comment
      offset - search offset
      count - max hit count
      Returns:
      all found comments in the specified range
    • getDomainForCode

      DomainModel getDomainForCode(String domainCode)
      Returns the domain with specified code.
      Parameters:
      domainCode - domain code
      Returns:
      domain with the specified code or null if no domain with the code could be found
    • getComponentForCode

      ComponentModel getComponentForCode(DomainModel domain, String componentCode)
      Returns the domain component with the specified code.
      Parameters:
      domain - domain
      componentCode - domain component code
      Returns:
      component in the specified domain with the specified code or null if component could not be found
    • getCommentTypeForCode

      CommentTypeModel getCommentTypeForCode(ComponentModel component, String commentTypeCode)
      Returns the comment type with the specified code.
      Parameters:
      component - domain component
      commentTypeCode - comment type code
      Returns:
      comment type in the specified domain component with the specified code or null if type could not be found
    • getDomainByCode

      @Deprecated(since="ages", forRemoval=true) DomainModel getDomainByCode(String domainCode)
      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.
    • 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.
    • 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, String text)
      Creates and returns a new comment reply.
      Parameters:
      author - reply author
      comment - comment to reply to
      text - reply content
      Returns:
      created reply
    • getAvailableCommentTypes

      Collection<CommentTypeModel> getAvailableCommentTypes(ComponentModel component)
      Returns the available comment types for a given component.