Class FavoriteUtil

java.lang.Object
io.jenkins.blueocean.service.embedded.util.FavoriteUtil

public class FavoriteUtil extends Object
Author:
Ivan Meredith
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
     
    static io.jenkins.blueocean.rest.model.BlueFavorite
     
    static io.jenkins.blueocean.rest.model.BlueFavorite
    getFavorite(Item item, io.jenkins.blueocean.rest.Reachable parent)
    Gets favorite model for given model model First it tries to find favorite model using BlueFavoriteResolver, if none found then it simply gets the mapped blueocean API resource for the given favorite item, creates BlueFavorite and returns.
    static void
    toggle(io.jenkins.blueocean.rest.model.BlueFavoriteAction action, Item item)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FavoriteUtil

      public FavoriteUtil()
  • Method Details

    • toggle

      public static void toggle(io.jenkins.blueocean.rest.model.BlueFavoriteAction action, Item item)
    • decodeFullName

      public static String decodeFullName(String name)
    • getFavorite

      public static io.jenkins.blueocean.rest.model.BlueFavorite getFavorite(Item item)
    • getFavorite

      public static io.jenkins.blueocean.rest.model.BlueFavorite getFavorite(Item item, @NonNull io.jenkins.blueocean.rest.Reachable parent)
      Gets favorite model for given model model First it tries to find favorite model using BlueFavoriteResolver, if none found then it simply gets the mapped blueocean API resource for the given favorite item, creates BlueFavorite and returns.
      Parameters:
      item - favorited model object
      parent - Reachable parent of BlueOcean favorited API resource. It might be null, in that case parent is computed using LinkResolver.resolve(Object)
      Returns:
      resolved favorite object if found otherwise null