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,FullyNamed,FullyNamedModelObject,Loadable,ModelObjectWithChildren,ModelObjectWithContextMenu,ModifiableTopLevelItemGroup,OnMaster,org.kohsuke.stapler.StaplerFallback,org.kohsuke.stapler.StaplerProxy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.only here for backward compstatic final classDeprecated.only here for backward compNested classes/interfaces inherited from class jenkins.model.Jenkins
Jenkins.DescriptorImpl, Jenkins.EnforceSlaveAgentPortAdministrativeMonitor, Jenkins.JenkinsHolder, Jenkins.MasterRestartNotifyierNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested 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, XSTREAM2Fields inherited from class hudson.model.AbstractCIBase
LOG_STARTUP_PERFORMANCEFields inherited from class hudson.model.Node
holdOffLaunchUntilSave, SKIP_BUILD_CHECK_ON_FLYWEIGHTS -
Constructor Summary
ConstructorsConstructorDescriptionHudson(File root, jakarta.servlet.ServletContext context, PluginManager pluginManager) Deprecated.Hudson(File root, javax.servlet.ServletContext context, PluginManager pluginManager) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptiondoFieldCheck(String value, String type, String errorText, String warningText) Deprecated.as of 1.324 Either use client-side validation (e.g.voiddoFieldCheck(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.voiddoLogRss(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.As on 1.267, moved to "/log/rss..."voiddoQuietDown(org.kohsuke.stapler.StaplerResponse rsp) Deprecated.as of 1.317 UseJenkins.doQuietDown()instead.Deprecated.as of 1.286.static HudsonDeprecated.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 booleanisAdmin()Deprecated.since 2007-12-18.static booleanisAdmin(org.kohsuke.stapler.StaplerRequest req) Deprecated.since 2007-12-18.static booleanisDarwin()Deprecated.static booleanDeprecated.voidDeprecated.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, 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, updateComputers, updateNewComputer, updateNodeMethods inherited from class hudson.model.AbstractCIBase
getDisabledAdministrativeMonitors, getNodeName, getUrl, interruptReloadThread, resetLabel, setDisabledAdministrativeMonitors, setViewOwner, updateComputerList, updateNewComputerMethods inherited from class hudson.model.Node
canTake, canTake, drainLabelsToTrim, getAssignedLabels, getChannel, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, onLoad, reconfigure, reconfigure, toComputerMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.ItemGroup
allItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getItemName, getItemsStream, getItemsStream, getUrlMethods inherited from interface jenkins.model.ModelObjectWithChildren
doChildrenContextMenuMethods inherited from interface jenkins.model.ModelObjectWithContextMenu
doContextMenuMethods inherited from interface hudson.model.ModifiableItemGroup
doCreateItemMethods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIconMethods inherited from interface hudson.model.ViewGroup
getAllViews, getUrl, getUserViewsTabBar
-
Constructor Details
-
Hudson
public Hudson(File root, jakarta.servlet.ServletContext context) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException - Throws:
IOExceptionInterruptedExceptionorg.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:
IOExceptionInterruptedExceptionorg.jvnet.hudson.reactor.ReactorException
-
Hudson
public Hudson(File root, jakarta.servlet.ServletContext context, PluginManager pluginManager) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException - Throws:
IOExceptionInterruptedExceptionorg.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:
IOExceptionInterruptedExceptionorg.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 installedItemListeners. -
getComputerListeners
Deprecated.as of 1.286. UseComputerListener.all().Gets all the installedComputerListeners. -
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:
IOExceptionjavax.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:
IOExceptionjavax.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:
IOExceptionjavax.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. -
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 complexACLandPermissionbased 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 suitableAccessControlledobject 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 customPermissionand check against ACL. SeeisAdmin()for more instructions.
-