@ParametersAreNonnullByDefault
public interface LikeEntityDao
LikeManager
.
This interface replaces the deprecated LikeDao
Modifier and Type | Method and Description |
---|---|
@NonNull LikeEntity |
addLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Add a like on the content entity for the given user.
|
@NonNull Map<com.atlassian.bonnie.Searchable,Integer> |
countLikes(Collection<? extends com.atlassian.bonnie.Searchable> searchables) |
int |
countLikes(com.atlassian.bonnie.Searchable contentEntity) |
@NonNull List<LikeEntity> |
getLikeEntities(Collection<? extends ContentEntityObject> contentEntities) |
boolean |
hasLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Returns true if the given user likes this content entity.
|
void |
removeAllLikesFor(String username)
Deprecated.
since 6.13. use
removeAllLikesFor(UserKey) instead |
void |
removeAllLikesFor(@NonNull com.atlassian.sal.api.user.UserKey key)
Remove all likes for the given userKey
|
void |
removeAllLikesOn(ContentEntityObject contentEntity)
Removes all likes (for any user) from the specified content entity.
|
void |
removeLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Remove like from content entity for the given user.
|
@NonNull LikeEntity addLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
contentEntity
- the content entity to add a like touser
- User liking the contentvoid removeLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
contentEntity
- content entity to remove like fromuser
- User removing their Likevoid removeAllLikesOn(ContentEntityObject contentEntity)
contentEntity
- content entity@Deprecated void removeAllLikesFor(String username)
removeAllLikesFor(UserKey)
insteadusername
- the name of the user to remove all likes forvoid removeAllLikesFor(@NonNull com.atlassian.sal.api.user.UserKey key)
key
- boolean hasLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
contentEntity
- the content entityuser
- the User the Like is being checked for@NonNull List<LikeEntity> getLikeEntities(Collection<? extends ContentEntityObject> contentEntities)
int countLikes(com.atlassian.bonnie.Searchable contentEntity)
@NonNull Map<com.atlassian.bonnie.Searchable,Integer> countLikes(Collection<? extends com.atlassian.bonnie.Searchable> searchables)
Copyright © 2003–2020 Atlassian. All rights reserved.