Package hudson.plugins.claim
Class ClaimConfig
- java.lang.Object
-
- hudson.model.Descriptor<GlobalConfiguration>
-
- jenkins.model.GlobalConfiguration
-
- hudson.plugins.claim.ClaimConfig
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,OnMaster
@Extension public final class ClaimConfig extends GlobalConfiguration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description ClaimConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData)
static ClaimConfig
get()
Gets the current claim configuration.String
getDisplayName()
This human readable name is used in the configuration screen.org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript
getGroovyTrigger()
boolean
getSendEmails()
This method returns true if the global configuration says we should send mails on initial claims.boolean
getSendEmailsForStickyFailures()
This method returns true if the global configuration says we should send mails on build sticky failures.boolean
hasGroovyTrigger()
boolean
isEmailDisplayedForAssigneesList()
Returns true if the email should be displayed in the assignee list when claiming.boolean
isPropagateToFollowingBuildsByDefault()
Returns true if the claims should be propagated to following builds by default, false otherwise.boolean
isSortUsersByFullName()
Returns true if the users should be sorted by full name instead of ids.boolean
isStickyByDefault()
Returns true if the claims should be sticky by default, false otherwise.void
setEmailDisplayedForAssigneesList(boolean emailDisplayedForAssigneesList)
Sets the email display option for assignees list when claiming.void
setPropagateToFollowingBuildsByDefault(boolean propagateToFollowingBuildsByDefault)
Sets the default following builds propagation behaviour for claims.void
setSendEmails(boolean val)
Set whether we should send emails for initial claims.void
setSendEmailsForStickyFailures(boolean val)
Set whether we should send emails for sticky failures.void
setSortUsersByFullName(boolean sortUsersByFullName)
Sets the user sort method.void
setStickyByDefault(boolean stickyByDefault)
Sets the default stickiness behaviour for build claims.-
Methods inherited from class jenkins.model.GlobalConfiguration
all, getDescriptor, getGlobalConfigPage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalPropertyType, getHelpFile, 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
-
-
-
-
Method Detail
-
getDisplayName
@NonNull public String getDisplayName()
This human readable name is used in the configuration screen.- Overrides:
getDisplayName
in classDescriptor<GlobalConfiguration>
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException
- Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
getSendEmails
public boolean getSendEmails()
This method returns true if the global configuration says we should send mails on initial claims.- Returns:
- true if configuration is that we send emails for initial claims, false otherwise
-
setSendEmails
public void setSendEmails(boolean val)
Set whether we should send emails for initial claims.- Parameters:
val
- the setting to use
-
getSendEmailsForStickyFailures
public boolean getSendEmailsForStickyFailures()
This method returns true if the global configuration says we should send mails on build sticky failures.- Returns:
- true if configuration is that we send emails for sticky failures, false otherwise
-
setSendEmailsForStickyFailures
public void setSendEmailsForStickyFailures(boolean val)
Set whether we should send emails for sticky failures.- Parameters:
val
- the setting to use
-
isStickyByDefault
public boolean isStickyByDefault()
Returns true if the claims should be sticky by default, false otherwise.- Returns:
- true to make claims sticky by default, else false.
-
setStickyByDefault
public void setStickyByDefault(boolean stickyByDefault)
Sets the default stickiness behaviour for build claims.- Parameters:
stickyByDefault
- the default stickiness value.
-
isPropagateToFollowingBuildsByDefault
public boolean isPropagateToFollowingBuildsByDefault()
Returns true if the claims should be propagated to following builds by default, false otherwise.- Returns:
- true to make claims propagated to following builds by default, else false.
-
setPropagateToFollowingBuildsByDefault
public void setPropagateToFollowingBuildsByDefault(boolean propagateToFollowingBuildsByDefault)
Sets the default following builds propagation behaviour for claims.- Parameters:
propagateToFollowingBuildsByDefault
- the default following build propagation value.
-
isSortUsersByFullName
public boolean isSortUsersByFullName()
Returns true if the users should be sorted by full name instead of ids.- Returns:
- true to make users sorted by full name, else false.
-
setSortUsersByFullName
public void setSortUsersByFullName(boolean sortUsersByFullName)
Sets the user sort method.- Parameters:
sortUsersByFullName
- true to make users sorted by full name, else false.
-
isEmailDisplayedForAssigneesList
public boolean isEmailDisplayedForAssigneesList()
Returns true if the email should be displayed in the assignee list when claiming.- Returns:
- true to display email address, else false.
-
setEmailDisplayedForAssigneesList
public void setEmailDisplayedForAssigneesList(boolean emailDisplayedForAssigneesList)
Sets the email display option for assignees list when claiming.- Parameters:
emailDisplayedForAssigneesList
- true to display email address, else false.
-
getGroovyTrigger
@NonNull public org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript getGroovyTrigger()
-
hasGroovyTrigger
public boolean hasGroovyTrigger()
-
get
public static ClaimConfig get()
Gets the current claim configuration.- Returns:
- the global claim configuration
-
-