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
FieldsModifier and TypeFieldDescriptionfinal StringThe name of the affected component.final StringThe globally unique ID of this warning.final StringA short, English language explanation for this warning.The type classifier for this warning.final StringA 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwo objects are considered equal if they are the same type and have the same ID.inthashCode()Returns whether this warning is fixable by updating the affected component.booleanisPluginWarning(String pluginName) booleanReturns true if this warning is relevant to the current configurationbooleanisRelevantToVersion(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- theJSONObjectrepresenting 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:
trueif the warning does not apply to the latest offered version of core or the affected plugin;falseif it does; andnullwhen the affected component isn't being offered, or it's a warning for something other than core or a plugin.
-
isRelevantToVersion
-