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
,ModelObjectWithChildren
,ModelObjectWithContextMenu
,ModifiableTopLevelItemGroup
,OnMaster
,org.kohsuke.stapler.StaplerFallback
,org.kohsuke.stapler.StaplerProxy
public class Hudson extends Jenkins
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Hudson.CloudList
Deprecated.only here for backward compstatic class
Hudson.MasterComputer
Deprecated.only here for backward comp-
Nested classes/interfaces inherited from class jenkins.model.Jenkins
Jenkins.DescriptorImpl, Jenkins.EnforceSlaveAgentPortAdministrativeMonitor, Jenkins.JenkinsHolder, Jenkins.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 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
Constructors Constructor Description Hudson(File root, javax.servlet.ServletContext context)
Hudson(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 boolean
adminCheck()
Deprecated.since 2007-12-18.static boolean
adminCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Deprecated.since 2007-12-18.FormValidation
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.CopyOnWriteList<ComputerListener>
getComputerListeners()
Deprecated.as of 1.286.static Hudson
getInstance()
Deprecated.Here only for compatibility.TopLevelItem
getJob(String name)
Deprecated.Left only for the compatibility of URLs.TopLevelItem
getJobCaseInsensitive(String name)
Deprecated.Used only for mapping jobs to URL in a case-insensitive fashion.CopyOnWriteList<ItemListener>
getJobListeners()
Deprecated.as of 1.286.Slave
getSlave(String name)
Deprecated.List<Slave>
getSlaves()
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
isWindows()
Deprecated.void
setSlaves(List<Slave> slaves)
Deprecated.-
Methods inherited from class jenkins.model.Jenkins
_doScript, _getFingerprint, add, addNode, addView, canAdd, canDelete, 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, doFingerprintCleanup, doGc, doIconSize, doJnlpJars, doLoginEntry, doLogout, doQuietDown, doQuietDown, doQuietDown, doReload, doResources, doRestart, doSafeExit, doSafeRestart, doScript, doScriptText, doSecured, doSignup, doSimulateOutOfMemory, doSubmitDescription, doTestPost, doToggleCollapse, doUserContent, doViewExistsCheck, doWorkspaceCleanup, expandVariablesForDirectory, get, getACL, getActions, getActiveAdministrativeMonitors, getActiveInstance, getAdjuncts, getAdministrativeMonitor, getAgentProtocols, getAllThreadDumps, getApi, getAsynchPeople, getAuthentication, getAuthentication2, getAuthorizationStrategy, getBuildDirFor, getBuilder, getBuildWrapper, getCategorizedManagementLinks, getClockDifference, getClockDifferenceCallable, getCloud, getComputer, getComputer, getComputerMap, getComputers, 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, getLabels, getLabelString, getLegacyInstanceId, getLifecycle, getLog, getManagementLinks, getMarkupFormatter, getMe, getMode, getMyViewsTabBar, getNode, getNodeDescription, getNodeProperties, getNodes, getNodesObject, getNumExecutors, getPeople, 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, getSetupWizard, getSlaveAgentPort, getStaplerFallback, getStoredVersion, getSystemMessage, getTarget, getTcpSlaveAgentListener, getTopLevelItemNames, getTrigger, getUnprotectedRootActions, getUpdateCenter, getUrlChildPrefix, getUser, getVersion, getView, getViewActions, getViews, getViewsTabBar, getWidgets, getWorkspaceFor, hasPeople, isCheckURIEncodingEnabled, isDefaultBuildDir, isDisableRememberMe, isNoUsageStatistics, isQuietingDown, isRootUrlSecure, isSlaveAgentPortEnforced, isSubjectToMandatoryReadPermissionCheck, isTerminating, isUpgradedFromBefore, isUsageStatisticsCollected, isUseCrumbs, isUseProjectNamingStrategy, isUseSecurity, lookup, makeSearchIndex, onDeleted, onRenamed, onViewRenamed, putItem, readResolve, rebuildDependencyGraph, rebuildDependencyGraphAsync, refreshExtensions, reload, remove, removeNode, restart, 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, 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, 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, getItemsStream, getItemsStream, getUrl
-
Methods inherited from interface hudson.model.ViewGroup
getAllViews, getUrl
-
-
-
-
Constructor Detail
-
Hudson
public Hudson(File root, javax.servlet.ServletContext context) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException
- Throws:
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException
-
Hudson
public Hudson(File root, javax.servlet.ServletContext context, PluginManager pluginManager) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException
- Throws:
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException
-
-
Method Detail
-
getInstance
@Deprecated @CLIResolver @Nullable public static Hudson getInstance()
Deprecated.Here only for compatibility. UseJenkins.get()
instead.
-
getJobListeners
@Deprecated public CopyOnWriteList<ItemListener> getJobListeners()
Deprecated.as of 1.286. UseItemListener.all()
.Gets all the installedItemListener
s.
-
getComputerListeners
@Deprecated public CopyOnWriteList<ComputerListener> getComputerListeners()
Deprecated.as of 1.286. UseComputerListener.all()
.Gets all the installedComputerListener
s.
-
getSlave
@Deprecated public Slave getSlave(String name)
Deprecated.UseJenkins.getNode(String)
. Since 1.252.Gets the agent of the give name, hooked under this Hudson.
-
getSlaves
@Deprecated public List<Slave> getSlaves()
Deprecated.UseJenkins.getNodes()
. Since 1.252.
-
setSlaves
@Deprecated public void setSlaves(List<Slave> slaves) throws IOException
Deprecated.UseJenkins.setNodes(List)
. Since 1.252.Updates the agent list.- Throws:
IOException
-
getJob
@Deprecated public TopLevelItem getJob(String name)
Deprecated.Left only for the compatibility of URLs. Should not be invoked for any other purpose.
-
getJobCaseInsensitive
@Deprecated public TopLevelItem getJobCaseInsensitive(String name)
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 public static boolean isWindows()
Deprecated.
-
isDarwin
@Deprecated public static boolean isDarwin()
Deprecated.
-
adminCheck
@Deprecated public static boolean adminCheck() throws IOException
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 public static boolean 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 public static boolean isAdmin(org.kohsuke.stapler.StaplerRequest req)
Deprecated.since 2007-12-18. Define a customPermission
and check against ACL. SeeisAdmin()
for more instructions.
-
-