|
||||||||||
| 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.Hudson
@ExportedBean public final class Hudson
Root object of the system.
| Nested Class Summary | |
|---|---|
static class |
Hudson.CloudList
|
static class |
Hudson.DescriptorImpl
|
static class |
Hudson.MasterComputer
|
| Nested classes/interfaces inherited from class hudson.model.Node |
|---|
Node.Mode, Node.NodeListener |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary | |
|---|---|
static Permission |
ADMINISTER
|
List<AdministrativeMonitor> |
administrativeMonitors
AdministrativeMonitors installed on this system. |
static Set<String> |
ALLOWED_RESOURCE_EXTENSIONS
Extension list that doResources(StaplerRequest, StaplerResponse)
can serve. |
static org.springframework.security.Authentication |
ANONYMOUS
|
static boolean |
AUTOMATIC_SLAVE_LAUNCH
Automatically try to launch a slave when Hudson is initialized or a new slave is created. |
Hudson.CloudList |
clouds
Active Clouds. |
static boolean |
CONCURRENT_BUILD
Tentative switch to activate the concurrent build behavior. |
static boolean |
FLYWEIGHT_SUPPORT
Enabled by default as of 1.337. |
static boolean |
KILL_AFTER_LOAD
|
static boolean |
LOG_STARTUP_PERFORMANCE
|
static List<LogRecord> |
logRecords
Live view of recent LogRecords produced by Hudson. |
Lookup |
lookup
Stores various objects scoped to Hudson. |
OverallLoadStatistics |
overallLoad
Load statistics of the entire system. |
NodeProvisioner |
overallNodeProvisioner
NodeProvisioner that reacts to OverallLoadStatistics. |
static boolean |
PARALLEL_LOAD
|
static PermissionGroup |
PERMISSIONS
|
PluginManager |
pluginManager
Loaded plugins. |
ProxyConfiguration |
proxy
HTTP proxy configuration. |
static Permission |
READ
|
static String |
RESOURCE_PATH
Prefix to static resources like images and javascripts in the war file. |
File |
root
Root directory of the system. |
javax.servlet.ServletContext |
servletContext
|
TcpSlaveAgentListener |
tcpSlaveAgentListener
|
static String |
VERSION
Version number of this Hudson. |
static String |
VERSION_HASH
Hash of VERSION. |
static String |
VIEW_RESOURCE_PATH
Prefix to resources alongside view scripts. |
static com.thoughtworks.xstream.XStream |
XSTREAM
Thread-safe reusable XStream. |
| 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 | ||
|---|---|---|
Fingerprint |
_getFingerprint(String md5sum)
Gets a Fingerprint object if it exists. |
|
void |
addNode(Node n)
Adds one more Node to Hudson. |
|
void |
addView(View v)
|
|
static boolean |
adminCheck()
Deprecated. since 2007-12-18. Use Node.checkPermission(Permission) |
|
static boolean |
adminCheck(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Deprecated. since 2007-12-18. Use Node.checkPermission(Permission) |
|
boolean |
canDelete(View view)
Determine whether a view may be deleted. |
|
static void |
checkGoodName(String name)
Check if the given name is suitable as a name for job, view, etc. |
|
void |
cleanUp()
Called to shut down the system. |
|
|
copy(T src,
String name)
|
|
|
copy(T src,
String name)
Copys a job. |
|
Computer |
createComputer()
Creates a new Computer object that acts as the UI peer of this
Node. |
|
Launcher |
createLauncher(TaskListener listener)
Returns a Launcher for executing programs on this node. |
|
FilePath |
createPath(String absolutePath)
Gets the FilePath on this node. |
|
|
createProject(Class<T> type,
String name)
Creates a new job. |
|
TopLevelItem |
createProject(TopLevelItemDescriptor type,
String name)
Creates a new job. |
|
TopLevelItem |
createProject(TopLevelItemDescriptor type,
String name,
boolean notify)
Creates a new job. |
|
TopLevelItem |
createProjectFromXML(String name,
InputStream xml)
Creates a new job from its configuration XML. |
|
void |
deleteView(View view)
Deletes a view in this group. |
|
org.kohsuke.stapler.HttpRedirect |
doCancelQuietDown()
|
|
FormValidation |
doCheckJobName(String value)
Makes sure that the given name is good as a job name. |
|
FormValidation |
doCheckURIEncoding(org.kohsuke.stapler.StaplerRequest request)
Checks if container uses UTF-8 to decode URLs. |
|
void |
doClassicThreadDump(org.kohsuke.stapler.StaplerResponse rsp)
Backward compatibility. |
|
void |
doCli(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Handles HTTP requests for duplex channels for CLI. |
|
void |
doConfigExecutorsSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Accepts submission from the configuration page. |
|
void |
doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Accepts submission from the configuration page. |
|
Item |
doCreateItem(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
|
|
void |
doCreateView(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
|
|
FormValidation |
doDefaultJDKCheck(org.kohsuke.stapler.StaplerRequest request,
String value)
If the user chose the default JDK, make sure we got 'java' in PATH. |
|
void |
doDoFingerprintCheck(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Do a finger-print check. |
|
void |
doEval(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Evaluates the Jelly script submitted by the client. |
|
void |
doExit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Shutdown the system. |
|
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 |
doFingerprintCleanup(org.kohsuke.stapler.StaplerResponse rsp)
|
|
void |
doGc(org.kohsuke.stapler.StaplerResponse rsp)
For debugging. |
|
void |
doIconSize(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Changes the icon size by changing the cookie |
|
Slave.JnlpJar |
doJnlpJars(org.kohsuke.stapler.StaplerRequest req)
|
|
void |
doLoginEntry(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Called once the user logs in. |
|
void |
doLogout(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Logs out the user. |
|
void |
doLogRss(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Deprecated. As on 1.267, moved to "/log/rss..." |
|
org.kohsuke.stapler.HttpRedirect |
doQuietDown()
|
|
org.kohsuke.stapler.HttpRedirect |
doQuietDown(boolean block,
int timeout)
|
|
void |
doQuietDown(org.kohsuke.stapler.StaplerResponse rsp)
Deprecated. as of 1.317 Use doQuietDown() instead. |
|
org.kohsuke.stapler.HttpResponse |
doReload()
Reloads the configuration. |
|
void |
doResources(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Serves static resources placed along with Jelly view files. |
|
void |
doRestart(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Perform a restart of Hudson, if we can. |
|
void |
doSafeExit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Shutdown the system safely. |
|
void |
doSafeRestart(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Queues up a restart of Hudson for when there are no builds running, if we can. |
|
void |
doScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
For system diagnostics. |
|
void |
doScriptText(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Run arbitrary Dynamic Language script and return result as plain text. |
|
void |
doSecured(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Checks if the user was successfully authenticated. |
|
void |
doSignup(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Sign up for the user account. |
|
void |
doSimulateOutOfMemory()
Simulates OutOfMemoryError. |
|
void |
doSubmitDescription(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Accepts the new description. |
|
void |
doTestPost(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
|
|
DirectoryBrowserSupport |
doUserContent()
Binds /userContent/... |
|
FormValidation |
doViewExistsCheck(String value)
Checks if a top-level view with the given name exists. |
|
void |
doWorkspaceCleanup(org.kohsuke.stapler.StaplerResponse rsp)
|
|
ACL |
getACL()
Returns the root ACL. |
|
List<Action> |
getActions()
Returns the transient Actions associated with the top page. |
|
org.kohsuke.stapler.framework.adjunct.AdjunctManager |
getAdjuncts(String dummy)
Makes AdjunctManager URL-bound. |
|
AdministrativeMonitor |
getAdministrativeMonitor(String id)
Binds AdministrativeMonitors to URL. |
|
|
getAllItems(Class<T> type)
Gets all the Items recursively in the ItemGroup tree and
filter them by the given type. |
|
Api |
getApi()
|
|
static org.springframework.security.Authentication |
getAuthentication()
Deprecated. As of release 3.0.0, replaced by HudsonSecurityManager.getAuthentication() |
|
AuthorizationStrategy |
getAuthorizationStrategy()
|
|
Descriptor<Builder> |
getBuilder(String shortClassName)
Gets the builder descriptor by name. |
|
Descriptor<BuildWrapper> |
getBuildWrapper(String shortClassName)
Gets the build wrapper descriptor by name. |
|
ClockDifference |
getClockDifference()
Estimates the clock difference with this slave. |
|
Cloud |
getCloud(String name)
Gets a Cloud by its name, or null. |
|
ComputerSet |
getComputer()
Deprecated. UI method. Not meant to be used programmatically. |
|
Computer |
getComputer(String name)
|
|
CopyOnWriteList<ComputerListener> |
getComputerListeners()
Deprecated. as of 1.286. Use ComputerListener.all(). |
|
Computer[] |
getComputers()
Gets the read-only list of all Computers. |
|
CrumbIssuer |
getCrumbIssuer()
|
|
DependencyGraph |
getDependencyGraph()
|
|
String |
getDescription()
|
|
NodeDescriptor |
getDescriptor()
Gets the descriptor for this instance. |
|
Descriptor |
getDescriptor(Class<? extends Describable> type)
Gets the Descriptor that corresponds to the given
Describable type. |
|
Descriptor |
getDescriptor(String id)
Exposes Descriptor by its name to URL. |
|
Descriptor |
getDescriptorByName(String id)
Alias for getDescriptor(String). |
|
|
getDescriptorByType(Class<T> type)
Gets the Descriptor instance in the current Hudson by its type. |
|
|
getDescriptorList(Class<T> type)
Returns ExtensionList that retains the discovered
Descriptor instances for the given kind of Describable. |
|
Descriptor |
getDescriptorOrDie(Class<? extends Describable> type)
Works just like getDescriptor(Class) but don't take no for an
answer. |
|
String |
getDisplayName()
|
|
Object |
getDynamic(String token)
|
|
|
getExtensionList(Class<T> extensionType)
Returns ExtensionList that retains the discovered instances for
the given extension type. |
|
ExtensionList |
getExtensionList(String extensionType)
Used to bind ExtensionLists to URLs. |
|
FederatedLoginService |
getFederatedLoginService(String name)
|
|
List<FederatedLoginService> |
getFederatedLoginServices()
|
|
Object |
getFingerprint(String md5sum)
|
|
FingerprintMap |
getFingerprintMap()
|
|
String |
getFullDisplayName()
|
|
String |
getFullName()
Gets the full name of this ItemGroup. |
|
Iterator<GlobalMessage> |
getGlobalMessages()
|
|
DescribableList<NodeProperty<?>,NodePropertyDescriptor> |
getGlobalNodeProperties()
|
|
RemotingDiagnostics.HeapDump |
getHeapDump()
Obtains the heap dump. |
|
InitMilestone |
getInitLevel()
Gets the initialization milestone that we've already reached. |
|
static Hudson |
getInstance()
|
|
TopLevelItem |
getItem(String name)
Gets the Item inside this group that has a given name. |
|
Item |
getItemByFullName(String fullName)
|
|
|
getItemByFullName(String fullName,
Class<T> type)
Gets the Item object by its full name. |
|
Map<String,TopLevelItem> |
getItemMap()
Returns the read-only view of all the TopLevelItems keyed by
their names. |
|
List<TopLevelItem> |
getItems()
Gets just the immediate children of Hudson. |
|
|
getItems(Class<T> type)
Gets just the immediate children of Hudson but of the given type. |
|
JDK |
getJDK(String name)
Gets the JDK installation of the given name, or returns null. |
|
List<JDK> |
getJDKs()
|
|
Slave.JnlpJar |
getJnlpJars(String fileName)
Serves jar files for JNLP slave agents. |
|
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(). |
|
Collection<String> |
getJobNames()
Gets the names of all the Jobs. |
|
JobPropertyDescriptor |
getJobProperty(String shortClassName)
Gets the JobPropertyDescriptor by name. |
|
Label |
getLabel(String expr)
Gets the label that exists on this system by the name. |
|
LabelAtom |
getLabelAtom(String name)
Returns the label atom of the given name. |
|
Set<LabelAtom> |
getLabelAtoms()
|
|
Set<Label> |
getLabels()
Gets all the active labels in the current system. |
|
String |
getLabelString()
Returns the manually configured label for a node. |
|
Lifecycle |
getLifecycle()
|
|
LogRecorderManager |
getLog()
For binding LogRecorderManager to "/log". |
|
List<ManagementLink> |
getManagementLinks()
|
|
MarkupFormatter |
getMarkupFormatter()
|
|
User |
getMe()
Exposes the current user to /me URL. |
|
Node.Mode |
getMode()
Returns Node.Mode.EXCLUSIVE if this node is only available for those
jobs that exclusively specifies this node as the assigned node. |
|
MyViewsTabBar |
getMyViewsTabBar()
|
|
Node |
getNode(String name)
Gets the slave node of the give name, hooked under this Hudson. |
|
String |
getNodeDescription()
Human-readable description of this node. |
|
String |
getNodeName()
Deprecated. |
|
DescribableList<NodeProperty<?>,NodePropertyDescriptor> |
getNodeProperties()
Gets the NodeProperty instances configured for this Node. |
|
List<Node> |
getNodes()
Returns all Nodes in the system, excluding Hudson
instance itself which represents the master. |
|
int |
getNumExecutors()
Returns the number of Executors. |
|
View.People |
getPeople()
|
|
|
getPlugin(Class<P> clazz)
Gets the plugin object from its class. |
|
Plugin |
getPlugin(String shortName)
Gets the plugin object from its short name. |
|
PluginCenter |
getPluginCenter()
|
|
PluginManager |
getPluginManager()
|
|
|
getPlugins(Class<P> clazz)
Gets the plugin objects from their super-class. |
|
View |
getPrimaryView()
Returns the primary View that renders the top-page of Hudson. |
|
List<Project> |
getProjects()
Gets the list of all the projects. |
|
Descriptor<Publisher> |
getPublisher(String shortClassName)
Gets the publisher descriptor by name. |
|
Queue |
getQueue()
|
|
int |
getQuietPeriod()
Gets the system default quiet period. |
|
Descriptor<RepositoryBrowser<?>> |
getRepositoryBrowser(String shortClassName)
Gets the repository browser descriptor by name. |
|
Descriptor<RetentionStrategy<?>> |
getRetentionStrategy(String shortClassName)
Gets the retention strategy descriptor by name. |
|
File |
getRootDir()
Gets the root directory on the file system that this Item can use
freely for storing the configuration data. |
|
File |
getRootDirFor(TopLevelItem child)
Assigns the root directory for children. |
|
FilePath |
getRootPath()
Gets the root directory of this node. |
|
String |
getRootUrl()
Gets the absolute URL of Hudson, such as "http://localhost/hudson/". |
|
String |
getRootUrlFromRequest()
Gets the absolute URL of Hudson top page, such as "http://localhost/hudson/". |
|
Descriptor<SCM> |
getScm(String shortClassName)
Gets the SCM descriptor by name. |
|
int |
getScmCheckoutRetryCount()
Gets the global SCM check out retry count. |
|
CopyOnWriteList<SCMListener> |
getSCMListeners()
Gets all the installed SCMListeners. |
|
ScriptSupport |
getScriptSupport()
|
|
String |
getSearchUrl()
Returns the URL of this item relative to the parent SearchItem. |
|
String |
getSecretKey()
Returns a secret key that survives across container start/stop. |
|
SecretKey |
getSecretKeyAsAES128()
Gets the secret key as a key for AES-128. |
|
List<TopLevelItem> |
getSecuredItems()
|
|
SecurityMode |
getSecurity()
Returns the constant that captures the three basic security modes in Hudson. |
|
HudsonSecurityManager |
getSecurityManager()
|
|
SecurityRealm |
getSecurityRealm()
|
|
Descriptor<SecurityRealm> |
getSecurityRealms(String shortClassName)
Gets the SecurityRealm descriptors by name. |
|
LabelAtom |
getSelfLabel()
Gets the special label that represents this node itself. |
|
Slave |
getSlave(String name)
Deprecated. Use getNode(String). Since 1.252. |
|
int |
getSlaveAgentPort()
|
|
List<Slave> |
getSlaves()
Deprecated. Use getNodes(). Since 1.252. |
|
View |
getStaplerFallback()
Fallback to the primary view. |
|
String |
getSystemMessage()
Synonym to getNodeDescription(). |
|
Object |
getTarget()
|
|
TcpSlaveAgentListener |
getTcpSlaveAgentListener()
|
|
Collection<String> |
getTopLevelItemNames()
Gets the names of all the TopLevelItems. |
|
TriggerDescriptor |
getTrigger(String shortClassName)
Gets the trigger descriptor by name. |
|
UpdateCenter |
getUpdateCenter()
|
|
String |
getUrl()
Deprecated. Why are you calling a method that always returns ""? Perhaps you meant getRootUrl(). |
|
String |
getUrlChildPrefix()
Gets the URL token that prefixes the URLs for child Items. |
|
User |
getUser(String name)
Gets the user of the given name. |
|
static VersionNumber |
getVersion()
Parses VERSION into VersionNumber, or null if it's not
parseable as a version number (such as when Hudson is run with "mvn
hudson-dev:run") |
|
View |
getView(String name)
Gets a view of the given name. |
|
Collection<View> |
getViews()
Gets the read-only list of all Views. |
|
ViewsTabBar |
getViewsTabBar()
Gets the TabBar for the views. |
|
List<Widget> |
getWidgets()
Gets the Widgets registered on this object. |
|
FilePath |
getWorkspaceFor(TopLevelItem item)
Returns a "workspace" directory for the given TopLevelItem. |
|
boolean |
hasPeople()
Does this View has any associated user information recorded? |
|
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 |
isCheckURIEncodingEnabled()
Does not check when system default encoding is "ISO-8859-1". |
|
static boolean |
isDarwin()
|
|
boolean |
isQuietingDown()
Returns true if Hudson is quieting down. |
|
boolean |
isTerminating()
Returns true if the container initiated the termination of the web application. |
|
boolean |
isUpgradedFromBefore(VersionNumber v)
Returns true if the current running Hudson is upgraded from a version earlier than the specified version. |
|
boolean |
isUsageStatisticsCollected()
|
|
boolean |
isUseCrumbs()
If true, all the POST requests to Hudson would have to have crumb in it to protect Hudson from CSRF vulnerabilities. |
|
boolean |
isUseSecurity()
A convenience method to check if there's some security restrictions in place. |
|
static boolean |
isWindows()
Deprecated. Use Functions.isWindows(). |
|
static
|
lookup(Class<T> type)
Shortcut for Hudson.getInstance().lookup.get(type) |
|
SearchIndexBuilder |
makeSearchIndex()
Default implementation that returns empty index. |
|
void |
onDeleted(TopLevelItem item)
Called in response to AbstractItem.doDoDelete(StaplerRequest, StaplerResponse) |
|
void |
onRenamed(TopLevelItem job,
String oldName,
String newName)
Called by Job.renameTo(String) to update relevant data structure. |
|
void |
onViewRenamed(View view,
String oldName,
String newName)
View calls this method when it's renamed. |
|
void |
putItem(TopLevelItem item)
Overwrites the existing item by new one. |
|
void |
rebuildDependencyGraph()
Rebuilds the dependency map. |
|
void |
reload()
Reloads the configuration synchronously. |
|
TopLevelItem |
reloadProjectFromDisk(File jobDir)
Reload a project to update its definition. |
|
void |
removeNode(Node n)
Removes a Node from Hudson. |
|
void |
restart()
Performs a restart. |
|
void |
safeRestart()
Queues up a restart to be performed once there are no builds currently running. |
|
void |
save()
Save the settings to a file. |
|
void |
setAuthorizationStrategy(AuthorizationStrategy authorizationStrategy)
|
|
void |
setCrumbIssuer(CrumbIssuer issuer)
|
|
void |
setMarkupFormatter(MarkupFormatter markupFormatter)
|
|
void |
setNodeName(String name)
When the user clones a Node, Hudson uses this method to change
the node name right after the cloned Node object is instantiated. |
|
void |
setNodes(List<? extends Node> nodes)
|
|
void |
setNoUsageStatistics(Boolean noUsageStatistics)
|
|
void |
setNumExecutors(int n)
|
|
void |
setSecurityRealm(SecurityRealm securityRealm)
|
|
void |
setSlaves(List<Slave> slaves)
Deprecated. Use setNodes(List). Since 1.252. |
|
void |
setSystemMessage(String message)
Sets the system message. |
|
| Methods inherited from class hudson.model.Node |
|---|
canTake, checkPermission, getAssignedLabels, getChannel, getFileSystemProvisioner, getLabelCloud, getNodePropertyDescriptors, hasPermission, isHoldOffLaunchUntilSave, setOfflineCause, toComputer |
| Methods inherited from class hudson.model.AbstractModelObject |
|---|
getSearch, getSearchIndex, getSearchName |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hudson.security.AccessControlled |
|---|
checkPermission, hasPermission |
| Field Detail |
|---|
public final transient Lookup lookup
Hudson.
public final transient File root
public final Hudson.CloudList clouds
Clouds.
public final transient PluginManager pluginManager
public transient volatile TcpSlaveAgentListener tcpSlaveAgentListener
@Exported public final transient OverallLoadStatistics overallLoad
public final transient NodeProvisioner overallNodeProvisioner
NodeProvisioner that reacts to OverallLoadStatistics.
public final transient javax.servlet.ServletContext servletContext
public final transient List<AdministrativeMonitor> administrativeMonitors
AdministrativeMonitors installed on this system.
AdministrativeMonitorpublic transient volatile ProxyConfiguration proxy
public static final Set<String> ALLOWED_RESOURCE_EXTENSIONS
doResources(StaplerRequest, StaplerResponse)
can serve. This set is mutable to allow plugins to add additional
extensions.
public static List<LogRecord> logRecords
LogRecords produced by Hudson.
public static final com.thoughtworks.xstream.XStream XSTREAM
XStream.
public static String VERSION
public static String VERSION_HASH
VERSION.
public static String RESOURCE_PATH
Value
computed in WebAppMain.
public static String VIEW_RESOURCE_PATH
Value computed in
WebAppMain.
public static boolean PARALLEL_LOAD
public static boolean KILL_AFTER_LOAD
public static boolean LOG_STARTUP_PERFORMANCE
public static boolean FLYWEIGHT_SUPPORT
public static boolean CONCURRENT_BUILD
AbstractProject.isConcurrentBuild()public static boolean AUTOMATIC_SLAVE_LAUNCH
public static final PermissionGroup PERMISSIONS
public static final Permission ADMINISTER
public static final Permission READ
public static final org.springframework.security.Authentication ANONYMOUS
| 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
pluginManager - If non-null, use existing plugin manager. create a
new one.
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException| Method Detail |
|---|
@CLIResolver public static Hudson getInstance()
public TcpSlaveAgentListener getTcpSlaveAgentListener()
public org.kohsuke.stapler.framework.adjunct.AdjunctManager getAdjuncts(String dummy)
AdjunctManager URL-bound. The dummy parameter allows us to
use different URLs for the same adjunct, for proper cache handling.
@Exported public int getSlaveAgentPort()
@Deprecated public String getNodeName()
getNodeName in class Nodepublic void setNodeName(String name)
NodeNode, Hudson uses this method to change
the node name right after the cloned Node object is instantiated.
This method is never used for any other purpose, and as such for all practical intents and purposes, the node name should be treated like immutable.
setNodeName in class Nodepublic String getNodeDescription()
Node
getNodeDescription in class Node@Exported public String getDescription()
public PluginManager getPluginManager()
public PluginCenter getPluginCenter()
public HudsonSecurityManager getSecurityManager()
public UpdateCenter getUpdateCenter()
public boolean isUsageStatisticsCollected()
public void setNoUsageStatistics(Boolean noUsageStatistics)
throws IOException
IOExceptionpublic View.People getPeople()
public boolean hasPeople()
View has any associated user information recorded?
public Api getApi()
public String getSecretKey()
This value is useful for implementing some of the security features.
public SecretKey getSecretKeyAsAES128()
public Descriptor<SCM> getScm(String shortClassName)
public Descriptor<RepositoryBrowser<?>> getRepositoryBrowser(String shortClassName)
public Descriptor<Builder> getBuilder(String shortClassName)
public Descriptor<BuildWrapper> getBuildWrapper(String shortClassName)
public Descriptor<Publisher> getPublisher(String shortClassName)
public TriggerDescriptor getTrigger(String shortClassName)
public Descriptor<RetentionStrategy<?>> getRetentionStrategy(String shortClassName)
public JobPropertyDescriptor getJobProperty(String shortClassName)
JobPropertyDescriptor by name. Primarily used for making
them web-visible.
public Descriptor getDescriptor(String id)
Descriptor by its name to URL.
After doing all the getXXX(shortClassName) methods, I finally
realized that this just doesn't scale.
id - Either Descriptor.getId() (recommended) or the short
name of a Describable subtype (for compatibility)public Descriptor getDescriptorByName(String id)
getDescriptor(String).
getDescriptorByName in interface DescriptorByNameOwnerid - Either Descriptor.getId() (recommended) or the short
name.public Descriptor getDescriptor(Class<? extends Describable> type)
Descriptor that corresponds to the given
Describable type. If you have an instance of type and
call Describable.getDescriptor(), you'll get the same instance
that this method returns.
public Descriptor getDescriptorOrDie(Class<? extends Describable> type)
getDescriptor(Class) but don't take no for an
answer.
AssertionError - If the descriptor is missing.public <T extends Descriptor> T getDescriptorByType(Class<T> type)
Descriptor instance in the current Hudson by its type.
public Descriptor<SecurityRealm> getSecurityRealms(String shortClassName)
SecurityRealm descriptors by name. Primarily used for
making them web-visible.
public CopyOnWriteList<ItemListener> getJobListeners()
ItemListener.all().
ItemListeners.
public CopyOnWriteList<SCMListener> getSCMListeners()
SCMListeners.
public CopyOnWriteList<ComputerListener> getComputerListeners()
ComputerListener.all().
ComputerListeners.
public Plugin getPlugin(String shortName)
This allows URL hudson/plugin/ID to be served by the views of the plugin class.
public <P extends Plugin> P getPlugin(Class<P> clazz)
This allows easy storage of plugin information in the plugin singleton without every plugin reimplementing the singleton pattern.
clazz - The plugin class (beware class-loader fun, this will
probably only work from within the hpi that defines the plugin class, it
may or may not work in other cases)
public <P extends Plugin> List<P> getPlugins(Class<P> clazz)
clazz - The plugin class (beware class-loader fun)
public String getSystemMessage()
getNodeDescription().
public MarkupFormatter getMarkupFormatter()
public void setMarkupFormatter(MarkupFormatter markupFormatter)
public void setSystemMessage(String message)
throws IOException
IOExceptionpublic FederatedLoginService getFederatedLoginService(String name)
public List<FederatedLoginService> getFederatedLoginServices()
public Launcher createLauncher(TaskListener listener)
NodeLauncher for executing programs on this node.
The callee must call Launcher.decorateFor(Node) before
returning to complete the decoration.
createLauncher in class Nodepublic String getFullName()
ItemGroupItemGroup.
getFullName in interface ItemGroup<TopLevelItem>Item.getFullName()public String getFullDisplayName()
getFullDisplayName in interface ItemGroup<TopLevelItem>Item.getFullDisplayName()public List<Action> getActions()
Actions associated with the top page.
Adding Action is primarily useful for plugins to contribute
an item to the navigation bar of the top page. See existing
Action implementation for it affects the GUI.
To register an Action, implement RootAction extension
point, or write code like
Hudson.getInstance().getActions().add(...).
@Exported(name="jobs") public List<TopLevelItem> getItems()
Hudson.
getItems in interface ItemGroup<TopLevelItem>getAllItems(Class)@Exported(name="securedJobs") public List<TopLevelItem> getSecuredItems()
public Map<String,TopLevelItem> getItemMap()
TopLevelItems keyed by
their names. This method is efficient, as it doesn't involve any copying.
public <T> List<T> getItems(Class<T> type)
Hudson but of the given type.
public <T extends Item> List<T> getAllItems(Class<T> type)
Items recursively in the ItemGroup tree and
filter them by the given type.
public List<Project> getProjects()
Since Project can only show up under Hudson, no need
to search recursively.
public Collection<String> getJobNames()
Jobs.
public Collection<String> getTopLevelItemNames()
TopLevelItems.
public View getView(String name)
ViewGroup
getView in interface ViewGroup@Exported public Collection<View> getViews()
Views.
getViews in interface ViewGroup
public void addView(View v)
throws IOException
IOExceptionpublic boolean canDelete(View view)
ViewGroup
canDelete in interface ViewGroup
public void deleteView(View view)
throws IOException
ViewGroup
deleteView in interface ViewGroupIOExceptionpublic ViewsTabBar getViewsTabBar()
ViewGroup
getViewsTabBar in interface ViewGrouppublic MyViewsTabBar getMyViewsTabBar()
public ScriptSupport getScriptSupport()
public boolean isUpgradedFromBefore(VersionNumber v)
This method continues to return true until the system configuration
is saved, at which point version will be overwritten and Hudson
forgets the upgrade history.
To handle SNAPSHOTS correctly, pass in "1.N.*" to test if it's upgrading from the version equal or younger than N. So say if you implement a feature in 1.301 and you want to check if the installation upgraded from pre-1.301, pass in "1.300.*"
public Computer[] getComputers()
Computers.
@CLIResolver public Computer getComputer(String name)
public ComputerSet getComputer()
public Label getLabel(String expr)
(String)public LabelAtom getLabelAtom(String name)
public Set<Label> getLabels()
public Set<LabelAtom> getLabelAtoms()
public Queue getQueue()
public String getDisplayName()
getDisplayName in interface ModelObjectgetDisplayName in class Nodepublic List<JDK> getJDKs()
public JDK getJDK(String name)
public Slave getSlave(String name)
getNode(String). Since 1.252.
public Node getNode(String name)
public Cloud getCloud(String name)
Cloud by its name, or null.
public List<Slave> getSlaves()
getNodes(). Since 1.252.
public List<Node> getNodes()
Nodes in the system, excluding Hudson
instance itself which represents the master.
public void setSlaves(List<Slave> slaves)
throws IOException
setNodes(List). Since 1.252.
IOException
public void addNode(Node n)
throws IOException
Node to Hudson.
IOException
public void removeNode(Node n)
throws IOException
Node from Hudson.
IOException
public void setNodes(List<? extends Node> nodes)
throws IOException
IOExceptionpublic DescribableList<NodeProperty<?>,NodePropertyDescriptor> getNodeProperties()
NodeNodeProperty instances configured for this Node.
getNodeProperties in class Nodepublic DescribableList<NodeProperty<?>,NodePropertyDescriptor> getGlobalNodeProperties()
public AdministrativeMonitor getAdministrativeMonitor(String id)
AdministrativeMonitors to URL.
public NodeDescriptor getDescriptor()
Describable Descriptor is a singleton for every concrete
Describable implementation, so if
a.getClass()==b.getClass() then
a.getDescriptor()==b.getDescriptor() must hold.
getDescriptor in interface Describable<Node>getDescriptor in class Nodepublic int getQuietPeriod()
public int getScmCheckoutRetryCount()
public String getUrl()
getRootUrl().
ItemGroup
getUrl in interface ItemGroup<TopLevelItem>getUrl in interface ViewGrouppublic String getSearchUrl()
SearchItemSearchItem.
getSearchUrl in interface SearchItemgetSearchUrl in class Node
public void onViewRenamed(View view,
String oldName,
String newName)
ViewGroupView calls this method when it's renamed. This method is intended
to work as a notification to the ViewGroup (so that it can adjust
its internal data structure, for example.)
It is the caller's responsibility to ensure that the new name is a legal view name.
onViewRenamed in interface ViewGrouppublic SearchIndexBuilder makeSearchIndex()
AbstractModelObject
@Exported public View getPrimaryView()
View that renders the top-page of Hudson.
public String getUrlChildPrefix()
ItemGroupItems. Like
"job", "item", etc.
getUrlChildPrefix in interface ItemGroup<TopLevelItem>public String getRootUrl()
This method first tries to use the manually configured value, then
fall back to StaplerRequest.getRootPath(). It is done in this
order so that it can work correctly even in the face of a reverse proxy.
Descriptor.getCheckUrl(String),
getRootUrlFromRequest()public String getRootUrlFromRequest()
Unlike getRootUrl(), which uses the manually configured
value, this one uses the current request to reconstruct the URL. The
benefit is that this is immune to the configuration mistake (users often
fail to set the root URL correctly, especially when a migration is
involved), but the downside is that unless you are processing a request,
this method doesn't work.
public File getRootDir()
PersistenceRootItem can use
freely for storing the configuration data.
This parameter is given by the ItemGroup when Item is
loaded from memory.
getRootDir in interface PersistenceRootpublic FilePath getWorkspaceFor(TopLevelItem item)
TopLevelItem.
Workspace directory is usually used for keeping out the checked out source code, but it can be used for anything.
IfHUDSON_WORKSPACES_PROPERTY_KEY is set through JNDI or
system properties or environment variables. workspaceRoot will be set
based on property value.
getWorkspaceFor in class Nodepublic FilePath getRootPath()
NodeHudson always owns a directory on every node. This method returns that.
getRootPath in class NodeFilePath object
is not available.public FilePath createPath(String absolutePath)
NodeFilePath on this node.
createPath in class Nodepublic ClockDifference getClockDifference()
Node
getClockDifference in class Nodepublic LogRecorderManager getLog()
LogRecorderManager to "/log". Everything below here
is admin-only, so do the check here.
@Exported public boolean isUseSecurity()
@Exported public boolean isUseCrumbs()
public SecurityMode getSecurity()
public SecurityRealm getSecurityRealm()
public void setSecurityRealm(SecurityRealm securityRealm)
public Lifecycle getLifecycle()
public <T> ExtensionList<T> getExtensionList(Class<T> extensionType)
ExtensionList that retains the discovered instances for
the given extension type.
extensionType - The base type that represents the extension point.
Normally ExtensionPoint subtype but that's not a hard
requirement.
public ExtensionList getExtensionList(String extensionType)
throws ClassNotFoundException
ExtensionLists to URLs.
ClassNotFoundExceptionpublic <T extends Describable<T>,D extends Descriptor<T>> DescriptorExtensionList<T,D> getDescriptorList(Class<T> type)
ExtensionList that retains the discovered
Descriptor instances for the given kind of Describable.
public ACL getACL()
ACL.
getACL in interface AccessControlledgetACL in class NodeAuthorizationStrategy.getRootACL()public AuthorizationStrategy getAuthorizationStrategy()
public void setAuthorizationStrategy(AuthorizationStrategy authorizationStrategy)
public boolean isQuietingDown()
No further jobs will be executed unless it can be finished while other current pending builds are still in progress.
public boolean isTerminating()
public InitMilestone getInitLevel()
InitMilestone.STARTED even if the initialization hasn't
been started, so that this method never returns null.
public void setNumExecutors(int n)
throws IOException
IOExceptionpublic TopLevelItem getJob(String name)
public TopLevelItem getJobCaseInsensitive(String name)
public TopLevelItem getItem(String name)
Item inside this group that has a given name..
Note that the look up is case-insensitive.
getItem in interface ItemGroup<TopLevelItem>public File getRootDirFor(TopLevelItem child)
ItemGrouproot directory for children.
getRootDirFor in interface ItemGroup<TopLevelItem>
public <T extends Item> T getItemByFullName(String fullName,
Class<T> type)
Item object by its full name. Full names are like path
names, where each name of Item is combined by '/'.
Item doesn't exist under the given
full name, or it exists but it's no an instance of the given type.public Item getItemByFullName(String fullName)
public User getUser(String name)
public TopLevelItem createProject(TopLevelItemDescriptor type,
String name)
throws IOException
IllegalArgumentException - if the project of the given name already
exists.
IOException
public TopLevelItem createProject(TopLevelItemDescriptor type,
String name,
boolean notify)
throws IOException
type - Descriptor for job typename - Name for jobnotify - Whether to fire onCreated method for all ItemListeners
IllegalArgumentException - if a project of the give name already
exists.
IOException
public void putItem(TopLevelItem item)
throws IOException,
InterruptedException
This is a short cut for deleting an existing job and adding a new one.
IOException
InterruptedException
public <T extends TopLevelItem> T createProject(Class<T> type,
String name)
throws IOException
This version infers the descriptor from the type of the top-level item.
IllegalArgumentException - if the project of the given name already
exists.
IOException
public void onRenamed(TopLevelItem job,
String oldName,
String newName)
throws IOException
Job.renameTo(String) to update relevant data structure.
assumed to be synchronized on Hudson by the caller.
onRenamed in interface ItemGroup<TopLevelItem>IOException
public void onDeleted(TopLevelItem item)
throws IOException
AbstractItem.doDoDelete(StaplerRequest, StaplerResponse)
onDeleted in interface ItemGroup<TopLevelItem>IOExceptionpublic FingerprintMap getFingerprintMap()
public Object getFingerprint(String md5sum)
throws IOException
IOException
public Fingerprint _getFingerprint(String md5sum)
throws IOException
Fingerprint object if it exists. Otherwise null.
IOExceptionpublic int getNumExecutors()
NodeExecutors.
This may be different from
getExecutors().size() because it takes time to adjust the
number of executors.
getNumExecutors in class Nodepublic Node.Mode getMode()
NodeNode.Mode.EXCLUSIVE if this node is only available for those
jobs that exclusively specifies this node as the assigned node.
getMode in class Nodepublic String getLabelString()
NodeNode.getAssignedLabels() and includes all labels that have been
manually configured.
Mainly for form binding.
getLabelString in class Nodepublic LabelAtom getSelfLabel()
Node
getSelfLabel in class Nodepublic Computer createComputer()
NodeComputer object that acts as the UI peer of this
Node. Nobody but updateComputerList() should call
this method.
public void save()
throws IOException
save in interface SaveableIOException - if the persistence failed.public void cleanUp()
public Object getDynamic(String token)
public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
Descriptor.FormException
IOException
javax.servlet.ServletException
Descriptor.FormExceptionpublic CrumbIssuer getCrumbIssuer()
public void setCrumbIssuer(CrumbIssuer issuer)
public void doTestPost(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doConfigExecutorsSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doSubmitDescription(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doQuietDown(org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
doQuietDown() instead.
IOException
javax.servlet.ServletException
public org.kohsuke.stapler.HttpRedirect doQuietDown()
throws IOException
IOException
@CLIMethod(name="quiet-down")
public org.kohsuke.stapler.HttpRedirect doQuietDown(@QueryParameter
boolean block,
@QueryParameter
int timeout)
throws InterruptedException,
IOException
InterruptedException
IOException@CLIMethod(name="cancel-quiet-down") public org.kohsuke.stapler.HttpRedirect doCancelQuietDown()
public void doClassicThreadDump(org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public Item doCreateItem(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public TopLevelItem createProjectFromXML(String name,
InputStream xml)
throws IOException
IOException
public TopLevelItem reloadProjectFromDisk(File jobDir)
throws IOException
IOException
public <T extends TopLevelItem> T copy(T src,
String name)
throws IOException
src - A TopLevelItem to be copied.name - Name of the newly created project.
TopLevelItem.
IOException
public <T extends AbstractProject<?,?>> T copy(T src,
String name)
throws IOException
IOException
public void doCreateView(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
Descriptor.FormException
IOException
javax.servlet.ServletException
Descriptor.FormException
public static void checkGoodName(String name)
throws Failure
ParseException - if the given name is not good
Failure
public void doSecured(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletExceptionBasicAuthenticationFilter
public void doLoginEntry(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOException
public void doLogout(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletExceptionpublic Slave.JnlpJar getJnlpJars(String fileName)
public Slave.JnlpJar doJnlpJars(org.kohsuke.stapler.StaplerRequest req)
public void doLogRss(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
@CLIMethod(name="reload-configuration")
public org.kohsuke.stapler.HttpResponse doReload()
throws IOException
IOException
public void reload()
throws IOException,
InterruptedException,
org.jvnet.hudson.reactor.ReactorException
IOException
InterruptedException
org.jvnet.hudson.reactor.ReactorException
public void doDoFingerprintCheck(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doGc(org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOException
public RemotingDiagnostics.HeapDump getHeapDump()
throws IOException
IOException
public void doSimulateOutOfMemory()
throws IOException
IOException
public void doCli(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
InterruptedException
IOException
javax.servlet.ServletException
InterruptedExceptionpublic DirectoryBrowserSupport doUserContent()
@CLIMethod(name="restart")
public void doRestart(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
RestartNotSupportedException
HudsonIsRestarting
IOException
javax.servlet.ServletException
RestartNotSupportedException
@CLIMethod(name="safe-restart")
public void doSafeRestart(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
RestartNotSupportedException
HudsonIsRestarting
IOException
javax.servlet.ServletException
RestartNotSupportedException
public void restart()
throws RestartNotSupportedException
RestartNotSupportedException
public void safeRestart()
throws RestartNotSupportedException
RestartNotSupportedException
public void doExit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOException
public void doSafeExit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOException@Deprecated public static org.springframework.security.Authentication getAuthentication()
HudsonSecurityManager.getAuthentication()
public void doScript(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doScriptText(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doEval(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doSignup(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doIconSize(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public void doFingerprintCleanup(org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOException
public void doWorkspaceCleanup(org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOException
public FormValidation doDefaultJDKCheck(org.kohsuke.stapler.StaplerRequest request,
@QueryParameter
String value)
public FormValidation doCheckJobName(@QueryParameter
String value)
public FormValidation doViewExistsCheck(@QueryParameter
String value)
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 void doResources(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
This method can serve a lot of files, so care needs to be taken to make this method secure. It's not clear to me what's the best strategy here, though the current implementation is based on file extensions.
IOException
javax.servlet.ServletException
public FormValidation doCheckURIEncoding(org.kohsuke.stapler.StaplerRequest request)
throws IOException
IOExceptionpublic static boolean isCheckURIEncodingEnabled()
public static boolean isWindows()
Functions.isWindows().
public static boolean isDarwin()
public void rebuildDependencyGraph()
public DependencyGraph getDependencyGraph()
public List<ManagementLink> getManagementLinks()
public User getMe()
public List<Widget> getWidgets()
Widgets registered on this object.
Plugins who wish to contribute boxes on the side panel can add
widgets by getWidgets().add(new MyWidget()) from
Plugin.start().
public Object getTarget()
getTarget in interface org.kohsuke.stapler.StaplerProxypublic Iterator<GlobalMessage> getGlobalMessages()
public View getStaplerFallback()
getStaplerFallback in interface org.kohsuke.stapler.StaplerFallbackpublic static <T> T lookup(Class<T> type)
Hudson.getInstance().lookup.get(type)
public static boolean adminCheck()
throws IOException
Node.checkPermission(Permission)
IOException
public static boolean adminCheck(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
Node.checkPermission(Permission)
IOExceptionpublic 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.
public static VersionNumber getVersion()
VERSION into VersionNumber, or null if it's not
parseable as a version number (such as when Hudson is run with "mvn
hudson-dev:run")
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||