com.atlassian.jira.rest.v1.favourites
Class FavouriteResource

java.lang.Object
  extended by com.atlassian.jira.rest.v1.favourites.FavouriteResource

public class FavouriteResource
extends Object

Allows of favouriting and unfavouriting of shared entities. Actions can also be undone.

Since:
v4.0

Nested Class Summary
static class FavouriteResource.OriginalOrder
           
 
Constructor Summary
FavouriteResource(JiraAuthenticationContext authContext, FavouritesService favService, FavouritesManager favouritesManager, SharedEntityAccessor.Factory sharedEntityAccessorFactory, SharedEntity.TypeDescriptor entityType, Long entityId)
          Main constructor for FavouritesResource.
 
Method Summary
 javax.ws.rs.core.Response addFavourite()
          Adds an entity to a user's list of favourites
 javax.ws.rs.core.Response deleteFavourite()
          Removes an entity to a user's list of favourites
 javax.ws.rs.core.Response isFavourite()
           
 javax.ws.rs.core.Response undo(FavouriteResource.OriginalOrder originalOrder)
          Undo an operation, and re-insert a favourite at a certain position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FavouriteResource

public FavouriteResource(JiraAuthenticationContext authContext,
                         FavouritesService favService,
                         FavouritesManager favouritesManager,
                         SharedEntityAccessor.Factory sharedEntityAccessorFactory,
                         SharedEntity.TypeDescriptor entityType,
                         Long entityId)
Main constructor for FavouritesResource.

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.
entityType - the entity type to favourite - SearchRequest, PortalPage
entityId - id of the entity to favourite
Method Detail

isFavourite

public javax.ws.rs.core.Response isFavourite()

addFavourite

public javax.ws.rs.core.Response addFavourite()
Adds an entity to a user's list of favourites

Returns:
200 if successful

deleteFavourite

public javax.ws.rs.core.Response deleteFavourite()
Removes an entity to a user's list of favourites

Returns:
200 if successful

undo

public javax.ws.rs.core.Response undo(FavouriteResource.OriginalOrder originalOrder)
Undo an operation, and re-insert a favourite at a certain position.

Parameters:
originalOrder - - the original order that entries where in
Returns:
200 on success


Copyright © 2002-2013 Atlassian. All Rights Reserved.