jp.ikedam.jenkins.plugins.updatesitesmanager
Class ManagedUpdateSite

java.lang.Object
  extended by hudson.model.UpdateSite
      extended by jp.ikedam.jenkins.plugins.updatesitesmanager.DescribedUpdateSite
          extended by jp.ikedam.jenkins.plugins.updatesitesmanager.ManagedUpdateSite
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<DescribedUpdateSite>

public class ManagedUpdateSite
extends DescribedUpdateSite

Extended UpdateSite to be managed in UpdateSitesManager. ManagedUpdateSite provides following features.

The CA certificate is written as additional trust anchor dynamically


Nested Class Summary
static class ManagedUpdateSite.DescriptorImpl
          Descriptor for this class.
 
Nested classes/interfaces inherited from class hudson.model.UpdateSite
hudson.model.UpdateSite.Data, hudson.model.UpdateSite.Entry, hudson.model.UpdateSite.Plugin
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.UpdateSite
neverUpdate
 
Constructor Summary
ManagedUpdateSite(String id, String url, boolean useCaCertificate, String caCertificate, String note, boolean disabled)
          Create a new instance
 
Method Summary
 String getCaCertificate()
          Returns the CA certificate to verify the signature.
protected  jenkins.util.JSONSignatureValidator getJsonSignatureValidator()
          Verifier for the signature of downloaded update-center.json.
 String getNote()
          Returns the note Note is only used for the displaying purpose.
 boolean isDisabled()
          Returns whether this site is disabled.
 boolean isUseCaCertificate()
          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
doInvalidateData, doPostBack, doVerifySignature, getApi, getConnectionCheckUrl, getData, getDataTimestamp, getDownloadUrl, getId, getJSONObject, getPlugin, getUrl, isLegacyDefault, updateDirectly, updateDirectlyNow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedUpdateSite

@DataBoundConstructor
public ManagedUpdateSite(String id,
                                              String url,
                                              boolean useCaCertificate,
                                              String caCertificate,
                                              String note,
                                              boolean disabled)
Create a new instance

Parameters:
id -
url -
useCaCertificate -
caCertificate -
note -
disabled -
Method Detail

getCaCertificate

public String 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

public void setCaCertificate(String caCertificate)
Set the CA certificate to verify the signature. Mainly for testing Purpose.


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 class DescribedUpdateSite
Returns:
the whether this site is disabled

getNote

public String getNote()
Returns the note Note is only used for the displaying purpose.

Overrides:
getNote in class DescribedUpdateSite
Returns:
the note

getJsonSignatureValidator

@Nonnull
protected jenkins.util.JSONSignatureValidator getJsonSignatureValidator()
Verifier for the signature of downloaded update-center.json.

Overrides:
getJsonSignatureValidator in class hudson.model.UpdateSite
Returns:
JSONSignatureValidator object with additional cert as anchor if enabled


Copyright © 2004-2016. All Rights Reserved.