com.atlassian.confluence.like
Interface LikeDao

All Known Implementing Classes:
EventPublishingLikeDao, HibernateLikeDao

Deprecated. 4.3.4 this interface is a little confused and only here for backwards compatibility use LikeEntityDao or LikeManager

@Deprecated
public interface LikeDao

Persists and retrieves likes. Should only be accessed via a LikeManager. Likes will be exposed via the transfer object Like.


Method Summary
 void addLike(ContentEntityObject contentEntity)
          Deprecated. Use LikeManager.addLike(ContentEntityObject) instead. Since v4.3.
 Like addLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
          Deprecated. Add a like on the content entity for the given user.
 Map<Long,List<Like>> getLikes(Collection<? extends ContentEntityObject> contentEntities)
          Deprecated. Gets all the likes for the specified content entities (likes are ordered such that recent likes come first).
 List<Like> getLikes(ContentEntityObject contentEntity)
          Deprecated. Gets all the likes for the specified content entity (likes are ordered such that recent likes come first)
 boolean hasLike(ContentEntityObject contentEntity)
          Deprecated. Use LikeManager.hasLike(ContentEntityObject) instead. Since v4.3.
 boolean hasLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
          Deprecated. Returns true if the given user likes this content entity.
 void removeAllLikesFor(String username)
          Deprecated. Removes all likes (for any user) from the specified content entity.
 void removeAllLikesOn(ContentEntityObject contentEntity)
          Deprecated. Removes all likes (for any user) from the specified content entity.
 void removeLike(ContentEntityObject contentEntity)
          Deprecated. Use LikeManager.removeLike(ContentEntityObject) instead. Since v4.3.
 void removeLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
          Deprecated. Remove like from content entity for the given user.
 

Method Detail

addLike

Like addLike(ContentEntityObject contentEntity,
             com.atlassian.user.User user)
Deprecated. 
Add a like on the content entity for the given user.

Parameters:
contentEntity - the content entity to add a like to
user - User liking the content
Returns:
the created Like

addLike

@Deprecated
void addLike(ContentEntityObject contentEntity)
Deprecated. Use LikeManager.addLike(ContentEntityObject) instead. Since v4.3.

Add a like on the content entity for the currently logged-in user.

Parameters:
contentEntity - the content entity to add a like to

removeLike

void removeLike(ContentEntityObject contentEntity,
                com.atlassian.user.User user)
Deprecated. 
Remove like from content entity for the given user.

Parameters:
contentEntity - content entity to remove like from
user - User removing their Like

removeLike

@Deprecated
void removeLike(ContentEntityObject contentEntity)
Deprecated. Use LikeManager.removeLike(ContentEntityObject) instead. Since v4.3.

Remove like from content entity for the currently logged-in user.

Parameters:
contentEntity - content entity to remove like from

removeAllLikesOn

void removeAllLikesOn(ContentEntityObject contentEntity)
Deprecated. 
Removes all likes (for any user) from the specified content entity.

Parameters:
contentEntity - content entity

removeAllLikesFor

void removeAllLikesFor(String username)
Deprecated. 
Removes all likes (for any user) from the specified content entity.

Parameters:
username - the name of the user to remove all likes for

hasLike

boolean hasLike(ContentEntityObject contentEntity,
                com.atlassian.user.User user)
Deprecated. 
Returns true if the given user likes this content entity.

Parameters:
contentEntity - the content entity
user - the User the Like is being checked for
Returns:
true if the user likes this content entity.

hasLike

@Deprecated
boolean hasLike(ContentEntityObject contentEntity)
Deprecated. Use LikeManager.hasLike(ContentEntityObject) instead. Since v4.3.

Returns true if the current logged in user likes this content entity.

Parameters:
contentEntity - the content entity
Returns:
true if the current logged in user likes this content entity.

getLikes

List<Like> getLikes(ContentEntityObject contentEntity)
Deprecated. 
Gets all the likes for the specified content entity (likes are ordered such that recent likes come first)

Parameters:
contentEntity - the content entity
Returns:
all the likes for the specified content entity.

getLikes

Map<Long,List<Like>> getLikes(Collection<? extends ContentEntityObject> contentEntities)
Deprecated. 
Gets all the likes for the specified content entities (likes are ordered such that recent likes come first).

Parameters:
contentEntities - content entities
Returns:
a map of contentId to a set of all the likes for that piece of content.


Copyright © 2003-2013 Atlassian. All Rights Reserved.