com.atlassian.jira.web.dwr
Class AjaxFavouriteControl

java.lang.Object
  extended by com.atlassian.jira.web.dwr.AjaxFavouriteControl

public class AjaxFavouriteControl
extends Object

Class used for the DWR endpoint for the Ajax Favourite picker (Star)

Since:
v3.13

Constructor Summary
AjaxFavouriteControl(JiraAuthenticationContext authContext, FavouritesService favService, FavouritesManager favouritesManager, SharedEntityAccessor.Factory sharedEntityAccessorFactory)
          Main constructor for AjaxFavouriteControl.
 
Method Summary
 boolean setFavourite(String entityType, String entityId, boolean enable)
          Adds or removes an entity from a user's list of favourites
 boolean undo(String entityType, String entityId, Long[] originalOrder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxFavouriteControl

public AjaxFavouriteControl(JiraAuthenticationContext authContext,
                            FavouritesService favService,
                            FavouritesManager favouritesManager,
                            SharedEntityAccessor.Factory sharedEntityAccessorFactory)
Main constructor for AjaxFavouriteControl.

Parameters:
authContext - the JIRA authentication context
favService - the FavouritesService that is delegated
favouritesManager - the fav manager
sharedEntityAccessorFactory - factory used to create SharedEntityAccessor objects when looking up shared entities.
Method Detail

setFavourite

public boolean setFavourite(String entityType,
                            String entityId,
                            boolean enable)
Adds or removes an entity from a user's list of favourites

Parameters:
entityType - the entity type to favourite - SearchRequest, PortalPage
entityId - id of the entity to favourite
enable - true to make favourite, false to unfavourite
Returns:
true if operation was successful, otherwise false

undo

public boolean undo(String entityType,
                    String entityId,
                    Long[] originalOrder)


Copyright © 2002-2009 Atlassian. All Rights Reserved.