Class WebhookCredentialsStore

java.lang.Object
com.cloudbees.plugins.credentials.CredentialsStore
io.jenkins.plugins.webhookexternalstore.WebhookCredentialsStore
All Implemented Interfaces:
Saveable, AccessControlled

public class WebhookCredentialsStore extends com.cloudbees.plugins.credentials.CredentialsStore
Webhook credentials store
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Expose the store.
  • Field Summary

    Fields inherited from interface hudson.model.Saveable

    NOOP
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addCredentials(com.cloudbees.plugins.credentials.domains.Domain domain, com.cloudbees.plugins.credentials.Credentials credentials)
     
    static XmlFile
    Gets the configuration file that WebhookCredentialsProvider uses to store its credentials.
     
    List<com.cloudbees.plugins.credentials.Credentials>
    getCredentials(com.cloudbees.plugins.credentials.domains.Domain domain)
     
    List<com.cloudbees.plugins.credentials.domains.Domain>
     
    com.cloudbees.plugins.credentials.CredentialsStoreAction
     
    boolean
    hasPermission2(org.springframework.security.core.Authentication authentication, Permission permission)
     
    protected void
    Loads the credentials from the configuration file.
    boolean
    removeCredentials(com.cloudbees.plugins.credentials.domains.Domain domain, com.cloudbees.plugins.credentials.Credentials credentials)
     
    void
    Saves the credentials to the configuration file.
    boolean
    updateCredentials(com.cloudbees.plugins.credentials.domains.Domain domain, com.cloudbees.plugins.credentials.Credentials current, com.cloudbees.plugins.credentials.Credentials replacement)
     

    Methods inherited from class com.cloudbees.plugins.credentials.CredentialsStore

    _isApplicable, addDomain, addDomain, checkPermission, getACL, getContextDisplayName, getContextIconClassName, getCredentialsDescriptors, getDisplayName, getDomainByName, getProvider, getProviderOrDie, getRelativeLinkTo, getRelativeLinkToAction, getRelativeLinkToContext, getScopes, hasPermission, hasPermission, isApplicable, isDomainsModifiable, removeDomain, updateDomain

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface hudson.security.AccessControlled

    checkAnyPermission, hasAnyPermission
  • Constructor Details

    • WebhookCredentialsStore

      public WebhookCredentialsStore(@NonNull WebhookCredentialsProvider provider, @NonNull ModelObject context)
      Constructor.
      Parameters:
      provider - the provider
      context - the context
  • Method Details

    • getContext

      @NonNull public ModelObject getContext()
      Specified by:
      getContext in class com.cloudbees.plugins.credentials.CredentialsStore
    • hasPermission2

      public boolean hasPermission2(@NonNull org.springframework.security.core.Authentication authentication, @NonNull Permission permission)
      Specified by:
      hasPermission2 in interface AccessControlled
      Overrides:
      hasPermission2 in class com.cloudbees.plugins.credentials.CredentialsStore
    • getCredentials

      @NonNull public List<com.cloudbees.plugins.credentials.Credentials> getCredentials(@NonNull com.cloudbees.plugins.credentials.domains.Domain domain)
      Specified by:
      getCredentials in class com.cloudbees.plugins.credentials.CredentialsStore
    • addCredentials

      public boolean addCredentials(@NonNull com.cloudbees.plugins.credentials.domains.Domain domain, @NonNull com.cloudbees.plugins.credentials.Credentials credentials)
      Specified by:
      addCredentials in class com.cloudbees.plugins.credentials.CredentialsStore
    • updateCredentials

      public boolean updateCredentials(@NonNull com.cloudbees.plugins.credentials.domains.Domain domain, @NonNull com.cloudbees.plugins.credentials.Credentials current, @NonNull com.cloudbees.plugins.credentials.Credentials replacement)
      Specified by:
      updateCredentials in class com.cloudbees.plugins.credentials.CredentialsStore
    • removeCredentials

      public boolean removeCredentials(@NonNull com.cloudbees.plugins.credentials.domains.Domain domain, @NonNull com.cloudbees.plugins.credentials.Credentials credentials)
      Specified by:
      removeCredentials in class com.cloudbees.plugins.credentials.CredentialsStore
    • getDomains

      @NonNull public List<com.cloudbees.plugins.credentials.domains.Domain> getDomains()
      Overrides:
      getDomains in class com.cloudbees.plugins.credentials.CredentialsStore
    • getStoreAction

      @CheckForNull public com.cloudbees.plugins.credentials.CredentialsStoreAction getStoreAction()
      Overrides:
      getStoreAction in class com.cloudbees.plugins.credentials.CredentialsStore
    • save

      public void save() throws IOException
      Saves the credentials to the configuration file.
      Specified by:
      save in interface Saveable
      Overrides:
      save in class com.cloudbees.plugins.credentials.CredentialsStore
      Throws:
      IOException - if an error occurs while saving the credentials
    • load

      protected void load()
      Loads the credentials from the configuration file.
    • getConfigFile

      public static XmlFile getConfigFile()
      Gets the configuration file that WebhookCredentialsProvider uses to store its credentials.
      Returns:
      the configuration file that WebhookCredentialsProvider uses to store its credentials.