public class DefaultCommentService extends AbstractBusinessService implements CommentService
AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCommentService() |
| Modifier and Type | Method and Description |
|---|---|
ReplyModel |
createReply(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.
|
CommentDao |
getCommentDao()
Deprecated.
since ages
|
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 where
user is 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 where
user is 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 where
user is a
participant. |
java.util.List<CommentModel> |
getComments(UserModel user,
DomainModel domain,
int offset,
int count)
Returns all comments in the specified domain where
user is a participant. |
CommentTypeModel |
getCommentTypeByCode(ComponentModel component,
java.lang.String commentTypeCode) |
CommentTypeModel |
getCommentTypeForCode(ComponentModel comp,
java.lang.String commentTypeCode)
Returns the comment type with the specified code.
|
ComponentModel |
getComponentByCode(DomainModel domain,
java.lang.String componentCode) |
ComponentModel |
getComponentForCode(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.
|
DomainModel |
getDomainByCode(java.lang.String domainCode) |
DomainModel |
getDomainForCode(java.lang.String domainCode)
Returns the domain with specified code.
|
protected FlexibleSearchService |
getFlexibleSearchService()
Deprecated.
since ages
|
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 where
user is 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 where
user is 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
where
user is a participant. |
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 where
user is
a participant. |
CommentUserSettingModel |
getUserSetting(UserModel user,
AbstractCommentModel commentItem)
Returns the CommentUserSettingModel attached to the comment for the given user.
|
void |
setCommentDao(CommentDao commentDao) |
void |
setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
Deprecated.
since ages
|
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplacepublic java.util.List<CommentModel> getComments(UserModel user, java.util.Collection<ComponentModel> components, java.util.Collection<CommentTypeModel> types, int offset, int count)
CommentServiceuser is a participant.getComments in interface CommentServiceuser - comment participantcomponents - domain componentstypes - comment typesoffset - search offsetcount - max hit countpublic java.util.List<CommentModel> getComments(UserModel user, java.util.Collection<ComponentModel> components, int offset, int count)
CommentServiceuser is a participant.getComments in interface CommentServiceuser - comment participantcomponents - domain componentsoffset - search offsetcount - max hit countpublic java.util.List<CommentModel> getComments(UserModel user, DomainModel domain, java.util.Collection<CommentTypeModel> types, int offset, int count)
CommentServiceuser is a
participant.getComments in interface CommentServiceuser - comment participantdomain - comment domaintypes - comment typesoffset - search offsetcount - max hit countpublic java.util.List<CommentModel> getComments(UserModel user, DomainModel domain, int offset, int count)
CommentServiceuser is a participant.getComments in interface CommentServiceuser - comment participantdomain - comment domainoffset - search offsetcount - max hit countpublic java.util.List<ReplyModel> getDirectReplies(CommentModel comment, int offset, int count)
CommentServicegetDirectReplies in interface CommentServicecomment - the commentoffset - search offsetcount - max hit countpublic java.util.List<CommentModel> getItemComments(ItemModel item, UserModel user, java.util.Collection<ComponentModel> components, java.util.Collection<CommentTypeModel> types, int offset, int count)
CommentServiceuser is a participant.getItemComments in interface CommentServiceitem - related itemuser - comment participantcomponents - domain componentstypes - comment typesoffset - search offsetcount - max hit countpublic java.util.List<CommentModel> getItemComments(ItemModel item, UserModel user, java.util.Collection<ComponentModel> components, int offset, int count)
CommentServiceuser is a participant.getItemComments in interface CommentServiceitem - related itemuser - comment participantcomponents - domain componentsoffset - search offsetcount - max hit countpublic java.util.List<CommentModel> getItemComments(ItemModel item, UserModel user, DomainModel domain, java.util.Collection<CommentTypeModel> types, int offset, int count)
CommentServiceuser is a participant.getItemComments in interface CommentServiceitem - related itemuser - comment participantdomain - comment domaintypes - comment typesoffset - search offsetcount - max hit countpublic java.util.List<CommentModel> getItemComments(ItemModel item, UserModel user, DomainModel domain, int offset, int count)
CommentServiceuser is
a participant.getItemComments in interface CommentServiceitem - related itemuser - comment participantdomain - comment domainoffset - search offsetcount - max hit countpublic ComponentModel getComponentForCode(DomainModel domain, java.lang.String componentCode)
CommentServicegetComponentForCode in interface CommentServicedomain - domaincomponentCode - domain component codenull if component could not be
foundpublic DomainModel getDomainForCode(java.lang.String domainCode)
CommentServicegetDomainForCode in interface CommentServicedomainCode - domain codenull if no domain with the code could be foundpublic CommentTypeModel getCommentTypeForCode(ComponentModel comp, java.lang.String commentTypeCode)
CommentServicegetCommentTypeForCode in interface CommentServicecomp - domain componentcommentTypeCode - comment type codenull if type could
not be foundpublic void setCommentDao(CommentDao commentDao)
@Deprecated public CommentDao getCommentDao()
@Deprecated public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
@Deprecated protected FlexibleSearchService getFlexibleSearchService()
public CommentUserSettingModel getUserSetting(UserModel user, AbstractCommentModel commentItem)
CommentServicegetUserSetting in interface CommentServicepublic ReplyModel createReply(UserModel author, AbstractCommentModel comment, java.lang.String text)
CommentServicecreateReply in interface CommentServiceauthor - reply authorcomment - comment to reply totext - reply contentpublic java.util.Collection<CommentTypeModel> getAvailableCommentTypes(ComponentModel component)
CommentServicegetAvailableCommentTypes in interface CommentServicepublic CommentTypeModel getCommentTypeByCode(ComponentModel component, java.lang.String commentTypeCode)
getCommentTypeByCode in interface CommentServicepublic ComponentModel getComponentByCode(DomainModel domain, java.lang.String componentCode)
getComponentByCode in interface CommentServicepublic DomainModel getDomainByCode(java.lang.String domainCode)
getDomainByCode in interface CommentServiceCopyright © 2018 SAP SE. All Rights Reserved.