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 classDescriptor 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.WarningVersionRangeNested 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 JSONSignatureValidatorVerifier for the signature of downloaded update-center.json.getNote()Returns the note Note is only used for the displaying purpose.booleanReturns whether this site is disabled.booleanReturns whether to use CA certificate.voidsetCaCertificate(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, isDueMethods 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-trueto 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:
isDisabledin classDescribedUpdateSite- Returns:
- whether this site is disabled
-
getNote
Returns the note Note is only used for the displaying purpose.- Overrides:
getNotein classDescribedUpdateSite- Returns:
- the note
-
getJsonSignatureValidator
Verifier for the signature of downloaded update-center.json.- Overrides:
getJsonSignatureValidatorin classUpdateSite- Returns:
- JSONSignatureValidator object with additional cert as anchor if enabled
-