Class PerforceScm.DescriptorImpl

java.lang.Object
hudson.model.Descriptor<SCM>
hudson.scm.SCMDescriptor<PerforceScm>
org.jenkinsci.plugins.p4.PerforceScm.DescriptorImpl
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Enclosing class:
PerforceScm

@Extension @Symbol("perforce") public static class PerforceScm.DescriptorImpl extends SCMDescriptor<PerforceScm>
The relationship of Descriptor and SCM (the describable) is akin to class and object. What this means is that the descriptor is used to create instances of the describable. Usually the Descriptor is an internal class in the SCM class named DescriptorImpl. The Descriptor should also contain the global configuration options as fields, just like the SCM class contains the configurations options for a job.
Author:
pallen
  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
      public no-argument constructor
  • Method Details

    • isAutoSave

      public boolean isAutoSave()
    • getCredential

      public String getCredential()
    • getClientName

      public String getClientName()
    • getDepotPath

      public String getDepotPath()
    • isAutoSubmitOnChange

      public boolean isAutoSubmitOnChange()
    • isDeleteClient

      public boolean isDeleteClient()
    • isDeleteFiles

      public boolean isDeleteFiles()
    • isHideTicket

      public boolean isHideTicket()
    • isHideMessages

      public boolean isHideMessages()
    • getMaxFiles

      public int getMaxFiles()
    • getMaxChanges

      public int getMaxChanges()
    • getHeadLimit

      public long getHeadLimit()
    • isLastSuccess

      public boolean isLastSuccess()
    • setLastSuccess

      public void setLastSuccess(boolean lastSuccess)
    • isRecursionInPolling

      public boolean isRecursionInPolling()
    • setRecursionInPolling

      public void setRecursionInPolling(boolean recursionInPolling)
    • getDisplayName

      @NonNull public String getDisplayName()
      Returns the name of the SCM, this is the name that will show up next to CVS and Subversion when configuring a job.
      Overrides:
      getDisplayName in class Descriptor<SCM>
    • isApplicable

      public boolean isApplicable(Job project)
      Overrides:
      isApplicable in class SCMDescriptor<PerforceScm>
    • newInstance

      public SCM newInstance(org.kohsuke.stapler.StaplerRequest2 req, @NonNull net.sf.json.JSONObject formData) throws Descriptor.FormException
      Overrides:
      newInstance in class Descriptor<SCM>
      Throws:
      Descriptor.FormException
    • configure

      public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json)
      The configure method is invoked when the global configuration page is submitted. In the method the data in the web form should be copied to the Descriptor's fields. To persist the fields to the global configuration XML file, the save() method must be called. Data is defined in the global.jelly page.
      Overrides:
      configure in class Descriptor<SCM>
    • doFillCredentialItems

      public ListBoxModel doFillCredentialItems(@AncestorInPath Item project, @QueryParameter String credential)
      Credentials list, a Jelly config method for a build job.
      Parameters:
      project - Jenkins project item
      credential - Perforce credential ID
      Returns:
      A list of Perforce credential items to populate the jelly Select list.
    • doCheckCredential

      public FormValidation doCheckCredential(@AncestorInPath Item project, @QueryParameter String value)
      Credentials list, a Jelly config method for a build job.
      Parameters:
      project - Jenkins project item
      value - credential user input value
      Returns:
      A list of Perforce credential items to populate the jelly Select list.