jp.ikedam.jenkins.plugins.updatesitesmanager
クラス ManagedUpdateSite

java.lang.Object
  上位を拡張 hudson.model.UpdateSite
      上位を拡張 jp.ikedam.jenkins.plugins.updatesitesmanager.DescribedUpdateSite
          上位を拡張 jp.ikedam.jenkins.plugins.updatesitesmanager.ManagedUpdateSite
すべての実装されたインタフェース:
hudson.ExtensionPoint, hudson.model.Describable<DescribedUpdateSite>, hudson.model.ModelObject, Serializable, jenkins.model.ModelObjectWithContextMenu

public class ManagedUpdateSite
extends DescribedUpdateSite

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

The CA certificate is written to a temporary file under ${JENKINS_HOME}/update-center-rootCAs/ . I think it is a better implementation to override UpdateSite#verifySignature, but it is private method. Re-implementing doPostBack results to re-implement whole the UpdateSite.

関連項目:
直列化された形式

入れ子のクラスの概要
static class ManagedUpdateSite.DescriptorImpl
          Descriptor for this class.
 
クラス jp.ikedam.jenkins.plugins.updatesitesmanager.DescribedUpdateSite から継承された入れ子のクラス/インタフェース
DescribedUpdateSite.Descriptor
 
クラス hudson.model.UpdateSite から継承された入れ子のクラス/インタフェース
hudson.model.UpdateSite.Data, hudson.model.UpdateSite.Entry, hudson.model.UpdateSite.Plugin
 
インタフェース hudson.ExtensionPoint から継承された入れ子のクラス/インタフェース
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
インタフェース jenkins.model.ModelObjectWithContextMenu から継承された入れ子のクラス/インタフェース
jenkins.model.ModelObjectWithContextMenu.ContextMenu, jenkins.model.ModelObjectWithContextMenu.MenuItem
 
フィールドの概要
 
クラス hudson.model.UpdateSite から継承されたフィールド
neverUpdate, signatureCheck
 
コンストラクタの概要
ManagedUpdateSite(String id, String url, boolean useCaCertificate, String caCertificate, String note, boolean disabled)
          Create a new instance
 
メソッドの概要
 hudson.util.FormValidation doPostBack(org.kohsuke.stapler.StaplerRequest req)
          Process update-center.json.
 hudson.util.FormValidation doVerifySignature()
          Verify the signature of downloaded update-center.json.
 String getCaCertificate()
          Returns the CA certificate to verify the signature.
protected  File getCaCertificateFile()
          Returns the path to the CA certificate file.
 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.
 
クラス jp.ikedam.jenkins.plugins.updatesitesmanager.DescribedUpdateSite から継承されたメソッド
all, doConfigure, doContextMenu, doDelete, getAvailables, getDescriptor, getDisplayName, getPageUrl, getUpdates, getUpdateSite, hasUpdates, isDue, isEditable
 
クラス hudson.model.UpdateSite から継承されたメソッド
doInvalidateData, getConnectionCheckUrl, getData, getDataTimestamp, getDownloadUrl, getId, getJSONObject, getPlugin, getUrl, isLegacyDefault
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ManagedUpdateSite

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

パラメータ:
id -
url -
useCaCertificate -
caCertificate -
note -
disabled -
メソッドの詳細

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.

戻り値:
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.

戻り値:
whether to use CA certificate

isDisabled

public boolean isDisabled()
Returns whether this site is disabled. When disabled, plugins in this site gets unavailable.

オーバーライド:
クラス DescribedUpdateSite 内の isDisabled
戻り値:
the whether this site is disabled

getNote

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

オーバーライド:
クラス DescribedUpdateSite 内の getNote
戻り値:
the note

getCaCertificateFile

protected File getCaCertificateFile()
Returns the path to the CA certificate file. The file to store the CA certificate temporary.

戻り値:
the path to the CA certificate file

doPostBack

public hudson.util.FormValidation doPostBack(org.kohsuke.stapler.StaplerRequest req)
                                      throws IOException,
                                             GeneralSecurityException
Process update-center.json. If a CA certificate is set, write it to file and make it ready to verify the signature.

オーバーライド:
クラス hudson.model.UpdateSite 内の doPostBack
パラメータ:
req -
戻り値:
FormValidation object
例外:
IOException
GeneralSecurityException
関連項目:
UpdateSite.doPostBack(org.kohsuke.stapler.StaplerRequest)

doVerifySignature

public hudson.util.FormValidation doVerifySignature()
                                             throws IOException
Verify the signature of downloaded update-center.json.

オーバーライド:
クラス hudson.model.UpdateSite 内の doVerifySignature
戻り値:
FormValidation object.
例外:
IOException
関連項目:
UpdateSite.doVerifySignature()


Copyright © 2004-2013. All Rights Reserved.