/** * Create a new HealthReport. * * @param score The percentage health score (from 0 to 100 inclusive). * @param iconUrl The path to the icon corresponding to this {@link Action}'s health or <code>null</code> to * display the default icon corresponding to the current health score. * <p> * If the path begins with a '/' then it will be the absolute path, otherwise the image is * assumed to be in one of <code>/images/16x16/</code>, <code>/images/24x24/</code> or * <code>/images/32x32/</code> depending on the icon size selected by the user. * When calculating the url to display for absolute paths, the getIconUrl(String) method * will replace /32x32/ in the path with the appropriate size. * @param description The health icon's tool-tip. * @deprecated since 2008-10-18. * Use {@link #HealthReport(int, String, org.jvnet.localizer.Localizable)} */ @Deprecated public HealthReport(int score, String iconUrl, String description) { this(score, iconUrl, new NonLocalizable(description)); }
/** * Setter for property 'description'. * * @param description Value to set for property 'description'. */ public void setDescription(String description) { setLocalizibleDescription(new NonLocalizable(description)); }
@Override protected void callback(HealthReport hr, UnmarshallingContext context) { // If we are being read back in from an older version if (hr.localizibleDescription == null) { hr.localizibleDescription = new NonLocalizable(hr.description == null ? "" : hr.description); OldDataMonitor.report(context, "1.256"); } if (hr.iconClassName == null && hr.iconUrl != null && iconIMGToClassMap.containsKey(hr.iconUrl)) { hr.iconClassName = iconIMGToClassMap.get(hr.iconUrl); } } }
@Nonnull @Override protected Localizable defaultDisplayName() { return new NonLocalizable("Tag"); }
/** * Create a new HealthReport. * * @param score The percentage health score (from 0 to 100 inclusive). * @param iconUrl The path to the icon corresponding to this {@link Action}'s health or <code>null</code> to * display the default icon corresponding to the current health score. * <p> * If the path begins with a '/' then it will be the absolute path, otherwise the image is * assumed to be in one of <code>/images/16x16/</code>, <code>/images/24x24/</code> or * <code>/images/32x32/</code> depending on the icon size selected by the user. * When calculating the url to display for absolute paths, the getIconUrl(String) method * will replace /32x32/ in the path with the appropriate size. * @param description The health icon's tool-tip. * @deprecated since 2008-10-18. * Use {@link #HealthReport(int, String, org.jvnet.localizer.Localizable)} */ @Deprecated public HealthReport(int score, String iconUrl, String description) { this(score, iconUrl, new NonLocalizable(description)); }
/** * Setter for property 'description'. * * @param description Value to set for property 'description'. */ public void setDescription(String description) { setLocalizibleDescription(new NonLocalizable(description)); }
@Override protected void callback(HealthReport hr, UnmarshallingContext context) { // If we are being read back in from an older version if (hr.localizibleDescription == null) { hr.localizibleDescription = new NonLocalizable(hr.description == null ? "" : hr.description); OldDataMonitor.report(context, "1.256"); } if (hr.iconClassName == null && hr.iconUrl != null && iconIMGToClassMap.containsKey(hr.iconUrl)) { hr.iconClassName = iconIMGToClassMap.get(hr.iconUrl); } } }