Class Jenkins
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Node
-
- hudson.model.AbstractCIBase
-
- jenkins.model.Jenkins
-
- All Implemented Interfaces:
ExtensionPoint,Describable<Node>,DescriptorByNameOwner,ItemGroup<TopLevelItem>,ModelObject,ModifiableItemGroup<TopLevelItem>,ModifiableViewGroup,PersistenceRoot,ReconfigurableDescribable<Node>,Saveable,ViewGroup,SearchableModelObject,SearchItem,AccessControlled,DirectlyModifiableTopLevelItemGroup,Loadable,ModelObjectWithChildren,ModelObjectWithContextMenu,ModifiableTopLevelItemGroup,OnMaster,org.kohsuke.stapler.StaplerFallback,org.kohsuke.stapler.StaplerProxy
- Direct Known Subclasses:
Hudson
@ExportedBean public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLevelItemGroup, org.kohsuke.stapler.StaplerProxy, org.kohsuke.stapler.StaplerFallback, ModifiableViewGroup, AccessControlled, DescriptorByNameOwner, ModelObjectWithContextMenu, ModelObjectWithChildren, OnMaster, Loadable
Root object of the system.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJenkins.CloudListstatic classJenkins.DescriptorImplstatic classJenkins.EnforceSlaveAgentPortAdministrativeMonitorstatic interfaceJenkins.JenkinsHolderHook for a test harness to intercept Jenkins.get() Do not use in the production code as the signature may change.static classJenkins.MasterComputerstatic classJenkins.MasterRestartNotifyier-
Nested classes/interfaces inherited from class hudson.model.Node
Node.InternalComputerListener, Node.Mode
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
-
Field Summary
Fields Modifier and Type Field Description static PermissionADMINISTERList<AdministrativeMonitor>administrativeMonitorsAdministrativeMonitors installed on this system.static Set<String>ALLOWED_RESOURCE_EXTENSIONSExtension list thatdoResources(StaplerRequest, StaplerResponse)can serve.static AuthenticationANONYMOUSDeprecated.useANONYMOUS2static org.springframework.security.core.AuthenticationANONYMOUS2Authenticationobject that represents the anonymous user.static booleanAUTOMATIC_AGENT_LAUNCHAutomatically try to launch an agent when Jenkins is initialized or a new agent computer is created.static StringCHANGELOG_URLHudson.CloudListcloudsActiveClouds.protected ConcurrentMap<Node,Computer>computersComputers in this Jenkins system.static booleanCONCURRENT_BUILDDeprecated.as of 1.464 This flag will have no effect.static intEXTEND_TIMEOUT_SECONDSThe amount of time by which to extend the startup notification timeout as each initialization milestone is attained.static booleanFLYWEIGHT_SUPPORTDeprecated.No longer used.static booleanKILL_AFTER_LOADstatic List<LogRecord>logRecordsLive view of recentLogRecords produced by Jenkins.LookuplookupStores various objects scoped toJenkins.static PermissionMANAGEThis permission grants access to parts of the Jenkins system configuration.static Permission[]MANAGE_AND_SYSTEM_READstatic StringNAME_VALIDATION_REJECTS_TRAILING_DOT_PROPName of the system property escape hatch for SECURITY-2424.OverallLoadStatisticsoverallLoadLoad statistics of the entire system.NodeProvisioneroverallNodeProvisionerDeprecated.as of 1.467 UseunlabeledNodeProvisioner.static booleanPARALLEL_LOADstatic PermissionGroupPERMISSIONSPluginManagerpluginManagerLoaded plugins.ProxyConfigurationproxyHTTP proxy configuration.static PermissionREADstatic StringRESOURCE_PATHPrefix to static resources like images and javascripts in the war file.FilerootRoot directory of the system.static PermissionRUN_SCRIPTSDeprecated.in Jenkins 2.222 useADMINISTERinsteadjavax.servlet.ServletContextservletContextstatic StringSESSION_HASHUnique random token that identifies the current session.protected NodeListslavesDeprecated.in favour ofNodesstatic PermissionSYSTEM_READAllows read-only access to large parts of the system configuration.TcpSlaveAgentListenertcpSlaveAgentListenerstatic StringUNCOMPUTED_VERSIONThe version number before it is "computed" (by a call to computeVersion()).LoadStatisticsunlabeledLoadLoad statistics of the free roaming jobs and agents.NodeProvisionerunlabeledNodeProvisionerNodeProvisionerthat reacts tounlabeledLoad.static StringVERSIONVersion number of this Jenkins.static StringVERSION_HASHHash ofVERSION.static StringVIEW_RESOURCE_PATHPrefix to resources alongside view scripts.static com.thoughtworks.xstream.XStreamXSTREAMThread-safe reusableXStream.static XStream2XSTREAM2-
Fields inherited from class hudson.model.AbstractCIBase
LOG_STARTUP_PERFORMANCE
-
Fields inherited from class hudson.model.Node
holdOffLaunchUntilSave, SKIP_BUILD_CHECK_ON_FLYWEIGHTS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJenkins(File root, javax.servlet.ServletContext context)protectedJenkins(File root, javax.servlet.ServletContext context, PluginManager pluginManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void_doScript(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, javax.servlet.RequestDispatcher view, hudson.remoting.VirtualChannel channel, ACL acl)Fingerprint_getFingerprint(String md5sum)Gets aFingerprintobject if it exists.<I extends TopLevelItem>
Iadd(I item, String name)Adds an item to this group.voidaddNode(Node n)Adds one moreNodeto Jenkins.voidaddView(View v)booleancanAdd(TopLevelItem item)Returns true if a particular item may be added to this group.booleancanDelete(View view)Determine whether a view may be deleted.static voidcheckGoodName(String name)Check if the given name is suitable as a name for job, view, etc.voidcleanUp()Called to shut down the system.<T extends TopLevelItem>
Tcopy(T src, String name)Copies a job.ComputercreateComputer()LaunchercreateLauncher(TaskListener listener)Returns aLauncherfor executing programs on this node.FilePathcreatePath(String absolutePath)Gets theFilePathon this node.TopLevelItemcreateProject(TopLevelItemDescriptor type, String name)TopLevelItemcreateProject(TopLevelItemDescriptor type, String name, boolean notify)Creates a new job.<T extends TopLevelItem>
TcreateProject(Class<T> type, String name)Creates a new job.TopLevelItemcreateProjectFromXML(String name, InputStream xml)Creates a new job from its configuration XML.voiddeleteView(View view)Deletes a view in this group.voiddisableSecurity()org.kohsuke.stapler.HttpRedirectdoCancelQuietDown()Cancel previous quiet down Jenkins - preparation for a restartFormValidationdoCheckDisplayName(String displayName, String jobName)Checks to see if the candidate displayName collides with any existing display names or project namesFormValidationdoCheckURIEncoding(org.kohsuke.stapler.StaplerRequest request)Deprecated.FormValidationdoCheckViewName(String value)Checks if a top-level view with the given name exists and make sure that the name is good as a view name.ModelObjectWithContextMenu.ContextMenudoChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)Generates the context menu to list up all the children.voiddoClassicThreadDump(org.kohsuke.stapler.StaplerResponse rsp)Backward compatibility.voiddoConfigExecutorsSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Accepts submission from the node configuration page.voiddoConfigSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Accepts submission from the configuration page.ModelObjectWithContextMenu.ContextMenudoContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)Generates the context menu.TopLevelItemdoCreateItem(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)The request format follows that of<n:form xmlns:n="/lib/form">.voiddoCreateView(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)FormValidationdoDefaultJDKCheck(org.kohsuke.stapler.StaplerRequest request, String value)If the user chose the default JDK, make sure we got 'java' in PATH.voiddoDoFingerprintCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Do a finger-print check.voiddoEval(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Evaluates the Jelly script submitted by the client.voiddoException()End point that intentionally throws an exception to test the error behaviour.voiddoExit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Shutdown the system.voiddoFingerprintCleanup(org.kohsuke.stapler.StaplerResponse rsp)voiddoGc(org.kohsuke.stapler.StaplerResponse rsp)For debugging.voiddoIconSize(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Changes the icon size by changing the cookieSlave.JnlpJardoJnlpJars(org.kohsuke.stapler.StaplerRequest req)voiddoLoginEntry(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Called once the user logs in.voiddoLogout(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Logs out the user.org.kohsuke.stapler.HttpRedirectdoQuietDown()org.kohsuke.stapler.HttpRedirectdoQuietDown(boolean block, int timeout)Deprecated.since 2.267; usedoQuietDown(boolean, int, String, boolean)instead.org.kohsuke.stapler.HttpRedirectdoQuietDown(boolean block, int timeout, String message)Deprecated.usedoQuietDown(boolean, int, String, boolean)instead.org.kohsuke.stapler.HttpRedirectdoQuietDown(boolean block, int timeout, String message, boolean safeRestart)Quiet down Jenkins - preparation for a restartorg.kohsuke.stapler.HttpResponsedoReload()Reloads the configuration.voiddoResources(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Serves static resources placed along with Jelly view files.voiddoRestart(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Perform a restart of Jenkins, if we can.org.kohsuke.stapler.HttpResponsedoSafeExit(org.kohsuke.stapler.StaplerRequest req)Shutdown the system safely.org.kohsuke.stapler.HttpResponsedoSafeRestart(org.kohsuke.stapler.StaplerRequest req)Deprecated.usedoSafeRestart(StaplerRequest, String)instead.org.kohsuke.stapler.HttpResponsedoSafeRestart(org.kohsuke.stapler.StaplerRequest req, String message)Queues up a safe restart of Jenkins.voiddoScript(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)For system diagnostics.voiddoScriptText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Run arbitrary Groovy script and return result as plain text.voiddoSecured(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Checks if the user was successfully authenticated.voiddoSignup(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Sign up for the user account.voiddoSimulateOutOfMemory()Simulates OutOfMemoryError.voiddoSubmitDescription(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Accepts the new description.voiddoTestPost(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)org.kohsuke.stapler.HttpResponsedoToggleCollapse()DirectoryBrowserSupportdoUserContent()Binds /userContent/...FormValidationdoViewExistsCheck(String value)Deprecated.1.512voiddoWorkspaceCleanup(org.kohsuke.stapler.StaplerResponse rsp)static StringexpandVariablesForDirectory(String base, String itemFullName, String itemRootDir)voidgenerateNotFoundResponse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Serve a custom 404 error page, configured in web.xml.static Jenkinsget()Gets theJenkinssingleton.ACLgetACL()Returns the rootACL.List<Action>getActions()Returns the transientActions associated with the top page.List<AdministrativeMonitor>getActiveAdministrativeMonitors()Returns the enabled and activated administrative monitors accessible to the current user.static JenkinsgetActiveInstance()Deprecated.This is a verbose historical alias forget().org.kohsuke.stapler.framework.adjunct.AdjunctManagergetAdjuncts(String dummy)MakesAdjunctManagerURL-bound.AdministrativeMonitorgetAdministrativeMonitor(String id)BindsAdministrativeMonitors to URL.Set<String>getAgentProtocols()Returns the enabled agent protocols.Map<String,Map<String,String>>getAllThreadDumps()Obtains the thread dump of all agents (including the controller/built-in node.)ApigetApi()static AuthenticationgetAuthentication()Deprecated.static org.springframework.security.core.AuthenticationgetAuthentication2()Gets theAuthenticationobject that represents the user associated with the current request.AuthorizationStrategygetAuthorizationStrategy()FilegetBuildDirFor(Job job)Descriptor<Builder>getBuilder(String shortClassName)Gets the builder descriptor by name.Descriptor<BuildWrapper>getBuildWrapper(String shortClassName)Gets the build wrapper descriptor by name.Map<ManagementLink.Category,List<ManagementLink>>getCategorizedManagementLinks()ClockDifferencegetClockDifference()Estimates the clock difference with this agent.hudson.remoting.Callable<ClockDifference,IOException>getClockDifferenceCallable()Returns aCallablethat when run on the channel, estimates the clock difference.CloudSetgetCloud()Only there to bind to /cloud/ URL.CloudgetCloud(String name)ComputerSetgetComputer()Deprecated.UI method.ComputergetComputer(String name)protected ConcurrentMap<Node,Computer>getComputerMap()Computer[]getComputers()Gets the read-only list of allComputers.protected XmlFilegetConfigFile()The file we save our configuration.StringgetConfiguredRootUrl()Exported alias forJenkinsLocationConfiguration.getUrl().CrumbIssuergetCrumbIssuer()Gets theCrumbIssuercurrently in use.DependencyGraphgetDependencyGraph()StringgetDescription()NodeDescriptorgetDescriptor()Gets the descriptor for this instance.DescriptorgetDescriptor(Class<? extends Describable> type)Gets theDescriptorthat corresponds to the givenDescribabletype.DescriptorgetDescriptor(String id)ExposesDescriptorby its name to URL.DescriptorgetDescriptorByName(String id)Alias forgetDescriptor(String).<T extends Descriptor>
TgetDescriptorByType(Class<T> type)Gets theDescriptorinstance in the current Jenkins by its type.<T extends Describable<T>,D extends Descriptor<T>>
DescriptorExtensionList<T,D>getDescriptorList(Class<T> type)ReturnsExtensionListthat retains the discoveredDescriptorinstances for the given kind ofDescribable.DescriptorgetDescriptorOrDie(Class<? extends Describable> type)Works just likegetDescriptor(Class)but don't take no for an answer.StringgetDisplayName()ObjectgetDynamic(String token)<T> ExtensionList<T>getExtensionList(Class<T> extensionType)ReturnsExtensionListthat retains the discovered instances for the given extension type.ExtensionListgetExtensionList(String extensionType)Used to bindExtensionLists to URLs.FederatedLoginServicegetFederatedLoginService(String name)List<FederatedLoginService>getFederatedLoginServices()ObjectgetFingerprint(String md5sum)FingerprintMapgetFingerprintMap()StringgetFullDisplayName()StringgetFullName()Gets the full name of thisItemGroup.Future<DependencyGraph>getFutureDependencyGraph()DescribableList<NodeProperty<?>,NodePropertyDescriptor>getGlobalNodeProperties()RemotingDiagnostics.HeapDumpgetHeapDump()Obtains the heap dump.InitMilestonegetInitLevel()Gets the initialization milestone that we've already reached.com.google.inject.InjectorgetInjector()Gets the dependency injection container that hosts all the extension implementations and other components in Jenkins.InstallStategetInstallState()Get the Jenkinsinstall state.static JenkinsgetInstance()Deprecated.This is a historical alias forgetInstanceOrNull()but with ambiguous nullability.static JenkinsgetInstanceOrNull()Gets theJenkinssingleton.TopLevelItemgetItem(String name)Gets theIteminside this group that has a given name, or null if it does not exist.ItemgetItem(String pathName, Item context)ItemgetItem(String pathName, ItemGroup context)Gets the item by its path name from the given context<T extends Item>
TgetItem(String pathName, ItemGroup context, Class<T> type)<T extends Item>
TgetItem(String pathName, Item context, Class<T> type)ItemgetItemByFullName(String fullName)<T extends Item>
TgetItemByFullName(String fullName, Class<T> type)Gets theItemobject by its full name.JenkinsgetItemGroup()Returns theItemGroupfrom which the views in this group should render items.Map<String,TopLevelItem>getItemMap()Returns the read-only view of all theTopLevelItems keyed by their names.List<TopLevelItem>getItems()Gets just the immediate children ofJenkins.<T> List<T>getItems(Class<T> type)Gets just the immediate children ofJenkinsbut of the given type.List<TopLevelItem>getItems(Predicate<TopLevelItem> pred)Gets just the immediate children ofJenkinsbased on supplied predicate.JDKgetJDK(String name)Gets the JDK installation of the given name, or returns null.List<JDK>getJDKs()Slave.JnlpJargetJnlpJars(String fileName)Serves jar files for inbound agents.Collection<String>getJobNames()Gets the names of all theJobs.JobPropertyDescriptorgetJobProperty(String shortClassName)Gets theJobPropertyDescriptorby name.LabelgetLabel(String expr)Gets the label that exists on this system by the name.LabelAtomgetLabelAtom(String name)Returns the label atom of the given name.Set<LabelAtom>getLabelAtoms()protected Set<LabelAtom>getLabelAtomSet()Set<Label>getLabels()Gets all the active labels in the current system.StringgetLabelString()Returns the manually configured label for a node.StringgetLegacyInstanceId()Returns the unique identifier of this Jenkins that has been historically used to identify this Jenkins to the outside world.LifecyclegetLifecycle()LogRecorderManagergetLog()For bindingLogRecorderManagerto "/log".List<ManagementLink>getManagementLinks()MarkupFormattergetMarkupFormatter()Gets the markup formatter used in the system.UsergetMe()Exposes the current user to/meURL.Node.ModegetMode()ReturnsNode.Mode.EXCLUSIVEif this node is only available for those jobs that exclusively specifies this node as the assigned node.MyViewsTabBargetMyViewsTabBar()NodegetNode(String name)Gets the agent node of the give name, hooked under this Jenkins.StringgetNodeDescription()Human-readable description of this node.DescribableList<NodeProperty<?>,NodePropertyDescriptor>getNodeProperties()Gets theNodePropertyinstances configured for thisNode.List<Node>getNodes()NodesgetNodesObject()intgetNumExecutors()Returns the number ofExecutors.NodegetOrLoadNode(String nodeName)<P extends Plugin>
PgetPlugin(Class<P> clazz)Gets the plugin object from its class.PlugingetPlugin(String shortName)Gets the plugin object from its short name.PluginManagergetPluginManager()<P extends Plugin>
List<P>getPlugins(Class<P> clazz)Gets the plugin objects from their super-class.ViewgetPrimaryView()Returns the primaryViewthat renders the top-page of Jenkins.ProjectNamingStrategygetProjectNamingStrategy()The strategy used to check the project names.List<Project>getProjects()Deprecated.This method will ignore Maven and matrix projects, as well as projects inside containers such as folders.ProxyConfigurationgetProxy()Retrieve the proxy configuration.Descriptor<Publisher>getPublisher(String shortClassName)Gets the publisher descriptor by name.QueuegetQueue()StringgetQuietDownReason()Returns quiet down reason if it was indicated.intgetQuietPeriod()Gets the system default quiet period.StringgetRawBuildsDir()StringgetRawWorkspaceDir()Descriptor<RepositoryBrowser<?>>getRepositoryBrowser(String shortClassName)Gets the repository browser descriptor by name.Descriptor<RetentionStrategy<?>>getRetentionStrategy(String shortClassName)Gets the retention strategy descriptor by name.FilegetRootDir()Gets the root directory on the file system that thisItemcan use freely for storing the configuration data.FilegetRootDirFor(TopLevelItem child)Assigns theroot directoryfor children.FilePathgetRootPath()Gets the root directory of this node.StringgetRootUrl()Gets the absolute URL of Jenkins, such ashttp://localhost/jenkins/.StringgetRootUrlFromRequest()Gets the absolute URL of Jenkins top page, such ashttp://localhost/jenkins/.Descriptor<SCM>getScm(String shortClassName)Gets the SCM descriptor by name.intgetScmCheckoutRetryCount()Gets the global SCM check out retry count.CopyOnWriteList<SCMListener>getSCMListeners()Deprecated.UseSCMListener.all()instead.StringgetSearchUrl()Returns the URL of this item relative to the parentSearchItem.StringgetSecretKey()Deprecated.Due to the past security advisory, this value should not be used any more to protect sensitive information.SecretKeygetSecretKeyAsAES128()Deprecated.SeegetSecretKey().SecurityModegetSecurity()Returns the constant that captures the three basic security modes in Jenkins.SecurityRealmgetSecurityRealm()Descriptor<SecurityRealm>getSecurityRealms(String shortClassName)Gets theSecurityRealmdescriptors by name.LabelAtomgetSelfLabel()Gets the special label that represents this node itself.SetupWizardgetSetupWizard()If set, a currently active setup wizard - e.g.intgetSlaveAgentPort()ViewgetStaplerFallback()Fallback to the primary view.static VersionNumbergetStoredVersion()Get the stored version of Jenkins, as stored bydoConfigSubmit(org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse).StringgetSystemMessage()Synonym forgetDescription().ObjectgetTarget()TcpSlaveAgentListenergetTcpSlaveAgentListener()Collection<String>getTopLevelItemNames()Gets the names of all theTopLevelItems.TriggerDescriptorgetTrigger(String shortClassName)Gets the trigger descriptor by name.Collection<String>getUnprotectedRootActions()Gets a list of unprotected root actions.UpdateCentergetUpdateCenter()StringgetUrlChildPrefix()Gets the URL token that prefixes the URLs for childItems.UsergetUser(String name)Gets the user of the given name.static VersionNumbergetVersion()ParsesVERSIONintoVersionNumber, or null if it's not parseable as a version number (such as when Jenkins is run withmvn jetty:run)ViewgetView(String name)Gets a view by the specified name.List<Action>getViewActions()Returns actions that should be displayed in views.Collection<View>getViews()Gets the read-only list of allViews.ViewsTabBargetViewsTabBar()Gets the TabBar for the views.List<Widget>getWidgets()Gets theWidgets registered on this object.FilePathgetWorkspaceFor(TopLevelItem item)Returns a "workspace" directory for the givenTopLevelItem.static booleanisCheckURIEncodingEnabled()Deprecated.booleanisDefaultBuildDir()If the configured buildsDir has it's default value or has been changed.booleanisDisableRememberMe()BooleanisNoUsageStatistics()If usage statistics has been disabledbooleanisPreparingSafeRestart()Returns if the quietingDown is a safe restart.booleanisQuietingDown()Returns true if Jenkins is quieting down.booleanisRootUrlSecure()Is Jenkins running in HTTPS? Note that we can't really trustServletRequest.isSecure()because HTTPS might be terminated in the reverse proxy.booleanisSlaveAgentPortEnforced()booleanisSubjectToMandatoryReadPermissionCheck(String restOfPath)Test a path to see if it is subject to mandatory read permission checks by container-managed securitybooleanisTerminating()Returns true if the container initiated the termination of the web application.booleanisUpgradedFromBefore(VersionNumber v)Returns true if the current running Jenkins is upgraded from a version earlier than the specified version.booleanisUsageStatisticsCollected()If usage statistics are being collectedbooleanisUseCrumbs()If true, all the POST requests to Jenkins would have to have crumb in it to protect Jenkins from CSRF vulnerabilities.booleanisUseProjectNamingStrategy()booleanisUseSecurity()A convenience method to check if there's some security restrictions in place.voidload()Loads the state of this object from disk.voidloadNode(File dir)static <T> Tlookup(Class<T> type)Shortcut forJenkins.getInstanceOrNull()?.lookup.get(type)SearchIndexBuildermakeSearchIndex()Default implementation that returns empty index.voidonDeleted(TopLevelItem item)Called in response toAbstractItem.doDoDelete(StaplerRequest, StaplerResponse)voidonRenamed(TopLevelItem job, String oldName, String newName)Called byJob.renameTo(String)to update relevant data structure.voidonViewRenamed(View view, String oldName, String newName)Viewcalls this method when it's renamed.voidputItem(TopLevelItem item)Overwrites the existing item by new one.protected ObjectreadResolve()Maintains backwards compatibility.voidrebuildDependencyGraph()Rebuilds the dependency map.Future<DependencyGraph>rebuildDependencyGraphAsync()Rebuilds the dependency map asynchronously.voidrefreshExtensions()RefreshExtensionLists by adding all the newly discovered extensions.voidreload()Reloads the configuration synchronously.voidremove(TopLevelItem item)Removes an item from this group.voidremoveNode(Node n)Removes aNodefrom Jenkins.voidrestart()Performs a restart.voidsafeRestart()Deprecated.usesafeRestart(String)instead.voidsafeRestart(String message)Queues up a restart to be performed once there are no builds currently running.voidsave()Save the settings to a file.voidsetAgentProtocols(Set<String> protocols)Sets the enabled agent protocols.voidsetAuthorizationStrategy(AuthorizationStrategy a)Sets a new authorization strategy.voidsetCrumbIssuer(CrumbIssuer issuer)voidsetDisableRememberMe(boolean disableRememberMe)voidsetInstallState(InstallState newState)Update the current install state.voidsetJDKs(Collection<? extends JDK> jdks)Replaces all JDK installations with those from the given collection.voidsetLabelString(String label)Sets the label string for a node.voidsetLog(LogRecorderManager log)Set the LogRecorderManager.voidsetMarkupFormatter(MarkupFormatter f)Sets the markup formatter used in the system globally.voidsetMode(Node.Mode m)voidsetMyViewsTabBar(MyViewsTabBar myViewsTabBar)voidsetNodeName(String name)voidsetNodes(List<? extends Node> n)voidsetNoUsageStatistics(Boolean noUsageStatistics)Sets the noUsageStatistics flagvoidsetNumExecutors(int n)Sets a number of executors.voidsetPrimaryView(View v)voidsetProjectNamingStrategy(ProjectNamingStrategy ns)voidsetProxy(ProxyConfiguration proxy)Set the proxy configuration.voidsetQuietPeriod(Integer quietPeriod)Sets the global quiet period.voidsetRawBuildsDir(String buildsDir)voidsetScmCheckoutRetryCount(int scmCheckoutRetryCount)voidsetSecurityRealm(SecurityRealm securityRealm)Sets a security realm.voidsetSlaveAgentPort(int port)voidsetSystemMessage(String message)Sets the system message.voidsetViews(Collection<View> views)Completely replaces views.voidsetViewsTabBar(ViewsTabBar viewsTabBar)booleanshouldShowStackTrace()LabelAtomtryGetLabelAtom(String name)Returns the label atom of the given name, only if it already exists.voidunloadNode(Node n)Unload a node from Jenkins without touching its configuration file.protected voidupdateComputerList()protected voidupdateNewComputer(Node n)booleanupdateNode(Node n)Saves an existingNodeon disk, called byNode.save().-
Methods inherited from class hudson.model.AbstractCIBase
getDisabledAdministrativeMonitors, getNodeName, getUrl, interruptReloadThread, killComputer, resetLabel, setDisabledAdministrativeMonitors, setViewOwner, updateComputerList, updateNewComputer
-
Methods inherited from class hudson.model.Node
canTake, canTake, getAssignedLabels, getChannel, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, onLoad, reconfigure, toComputer
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
Methods inherited from interface hudson.model.ItemGroup
allItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getItemName, getItemsStream, getItemsStream, getUrl
-
Methods inherited from interface hudson.model.ViewGroup
getAllViews, getUrl
-
-
-
-
Field Detail
-
root
public final transient File root
Root directory of the system.
-
computers
protected final transient ConcurrentMap<Node,Computer> computers
Computers in this Jenkins system. Read-only.
-
clouds
public final Hudson.CloudList clouds
ActiveClouds.
-
slaves
@Deprecated protected transient volatile NodeList slaves
Deprecated.in favour ofNodesLegacy store of the set of installed cluster nodes.
-
pluginManager
public final transient PluginManager pluginManager
Loaded plugins.
-
tcpSlaveAgentListener
public transient volatile TcpSlaveAgentListener tcpSlaveAgentListener
-
overallLoad
@Exported public final transient OverallLoadStatistics overallLoad
Load statistics of the entire system. This includes every executor and every job in the system.
-
unlabeledLoad
@Exported public final transient LoadStatistics unlabeledLoad
Load statistics of the free roaming jobs and agents. This includes all executors onNode.Mode.NORMALnodes and jobs that do not have any assigned nodes.- Since:
- 1.467
-
unlabeledNodeProvisioner
public final transient NodeProvisioner unlabeledNodeProvisioner
NodeProvisionerthat reacts tounlabeledLoad.- Since:
- 1.467
-
overallNodeProvisioner
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public final transient NodeProvisioner overallNodeProvisioner
Deprecated.as of 1.467 UseunlabeledNodeProvisioner. This was broken because it was tracking all the executors in the system, but it was only tracking free-roaming jobs in the queue. SoCloudfails to launch nodes when you have some exclusive agents and free-roaming jobs in the queue.
-
servletContext
public final transient javax.servlet.ServletContext servletContext
-
administrativeMonitors
public final transient List<AdministrativeMonitor> administrativeMonitors
AdministrativeMonitors installed on this system.- See Also:
AdministrativeMonitor
-
proxy
public transient volatile ProxyConfiguration proxy
HTTP proxy configuration.
-
ALLOWED_RESOURCE_EXTENSIONS
public static final Set<String> ALLOWED_RESOURCE_EXTENSIONS
Extension list thatdoResources(StaplerRequest, StaplerResponse)can serve. This set is mutable to allow plugins to add additional extensions.
-
logRecords
public static List<LogRecord> logRecords
Live view of recentLogRecords produced by Jenkins.
-
XSTREAM
public static final com.thoughtworks.xstream.XStream XSTREAM
Thread-safe reusableXStream.
-
XSTREAM2
public static final XStream2 XSTREAM2
-
UNCOMPUTED_VERSION
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final String UNCOMPUTED_VERSION
The version number before it is "computed" (by a call to computeVersion()).- Since:
- 2.0
- See Also:
- Constant Field Values
-
VERSION
public static String VERSION
Version number of this Jenkins.
-
CHANGELOG_URL
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static String CHANGELOG_URL
-
SESSION_HASH
public static String SESSION_HASH
Unique random token that identifies the current session. Used to makeRESOURCE_PATHunique so that we can set long "Expires" header. We used to useVERSION_HASH, but making this session local allows us to reuse the sameRESOURCE_PATHfor static resources in plugins.
-
RESOURCE_PATH
public static String RESOURCE_PATH
Prefix to static resources like images and javascripts in the war file. Either "" or strings like "/static/VERSION", which avoids Jenkins to pick up stale cache when the user upgrades to a different version.Value computed in
WebAppMain.
-
VIEW_RESOURCE_PATH
public static String VIEW_RESOURCE_PATH
Prefix to resources alongside view scripts. Strings like "/resources/VERSION", which avoids Jenkins to pick up stale cache when the user upgrades to a different version.Value computed in
WebAppMain.
-
PARALLEL_LOAD
public static boolean PARALLEL_LOAD
-
KILL_AFTER_LOAD
public static boolean KILL_AFTER_LOAD
-
FLYWEIGHT_SUPPORT
@Deprecated public static boolean FLYWEIGHT_SUPPORT
Deprecated.No longer used.
-
CONCURRENT_BUILD
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Deprecated public static boolean CONCURRENT_BUILD
Deprecated.as of 1.464 This flag will have no effect.Tentative switch to activate the concurrent build behavior. When we merge this back to the trunk, this allows us to keep this feature hidden for a while until we iron out the kinks.- See Also:
AbstractProject.isConcurrentBuild()
-
NAME_VALIDATION_REJECTS_TRAILING_DOT_PROP
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final String NAME_VALIDATION_REJECTS_TRAILING_DOT_PROP
Name of the system property escape hatch for SECURITY-2424. It allows to have back the legacy (and vulnerable) behavior allowing a "good name" to end with a dot. This could be used to exploit two names colliding in the file system to extract information. The files ending with a dot are only a problem on Windows. The default value is true. For detailed documentation: Support for Whitespace characters in File and Folder names for Windows- See Also:
checkGoodName(String)
-
AUTOMATIC_AGENT_LAUNCH
public static boolean AUTOMATIC_AGENT_LAUNCH
Automatically try to launch an agent when Jenkins is initialized or a new agent computer is created.
-
EXTEND_TIMEOUT_SECONDS
public static int EXTEND_TIMEOUT_SECONDS
The amount of time by which to extend the startup notification timeout as each initialization milestone is attained.
-
PERMISSIONS
public static final PermissionGroup PERMISSIONS
-
ADMINISTER
public static final Permission ADMINISTER
-
MANAGE
@Restricted(org.kohsuke.accmod.restrictions.Beta.class) public static final Permission MANAGE
This permission grants access to parts of the Jenkins system configuration.Only features that won't have an impact on Jenkins' overall security and stability should have their permission requirement lowered from
ADMINISTERtoMANAGE. For example, many scripting and code execution features (e.g., configuring master agents, paths to tools on master, etc.) are unsafe to make available to users with only this permission, as they could be used to bypass permission enforcement and elevate permissions.This permission is disabled by default and support for it considered experimental. Administrators can set the system property
jenkins.security.ManagePermissionto enable it.- Since:
- 2.222
-
SYSTEM_READ
public static final Permission SYSTEM_READ
Allows read-only access to large parts of the system configuration. When combined withMANAGE, it is expected that everything is shown as if onlySYSTEM_READwas granted, but that only options editable by users withMANAGEare editable.
-
MANAGE_AND_SYSTEM_READ
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final Permission[] MANAGE_AND_SYSTEM_READ
-
READ
public static final Permission READ
-
RUN_SCRIPTS
@Deprecated public static final Permission RUN_SCRIPTS
Deprecated.in Jenkins 2.222 useADMINISTERinstead
-
ANONYMOUS2
public static final org.springframework.security.core.Authentication ANONYMOUS2
Authenticationobject that represents the anonymous user. Because Spring Security creates its ownAnonymousAuthenticationTokeninstances, the code must not expect the singleton semantics. This is just a convenient instance.- Since:
- 2.266
-
ANONYMOUS
@Deprecated public static final Authentication ANONYMOUS
Deprecated.useANONYMOUS2- Since:
- 1.343
-
-
Constructor Detail
-
Jenkins
protected Jenkins(File root, javax.servlet.ServletContext context) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException
- Throws:
IOExceptionInterruptedExceptionorg.jvnet.hudson.reactor.ReactorException
-
Jenkins
protected Jenkins(File root, javax.servlet.ServletContext context, PluginManager pluginManager) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException
- Parameters:
pluginManager- If non-null, use existing plugin manager. create a new one.- Throws:
IOExceptionInterruptedExceptionorg.jvnet.hudson.reactor.ReactorException
-
-
Method Detail
-
loadNode
@Restricted(org.kohsuke.accmod.restrictions.Beta.class) public void loadNode(File dir) throws IOException
- Throws:
IOException
-
get
@NonNull public static Jenkins get() throws IllegalStateException
Gets theJenkinssingleton.- Returns:
Jenkinsinstance- Throws:
IllegalStateException- for the reasons thatgetInstanceOrNull()might return null- Since:
- 2.98
-
getActiveInstance
@Deprecated @NonNull public static Jenkins getActiveInstance() throws IllegalStateException
Deprecated.This is a verbose historical alias forget().- Throws:
IllegalStateException- Since:
- 1.590
-
getInstanceOrNull
@CLIResolver @CheckForNull public static Jenkins getInstanceOrNull()
Gets theJenkinssingleton.get()is what you normally want.In certain rare cases you may have code that is intended to run before Jenkins starts or while Jenkins is being shut down. For those rare cases use this method.
In other cases you may have code that might end up running on a remote JVM and not on the Jenkins controller or built-in node. For those cases you really should rewrite your code so that when the
Callableis sent over the remoting channel it can do whatever it needs without ever referring toJenkins; for example, gather any information you need on the controller side before constructing the callable. If you must do a runtime check whether you are in the controller or agent, useJenkinsJVMrather than this method, as merely loading theJenkinsclass file into an agent JVM can cause linkage errors under some conditions.- Returns:
- The instance. Null if the
Jenkinsservice has not been started, or was already shut down, or we are running on an unrelated JVM, typically an agent. - Since:
- 1.653
-
getInstance
@Nullable @Deprecated public static Jenkins getInstance()
Deprecated.This is a historical alias forgetInstanceOrNull()but with ambiguous nullability. Useget()in typical cases.
-
readResolve
protected Object readResolve()
Maintains backwards compatibility. Invoked by XStream when this object is de-serialized.
-
getProxy
@CheckForNull public ProxyConfiguration getProxy()
Retrieve the proxy configuration.- Returns:
- the proxy configuration
- Since:
- 2.205
-
setProxy
public void setProxy(@CheckForNull ProxyConfiguration proxy)Set the proxy configuration.- Parameters:
proxy- the proxy to set- Since:
- 2.205
-
getInstallState
@NonNull public InstallState getInstallState()
Get the Jenkinsinstall state.- Returns:
- The Jenkins
install state.
-
setInstallState
public void setInstallState(@NonNull InstallState newState)Update the current install state. This will invoke state.initializeState() when the state has been transitioned.
-
getTcpSlaveAgentListener
public TcpSlaveAgentListener getTcpSlaveAgentListener()
-
getAdjuncts
public org.kohsuke.stapler.framework.adjunct.AdjunctManager getAdjuncts(String dummy)
MakesAdjunctManagerURL-bound. The dummy parameter allows us to use different URLs for the same adjunct, for proper cache handling.
-
getSlaveAgentPort
@Exported public int getSlaveAgentPort()
-
isSlaveAgentPortEnforced
public boolean isSlaveAgentPortEnforced()
- Since:
- 2.24
-
setSlaveAgentPort
public void setSlaveAgentPort(int port) throws IOException- Parameters:
port- 0 to indicate random available TCP port. -1 to disable this service.- Throws:
IOException
-
getAgentProtocols
@NonNull public Set<String> getAgentProtocols()
Returns the enabled agent protocols.- Returns:
- the enabled agent protocols.
- Since:
- 2.16
-
setAgentProtocols
public void setAgentProtocols(@NonNull Set<String> protocols)Sets the enabled agent protocols.- Parameters:
protocols- the enabled agent protocols.- Since:
- 2.16
-
setNodeName
public void setNodeName(String name)
Description copied from class:NodeWhen the user clones aNode, Hudson uses this method to change the node name right after the clonedNodeobject is instantiated.This method is never used for any other purpose, and as such for all practical intents and purposes, the node name should be treated like immutable.
- Specified by:
setNodeNamein classNode
-
getNodeDescription
public String getNodeDescription()
Description copied from class:NodeHuman-readable description of this node.- Specified by:
getNodeDescriptionin classNode
-
getDescription
@Exported public String getDescription()
-
getPluginManager
@NonNull public PluginManager getPluginManager()
-
getUpdateCenter
public UpdateCenter getUpdateCenter()
-
isNoUsageStatistics
@CheckForNull public Boolean isNoUsageStatistics()
If usage statistics has been disabled- Since:
- 2.226
-
isUsageStatisticsCollected
public boolean isUsageStatisticsCollected()
If usage statistics are being collected- Returns:
trueif usage statistics should be collected. Defaults totruewhennoUsageStatisticsis not set.
-
setNoUsageStatistics
public void setNoUsageStatistics(Boolean noUsageStatistics) throws IOException
Sets the noUsageStatistics flag- Throws:
IOException
-
getApi
public Api getApi()
-
getSecretKey
@Deprecated public String getSecretKey()
Deprecated.Due to the past security advisory, this value should not be used any more to protect sensitive information. SeeConfidentialStoreandConfidentialKeyfor how to store secrets.Returns a secret key that survives across container start/stop.This value is useful for implementing some of the security features.
-
getSecretKeyAsAES128
@Deprecated public SecretKey getSecretKeyAsAES128()
Deprecated.SeegetSecretKey().Gets the secret key as a key for AES-128.- Since:
- 1.308
-
getLegacyInstanceId
public String getLegacyInstanceId()
Returns the unique identifier of this Jenkins that has been historically used to identify this Jenkins to the outside world.This form of identifier is weak in that it can be impersonated by others. See the Instance Identity plugin for more modern form of instance ID that can be challenged and verified.
- Since:
- 1.498
-
getScm
public Descriptor<SCM> getScm(String shortClassName)
Gets the SCM descriptor by name. Primarily used for making them web-visible.
-
getRepositoryBrowser
public Descriptor<RepositoryBrowser<?>> getRepositoryBrowser(String shortClassName)
Gets the repository browser descriptor by name. Primarily used for making them web-visible.
-
getBuilder
public Descriptor<Builder> getBuilder(String shortClassName)
Gets the builder descriptor by name. Primarily used for making them web-visible.
-
getBuildWrapper
public Descriptor<BuildWrapper> getBuildWrapper(String shortClassName)
Gets the build wrapper descriptor by name. Primarily used for making them web-visible.
-
getPublisher
public Descriptor<Publisher> getPublisher(String shortClassName)
Gets the publisher descriptor by name. Primarily used for making them web-visible.
-
getTrigger
public TriggerDescriptor getTrigger(String shortClassName)
Gets the trigger descriptor by name. Primarily used for making them web-visible.
-
getRetentionStrategy
public Descriptor<RetentionStrategy<?>> getRetentionStrategy(String shortClassName)
Gets the retention strategy descriptor by name. Primarily used for making them web-visible.
-
getJobProperty
public JobPropertyDescriptor getJobProperty(String shortClassName)
Gets theJobPropertyDescriptorby name. Primarily used for making them web-visible.
-
getComputer
@Deprecated public ComputerSet getComputer()
Deprecated.UI method. Not meant to be used programmatically.
-
getCloud
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public CloudSet getCloud()
Only there to bind to /cloud/ URL. Otherwise /cloud/new gets resolved to getCloud("new") by stapler which is not what we want.
-
getDescriptor
public Descriptor getDescriptor(String id)
ExposesDescriptorby its name to URL. After doing all thegetXXX(shortClassName)methods, I finally realized that this just doesn't scale.- Parameters:
id- EitherDescriptor.getId()(recommended) or the short name of aDescribablesubtype (for compatibility)- Throws:
IllegalArgumentException- if a short name was passed which matches multiple IDs (fail fast)
-
getDescriptorByName
public Descriptor getDescriptorByName(String id)
Alias forgetDescriptor(String).- Specified by:
getDescriptorByNamein interfaceDescriptorByNameOwner- Parameters:
id- EitherDescriptor.getId()(recommended) or the short name.
-
getDescriptor
@CheckForNull public Descriptor getDescriptor(Class<? extends Describable> type)
Gets theDescriptorthat corresponds to the givenDescribabletype.If you have an instance of
typeand callDescribable.getDescriptor(), you'll get the same instance that this method returns.
-
getDescriptorOrDie
@NonNull public Descriptor getDescriptorOrDie(Class<? extends Describable> type)
Works just likegetDescriptor(Class)but don't take no for an answer.- Throws:
AssertionError- If the descriptor is missing.- Since:
- 1.326
-
getDescriptorByType
public <T extends Descriptor> T getDescriptorByType(Class<T> type)
Gets theDescriptorinstance in the current Jenkins by its type.
-
getSecurityRealms
public Descriptor<SecurityRealm> getSecurityRealms(String shortClassName)
Gets theSecurityRealmdescriptors by name. Primarily used for making them web-visible.
-
updateNewComputer
protected void updateNewComputer(Node n)
-
updateComputerList
protected void updateComputerList()
-
getSCMListeners
@Deprecated public CopyOnWriteList<SCMListener> getSCMListeners()
Deprecated.UseSCMListener.all()instead.
-
getPlugin
@CheckForNull public Plugin getPlugin(String shortName)
Gets the plugin object from its short name. This allows URLhudson/plugin/IDto be served by the views of the plugin class.- Parameters:
shortName- Short name of the plugin- Returns:
- The plugin singleton or
nullif for some reason the plugin is not loaded. The fact the plugin is loaded does not mean it is enabled and fully initialized for the current Jenkins session. UsePlugin.getWrapper()and thenPluginWrapper.isActive()to check it.
-
getPlugin
@CheckForNull public <P extends Plugin> P getPlugin(Class<P> clazz)
Gets the plugin object from its class.This allows easy storage of plugin information in the plugin singleton without every plugin reimplementing the singleton pattern.
- Type Parameters:
P- Class of the plugin- Parameters:
clazz- The plugin class (beware class-loader fun, this will probably only work from within the jpi that defines the plugin class, it may or may not work in other cases)- Returns:
- The plugin singleton or
nullif for some reason the plugin is not loaded. The fact the plugin is loaded does not mean it is enabled and fully initialized for the current Jenkins session. UsePlugin.getWrapper()and thenPluginWrapper.isActive()to check it.
-
getPlugins
public <P extends Plugin> List<P> getPlugins(Class<P> clazz)
Gets the plugin objects from their super-class.- Parameters:
clazz- The plugin class (beware class-loader fun)- Returns:
- The plugin instances.
-
getSystemMessage
public String getSystemMessage()
Synonym forgetDescription().
-
getMarkupFormatter
@NonNull public MarkupFormatter getMarkupFormatter()
Gets the markup formatter used in the system.- Returns:
- never null.
- Since:
- 1.391
-
setMarkupFormatter
public void setMarkupFormatter(MarkupFormatter f)
Sets the markup formatter used in the system globally.- Since:
- 1.391
-
setSystemMessage
public void setSystemMessage(String message) throws IOException
Sets the system message.- Throws:
IOException
-
getFederatedLoginService
@StaplerDispatchable public FederatedLoginService getFederatedLoginService(String name)
-
getFederatedLoginServices
public List<FederatedLoginService> getFederatedLoginServices()
-
createLauncher
public Launcher createLauncher(TaskListener listener)
Description copied from class:NodeReturns aLauncherfor executing programs on this node.The callee must call
Launcher.decorateFor(Node)before returning to complete the decoration.- Specified by:
createLauncherin classNode
-
getFullName
public String getFullName()
Description copied from interface:ItemGroupGets the full name of thisItemGroup.- Specified by:
getFullNamein interfaceItemGroup<TopLevelItem>- See Also:
Item.getFullName()
-
getFullDisplayName
public String getFullDisplayName()
- Specified by:
getFullDisplayNamein interfaceItemGroup<TopLevelItem>- See Also:
Item.getFullDisplayName()
-
getActions
public List<Action> getActions()
Returns the transientActions associated with the top page.Adding
Actionis primarily useful for plugins to contribute an item to the navigation bar of the top page. See existingActionimplementation for it affects the GUI.To register an
Action, implementRootActionextension point, or write code likeJenkins.get().getActions().add(...).- Returns:
- Live list where the changes can be made. Can be empty but never null.
- Since:
- 1.172
-
getItems
@Exported(name="jobs") public List<TopLevelItem> getItems()
Gets just the immediate children ofJenkins.- Specified by:
getItemsin interfaceItemGroup<TopLevelItem>- See Also:
ItemGroup.getAllItems(Class)
-
getItems
public List<TopLevelItem> getItems(Predicate<TopLevelItem> pred)
Gets just the immediate children ofJenkinsbased on supplied predicate.- Specified by:
getItemsin interfaceItemGroup<TopLevelItem>- Since:
- 2.221
- See Also:
ItemGroup.getAllItems(Class)
-
getItemMap
public Map<String,TopLevelItem> getItemMap()
Returns the read-only view of all theTopLevelItems keyed by their names.This method is efficient, as it doesn't involve any copying.
- Since:
- 1.296
-
getItems
public <T> List<T> getItems(Class<T> type)
Gets just the immediate children ofJenkinsbut of the given type.
-
getProjects
@Deprecated public List<Project> getProjects()
Deprecated.This method will ignore Maven and matrix projects, as well as projects inside containers such as folders. You may prefer to callItemGroup.getAllItems(Class)onAbstractProject, perhaps also usingUtil.createSubList(java.util.Collection<?>, java.lang.Class<T>)to consider onlyTopLevelItems. (That will also consider the caller's permissions.) If you really want to get justProjects at top level, ignoring permissions, you can filter the values fromgetItemMap()usingUtil.createSubList(java.util.Collection<?>, java.lang.Class<T>).Gets a list of simple top-level projects.
-
getJobNames
public Collection<String> getJobNames()
Gets the names of all theJobs.
-
getViewActions
public List<Action> getViewActions()
Description copied from interface:ViewGroupReturns actions that should be displayed in views.In this interface, the return value is used read-only. This doesn't prevent subtypes from returning modifiable actions, however.
- Specified by:
getViewActionsin interfaceViewGroup- Returns:
- may be empty but never null;
getActions()by default - See Also:
Actionable.getActions()
-
getTopLevelItemNames
public Collection<String> getTopLevelItemNames()
Gets the names of all theTopLevelItems.
-
getView
@CheckForNull public View getView(@CheckForNull String name)
Gets a view by the specified name. The method iterates throughViewGroups if required.
-
getViews
@Exported public Collection<View> getViews()
Gets the read-only list of allViews.
-
addView
public void addView(@NonNull View v) throws IOExceptionDescription copied from interface:ModifiableViewGroup- Specified by:
addViewin interfaceModifiableViewGroup- Throws:
IOException
-
setViews
public void setViews(Collection<View> views) throws IOException
Completely replaces views.This operation is NOT provided as an atomic operation, but rather the sole purpose of this is to define a setter for this to help introspecting code, such as system-config-dsl plugin
- Throws:
IOException
-
canDelete
public boolean canDelete(View view)
Description copied from interface:ViewGroupDetermine whether a view may be deleted.
-
deleteView
public void deleteView(View view) throws IOException
Description copied from interface:ViewGroupDeletes a view in this group.- Specified by:
deleteViewin interfaceViewGroup- Throws:
IOException
-
onViewRenamed
public void onViewRenamed(View view, String oldName, String newName)
Description copied from interface:ViewGroupViewcalls this method when it's renamed. This method is intended to work as a notification to theViewGroup(so that it can adjust its internal data structure, for example.)It is the caller's responsibility to ensure that the new name is a legal view name.
- Specified by:
onViewRenamedin interfaceViewGroup
-
getPrimaryView
@Exported public View getPrimaryView()
Returns the primaryViewthat renders the top-page of Jenkins.- Specified by:
getPrimaryViewin interfaceViewGroup- Returns:
- by default, null
-
setPrimaryView
public void setPrimaryView(@NonNull View v)
-
getViewsTabBar
public ViewsTabBar getViewsTabBar()
Description copied from interface:ViewGroupGets the TabBar for the views. TabBar for views can be provided by extension. Only one TabBar can be active at a given time (Selectable by user in the global Configuration page). Default TabBar is provided by Hudson Platform.- Specified by:
getViewsTabBarin interfaceViewGroup
-
setViewsTabBar
public void setViewsTabBar(ViewsTabBar viewsTabBar)
-
getItemGroup
public Jenkins getItemGroup()
Description copied from interface:ViewGroupReturns theItemGroupfrom which the views in this group should render items.Generally speaking, Views render a subset of
TopLevelItems that belong to this item group.- Specified by:
getItemGroupin interfaceViewGroup- Returns:
- Never null. Sometimes this is
ModifiableItemGroup(if the container allows arbitrary addition). By default,get().
-
getMyViewsTabBar
public MyViewsTabBar getMyViewsTabBar()
-
setMyViewsTabBar
public void setMyViewsTabBar(MyViewsTabBar myViewsTabBar)
-
isUpgradedFromBefore
public boolean isUpgradedFromBefore(VersionNumber v)
Returns true if the current running Jenkins is upgraded from a version earlier than the specified version.This method continues to return true until the system configuration is saved, at which point
versionwill be overwritten and Jenkins forgets the upgrade history.To handle SNAPSHOTS correctly, pass in "1.N.*" to test if it's upgrading from the version equal or younger than N. So say if you implement a feature in 1.301 and you want to check if the installation upgraded from pre-1.301, pass in "1.300.*"
- Since:
- 1.301
-
getComputer
@CLIResolver @CheckForNull public Computer getComputer(@NonNull String name)
-
getLabel
@CheckForNull public Label getLabel(String expr)
Gets the label that exists on this system by the name.- Returns:
- null if name is null.
- See Also:
(String)
-
getLabelAtom
@Nullable public LabelAtom getLabelAtom(@CheckForNull String name)
Returns the label atom of the given name.- Returns:
- non-null iff name is non-null
-
tryGetLabelAtom
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Nullable public LabelAtom tryGetLabelAtom(@NonNull String name)
Returns the label atom of the given name, only if it already exists.- Returns:
- non-null if the label atom already exists.
-
getLabelAtomSet
protected Set<LabelAtom> getLabelAtomSet()
- Overrides:
getLabelAtomSetin classNode- Returns:
- An immutable set of LabelAtom associated with the current node label.
-
getQueue
public Queue getQueue()
- Specified by:
getQueuein classAbstractCIBase
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classNode
-
setJDKs
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setJDKs(Collection<? extends JDK> jdks)
Replaces all JDK installations with those from the given collection. UseJDK.DescriptorImpl.setInstallations(JDK...)to set JDK installations from external code.
-
getJDK
public JDK getJDK(String name)
Gets the JDK installation of the given name, or returns null.
-
getNode
@CheckForNull public Node getNode(String name)
Gets the agent node of the give name, hooked under this Jenkins.
-
getOrLoadNode
@CheckForNull @Restricted(org.kohsuke.accmod.restrictions.Beta.class) public Node getOrLoadNode(String nodeName)
-
getComputerMap
protected ConcurrentMap<Node,Computer> getComputerMap()
- Specified by:
getComputerMapin classAbstractCIBase
-
getNodes
@NonNull public List<Node> getNodes()
Returns allNodes in the system, excludingJenkinsinstance itself which represents the built-in node (in other words, this only returns agents).- Specified by:
getNodesin classAbstractCIBase
-
getNodesObject
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Nodes getNodesObject()
- Returns:
- The Nodes object.
-
addNode
public void addNode(Node n) throws IOException
Adds one moreNodeto Jenkins. If a node of the same name already exists then that node will be replaced.- Throws:
IOException
-
removeNode
public void removeNode(@NonNull Node n) throws IOExceptionRemoves aNodefrom Jenkins.- Throws:
IOException
-
unloadNode
@Restricted(org.kohsuke.accmod.restrictions.Beta.class) public void unloadNode(@NonNull Node n)Unload a node from Jenkins without touching its configuration file.
-
updateNode
public boolean updateNode(Node n) throws IOException
Saves an existingNodeon disk, called byNode.save(). This method is preferred in those cases where you need to determine atomically that the node being saved is actually in the list of nodes.- Parameters:
n- the node to be updated.- Returns:
true, if the node was updated.false, if the node was not in the list of nodes.- Throws:
IOException- if the node could not be persisted.- Since:
- 1.634
- See Also:
Nodes.updateNode(hudson.model.Node)
-
setNodes
public void setNodes(List<? extends Node> n) throws IOException
- Throws:
IOException
-
getNodeProperties
public DescribableList<NodeProperty<?>,NodePropertyDescriptor> getNodeProperties()
Description copied from class:NodeGets theNodePropertyinstances configured for thisNode.- Specified by:
getNodePropertiesin classNode
-
getGlobalNodeProperties
public DescribableList<NodeProperty<?>,NodePropertyDescriptor> getGlobalNodeProperties()
-
getAdministrativeMonitor
@CheckForNull public AdministrativeMonitor getAdministrativeMonitor(String id)
BindsAdministrativeMonitors to URL.- Parameters:
id- Monitor ID- Returns:
- The requested monitor or
nullif it does not exist
-
getActiveAdministrativeMonitors
public List<AdministrativeMonitor> getActiveAdministrativeMonitors()
Returns the enabled and activated administrative monitors accessible to the current user.- Since:
- 2.64
-
getDescriptor
public NodeDescriptor getDescriptor()
Description copied from interface:DescribableGets the descriptor for this instance.Descriptoris a singleton for every concreteDescribableimplementation, so ifa.getClass() == b.getClass()then by defaulta.getDescriptor() == b.getDescriptor()as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)- Specified by:
getDescriptorin interfaceDescribable<Node>- Specified by:
getDescriptorin classNode
-
getQuietPeriod
public int getQuietPeriod()
Gets the system default quiet period.
-
setQuietPeriod
public void setQuietPeriod(Integer quietPeriod) throws IOException
Sets the global quiet period.- Parameters:
quietPeriod- null to the default value.- Throws:
IOException
-
getScmCheckoutRetryCount
public int getScmCheckoutRetryCount()
Gets the global SCM check out retry count.
-
setScmCheckoutRetryCount
public void setScmCheckoutRetryCount(int scmCheckoutRetryCount) throws IOException- Throws:
IOException
-
getSearchUrl
public String getSearchUrl()
Description copied from interface:SearchItemReturns the URL of this item relative to the parentSearchItem.- Specified by:
getSearchUrlin interfaceSearchItem- Overrides:
getSearchUrlin classNode- Returns:
- URL like "foo" or "foo/bar". The path can end with '/'. The path that starts with '/' will be interpreted as the absolute path (within the context path of Jenkins.)
-
makeSearchIndex
public SearchIndexBuilder makeSearchIndex()
Description copied from class:AbstractModelObjectDefault implementation that returns empty index.- Overrides:
makeSearchIndexin classAbstractModelObject
-
getUrlChildPrefix
public String getUrlChildPrefix()
Description copied from interface:ItemGroupGets the URL token that prefixes the URLs for childItems. Like "job", "item", etc.- Specified by:
getUrlChildPrefixin interfaceItemGroup<TopLevelItem>
-
getRootUrl
@Nullable public String getRootUrl() throws IllegalStateException
Gets the absolute URL of Jenkins, such ashttp://localhost/jenkins/.This method first tries to use the manually configured value, then fall back to
getRootUrlFromRequest(). It is done in this order so that it can work correctly even in the face of a reverse proxy.- Returns:
nullif this parameter is not configured by the user and the calling thread is not in an HTTP request; otherwise the returned URL will always have the trailing/- Throws:
IllegalStateException-JenkinsLocationConfigurationcannot be retrieved. Jenkins instance may be not ready, or there is an extension loading glitch.- Since:
- 1.66
- See Also:
- Hyperlinks in HTML
-
getConfiguredRootUrl
@Exported(name="url") @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @CheckForNull public String getConfiguredRootUrl()
Exported alias forJenkinsLocationConfiguration.getUrl().
-
isRootUrlSecure
public boolean isRootUrlSecure()
Is Jenkins running in HTTPS? Note that we can't really trustServletRequest.isSecure()because HTTPS might be terminated in the reverse proxy.
-
getRootUrlFromRequest
@NonNull public String getRootUrlFromRequest()
Gets the absolute URL of Jenkins top page, such ashttp://localhost/jenkins/.Unlike
getRootUrl(), which uses the manually configured value, this one uses the current request to reconstruct the URL. The benefit is that this is immune to the configuration mistake (users often fail to set the root URL correctly, especially when a migration is involved), but the downside is that unless you are processing a request, this method doesn't work.Please note that this will not work in all cases if Jenkins is running behind a reverse proxy which has not been fully configured. Specifically the
HostandX-Forwarded-Protoheaders must be set. Reverse proxy - Apache shows some examples of configuration.- Since:
- 1.263
-
getRootDir
public File getRootDir()
Description copied from interface:PersistenceRootGets the root directory on the file system that thisItemcan use freely for storing the configuration data.This parameter is given by the
ItemGroupwhenItemis loaded from memory.- Specified by:
getRootDirin interfacePersistenceRoot- Overrides:
getRootDirin classNode
-
getWorkspaceFor
public FilePath getWorkspaceFor(TopLevelItem item)
Description copied from class:NodeReturns a "workspace" directory for the givenTopLevelItem.Workspace directory is usually used for keeping out the checked out source code, but it can be used for anything.
- Specified by:
getWorkspaceForin classNode- Returns:
- null if this node is not connected hence the path is not available
-
isDefaultBuildDir
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isDefaultBuildDir()
If the configured buildsDir has it's default value or has been changed.- Returns:
- true if default value.
-
expandVariablesForDirectory
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static String expandVariablesForDirectory(String base, String itemFullName, String itemRootDir)
-
getRawWorkspaceDir
public String getRawWorkspaceDir()
-
getRawBuildsDir
public String getRawBuildsDir()
-
setRawBuildsDir
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setRawBuildsDir(String buildsDir)
-
getRootPath
@NonNull public FilePath getRootPath()
Description copied from class:NodeGets the root directory of this node.Hudson always owns a directory on every node. This method returns that.
- Specified by:
getRootPathin classNode- Returns:
- null if the node is offline and hence the
FilePathobject is not available.
-
createPath
public FilePath createPath(String absolutePath)
Description copied from class:NodeGets theFilePathon this node.- Overrides:
createPathin classNode
-
getClockDifference
public ClockDifference getClockDifference()
Description copied from class:NodeEstimates the clock difference with this agent.- Overrides:
getClockDifferencein classNode- Returns:
- always non-null.
-
getClockDifferenceCallable
public hudson.remoting.Callable<ClockDifference,IOException> getClockDifferenceCallable()
Description copied from class:NodeReturns aCallablethat when run on the channel, estimates the clock difference.- Specified by:
getClockDifferenceCallablein classNode- Returns:
- always non-null.
-
getLog
public LogRecorderManager getLog()
For bindingLogRecorderManagerto "/log". Everything below here is admin-only, so do the check here.
-
setLog
public void setLog(LogRecorderManager log)
Set the LogRecorderManager.- Parameters:
log- the LogRecorderManager to set- Since:
- 2.323
-
isUseSecurity
@Exported public boolean isUseSecurity()
A convenience method to check if there's some security restrictions in place.
-
isUseProjectNamingStrategy
public boolean isUseProjectNamingStrategy()
-
isUseCrumbs
@Exported public boolean isUseCrumbs()
If true, all the POST requests to Jenkins would have to have crumb in it to protect Jenkins from CSRF vulnerabilities.
-
getSecurity
public SecurityMode getSecurity()
Returns the constant that captures the three basic security modes in Jenkins.
-
getSecurityRealm
public SecurityRealm getSecurityRealm()
- Returns:
- never null.
-
setSecurityRealm
public void setSecurityRealm(@CheckForNull SecurityRealm securityRealm)Sets a security realm.- Parameters:
securityRealm- Security realm to set. Ifnull,SecurityRealm.NO_AUTHENTICATIONwill be set.
-
setAuthorizationStrategy
public void setAuthorizationStrategy(@CheckForNull AuthorizationStrategy a)Sets a new authorization strategy.- Parameters:
a- Authorization strategy to set. Ifnull,AuthorizationStrategy.UNSECUREDwill be set
-
isDisableRememberMe
public boolean isDisableRememberMe()
-
setDisableRememberMe
public void setDisableRememberMe(boolean disableRememberMe)
-
disableSecurity
public void disableSecurity()
-
setProjectNamingStrategy
public void setProjectNamingStrategy(ProjectNamingStrategy ns)
-
getLifecycle
public Lifecycle getLifecycle()
-
getInjector
@CheckForNull public com.google.inject.Injector getInjector()
Gets the dependency injection container that hosts all the extension implementations and other components in Jenkins.- Since:
- 1.433
-
getExtensionList
public <T> ExtensionList<T> getExtensionList(Class<T> extensionType)
ReturnsExtensionListthat retains the discovered instances for the given extension type.- Parameters:
extensionType- The base type that represents the extension point. NormallyExtensionPointsubtype but that's not a hard requirement.- Returns:
- Can be an empty list but never null.
- See Also:
ExtensionList.lookup(java.lang.Class<T>)
-
getExtensionList
@StaplerDispatchable public ExtensionList getExtensionList(String extensionType) throws ClassNotFoundException
Used to bindExtensionLists to URLs.- Throws:
ClassNotFoundException- Since:
- 1.349
-
getDescriptorList
@NonNull public <T extends Describable<T>,D extends Descriptor<T>> DescriptorExtensionList<T,D> getDescriptorList(Class<T> type)
ReturnsExtensionListthat retains the discoveredDescriptorinstances for the given kind ofDescribable.- Returns:
- Can be an empty list but never null.
-
refreshExtensions
public void refreshExtensions() throws ExtensionRefreshExceptionRefreshExtensionLists by adding all the newly discovered extensions. Exposed only forPluginManager.dynamicLoad(File).- Throws:
ExtensionRefreshException
-
getACL
@NonNull public ACL getACL()
Returns the rootACL.- Specified by:
getACLin interfaceAccessControlled- Overrides:
getACLin classNode- Returns:
- never null.
- See Also:
AuthorizationStrategy.getRootACL()
-
getAuthorizationStrategy
public AuthorizationStrategy getAuthorizationStrategy()
- Returns:
- never null.
-
getProjectNamingStrategy
public ProjectNamingStrategy getProjectNamingStrategy()
The strategy used to check the project names.- Returns:
- never
null
-
isQuietingDown
@Exported public boolean isQuietingDown()
Returns true if Jenkins is quieting down.No further jobs will be executed unless it can be finished while other current pending builds are still in progress.
-
isPreparingSafeRestart
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @NonNull public boolean isPreparingSafeRestart()
Returns if the quietingDown is a safe restart.- Since:
- 2.414
-
getQuietDownReason
@Exported @CheckForNull public String getQuietDownReason()
Returns quiet down reason if it was indicated.- Returns:
- Reason if it was indicated. null otherwise
- Since:
- 2.267
-
isTerminating
public boolean isTerminating()
Returns true if the container initiated the termination of the web application.
-
getInitLevel
public InitMilestone getInitLevel()
Gets the initialization milestone that we've already reached.- Returns:
InitMilestone.STARTEDeven if the initialization hasn't been started, so that this method never returns null.
-
setNumExecutors
public void setNumExecutors(int n) throws IOException, IllegalArgumentExceptionSets a number of executors.- Parameters:
n- Number of executors- Throws:
IOException- Failed to save the configurationIllegalArgumentException- Negative value has been passed
-
getItem
public TopLevelItem getItem(String name) throws org.springframework.security.access.AccessDeniedException
Gets theIteminside this group that has a given name, or null if it does not exist.. Note that the look up is case-insensitive.- Specified by:
getItemin interfaceItemGroup<TopLevelItem>- Returns:
- an item whose
Item.getName()isnameand whoseItem.getParent()isthis, or null if there is no such item, or there is but the current user lacks bothItem.DISCOVERandItem.READon it - Throws:
org.springframework.security.access.AccessDeniedException- if the current user hasItem.DISCOVERbut notItem.READon this item
-
getItem
public Item getItem(String pathName, ItemGroup context)
Gets the item by its path name from the given contextPath Names: If the name starts from '/', like "/foo/bar/zot", then it's interpreted as absolute. Otherwise, the name should be something like "foo/bar" and it's interpreted like relative path name in the file system is, against the given context.
For compatibility, as a fallback when nothing else matches, a simple path like
foo/barcan also be treated withgetItemByFullName(java.lang.String, java.lang.Class<T>).- Parameters:
context- null is interpreted asJenkins. Base 'directory' of the interpretation.- Since:
- 1.406
-
getItem
public final <T extends Item> T getItem(String pathName, ItemGroup context, @NonNull Class<T> type)
-
getRootDirFor
public File getRootDirFor(TopLevelItem child)
Description copied from interface:ItemGroupAssigns theroot directoryfor children.- Specified by:
getRootDirForin interfaceItemGroup<TopLevelItem>
-
getItemByFullName
@CheckForNull public <T extends Item> T getItemByFullName(@NonNull String fullName, Class<T> type) throws org.springframework.security.access.AccessDeniedException
Gets theItemobject by its full name. Full names are like path names, where each name ofItemis combined by '/'.- Returns:
- null if either such
Itemdoesn't exist under the given full name, or it exists but it's no an instance of the given type. - Throws:
org.springframework.security.access.AccessDeniedException- as perItemGroup.getItem(java.lang.String)
-
getUser
@CheckForNull public User getUser(String name)
Gets the user of the given name.- Returns:
- the user of the given name (which may or may not be an id), if that person exists; else null
- See Also:
User.get(String,boolean),User.getById(String, boolean)
-
createProject
@NonNull public TopLevelItem createProject(@NonNull TopLevelItemDescriptor type, @NonNull String name) throws IOException
- Throws:
IOException
-
createProject
@NonNull public TopLevelItem createProject(@NonNull TopLevelItemDescriptor type, @NonNull String name, boolean notify) throws IOException
Description copied from interface:ModifiableTopLevelItemGroupCreates a new job.- Specified by:
createProjectin interfaceModifiableTopLevelItemGroup- Parameters:
type- Descriptor for job typename- Name for jobnotify- Whether to fire onCreated method for all ItemListeners- Throws:
IOException
-
putItem
public void putItem(TopLevelItem item) throws IOException, InterruptedException
Overwrites the existing item by new one.This is a short cut for deleting an existing job and adding a new one.
- Throws:
IOExceptionInterruptedException
-
createProject
@NonNull public <T extends TopLevelItem> T createProject(@NonNull Class<T> type, @NonNull String name) throws IOException
Creates a new job.This version infers the descriptor from the type of the top-level item.
- Throws:
IllegalArgumentException- if the project of the given name already exists.IOException
-
onRenamed
public void onRenamed(TopLevelItem job, String oldName, String newName) throws IOException
Called byJob.renameTo(String)to update relevant data structure. assumed to be synchronized on Jenkins by the caller.- Specified by:
onRenamedin interfaceItemGroup<TopLevelItem>- Throws:
IOException
-
onDeleted
public void onDeleted(TopLevelItem item) throws IOException
Called in response toAbstractItem.doDoDelete(StaplerRequest, StaplerResponse)- Specified by:
onDeletedin interfaceItemGroup<TopLevelItem>- Throws:
IOException
-
canAdd
public boolean canAdd(TopLevelItem item)
Description copied from interface:DirectlyModifiableTopLevelItemGroupReturns true if a particular item may be added to this group.- Specified by:
canAddin interfaceDirectlyModifiableTopLevelItemGroup- Parameters:
item- an item currently elsewhere- Returns:
- true if
DirectlyModifiableTopLevelItemGroup.add(I, java.lang.String)may be called with this item
-
add
public <I extends TopLevelItem> I add(I item, String name) throws IOException, IllegalArgumentException
Description copied from interface:DirectlyModifiableTopLevelItemGroupAdds an item to this group. UnlikeputItem(hudson.model.TopLevelItem)this does not try to callItem.delete()on an existing item, nor does it fireItemListener.onCreated(hudson.model.Item), nor check permissions. Normally you would callItem.onLoad(hudson.model.ItemGroup<? extends hudson.model.Item>, java.lang.String)after calling this method (the implementation is not expected to do so).- Specified by:
addin interfaceDirectlyModifiableTopLevelItemGroup- Type Parameters:
I- the kind of item- Parameters:
item- an item to add which is currently elsewherename- the desired item name in this group (might simply be the originalItem.getName())- Returns:
- normally the same
item, but might be a new copy if necessary - Throws:
IOException- if adding failsIllegalArgumentException- ifDirectlyModifiableTopLevelItemGroup.canAdd(hudson.model.TopLevelItem)is false, or an item with this name already exists, or this item is as yet unnamed
-
remove
public void remove(TopLevelItem item) throws IOException, IllegalArgumentException
Description copied from interface:DirectlyModifiableTopLevelItemGroupRemoves an item from this group. UnlikeItemGroup.onDeleted(T)this is not expected to fire any events.- Specified by:
removein interfaceDirectlyModifiableTopLevelItemGroup- Parameters:
item- an item which was part of this group- Throws:
IOException- if removing failsIllegalArgumentException- if this was not part of the group to begin with
-
getFingerprintMap
public FingerprintMap getFingerprintMap()
-
getFingerprint
@StaplerDispatchable public Object getFingerprint(String md5sum) throws IOException
- Throws:
IOException
-
_getFingerprint
public Fingerprint _getFingerprint(String md5sum) throws IOException
Gets aFingerprintobject if it exists. Otherwise null.- Throws:
IOException
-
getConfigFile
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) protected XmlFile getConfigFile()
The file we save our configuration.- Overrides:
getConfigFilein classNode
-
getNumExecutors
public int getNumExecutors()
Description copied from class:NodeReturns the number ofExecutors. This may be different fromgetExecutors().size()because it takes time to adjust the number of executors.- Specified by:
getNumExecutorsin classNode
-
getMode
public Node.Mode getMode()
Description copied from class:NodeReturnsNode.Mode.EXCLUSIVEif this node is only available for those jobs that exclusively specifies this node as the assigned node.
-
setMode
public void setMode(Node.Mode m) throws IOException
- Throws:
IOException
-
getLabelString
public String getLabelString()
Description copied from class:NodeReturns the manually configured label for a node. The list of assigned and dynamically determined labels is available viaNode.getAssignedLabels()and includes all labels that have been manually configured. Mainly for form binding.- Specified by:
getLabelStringin classNode
-
setLabelString
public void setLabelString(String label) throws IOException
Description copied from class:NodeSets the label string for a node. This value will be returned byNode.getLabelString().- Overrides:
setLabelStringin classNode- Parameters:
label- The new label string to use.- Throws:
IOException
-
getSelfLabel
@NonNull public LabelAtom getSelfLabel()
Description copied from class:NodeGets the special label that represents this node itself.- Overrides:
getSelfLabelin classNode
-
createComputer
@NonNull public Computer createComputer()
Description copied from class:NodeCreates a newComputerobject that acts as the UI peer of thisNode. Nobody butupdateComputerList()should call this method.- Specified by:
createComputerin classNode- Returns:
- Created instance of the computer.
Can be
nullif theNodeimplementation does not support it (e.g.Cloudagent).
-
load
public void load() throws IOExceptionDescription copied from interface:LoadableLoads the state of this object from disk.- Specified by:
loadin interfaceLoadable- Throws:
IOException- The state could not be loaded.
-
save
public void save() throws IOExceptionSave the settings to a file.- Specified by:
savein interfaceSaveable- Overrides:
savein classNode- Throws:
IOException- if the persistence failed.
-
cleanUp
public void cleanUp()
Called to shut down the system.
-
doConfigSubmit
@POST public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormExceptionAccepts submission from the configuration page.- Throws:
IOExceptionjavax.servlet.ServletExceptionDescriptor.FormException
-
getCrumbIssuer
@CheckForNull public CrumbIssuer getCrumbIssuer()
Gets theCrumbIssuercurrently in use.- Returns:
- null if none is in use.
-
setCrumbIssuer
public void setCrumbIssuer(CrumbIssuer issuer)
-
doTestPost
public void doTestPost(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException- Throws:
IOExceptionjavax.servlet.ServletException
-
doConfigExecutorsSubmit
@POST public void doConfigExecutorsSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormExceptionAccepts submission from the node configuration page.- Throws:
IOExceptionjavax.servlet.ServletExceptionDescriptor.FormException
-
doSubmitDescription
public void doSubmitDescription(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionAccepts the new description.- Throws:
IOExceptionjavax.servlet.ServletException
-
doQuietDown
public org.kohsuke.stapler.HttpRedirect doQuietDown()
-
doQuietDown
@Deprecated public org.kohsuke.stapler.HttpRedirect doQuietDown(boolean block, int timeout)
Deprecated.since 2.267; usedoQuietDown(boolean, int, String, boolean)instead.Quiet down Jenkins - preparation for a restart Presented for compatibility.- Parameters:
block- Block until the system really quiets down and no builds are runningtimeout- If non-zero, only block up to the specified number of milliseconds
-
doQuietDown
@Deprecated(since="2.414") public org.kohsuke.stapler.HttpRedirect doQuietDown(boolean block, int timeout, @CheckForNull String message) throws InterruptedException, IOException
Deprecated.usedoQuietDown(boolean, int, String, boolean)instead.Quiet down Jenkins - preparation for a restart- Parameters:
block- Block until the system really quiets down and no builds are runningtimeout- If non-zero, only block up to the specified number of millisecondsmessage- Quiet reason that will be visible to user- Throws:
InterruptedExceptionIOException
-
doQuietDown
public org.kohsuke.stapler.HttpRedirect doQuietDown(@QueryParameter boolean block, @QueryParameter int timeout, @QueryParameter @CheckForNull String message, @QueryParameter boolean safeRestart) throws InterruptedException, IOExceptionQuiet down Jenkins - preparation for a restart- Parameters:
block- Block until the system really quiets down and no builds are runningtimeout- If non-zero, only block up to the specified number of millisecondsmessage- Quiet reason that will be visible to usersafeRestart- If the quietDown is for a safeRestart- Throws:
InterruptedExceptionIOException- Since:
- 2.414
-
doCancelQuietDown
public org.kohsuke.stapler.HttpRedirect doCancelQuietDown()
Cancel previous quiet down Jenkins - preparation for a restart
-
doToggleCollapse
public org.kohsuke.stapler.HttpResponse doToggleCollapse() throws javax.servlet.ServletException, IOException- Throws:
javax.servlet.ServletExceptionIOException
-
doClassicThreadDump
public void doClassicThreadDump(org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionBackward compatibility. Redirect to the thread dump.- Throws:
IOExceptionjavax.servlet.ServletException
-
getAllThreadDumps
public Map<String,Map<String,String>> getAllThreadDumps() throws IOException, InterruptedException
Obtains the thread dump of all agents (including the controller/built-in node.)Since this is for diagnostics, it has a built-in precautionary measure against hang agents.
- Throws:
IOExceptionInterruptedException
-
doCreateItem
public TopLevelItem doCreateItem(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
Description copied from interface:ModifiableItemGroupThe request format follows that of<n:form xmlns:n="/lib/form">.- Specified by:
doCreateItemin interfaceModifiableItemGroup<TopLevelItem>- Throws:
IOExceptionjavax.servlet.ServletException
-
createProjectFromXML
public TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException
Description copied from interface:ModifiableTopLevelItemGroupCreates a new job from its configuration XML. The type of the job created will be determined by what's in this XML.- Specified by:
createProjectFromXMLin interfaceModifiableTopLevelItemGroup- Parameters:
name- Name of the newly created project.xml- Item configuration as xml- Returns:
- Newly created
TopLevelItem. - Throws:
IOException- Since:
- 1.319
-
copy
public <T extends TopLevelItem> T copy(T src, String name) throws IOException
Description copied from interface:ModifiableTopLevelItemGroupCopies a job.- Specified by:
copyin interfaceModifiableTopLevelItemGroup- Parameters:
src- ATopLevelItemto be copied.name- Name of the newly created project.- Returns:
- Newly created
TopLevelItem. - Throws:
IOException
-
copy
public <T extends AbstractProject<?,?>> T copy(T src, String name) throws IOException
- Throws:
IOException
-
doCreateView
@POST public void doCreateView(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException- Throws:
IOExceptionjavax.servlet.ServletExceptionDescriptor.FormException
-
checkGoodName
public static void checkGoodName(String name) throws Failure
Check if the given name is suitable as a name for job, view, etc.- Throws:
Failure- if the given name is not good
-
doSecured
public void doSecured(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionChecks if the user was successfully authenticated.- Throws:
IOExceptionjavax.servlet.ServletException- See Also:
BasicAuthenticationFilter
-
doLoginEntry
public void doLoginEntry(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOExceptionCalled once the user logs in. Just forward to the top page. Used only byLegacySecurityRealm.- Throws:
IOException
-
doLogout
public void doLogout(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionLogs out the user.- Throws:
IOExceptionjavax.servlet.ServletException
-
getJnlpJars
public Slave.JnlpJar getJnlpJars(String fileName)
Serves jar files for inbound agents.
-
doJnlpJars
public Slave.JnlpJar doJnlpJars(org.kohsuke.stapler.StaplerRequest req)
-
doReload
public org.kohsuke.stapler.HttpResponse doReload() throws IOExceptionReloads the configuration.- Throws:
IOException
-
reload
public void reload() throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorExceptionReloads the configuration synchronously. Beware that this calls neitherItemListener.onLoaded()norInitializers.- Throws:
IOExceptionInterruptedExceptionorg.jvnet.hudson.reactor.ReactorException
-
doDoFingerprintCheck
public void doDoFingerprintCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionDo a finger-print check.- Throws:
IOExceptionjavax.servlet.ServletException
-
doGc
public void doGc(org.kohsuke.stapler.StaplerResponse rsp) throws IOExceptionFor debugging. Expose URL to perform GC.- Throws:
IOException
-
doException
@StaplerDispatchable public void doException()
End point that intentionally throws an exception to test the error behaviour.- Since:
- 1.467
-
doContextMenu
public ModelObjectWithContextMenu.ContextMenu doContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException, org.apache.commons.jelly.JellyException
Description copied from interface:ModelObjectWithContextMenuGenerates the context menu. The typical implementation isreturn new ContextMenu().from(this,request,response);, which implements the default behaviour. SeeModelObjectWithContextMenu.ContextMenu.from(ModelObjectWithContextMenu, StaplerRequest, StaplerResponse)for more details of what it does. This should suit most implementations.- Specified by:
doContextMenuin interfaceModelObjectWithContextMenu- Throws:
IOExceptionorg.apache.commons.jelly.JellyException
-
doChildrenContextMenu
public ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws Exception
Description copied from interface:ModelObjectWithChildrenGenerates the context menu to list up all the children.- Specified by:
doChildrenContextMenuin interfaceModelObjectWithChildren- Throws:
Exception
-
getHeapDump
public RemotingDiagnostics.HeapDump getHeapDump() throws IOException
Obtains the heap dump.- Throws:
IOException
-
doSimulateOutOfMemory
public void doSimulateOutOfMemory() throws IOExceptionSimulates OutOfMemoryError. Useful to make sure OutOfMemoryHeapDump setting.- Throws:
IOException
-
doUserContent
public DirectoryBrowserSupport doUserContent()
Binds /userContent/... to $JENKINS_HOME/userContent.
-
doRestart
@CLIMethod(name="restart") public void doRestart(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, RestartNotSupportedException
Perform a restart of Jenkins, if we can. This first replaces "app" toHudsonIsRestarting- Throws:
IOExceptionjavax.servlet.ServletExceptionRestartNotSupportedException
-
generateNotFoundResponse
@WebMethod(name="404") @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void generateNotFoundResponse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws javax.servlet.ServletException, IOExceptionServe a custom 404 error page, configured in web.xml.- Throws:
javax.servlet.ServletExceptionIOException
-
doSafeRestart
@Deprecated(since="2.414") public org.kohsuke.stapler.HttpResponse doSafeRestart(org.kohsuke.stapler.StaplerRequest req) throws IOException, javax.servlet.ServletException, RestartNotSupportedException
Deprecated.usedoSafeRestart(StaplerRequest, String)instead.Queues up a safe restart of Jenkins. Builds that cannot continue while the controller is not running have to finish or pause before it can proceed. No new builds will be started. No new jobs are accepted.- Throws:
IOExceptionjavax.servlet.ServletExceptionRestartNotSupportedException
-
doSafeRestart
public org.kohsuke.stapler.HttpResponse doSafeRestart(org.kohsuke.stapler.StaplerRequest req, @QueryParameter("message") String message) throws IOException, javax.servlet.ServletException, RestartNotSupportedExceptionQueues up a safe restart of Jenkins. Jobs have to finish or pause before it can proceed. No new jobs are accepted.- Throws:
IOExceptionjavax.servlet.ServletExceptionRestartNotSupportedException- Since:
- 2.414
-
restart
public void restart() throws RestartNotSupportedExceptionPerforms a restart.- Throws:
RestartNotSupportedException
-
safeRestart
@Deprecated(since="2.414") public void safeRestart() throws RestartNotSupportedException
Deprecated.usesafeRestart(String)instead.Queues up a restart to be performed once there are no builds currently running.- Throws:
RestartNotSupportedException- Since:
- 1.332
-
safeRestart
public void safeRestart(String message) throws RestartNotSupportedException
Queues up a restart to be performed once there are no builds currently running.- Parameters:
message- the message to show to users in the shutdown banner.- Throws:
RestartNotSupportedException- Since:
- 2.414
-
doExit
@CLIMethod(name="shutdown") public void doExit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
Shutdown the system.- Throws:
IOException- Since:
- 1.161
-
doSafeExit
@CLIMethod(name="safe-shutdown") public org.kohsuke.stapler.HttpResponse doSafeExit(org.kohsuke.stapler.StaplerRequest req) throws IOException
Shutdown the system safely.- Throws:
IOException- Since:
- 1.332
-
getAuthentication2
@NonNull public static org.springframework.security.core.Authentication getAuthentication2()
Gets theAuthenticationobject that represents the user associated with the current request.- Since:
- 2.266
-
getAuthentication
@Deprecated @NonNull public static Authentication getAuthentication()
Deprecated.
-
doScript
public void doScript(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionFor system diagnostics. Run arbitrary Groovy script.- Throws:
IOExceptionjavax.servlet.ServletException
-
doScriptText
public void doScriptText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionRun arbitrary Groovy script and return result as plain text.- Throws:
IOExceptionjavax.servlet.ServletException
-
_doScript
public static void _doScript(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, javax.servlet.RequestDispatcher view, hudson.remoting.VirtualChannel channel, ACL acl) throws IOException, javax.servlet.ServletException- Throws:
IOExceptionjavax.servlet.ServletException- Since:
- 1.509.1
-
doEval
public void doEval(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionEvaluates the Jelly script submitted by the client. This is useful for system administration as well as unit testing.- Throws:
IOExceptionjavax.servlet.ServletException
-
doSignup
public void doSignup(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionSign up for the user account.- Throws:
IOExceptionjavax.servlet.ServletException
-
doIconSize
public void doIconSize(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionChanges the icon size by changing the cookie- Throws:
IOExceptionjavax.servlet.ServletException
-
doFingerprintCleanup
public void doFingerprintCleanup(org.kohsuke.stapler.StaplerResponse rsp) throws IOException- Throws:
IOException
-
doWorkspaceCleanup
public void doWorkspaceCleanup(org.kohsuke.stapler.StaplerResponse rsp) throws IOException- Throws:
IOException
-
doDefaultJDKCheck
public FormValidation doDefaultJDKCheck(org.kohsuke.stapler.StaplerRequest request, @QueryParameter String value)
If the user chose the default JDK, make sure we got 'java' in PATH.
-
doCheckViewName
public FormValidation doCheckViewName(@QueryParameter String value)
Checks if a top-level view with the given name exists and make sure that the name is good as a view name.
-
doViewExistsCheck
@Deprecated public FormValidation doViewExistsCheck(@QueryParameter String value)
Deprecated.1.512Checks if a top-level view with the given name exists.
-
doResources
public void doResources(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletExceptionServes static resources placed along with Jelly view files.This method can serve a lot of files, so care needs to be taken to make this method secure. It's not clear to me what's the best strategy here, though the current implementation is based on file extensions.
- Throws:
IOExceptionjavax.servlet.ServletException
-
doCheckURIEncoding
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince("2.37") @Deprecated public FormValidation doCheckURIEncoding(org.kohsuke.stapler.StaplerRequest request) throws IOException
Deprecated.Checks if container uses UTF-8 to decode URLs. See http://wiki.jenkins-ci.org/display/JENKINS/Tomcat#Tomcat-i18n- Throws:
IOException
-
isCheckURIEncodingEnabled
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince("2.37") @Deprecated public static boolean isCheckURIEncodingEnabled()
Deprecated.Does not check when system default encoding is "ISO-8859-1".
-
getFutureDependencyGraph
public Future<DependencyGraph> getFutureDependencyGraph()
-
rebuildDependencyGraph
public void rebuildDependencyGraph()
Rebuilds the dependency map.
-
rebuildDependencyGraphAsync
public Future<DependencyGraph> rebuildDependencyGraphAsync()
Rebuilds the dependency map asynchronously.This would keep the UI thread more responsive and helps avoid the deadlocks, as dependency graph recomputation tends to touch a lot of other things.
- Since:
- 1.522
-
getDependencyGraph
public DependencyGraph getDependencyGraph()
-
getManagementLinks
public List<ManagementLink> getManagementLinks()
-
getCategorizedManagementLinks
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Map<ManagementLink.Category,List<ManagementLink>> getCategorizedManagementLinks()
-
getSetupWizard
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public SetupWizard getSetupWizard()
If set, a currently active setup wizard - e.g. installation- Since:
- 2.0
-
getMe
public User getMe()
Exposes the current user to/meURL.
-
getWidgets
@StaplerDispatchable public List<Widget> getWidgets()
Gets theWidgets registered on this object.Plugins who wish to contribute boxes on the side panel can add widgets by
getWidgets().add(new MyWidget())fromPlugin.start().
-
getTarget
public Object getTarget()
- Specified by:
getTargetin interfaceorg.kohsuke.stapler.StaplerProxy
-
isSubjectToMandatoryReadPermissionCheck
public boolean isSubjectToMandatoryReadPermissionCheck(String restOfPath)
Test a path to see if it is subject to mandatory read permission checks by container-managed security- Parameters:
restOfPath- the URI, excluding the Jenkins root URI and query string- Returns:
- true if the path is subject to mandatory read permission checks
- Since:
- 2.37
-
getUnprotectedRootActions
public Collection<String> getUnprotectedRootActions()
Gets a list of unprotected root actions. These URL prefixes should be exempted from access control checks by container-managed security. Ideally would be synchronized withgetTarget().- Returns:
- a list of URL names
- Since:
- 1.495
-
getStaplerFallback
public View getStaplerFallback()
Fallback to the primary view.- Specified by:
getStaplerFallbackin interfaceorg.kohsuke.stapler.StaplerFallback
-
doCheckDisplayName
public FormValidation doCheckDisplayName(@QueryParameter String displayName, @QueryParameter String jobName)
Checks to see if the candidate displayName collides with any existing display names or project names- Parameters:
displayName- The display name to testjobName- The name of the job the user is configuring
-
lookup
@CheckForNull public static <T> T lookup(Class<T> type)
Shortcut forJenkins.getInstanceOrNull()?.lookup.get(type)
-
getVersion
@CheckForNull public static VersionNumber getVersion()
ParsesVERSIONintoVersionNumber, or null if it's not parseable as a version number (such as when Jenkins is run withmvn jetty:run)
-
getStoredVersion
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull public static VersionNumber getStoredVersion()
Get the stored version of Jenkins, as stored bydoConfigSubmit(org.kohsuke.stapler.StaplerRequest, org.kohsuke.stapler.StaplerResponse).Parses the version into
VersionNumber, or null if it's not parseable as a version number (such as when Jenkins is run withmvn jetty:run)- Since:
- 2.0
-
shouldShowStackTrace
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean shouldShowStackTrace()
-
-