Class PerforceScm.DescriptorImpl

  • All Implemented Interfaces:
    Saveable, 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 Detail

      • DescriptorImpl

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

      • 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)
      • getDisplayName

        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>
      • configure

        public boolean configure​(org.kohsuke.stapler.StaplerRequest req,
                                 net.sf.json.JSONObject json)
                          throws Descriptor.FormException
        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>
        Throws:
        Descriptor.FormException
      • 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.