當前位置: 首頁>>代碼示例>>Java>>正文


Java WebMethod類代碼示例

本文整理匯總了Java中org.kohsuke.stapler.WebMethod的典型用法代碼示例。如果您正苦於以下問題:Java WebMethod類的具體用法?Java WebMethod怎麽用?Java WebMethod使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


WebMethod類屬於org.kohsuke.stapler包,在下文中一共展示了WebMethod類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: doScriptJs

import org.kohsuke.stapler.WebMethod; //導入依賴的package包/類
@Override
@WebMethod(name = "script.js")
public void doScriptJs(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
	initPython();
	if (pexec.isImplemented(2)) {
		pexec.execPythonVoid("do_script_js", req, rsp);
	} else {
		super.doScriptJs(req, rsp);
	}
}
 
開發者ID:conyx,項目名稱:jenkins.py,代碼行數:11,代碼來源:ConsoleAnnotationDescriptorPW.java

示例2: doStyleCss

import org.kohsuke.stapler.WebMethod; //導入依賴的package包/類
@Override
@WebMethod(name = "style.css")
public void doStyleCss(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
	initPython();
	if (pexec.isImplemented(3)) {
		pexec.execPythonVoid("do_style_css", req, rsp);
	} else {
		super.doStyleCss(req, rsp);
	}
}
 
開發者ID:conyx,項目名稱:jenkins.py,代碼行數:11,代碼來源:ConsoleAnnotationDescriptorPW.java

示例3: doConfigDotXml

import org.kohsuke.stapler.WebMethod; //導入依賴的package包/類
@Override
@WebMethod(name = "config.xml")
public void doConfigDotXml(StaplerRequest req, StaplerResponse rsp) throws IOException {
	initPython();
	if (pexec.isImplemented(96)) {
		pexec.execPythonVoid("do_config_dot_xml", req, rsp);
	} else {
		super.doConfigDotXml(req, rsp);
	}
}
 
開發者ID:conyx,項目名稱:jenkins.py,代碼行數:11,代碼來源:JobPW.java

示例4: doConfigDotXml

import org.kohsuke.stapler.WebMethod; //導入依賴的package包/類
@Override
@WebMethod(name = "config.xml")
public HttpResponse doConfigDotXml(StaplerRequest req) throws IOException {
	initPython();
	if (pexec.isImplemented(48)) {
		return (HttpResponse) pexec.execPython("do_config_dot_xml", req);
	} else {
		return super.doConfigDotXml(req);
	}
}
 
開發者ID:conyx,項目名稱:jenkins.py,代碼行數:11,代碼來源:ViewPW.java

示例5: doScriptJs

import org.kohsuke.stapler.WebMethod; //導入依賴的package包/類
@Override
@WebMethod(name = "script.js")
public void doScriptJs(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
	initPython();
	if (pexec.isImplemented(3)) {
		pexec.execPythonVoid("do_script_js", req, rsp);
	} else {
		super.doScriptJs(req, rsp);
	}
}
 
開發者ID:conyx,項目名稱:jenkins.py,代碼行數:11,代碼來源:ConsoleAnnotatorFactoryPW.java

示例6: doStyleCss

import org.kohsuke.stapler.WebMethod; //導入依賴的package包/類
@Override
@WebMethod(name = "style.css")
public void doStyleCss(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
	initPython();
	if (pexec.isImplemented(4)) {
		pexec.execPythonVoid("do_style_css", req, rsp);
	} else {
		super.doStyleCss(req, rsp);
	}
}
 
開發者ID:conyx,項目名稱:jenkins.py,代碼行數:11,代碼來源:ConsoleAnnotatorFactoryPW.java

示例7: doConfigDotXml

import org.kohsuke.stapler.WebMethod; //導入依賴的package包/類
/**
 * Accepts <tt>config.xml</tt> submission, as well as serve it.
 */
@Override
@WebMethod(name = "config.xml")
public void doConfigDotXml(StaplerRequest req, StaplerResponse rsp)
		throws IOException {
	/* Job reconfiguration is handled by the superclass, as there is no
	 * need to involve versioning/inheritance there 
	 */
	if (req.getMethod().equals("POST")) {
		super.doConfigDotXml(req, rsp);
	}
	if (!req.getMethod().equals("GET")) {
		//Huh? Only GET/POST make sense
		rsp.sendError(SC_BAD_REQUEST);
	}
	
	//Check that the calling user is allowed to read the config
	checkPermission(EXTENDED_READ);
	
	//Fetch the user-selected version (defaults to stable version)
	//Note: Transient projects have no config.xml and can't use super.dCDX()
	if (!this.isTransient) {
		Long latestVersion = this.getLatestVersion();
		Long selectedVersion = VersionHandler.getVersion(this);
		if (selectedVersion == null || selectedVersion == latestVersion) {
			//The super-method can handle these cases just fine
			super.doConfigDotXml(req, rsp);
			return;
		}
	}
	
	try {
		// Tell the client browser to expect XML
		rsp.setContentType("application/xml");
		// Send the modified XML to the user
		this.writeStableConfigDotXml(rsp.getOutputStream());
	} catch (HttpStatusException ex) {
		rsp.sendError(ex.status, ex.getMessage());
		return;
	}
}
 
開發者ID:i-m-c,項目名稱:jenkins-inheritance-plugin,代碼行數:44,代碼來源:InheritanceProject.java

示例8: doSlaveAgentJnlp

import org.kohsuke.stapler.WebMethod; //導入依賴的package包/類
@Override
@WebMethod(name="slave-agent.jnlp")
public HttpResponse doSlaveAgentJnlp(StaplerRequest req, StaplerResponse res) throws IOException, ServletException {
 return new EncryptedSlaveAgentJnlpFile(this, "mesos-slave-agent.jnlp.jelly", getName(), CONNECT);
}
 
開發者ID:jenkinsci,項目名稱:mesos-plugin,代碼行數:6,代碼來源:MesosComputer.java


注:本文中的org.kohsuke.stapler.WebMethod類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。