Package hudson.model
Class UpdateSite.Warning
- java.lang.Object
-
- hudson.model.UpdateSite.Warning
-
- Enclosing class:
- UpdateSite
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class UpdateSite.Warning extends Object
Represents a warning about a certain component, mostly related to known security issues.- Since:
- 2.40
- See Also:
UpdateSiteWarningsConfiguration
,UpdateSiteWarningsMonitor
-
-
Field Summary
Fields Modifier and Type Field Description String
component
The name of the affected component.String
id
The globally unique ID of this warning.String
message
A short, English language explanation for this warning.UpdateSite.WarningType
type
The type classifier for this warning.String
url
A URL with more information about this, typically a security advisory.List<UpdateSite.WarningVersionRange>
versionRanges
A list of named version ranges specifying which versions of the named component this warning applies to.
-
Constructor Summary
Constructors Constructor Description Warning(net.sf.json.JSONObject o)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Two objects are considered equal if they are the same type and have the same ID.int
hashCode()
Boolean
isFixable()
Returns whether this warning is fixable by updating the affected component.boolean
isPluginWarning(String pluginName)
boolean
isRelevant()
Returns true if this warning is relevant to the current configurationboolean
isRelevantToVersion(VersionNumber version)
-
-
-
Field Detail
-
type
@NonNull public UpdateSite.WarningType type
The type classifier for this warning.
-
id
@Exported @NonNull public final String id
The globally unique ID of this warning.This is typically the CVE identifier or SECURITY issue (Jenkins project); possibly with a unique suffix (e.g. artifactId) if either applies to multiple components.
-
component
@Exported @NonNull public final String component
The name of the affected component.- If type is 'core', this is 'core' by convention.
- If type is 'plugin', this is the artifactId of the affected plugin
-
message
@Exported @NonNull public final String message
A short, English language explanation for this warning.
-
url
@Exported @NonNull public final String url
A URL with more information about this, typically a security advisory. For use in administrator notices only, so
-
versionRanges
@Exported @NonNull public final List<UpdateSite.WarningVersionRange> versionRanges
A list of named version ranges specifying which versions of the named component this warning applies to. If this list is empty, all versions of the component are considered to be affected by this warning.
-
-
Method Detail
-
equals
public boolean equals(Object o)
Two objects are considered equal if they are the same type and have the same ID.
-
isPluginWarning
public boolean isPluginWarning(@NonNull String pluginName)
-
isRelevant
public boolean isRelevant()
Returns true if this warning is relevant to the current configuration- Returns:
- true if this warning is relevant to the current configuration
-
isFixable
public Boolean isFixable()
Returns whether this warning is fixable by updating the affected component.- Returns:
true
if the warning does not apply to the latest offered version of core or the affected plugin;false
if it does; andnull
when the affected component isn't being offered, or it's a warning for something other than core or a plugin.
-
isRelevantToVersion
public boolean isRelevantToVersion(@NonNull VersionNumber version)
-
-