com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger
Class GerritTrigger.DescriptorImpl

java.lang.Object
  extended by hudson.model.Descriptor<hudson.triggers.Trigger<?>>
      extended by hudson.triggers.TriggerDescriptor
          extended by com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.DescriptorImpl
All Implemented Interfaces:
hudson.model.Saveable
Enclosing class:
GerritTrigger

@Extension
public static final class GerritTrigger.DescriptorImpl
extends hudson.triggers.TriggerDescriptor

The Descriptor for the Trigger.


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.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
GerritTrigger.DescriptorImpl()
          Default Constructor.
 
Method Summary
 hudson.model.AutoCompletionCandidates doAutoCompleteDependencyJobsNames(String value, hudson.model.Item self, hudson.model.ItemGroup container)
          Provides auto-completion candidates for dependency jobs names.
 hudson.util.FormValidation doCheckDependencyJobsNames(hudson.model.Item project, String value)
          Validates that the dependency jobs are legitimate and do not create cycles.
 hudson.util.FormValidation doEmptyOrIntegerCheck(String value)
          Checks that the provided parameter is an empty string or an integer.
 hudson.util.ListBoxModel doFillGerritSlaveIdItems(String serverName)
          Fill the Gerrit slave dropdown with the list of slaves configured with the selected server.
 hudson.util.ListBoxModel doFillServerNameItems()
          Fill the server dropdown with the list of servers configured globally.
 hudson.util.FormValidation doUrlCheck(String value)
          Checks that the provided parameter is nonempty and a valid URL.
 CompareType[] getCompareTypes()
          A list of CompareTypes for the UI.
 String getDisplayName()
           
 List<PluginGerritEvent.PluginGerritEventDescriptor> getGerritEventDescriptors()
          Getter for the list of PluginGerritEventDescriptors.
 String getHelpFile()
           
 boolean isApplicable(hudson.model.Item item)
           
 boolean isSlaveSelectionAllowedInJobs()
          Whether slave selection in jobs should be allowed.
 
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, 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

GerritTrigger.DescriptorImpl

public GerritTrigger.DescriptorImpl()
Default Constructor.

Method Detail

doEmptyOrIntegerCheck

public hudson.util.FormValidation doEmptyOrIntegerCheck(@QueryParameter(value="value")
                                                        String value)
Checks that the provided parameter is an empty string or an integer.

Parameters:
value - the value.
Returns:
FormValidation.validatePositiveInteger(String)

doAutoCompleteDependencyJobsNames

public hudson.model.AutoCompletionCandidates doAutoCompleteDependencyJobsNames(@QueryParameter
                                                                               String value,
                                                                               @AncestorInPath
                                                                               hudson.model.Item self,
                                                                               @AncestorInPath
                                                                               hudson.model.ItemGroup container)
Provides auto-completion candidates for dependency jobs names.

Parameters:
value - the value.
self - the current instance.
container - the container.
Returns:
AutoCompletionCandidates

doCheckDependencyJobsNames

public hudson.util.FormValidation doCheckDependencyJobsNames(@AncestorInPath
                                                             hudson.model.Item project,
                                                             @QueryParameter
                                                             String value)
Validates that the dependency jobs are legitimate and do not create cycles.

Parameters:
value - the string value.
project - the current project.
Returns:
FormValidation

doFillServerNameItems

public hudson.util.ListBoxModel doFillServerNameItems()
Fill the server dropdown with the list of servers configured globally.

Returns:
list of servers.

isSlaveSelectionAllowedInJobs

public boolean isSlaveSelectionAllowedInJobs()
Whether slave selection in jobs should be allowed. If so, the user will see one more dropdown on the job config page, right under server selection dropdown.

Returns:
true if so.

doFillGerritSlaveIdItems

public hudson.util.ListBoxModel doFillGerritSlaveIdItems(@QueryParameter(value="serverName")
                                                         String serverName)
Fill the Gerrit slave dropdown with the list of slaves configured with the selected server. Expected to be called only when slave config is enabled at job level.

Parameters:
serverName - the name of the selected server.
Returns:
list of slaves.

doUrlCheck

public hudson.util.FormValidation doUrlCheck(@QueryParameter(value="value")
                                             String value)
Checks that the provided parameter is nonempty and a valid URL.

Parameters:
value - the value.
Returns:
FormValidation.ok()

isApplicable

public boolean isApplicable(hudson.model.Item item)
Specified by:
isApplicable in class hudson.triggers.TriggerDescriptor

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.triggers.Trigger<?>>

getHelpFile

public String getHelpFile()
Overrides:
getHelpFile in class hudson.model.Descriptor<hudson.triggers.Trigger<?>>

getCompareTypes

public CompareType[] getCompareTypes()
A list of CompareTypes for the UI.

Returns:
A list of CompareTypes

getGerritEventDescriptors

public List<PluginGerritEvent.PluginGerritEventDescriptor> getGerritEventDescriptors()
Getter for the list of PluginGerritEventDescriptors.

Returns:
the list.


Copyright © 2004-2014. All Rights Reserved.