Class FavoriteUtil
java.lang.Object
io.jenkins.blueocean.service.embedded.util.FavoriteUtil
- Author:
- Ivan Meredith
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
decodeFullName
(String name) static io.jenkins.blueocean.rest.model.BlueFavorite
getFavorite
(Item item) 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 usingBlueFavoriteResolver
, if none found then it simply gets the mapped blueocean API resource for the given favorite item, creates BlueFavorite and returns.static void
-
Constructor Details
-
FavoriteUtil
public FavoriteUtil()
-
-
Method Details
-
toggle
-
decodeFullName
-
getFavorite
-
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 usingBlueFavoriteResolver
, 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 objectparent
-Reachable
parent of BlueOcean favorited API resource. It might be null, in that case parent is computed usingLinkResolver.resolve(Object)
- Returns:
- resolved favorite object if found otherwise null
-