Class DefaultCommentService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.comments.services.impl.DefaultCommentService
- All Implemented Interfaces:
CommentService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
AbstractWarehousingCommentService,DefaultCommerceCommentService
Default comment service implementation.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
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.Deprecated, for removal: This API element is subject to removal in a future version.since agesgetComments(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) getCommentTypeForCode(ComponentModel comp, String commentTypeCode) Returns the comment type with the specified code.getComponentByCode(DomainModel domain, String componentCode) 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) getDomainForCode(String domainCode) Returns the domain with specified code.protected FlexibleSearchServiceDeprecated, for removal: This API element is subject to removal in a future version.since agesgetItemComments(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.voidsetCommentDao(CommentDao commentDao) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) Deprecated, for removal: This API element is subject to removal in a future version.since agesMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
DefaultCommentService
public DefaultCommentService()
-
-
Method Details
-
getComments
public List<CommentModel> getComments(UserModel user, Collection<ComponentModel> components, Collection<CommentTypeModel> types, int offset, int count) Description copied from interface:CommentServiceReturns all comments in the specified domain components which are of the specified types and whereuseris a participant.- Specified by:
getCommentsin interfaceCommentService- Parameters:
user- comment participantcomponents- domain componentstypes- comment typesoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getComments
public List<CommentModel> getComments(UserModel user, Collection<ComponentModel> components, int offset, int count) Description copied from interface:CommentServiceReturns all comments in the specified domain components whereuseris a participant.- Specified by:
getCommentsin interfaceCommentService- Parameters:
user- comment participantcomponents- domain componentsoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getComments
public List<CommentModel> getComments(UserModel user, DomainModel domain, Collection<CommentTypeModel> types, int offset, int count) Description copied from interface:CommentServiceReturns all comments in the specified domain which are of the specified types and whereuseris a participant.- Specified by:
getCommentsin interfaceCommentService- Parameters:
user- comment participantdomain- comment domaintypes- comment typesoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getComments
Description copied from interface:CommentServiceReturns all comments in the specified domain whereuseris a participant.- Specified by:
getCommentsin interfaceCommentService- Parameters:
user- comment participantdomain- comment domainoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getDirectReplies
Description copied from interface:CommentServiceReturns all direct comment replies for the specified comment.- Specified by:
getDirectRepliesin interfaceCommentService- Parameters:
comment- the commentoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getItemComments
public List<CommentModel> getItemComments(ItemModel item, UserModel user, Collection<ComponentModel> components, Collection<CommentTypeModel> types, int offset, int count) Description copied from interface:CommentServiceReturns all item comments for the specified item, which are in the specified domain components, of the specified types and whereuseris a participant.- Specified by:
getItemCommentsin interfaceCommentService- Parameters:
item- related itemuser- comment participantcomponents- domain componentstypes- comment typesoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getItemComments
public List<CommentModel> getItemComments(ItemModel item, UserModel user, Collection<ComponentModel> components, int offset, int count) Description copied from interface:CommentServiceReturns all item comments for the specified item, which are in the specified domain components and whereuseris a participant.- Specified by:
getItemCommentsin interfaceCommentService- Parameters:
item- related itemuser- comment participantcomponents- domain componentsoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getItemComments
public List<CommentModel> getItemComments(ItemModel item, UserModel user, DomainModel domain, Collection<CommentTypeModel> types, int offset, int count) Description copied from interface:CommentServiceReturns all item comments for the specified item, which are in the specified domain, of the specified types and whereuseris a participant.- Specified by:
getItemCommentsin interfaceCommentService- Parameters:
item- related itemuser- comment participantdomain- comment domaintypes- comment typesoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getItemComments
public List<CommentModel> getItemComments(ItemModel item, UserModel user, DomainModel domain, int offset, int count) Description copied from interface:CommentServiceReturns all item comments for the specified item, which are in the specified domain and whereuseris a participant.- Specified by:
getItemCommentsin interfaceCommentService- Parameters:
item- related itemuser- comment participantdomain- comment domainoffset- search offsetcount- max hit count- Returns:
- all found comments in the specified range
-
getComponentForCode
Description copied from interface:CommentServiceReturns the domain component with the specified code.- Specified by:
getComponentForCodein interfaceCommentService- Parameters:
domain- domaincomponentCode- domain component code- Returns:
- component in the specified domain with the specified code or
nullif component could not be found
-
getDomainForCode
Description copied from interface:CommentServiceReturns the domain with specified code.- Specified by:
getDomainForCodein interfaceCommentService- Parameters:
domainCode- domain code- Returns:
- domain with the specified code or
nullif no domain with the code could be found
-
getCommentTypeForCode
Description copied from interface:CommentServiceReturns the comment type with the specified code.- Specified by:
getCommentTypeForCodein interfaceCommentService- Parameters:
comp- domain componentcommentTypeCode- comment type code- Returns:
- comment type in the specified domain component with the specified code or
nullif type could not be found
-
setCommentDao
-
getCommentDao
Deprecated, for removal: This API element is subject to removal in a future version.since ages -
setFlexibleSearchService
@Deprecated(since="ages", forRemoval=true) public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService) Deprecated, for removal: This API element is subject to removal in a future version.since ages -
getFlexibleSearchService
@Deprecated(since="ages", forRemoval=true) protected FlexibleSearchService getFlexibleSearchService()Deprecated, for removal: This API element is subject to removal in a future version.since ages -
getUserSetting
Description copied from interface:CommentServiceReturns the CommentUserSettingModel attached to the comment for the given user. Creates a new one, if none is present.- Specified by:
getUserSettingin interfaceCommentService
-
createReply
Description copied from interface:CommentServiceCreates and returns a new comment reply.- Specified by:
createReplyin interfaceCommentService- Parameters:
author- reply authorcomment- comment to reply totext- reply content- Returns:
- created reply
-
getAvailableCommentTypes
Description copied from interface:CommentServiceReturns the available comment types for a given component.- Specified by:
getAvailableCommentTypesin interfaceCommentService
-
getCommentTypeByCode
- Specified by:
getCommentTypeByCodein interfaceCommentService
-
getComponentByCode
- Specified by:
getComponentByCodein interfaceCommentService
-
getDomainByCode
- Specified by:
getDomainByCodein interfaceCommentService
-