|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.like.DefaultLikeManager
public class DefaultLikeManager
Constructor Summary | |
---|---|
DefaultLikeManager(org.springframework.transaction.PlatformTransactionManager transactionManager,
LikeEntityDao dao,
com.atlassian.event.api.EventPublisher publisher,
PermissionManager permissionManager)
|
Method Summary | |
---|---|
Like |
addLike(ContentEntityObject contentEntity)
|
Like |
addLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Add a like for the provided user. |
java.util.Map<com.atlassian.bonnie.Searchable,java.lang.Integer> |
countLikes(java.util.Collection<? extends com.atlassian.bonnie.Searchable> searchables)
Count the number of likes for the given objects |
int |
countLikes(com.atlassian.bonnie.Searchable searchable)
Count the number of likes for the given object |
java.util.Map<java.lang.Long,java.util.List<Like>> |
getLikes(java.util.Collection<? extends ContentEntityObject> contentEntities)
Gets all the likes for the specified content entities (likes are ordered such that recent likes come first). |
java.util.List<Like> |
getLikes(ContentEntityObject contentEntity)
Gets all the likes for the specified content entity (likes are ordered such that recent likes come first) |
boolean |
hasLike(ContentEntityObject contentEntity)
|
boolean |
hasLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Returns true if the provided user likes this content entity. |
void |
removeAllLikesFor(java.lang.String username)
Removes all likes (for any user) from the specified content entity. |
void |
removeAllLikesOn(ContentEntityObject contentEntity)
Removes all likes (for any user) from the specified content entity. |
void |
removeLike(ContentEntityObject contentEntity)
|
void |
removeLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Remove like from content entity for the current logged in user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultLikeManager(org.springframework.transaction.PlatformTransactionManager transactionManager, LikeEntityDao dao, com.atlassian.event.api.EventPublisher publisher, PermissionManager permissionManager)
Method Detail |
---|
public Like addLike(ContentEntityObject contentEntity)
addLike
in interface LikeManager
public Like addLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
LikeManager
addLike
in interface LikeManager
contentEntity
- the content entity to add a like touser
- the userpublic void removeLike(ContentEntityObject contentEntity)
removeLike
in interface LikeManager
public void removeLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
LikeManager
removeLike
in interface LikeManager
contentEntity
- content entity to remove like fromuser
- the userpublic void removeAllLikesOn(ContentEntityObject contentEntity)
LikeManager
removeAllLikesOn
in interface LikeManager
contentEntity
- content entitypublic void removeAllLikesFor(java.lang.String username)
LikeManager
removeAllLikesFor
in interface LikeManager
username
- the name of the user to remove all likes forpublic boolean hasLike(ContentEntityObject contentEntity)
hasLike
in interface LikeManager
public boolean hasLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
LikeManager
hasLike
in interface LikeManager
contentEntity
- the content entityuser
- the user who would like this content
public java.util.List<Like> getLikes(ContentEntityObject contentEntity)
LikeManager
getLikes
in interface LikeManager
contentEntity
- the content entity
public java.util.Map<java.lang.Long,java.util.List<Like>> getLikes(java.util.Collection<? extends ContentEntityObject> contentEntities)
LikeManager
getLikes
in interface LikeManager
contentEntities
- content entities
public java.util.Map<com.atlassian.bonnie.Searchable,java.lang.Integer> countLikes(java.util.Collection<? extends com.atlassian.bonnie.Searchable> searchables)
LikeManager
countLikes
in interface LikeManager
searchables
- A searchable object whose ID must be set
public int countLikes(com.atlassian.bonnie.Searchable searchable)
LikeManager
countLikes
in interface LikeManager
searchable
- A searchable object whose ID must be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |