Class FavouriteResource

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

@Consumes({"application/json","application/xml"}) @Produces({"application/json","application/xml"}) public class FavouriteResource extends Object
Allows of favouriting and unfavouriting of shared entities. Actions can also be undone.
Since:
v4.0
  • Constructor Details

    • FavouriteResource

      @Inject 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 Details

    • isFavourite

      @GET public jakarta.ws.rs.core.Response isFavourite()
    • addFavourite

      @PUT public jakarta.ws.rs.core.Response addFavourite()
      Adds an entity to a user's list of favourites
      Returns:
      200 if successful
    • deleteFavourite

      @DELETE public jakarta.ws.rs.core.Response deleteFavourite()
      Removes an entity to a user's list of favourites
      Returns:
      200 if successful
    • undo

      @POST public jakarta.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