public class Hudson extends Jenkins
Modifier and Type | Class and Description |
---|---|
static class |
Hudson.CloudList
Deprecated.
only here for backward comp
|
static class |
Hudson.MasterComputer
Deprecated.
only here for backward comp
|
Jenkins.DescriptorImpl, Jenkins.EnforceSlaveAgentPortAdministrativeMonitor, Jenkins.JenkinsHolder, Jenkins.MasterRestartNotifyier
Node.InternalComputerListener, Node.Mode
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
ExtensionPoint.LegacyInstancesAreScopedToHudson
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
LOG_STARTUP_PERFORMANCE
holdOffLaunchUntilSave, SKIP_BUILD_CHECK_ON_FLYWEIGHTS
Constructor and Description |
---|
Hudson(File root,
javax.servlet.ServletContext context) |
Hudson(File root,
javax.servlet.ServletContext context,
PluginManager pluginManager) |
Modifier and Type | Method and Description |
---|---|
static boolean |
adminCheck()
Deprecated.
since 2007-12-18.
Use
AccessControlled.checkPermission(hudson.security.Permission) |
static boolean |
adminCheck(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Deprecated.
since 2007-12-18.
Use
AccessControlled.checkPermission(hudson.security.Permission) |
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.
|
FormValidation |
doFieldCheck(String value,
String type,
String errorText,
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.
|
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
Use
Jenkins.doQuietDown() instead. |
CopyOnWriteList<ComputerListener> |
getComputerListeners()
Deprecated.
as of 1.286.
Use
ComputerListener.all() . |
static Hudson |
getInstance()
Deprecated.
Here only for compatibility. Use
Jenkins.get() instead. |
TopLevelItem |
getJob(String name)
Deprecated.
Left only for the compatibility of URLs.
Should not be invoked for any other purpose.
|
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.
Use
ItemListener.all() . |
Slave |
getSlave(String name)
Deprecated.
Use
Jenkins.getNode(String) . Since 1.252. |
List<Slave> |
getSlaves()
Deprecated.
Use
Jenkins.getNodes() . Since 1.252. |
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
complex
ACL and Permission based scheme.
For a quick migration, use
But ideally, your plugin should first identify a suitable |
static boolean |
isAdmin(org.kohsuke.stapler.StaplerRequest req)
Deprecated.
since 2007-12-18.
Define a custom
Permission and check against ACL.
See isAdmin() for more instructions. |
static boolean |
isDarwin()
Deprecated.
|
static boolean |
isWindows()
Deprecated.
|
void |
setSlaves(List<Slave> slaves)
Deprecated.
Use
Jenkins.setNodes(List) . Since 1.252. |
_doScript, _getFingerprint, add, addNode, addView, canAdd, canDelete, checkGoodName, cleanUp, copy, 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
getDisabledAdministrativeMonitors, getNodeName, getUrl, interruptReloadThread, killComputer, resetLabel, setDisabledAdministrativeMonitors, setViewOwner, updateComputerList, updateNewComputer
canTake, canTake, getAssignedLabels, getChannel, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getTemporaryOfflineCause, isAcceptingTasks, isHoldOffLaunchUntilSave, reconfigure, toComputer
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getItemsStream, getItemsStream, getUrl
getAllViews, getUrl
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
public Hudson(File root, javax.servlet.ServletContext context) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException
public Hudson(File root, javax.servlet.ServletContext context, PluginManager pluginManager) throws IOException, InterruptedException, org.jvnet.hudson.reactor.ReactorException
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException
@Deprecated @CLIResolver @Nullable public static Hudson getInstance()
Jenkins.get()
instead.@Deprecated public CopyOnWriteList<ItemListener> getJobListeners()
ItemListener.all()
.ItemListener
s.@Deprecated public CopyOnWriteList<ComputerListener> getComputerListeners()
ComputerListener.all()
.ComputerListener
s.@Deprecated public Slave getSlave(String name)
Jenkins.getNode(String)
. Since 1.252.@Deprecated public List<Slave> getSlaves()
Jenkins.getNodes()
. Since 1.252.@Deprecated public void setSlaves(List<Slave> slaves) throws IOException
Jenkins.setNodes(List)
. Since 1.252.IOException
@Deprecated public TopLevelItem getJob(String name)
@Deprecated public TopLevelItem getJobCaseInsensitive(String name)
@Deprecated public void doQuietDown(org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
Jenkins.doQuietDown()
instead.IOException
javax.servlet.ServletException
@Deprecated public void doLogRss(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
@Deprecated public void doFieldCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
@Deprecated public FormValidation doFieldCheck(@QueryParameter(fixEmpty=true) String value, @QueryParameter(fixEmpty=true) String type, @QueryParameter(fixEmpty=true) String errorText, @QueryParameter(fixEmpty=true) String warningText)
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".
@Deprecated public static boolean isWindows()
Functions.isWindows()
.@Deprecated public static boolean isDarwin()
Platform.isDarwin()
@Deprecated public static boolean adminCheck() throws IOException
AccessControlled.checkPermission(hudson.security.Permission)
IOException
@Deprecated public static boolean adminCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
AccessControlled.checkPermission(hudson.security.Permission)
IOException
@Deprecated public static boolean isAdmin()
ACL
and Permission
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 suitable AccessControlled
object to check its permission
against.
@Deprecated public static boolean isAdmin(org.kohsuke.stapler.StaplerRequest req)
Permission
and check against ACL.
See isAdmin()
for more instructions.Copyright © 2004–2022. All rights reserved.