|
||||||||||
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. |
Map<Long,List<Like>> |
getLikes(Collection<? extends ContentEntityObject> contentEntities)
Gets all the likes for the specified content entities (likes are ordered such that recent likes come first). |
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(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(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 List<Like> getLikes(ContentEntityObject contentEntity)
LikeManager
getLikes
in interface LikeManager
contentEntity
- the content entity
public Map<Long,List<Like>> getLikes(Collection<? extends ContentEntityObject> contentEntities)
LikeManager
getLikes
in interface LikeManager
contentEntities
- content entities
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |