use of hudson.plugins.favorite.user.FavoriteUserProperty in project blueocean-plugin by jenkinsci.
the class FavoriteListStatePreloader method getStateJson.
@CheckForNull
@Override
public String getStateJson() {
User jenkinsUser = User.current();
if (jenkinsUser == null) {
return null;
}
FavoriteUserProperty fup = jenkinsUser.getProperty(FavoriteUserProperty.class);
if (fup == null) {
return null;
}
Set<String> favorites = fup.getAllFavorites();
if (favorites == null) {
return null;
}
return JSONArray.fromObject(favorites).toString();
}
Aggregations