Class GerritTriggerDescriptor
java.lang.Object
hudson.model.Descriptor<Trigger<?>>
hudson.triggers.TriggerDescriptor
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerDescriptor
The Descriptor for the Trigger.
-
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.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoAutoCompleteDependencyJobsNames(String value, Item self, ItemGroup container) Provides auto-completion candidates for dependency jobs names.doCheckDependencyJobsNames(Item project, String value) Validates that the dependency jobs are legitimate and do not create cycles.doFillGerritSlaveIdItems(String serverName) Fill the Gerrit slave dropdown with the list of slaves configured with the selected server.doFillNotificationLevelItems(String serverName) Fill the dropdown for notification levels.doFillServerNameItems(Item project) Fill the server dropdown with the list of servers configured globally.doUrlCheck(String value) Checks that the provided parameter is nonempty and a valid URL.A list of CompareTypes for the UI.Getter for the list of PluginGerritEventDescriptors.booleanisApplicable(Item item) booleanWhether slave selection in jobs should be allowed.booleanChecks if the provided job type can supportGerritTrigger.getBuildUnsuccessfulFilepath().Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
GerritTriggerDescriptor
public GerritTriggerDescriptor()Default Constructor.
-
-
Method Details
-
isUnsuccessfulMessageFileSupported
Checks if the provided job type can supportGerritTrigger.getBuildUnsuccessfulFilepath(). I.e. if the job is anAbstractProject.- Parameters:
job- the job to check.- Returns:
- true if so.
-
doAutoCompleteDependencyJobsNames
public AutoCompletionCandidates doAutoCompleteDependencyJobsNames(@QueryParameter String value, @AncestorInPath Item self, @AncestorInPath 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 FormValidation doCheckDependencyJobsNames(@AncestorInPath 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
Fill the server dropdown with the list of servers configured globally.- Parameters:
project- the current project.- 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
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
Checks that the provided parameter is nonempty and a valid URL.- Parameters:
value- the value.- Returns:
FormValidation.ok()
-
doFillNotificationLevelItems
Fill the dropdown for notification levels.- Parameters:
serverName- the server name.- Returns:
- the values.
-
isApplicable
- Specified by:
isApplicablein classTriggerDescriptor
-
getDisplayName
- Overrides:
getDisplayNamein classDescriptor<Trigger<?>>
-
getHelpFile
- Overrides:
getHelpFilein classDescriptor<Trigger<?>>
-
getCompareTypes
A list of CompareTypes for the UI.- Returns:
- A list of CompareTypes
-
getGerritEventDescriptors
Getter for the list of PluginGerritEventDescriptors.- Returns:
- the list.
-