Class ManagedUpdateSite

All Implemented Interfaces:
ExtensionPoint, Describable<DescribedUpdateSite>
Direct Known Subclasses:
CredentialRequiredUpdateSite

public class ManagedUpdateSite extends DescribedUpdateSite
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.
The CA certificate is written as additional trust anchor dynamically
  • 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 site
      url - URL for the site
      useCaCertificate - whether to use a specified CA certificate
      caCertificate - CA certificate to verify the site
      note - note
      disabled - true to disable the site
  • Method Details

    • 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.
      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 class DescribedUpdateSite
      Returns:
      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 JSONSignatureValidator getJsonSignatureValidator(@CheckForNull String name)
      Verifier for the signature of downloaded update-center.json.
      Overrides:
      getJsonSignatureValidator in class UpdateSite
      Returns:
      JSONSignatureValidator object with additional cert as anchor if enabled