org.jenkinsci.plugins.darcs
Class DarcsScmDescriptor

java.lang.Object
  extended by hudson.model.Descriptor<hudson.scm.SCM>
      extended by hudson.scm.SCMDescriptor<DarcsScm>
          extended by org.jenkinsci.plugins.darcs.DarcsScmDescriptor
All Implemented Interfaces:
hudson.model.Saveable

@Extension
public class DarcsScmDescriptor
extends hudson.scm.SCMDescriptor<DarcsScm>

Inner class of the SCM descriptor. Contains the global configuration options as fields.

Author:
Sven Strittmatter

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType, hudson.model.Descriptor.Self
 
Field Summary
 
Fields inherited from class hudson.scm.SCMDescriptor
generation, repositoryBrowser
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
DarcsScmDescriptor()
          Dedicated constructor.
 
Method Summary
 boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
           
 hudson.util.FormValidation doDarcsExeCheck(String value)
          Validated the given executable string if it is a valid Darcs executable.
 String getDarcsExe()
          Returns the executable.
 String getDisplayName()
          Returns the display name.
 void load()
          Own implementation of XML configuration loading to inject Jenkins.XSTREAM2 for unmarshalling.
 hudson.scm.SCM newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
           
 
Methods inherited from class hudson.scm.SCMDescriptor
getBrowserDescriptors, isApplicable, isBrowserReusable
 
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getT, getViewPage, isInstance, isSubTypeOf, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DarcsScmDescriptor

public DarcsScmDescriptor()
Dedicated constructor.

Method Detail

load

public void load()
Own implementation of XML configuration loading to inject Jenkins.XSTREAM2 for unmarshalling. TODO Remove this, if it possible to inject XStream into parent implementation. Since 1.494 Dexcriptor#getConfigFile() is not private anymore. override load() and call getConfigFile().getXStream().addCompatibilityAlias() public void load() { getConfigFile().getXStream().addCompatibilityAlias("org.jenkinsci.plugins.darcs.DarcsScm$DescriptorImpl", DarcsScmDescriptor.class); super.load(); }

Overrides:
load in class hudson.scm.SCMDescriptor<DarcsScm>

getDisplayName

public String getDisplayName()
Returns the display name.

Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.scm.SCM>
Returns:
display name string

getDarcsExe

public String getDarcsExe()
Returns the executable.

Returns:
if darcsExe is null DEFAULT_EXE will be returned

newInstance

public hudson.scm.SCM newInstance(org.kohsuke.stapler.StaplerRequest req,
                                  net.sf.json.JSONObject formData)
                           throws hudson.model.Descriptor.FormException
Overrides:
newInstance in class hudson.model.Descriptor<hudson.scm.SCM>
Throws:
hudson.model.Descriptor.FormException

configure

public boolean configure(org.kohsuke.stapler.StaplerRequest req,
                         net.sf.json.JSONObject formData)
                  throws hudson.model.Descriptor.FormException
Overrides:
configure in class hudson.model.Descriptor<hudson.scm.SCM>
Throws:
hudson.model.Descriptor.FormException

doDarcsExeCheck

public hudson.util.FormValidation doDarcsExeCheck(@QueryParameter
                                                  String value)
Validated the given executable string if it is a valid Darcs executable.

Parameters:
value - string from the plugin configuration field
Returns:
validation object which indicates validation state


Copyright © 2004-2013 weltraumschaf.de. All Rights Reserved.