Package hudson.model
Class Hudson
- 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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated.only here for backward compstatic final class
Deprecated.only here for backward compNested classes/interfaces inherited from class jenkins.model.Jenkins
Jenkins.DescriptorImpl, Jenkins.EnforceSlaveAgentPortAdministrativeMonitor, Jenkins.JenkinsHolder, Jenkins.MasterRestartNotifyier
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 inherited from class jenkins.model.Jenkins
ADMINISTER, administrativeMonitors, ALLOWED_RESOURCE_EXTENSIONS, ANONYMOUS, ANONYMOUS2, AUTOMATIC_AGENT_LAUNCH, CHANGELOG_URL, clouds, computers, CONCURRENT_BUILD, EXTEND_TIMEOUT_SECONDS, FLYWEIGHT_SUPPORT, KILL_AFTER_LOAD, logRecords, lookup, MANAGE, MANAGE_AND_SYSTEM_READ, NAME_VALIDATION_REJECTS_TRAILING_DOT_PROP, overallLoad, overallNodeProvisioner, PARALLEL_LOAD, PERMISSIONS, pluginManager, proxy, READ, RESOURCE_PATH, root, RUN_SCRIPTS, servletContext, SESSION_HASH, slaves, SYSTEM_READ, tcpSlaveAgentListener, UNCOMPUTED_VERSION, unlabeledLoad, unlabeledNodeProvisioner, VERSION, VERSION_HASH, VIEW_RESOURCE_PATH, XSTREAM, XSTREAM2
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
ConstructorDescriptionHudson
(File root, jakarta.servlet.ServletContext context, PluginManager pluginManager) Deprecated.Hudson
(File root, javax.servlet.ServletContext context, PluginManager pluginManager) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Deprecated.since 2007-12-18.static boolean
adminCheck
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.since 2007-12-18.doFieldCheck
(String value, String type, String errorText, String warningText) Deprecated.as of 1.324 Either use client-side validation (e.g.void
doFieldCheck
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.as of 1.294 Define your own check method, instead of relying on this generic one.void
doLogRss
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.As on 1.267, moved to "/log/rss..."void
doQuietDown
(org.kohsuke.stapler.StaplerResponse rsp) Deprecated.as of 1.317 UseJenkins.doQuietDown()
instead.Deprecated.as of 1.286.static Hudson
Deprecated.Here only for compatibility.Deprecated.Left only for the compatibility of URLs.getJobCaseInsensitive
(String name) Deprecated.Used only for mapping jobs to URL in a case-insensitive fashion.Deprecated.as of 1.286.Deprecated.Deprecated.UseJenkins.getNodes()
.static boolean
isAdmin()
Deprecated.since 2007-12-18.static boolean
isAdmin
(org.kohsuke.stapler.StaplerRequest req) Deprecated.since 2007-12-18.static boolean
isDarwin()
Deprecated.static boolean
Deprecated.void
Deprecated.Methods inherited from class jenkins.model.Jenkins
_doScript, _doScript, _getFingerprint, add, addNode, addView, canAdd, canDelete, checkDisplayName, checkGoodName, cleanUp, copy, createComputer, createLauncher, createPath, createProject, createProject, createProject, createProjectFromXML, deleteView, disableSecurity, doCancelQuietDown, doCheckDisplayName, doCheckURIEncoding, doCheckViewName, doChildrenContextMenu, doClassicThreadDump, doConfigExecutorsSubmit, doConfigSubmit, doContextMenu, doCreateItem, doCreateView, doDefaultJDKCheck, doDoFingerprintCheck, doEval, doException, doExit, doFillJobNameItems, doFingerprintCleanup, doGc, doIconSize, doJnlpJars, doLoginEntry, doLogout, doLogout, doQuietDown, doQuietDown, doQuietDown, doQuietDown, doReload, doResources, doRestart, doSafeExit, doSafeExit, doSafeRestart, doSafeRestart, doSafeRestart, doScript, doScript, doScriptText, doScriptText, doSecured, doSignup, doSimulateOutOfMemory, doSubmitDescription, doTestPost, doToggleCollapse, doUserContent, doViewExistsCheck, doWorkspaceCleanup, expandVariablesForDirectory, generateNotFoundResponse, get, getACL, getActions, getActiveAdministrativeMonitors, getActiveInstance, getAdjuncts, getAdministrativeMonitor, getAgentProtocols, getAllThreadDumps, getApi, getAuthentication, getAuthentication2, getAuthorizationStrategy, getBuildDirFor, getBuilder, getBuildWrapper, getCategorizedManagementLinks, getClockDifference, getClockDifferenceCallable, getCloud, getCloud, getComputer, getComputer, getComputerMap, getComputers, getComputersCollection, getConfigFile, getConfiguredRootUrl, getCrumbIssuer, getDependencyGraph, getDescription, getDescriptor, getDescriptor, getDescriptor, getDescriptorByName, getDescriptorByType, getDescriptorList, getDescriptorOrDie, getDisplayName, getDynamic, getExtensionList, getExtensionList, getFederatedLoginService, getFederatedLoginServices, getFingerprint, getFingerprintMap, getFullDisplayName, getFullName, getFutureDependencyGraph, getGlobalNodeProperties, getHeapDump, getInitLevel, getInjector, getInstallState, getInstanceOrNull, getItem, getItem, getItem, getItem, getItem, getItemByFullName, getItemByFullName, getItemGroup, getItemMap, getItems, getItems, getItems, getJDK, getJDKs, getJnlpJars, getJobNames, getJobProperty, getLabel, getLabelAtom, getLabelAtoms, getLabelAtomSet, getLabels, getLabelString, getLegacyInstanceId, getLifecycle, getLog, getManagementLinks, getMarkupFormatter, getMe, getMode, getMyViewsTabBar, getNode, getNodeDescription, getNodeProperties, getNodes, getNodesObject, getNumExecutors, getOrLoadNode, getPlugin, getPlugin, getPluginManager, getPlugins, getPrimaryView, getProjectNamingStrategy, getProjects, getProxy, getPublisher, getQueue, getQuietDownReason, getQuietPeriod, getRawBuildsDir, getRawWorkspaceDir, getRepositoryBrowser, getRetentionStrategy, getRootDir, getRootDirFor, getRootPath, getRootUrl, getRootUrlFromRequest, getScm, getScmCheckoutRetryCount, getSCMListeners, getSearchUrl, getSecretKey, getSecretKeyAsAES128, getSecurity, getSecurityRealm, getSecurityRealms, getSelfLabel, getServletContext, getSetupWizard, getSlaveAgentPort, getStaplerFallback, getStoredVersion, getSystemMessage, getTarget, getTcpSlaveAgentListener, getTopLevelItemNames, getTrigger, getUnprotectedRootActions, getUpdateCenter, getUrlChildPrefix, getUser, getVersion, getView, getViewActions, getViews, getViewsTabBar, getWidgets, getWorkspaceFor, isCheckURIEncodingEnabled, isDefaultBuildDir, isDisableRememberMe, isNoUsageStatistics, isPreparingSafeRestart, isQuietingDown, isRootUrlSecure, isSlaveAgentPortEnforced, isSubjectToMandatoryReadPermissionCheck, isTerminating, isUpgradedFromBefore, isUsageStatisticsCollected, isUseCrumbs, isUseProjectNamingStrategy, isUseSecurity, load, loadNode, lookup, makeSearchIndex, onDeleted, onRenamed, onViewRenamed, putItem, readResolve, rebuildDependencyGraph, rebuildDependencyGraphAsync, refreshExtensions, reload, remove, removeNode, restart, safeRestart, safeRestart, save, setAgentProtocols, setAuthorizationStrategy, setCrumbIssuer, setDisableRememberMe, setInstallState, setJDKs, setLabelString, setLog, setMarkupFormatter, setMode, setMyViewsTabBar, setNodeName, setNodes, setNoUsageStatistics, setNumExecutors, setPrimaryView, setProjectNamingStrategy, setProxy, setQuietPeriod, setRawBuildsDir, setScmCheckoutRetryCount, setSecurityRealm, setSlaveAgentPort, setSystemMessage, setViews, setViewsTabBar, shouldShowStackTrace, tryGetLabelAtom, unloadNode, updateComputerList, updateNewComputer, updateNode
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, reconfigure, toComputer
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, 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 jenkins.model.ModelObjectWithChildren
doChildrenContextMenu
Methods inherited from interface jenkins.model.ModelObjectWithContextMenu
doContextMenu
Methods inherited from interface hudson.model.ModifiableItemGroup
doCreateItem
Methods inherited from interface hudson.search.SearchItem
getSearchIcon
Methods inherited from interface hudson.model.ViewGroup
getAllViews, getUrl
-
Constructor Details
-
Hudson
public Hudson(File root, jakarta.servlet.ServletContext context) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException - Throws:
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException
- Since:
- 2.475
-
Hudson
@Deprecated public Hudson(File root, javax.servlet.ServletContext context) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException Deprecated.- Throws:
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException
-
Hudson
public Hudson(File root, jakarta.servlet.ServletContext context, PluginManager pluginManager) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException - Throws:
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException
- Since:
- 2.475
-
Hudson
@Deprecated public Hudson(File root, javax.servlet.ServletContext context, PluginManager pluginManager) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException Deprecated.- Throws:
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException
-
-
Method Details
-
getInstance
Deprecated.Here only for compatibility. UseJenkins.get()
instead. -
getJobListeners
Deprecated.as of 1.286. UseItemListener.all()
.Gets all the installedItemListener
s. -
getComputerListeners
Deprecated.as of 1.286. UseComputerListener.all()
.Gets all the installedComputerListener
s. -
getSlave
Deprecated.UseJenkins.getNode(String)
. Since 1.252.Gets the agent of the give name, hooked under this Hudson. -
getSlaves
Deprecated.UseJenkins.getNodes()
. Since 1.252. -
setSlaves
Deprecated.UseJenkins.setNodes(List)
. Since 1.252.Updates the agent list.- Throws:
IOException
-
getJob
Deprecated.Left only for the compatibility of URLs. Should not be invoked for any other purpose. -
getJobCaseInsensitive
Deprecated.Used only for mapping jobs to URL in a case-insensitive fashion. -
doQuietDown
@Deprecated public void doQuietDown(org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException Deprecated.as of 1.317 UseJenkins.doQuietDown()
instead.- Throws:
IOException
javax.servlet.ServletException
-
doLogRss
@Deprecated public void doLogRss(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException Deprecated.As on 1.267, moved to "/log/rss..."RSS feed for log entries.- Throws:
IOException
javax.servlet.ServletException
-
doFieldCheck
@Deprecated public void doFieldCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException Deprecated.as of 1.294 Define your own check method, instead of relying on this generic one.- Throws:
IOException
javax.servlet.ServletException
-
doFieldCheck
@Deprecated public FormValidation doFieldCheck(@QueryParameter(fixEmpty=true) String value, @QueryParameter(fixEmpty=true) String type, @QueryParameter(fixEmpty=true) String errorText, @QueryParameter(fixEmpty=true) String warningText) Deprecated.as of 1.324 Either use client-side validation (e.g. class="required number") or define your own check method, instead of relying on this generic one.Checks if the value for a field is set; if not an error or warning text is displayed. If the parameter "value" is not set then the parameter "errorText" is displayed as an error text. If the parameter "errorText" is not set, then the parameter "warningText" is displayed as a warning text.If the text is set and the parameter "type" is set, it will validate that the value is of the correct type. Supported types are "number, "number-positive" and "number-negative".
-
isWindows
Deprecated. -
isDarwin
Deprecated. -
adminCheck
Deprecated.since 2007-12-18. UseAccessControlled.checkPermission(hudson.security.Permission)
- Throws:
IOException
-
adminCheck
@Deprecated public static boolean adminCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException Deprecated.since 2007-12-18. UseAccessControlled.checkPermission(hudson.security.Permission)
- Throws:
IOException
-
isAdmin
Deprecated.since 2007-12-18. This method is deprecated when Hudson moved from simple Unix root-like model of "admin gets to do everything, and others don't have any privilege" to more complexACL
andPermission
based scheme.For a quick migration, use
Hudson.getInstance().getACL().hasPermission(Hudson.ADMINISTER)
To check if the user has the 'administer' role in Hudson.But ideally, your plugin should first identify a suitable
Permission
(or create one, if appropriate), then identify a suitableAccessControlled
object to check its permission against.Checks if the current user (for which we are processing the current request) has the admin access. -
isAdmin
Deprecated.since 2007-12-18. Define a customPermission
and check against ACL. SeeisAdmin()
for more instructions.
-