com.atlassian.jira.bc.favourites
Class DefaultFavouritesService

java.lang.Object
  extended by com.atlassian.jira.bc.favourites.DefaultFavouritesService
All Implemented Interfaces:
FavouritesService

public class DefaultFavouritesService
extends java.lang.Object
implements FavouritesService


Constructor Summary
DefaultFavouritesService(FavouritesManager favouritesManager)
           
 
Method Summary
 void addFavourite(JiraServiceContext ctx, SharedEntity entity)
          Add the given entity as a favourite of the user passed in the context
 void addFavouriteInPosition(JiraServiceContext ctx, SharedEntity entity, long position)
          Add the given entity as a favourite of the user passed in the context and place it in the specified position.
 boolean isFavourite(com.opensymphony.user.User user, SharedEntity entity)
          Check that the given entity is a favourite of the user passed in the context
 void removeFavourite(JiraServiceContext ctx, SharedEntity entity)
          Remove the given entity as a favourite of the user passed in the context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFavouritesService

public DefaultFavouritesService(FavouritesManager favouritesManager)
Method Detail

addFavourite

public void addFavourite(JiraServiceContext ctx,
                         SharedEntity entity)
Description copied from interface: FavouritesService
Add the given entity as a favourite of the user passed in the context

Specified by:
addFavourite in interface FavouritesService
Parameters:
ctx - JIRA Service context
entity - The entity to favourite

addFavouriteInPosition

public void addFavouriteInPosition(JiraServiceContext ctx,
                                   SharedEntity entity,
                                   long position)
Description copied from interface: FavouritesService
Add the given entity as a favourite of the user passed in the context and place it in the specified position. The entity currently in the specified position and all those after will be moved down one position.

Specified by:
addFavouriteInPosition in interface FavouritesService
Parameters:
ctx - JIRA Service Context holding the current user
entity - the entity to favourite
position - the position in which this entity should be added in the favourites order.

removeFavourite

public void removeFavourite(JiraServiceContext ctx,
                            SharedEntity entity)
Description copied from interface: FavouritesService
Remove the given entity as a favourite of the user passed in the context

Specified by:
removeFavourite in interface FavouritesService
Parameters:
ctx - JIRA Service context
entity - The entity to unfavourite

isFavourite

public boolean isFavourite(com.opensymphony.user.User user,
                           SharedEntity entity)
Description copied from interface: FavouritesService
Check that the given entity is a favourite of the user passed in the context

Specified by:
isFavourite in interface FavouritesService
Parameters:
user - the user to check for
entity - The entity to check favourite
Returns:
true if entity is a favourite, otherwise false


Copyright © 2002-2010 Atlassian. All Rights Reserved.