Package org.jenkinsci.plugins.p4
Class PerforceScm.DescriptorImpl
- 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
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self -
Field Summary
Fields inherited from class hudson.scm.SCMDescriptor
repositoryBrowserFields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) The configure method is invoked when the global configuration page is submitted.doCheckCredential(Item project, String value) Credentials list, a Jelly config method for a build job.doFillCredentialItems(Item project, String credential) Credentials list, a Jelly config method for a build job.Returns the name of the SCM, this is the name that will show up next to CVS and Subversion when configuring a job.longintintbooleanisApplicable(Job project) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleannewInstance(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject formData) voidsetLastSuccess(boolean lastSuccess) voidsetRecursionInPolling(boolean recursionInPolling) Methods inherited from class hudson.scm.SCMDescriptor
getBrowserDescriptors, getGeneration, incrementGeneration, isApplicable, isBrowserReusable, loadMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
DescriptorImpl
public DescriptorImpl()public no-argument constructor
-
-
Method Details
-
isAutoSave
public boolean isAutoSave() -
getCredential
-
getClientName
-
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
Returns the name of the SCM, this is the name that will show up next to CVS and Subversion when configuring a job.- Overrides:
getDisplayNamein classDescriptor<SCM>
-
isApplicable
- Overrides:
isApplicablein classSCMDescriptor<PerforceScm>
-
newInstance
public SCM newInstance(org.kohsuke.stapler.StaplerRequest2 req, @NonNull net.sf.json.JSONObject formData) throws Descriptor.FormException - Overrides:
newInstancein classDescriptor<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:
configurein classDescriptor<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 itemcredential- Perforce credential ID- Returns:
- A list of Perforce credential items to populate the jelly Select list.
-
doCheckCredential
Credentials list, a Jelly config method for a build job.- Parameters:
project- Jenkins project itemvalue- credential user input value- Returns:
- A list of Perforce credential items to populate the jelly Select list.
-