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:
-
Field Summary
Modifier and TypeFieldDescriptionfinal String
The name of the affected component.final String
The globally unique ID of this warning.final String
A short, English language explanation for this warning.The type classifier for this warning.final String
A URL with more information about this, typically a security advisory.A list of named version ranges specifying which versions of the named component this warning applies to. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Two objects are considered equal if they are the same type and have the same ID.int
hashCode()
Returns whether this warning is fixable by updating the affected component.boolean
isPluginWarning
(String pluginName) boolean
Returns true if this warning is relevant to the current configurationboolean
isRelevantToVersion
(VersionNumber version)
-
Field Details
-
type
The type classifier for this warning. -
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
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
A short, English language explanation for this warning. -
url
A URL with more information about this, typically a security advisory. For use in administrator notices only, so -
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.
-
-
Constructor Details
-
Warning
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Warning(net.sf.json.JSONObject o) - Parameters:
o
- theJSONObject
representing the warning- Throws:
net.sf.json.JSONException
- if the argument does not match the expected format
-
-
Method Details
-
equals
Two objects are considered equal if they are the same type and have the same ID. -
hashCode
public int hashCode() -
isPluginWarning
-
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
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
-