Class ManagedUpdateSite
java.lang.Object
hudson.model.UpdateSite
jp.ikedam.jenkins.plugins.updatesitesmanager.DescribedUpdateSite
jp.ikedam.jenkins.plugins.updatesitesmanager.ManagedUpdateSite
- All Implemented Interfaces:
ExtensionPoint
,Describable<DescribedUpdateSite>
- Direct Known Subclasses:
CredentialRequiredUpdateSite
Extended UpdateSite to be managed in UpdateSitesManager.
ManagedUpdateSite provides following features.
- can switch enabled/disabled.
- have a note field.
- can set a CA certificate for the signature of the site.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Descriptor for this class.Nested classes/interfaces inherited from class hudson.model.UpdateSite
UpdateSite.Data, UpdateSite.Deprecation, UpdateSite.Entry, UpdateSite.IssueTracker, UpdateSite.Plugin, UpdateSite.Warning, UpdateSite.WarningType, UpdateSite.WarningVersionRange
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.UpdateSite
neverUpdate
-
Constructor Summary
ConstructorsConstructorDescriptionManagedUpdateSite
(String id, String url, boolean useCaCertificate, String caCertificate, String note, boolean disabled) Create a new instance -
Method Summary
Modifier and TypeMethodDescriptionReturns the CA certificate to verify the signature.protected JSONSignatureValidator
Verifier for the signature of downloaded update-center.json.getNote()
Returns the note Note is only used for the displaying purpose.boolean
Returns whether this site is disabled.boolean
Returns whether to use CA certificate.void
setCaCertificate
(String caCertificate) Set the CA certificate to verify the signature.Methods inherited from class jp.ikedam.jenkins.plugins.updatesitesmanager.DescribedUpdateSite
all, getAvailables, getDescriptor, getUpdates, hasUpdates, isDue
Methods inherited from class hudson.model.UpdateSite
connect, createInstallationJob, doInvalidateData, doVerifySignature, getApi, getConnectionCheckUrl, getData, getDataTimestamp, getDownloadUrl, getId, getJSONObject, getJsonSignatureValidator, getMetadataUrlForDownloadable, getPlugin, getSuggestedPluginsUrl, getUrl, isLegacyDefault, preValidate, updateData, updateDirectly, updateDirectly, updateDirectlyNow, updateDirectlyNow, verifySignatureInternal
-
Constructor Details
-
ManagedUpdateSite
@DataBoundConstructor public ManagedUpdateSite(String id, String url, boolean useCaCertificate, String caCertificate, String note, boolean disabled) Create a new instance- Parameters:
id
- id for the siteurl
- URL for the siteuseCaCertificate
- whether to use a specified CA certificatecaCertificate
- CA certificate to verify the sitenote
- notedisabled
-true
to disable the site
-
-
Method Details
-
getCaCertificate
Returns the CA certificate to verify the signature. This is useful when the UpdateSite is signed with a self-signed private key.- Returns:
- the CA certificate
-
setCaCertificate
Set the CA certificate to verify the signature. Mainly for testing Purpose.- Parameters:
caCertificate
- CA certificate
-
isUseCaCertificate
public boolean isUseCaCertificate()Returns whether to use CA certificate.- Returns:
- whether to use CA certificate
-
isDisabled
public boolean isDisabled()Returns whether this site is disabled. When disabled, plugins in this site gets unavailable.- Overrides:
isDisabled
in classDescribedUpdateSite
- Returns:
- whether this site is disabled
-
getNote
Returns the note Note is only used for the displaying purpose.- Overrides:
getNote
in classDescribedUpdateSite
- Returns:
- the note
-
getJsonSignatureValidator
Verifier for the signature of downloaded update-center.json.- Overrides:
getJsonSignatureValidator
in classUpdateSite
- Returns:
- JSONSignatureValidator object with additional cert as anchor if enabled
-