|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.AbstractModelObject
hudson.model.Node
hudson.model.AbstractCIBase
jenkins.model.Jenkins
hudson.model.Hudson
public class Hudson
Nested Class Summary | |
---|---|
static class |
Hudson.CloudList
Deprecated. only here for backward comp |
static class |
Hudson.MasterComputer
Deprecated. only here for backward comp |
Nested classes/interfaces inherited from class jenkins.model.Jenkins |
---|
Jenkins.DescriptorImpl, Jenkins.JenkinsHolder |
Nested classes/interfaces inherited from class hudson.model.Node |
---|
Node.InternalComputerListener, Node.Mode |
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu |
---|
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.MenuItem |
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Field Summary |
---|
Fields inherited from class jenkins.model.Jenkins |
---|
ADMINISTER, administrativeMonitors, ALLOWED_RESOURCE_EXTENSIONS, ANONYMOUS, AUTOMATIC_SLAVE_LAUNCH, clouds, computers, CONCURRENT_BUILD, FLYWEIGHT_SUPPORT, KILL_AFTER_LOAD, logRecords, lookup, overallLoad, overallNodeProvisioner, PARALLEL_LOAD, PERMISSIONS, pluginManager, proxy, READ, RESOURCE_PATH, root, RUN_SCRIPTS, servletContext, SESSION_HASH, slaves, tcpSlaveAgentListener, 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 |
Fields inherited from interface hudson.model.Saveable |
---|
NOOP |
Constructor Summary | |
---|---|
Hudson(File root,
javax.servlet.ServletContext context)
|
|
Hudson(File root,
javax.servlet.ServletContext context,
PluginManager pluginManager)
|
Method Summary | |
---|---|
static boolean |
adminCheck()
Deprecated. since 2007-12-18. Use Node.checkPermission(hudson.security.Permission) |
static boolean |
adminCheck(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Deprecated. since 2007-12-18. Use Node.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()
|
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. Use Platform.isDarwin() |
static boolean |
isWindows()
Deprecated. Use Functions.isWindows() . |
void |
setSlaves(List<Slave> slaves)
Deprecated. Use Jenkins.setNodes(List) . Since 1.252. |
Methods inherited from class hudson.model.AbstractCIBase |
---|
getNodeName, getUrl, interruptReloadThread, killComputer, resetLabel, setViewOwner, updateComputerList |
Methods inherited from class hudson.model.Node |
---|
canTake, canTake, checkPermission, getAssignedLabels, getChannel, getFileSystemProvisioner, getLabelCloud, getNodePropertyDescriptors, hasPermission, 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.model.ItemGroup |
---|
getUrl |
Methods inherited from interface hudson.model.ViewGroup |
---|
getUrl |
Methods inherited from interface hudson.security.AccessControlled |
---|
checkPermission, hasPermission |
Constructor Detail |
---|
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
Method Detail |
---|
@CLIResolver public static Hudson getInstance()
public CopyOnWriteList<ItemListener> getJobListeners()
ItemListener.all()
.
ItemListener
s.
public CopyOnWriteList<ComputerListener> getComputerListeners()
ComputerListener.all()
.
ComputerListener
s.
public Slave getSlave(String name)
Jenkins.getNode(String)
. Since 1.252.
public List<Slave> getSlaves()
Jenkins.getNodes()
. Since 1.252.
public void setSlaves(List<Slave> slaves) throws IOException
Jenkins.setNodes(List)
. Since 1.252.
IOException
public TopLevelItem getJob(String name)
public TopLevelItem getJobCaseInsensitive(String name)
public void doQuietDown(org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
Jenkins.doQuietDown()
instead.
IOException
javax.servlet.ServletException
public void doLogRss(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doFieldCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
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".
public static boolean isWindows()
Functions.isWindows()
.
public static boolean isDarwin()
Platform.isDarwin()
public static boolean adminCheck() throws IOException
Node.checkPermission(hudson.security.Permission)
IOException
public static boolean adminCheck(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
Node.checkPermission(hudson.security.Permission)
IOException
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.
public static boolean isAdmin(org.kohsuke.stapler.StaplerRequest req)
Permission
and check against ACL.
See isAdmin()
for more instructions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |