本文整理汇总了Java中hudson.util.FormApply类的典型用法代码示例。如果您正苦于以下问题:Java FormApply类的具体用法?Java FormApply怎么用?Java FormApply使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormApply类属于hudson.util包,在下文中一共展示了FormApply类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: doConfigSubmit
点赞 2
import hudson.util.FormApply; //导入依赖的package包/类
public HttpResponse doConfigSubmit(StaplerRequest req) throws ServletException, IOException {
repository = null; // otherwise bindJSON will never clear it once set
req.bindJSON(this, req.getSubmittedForm());
getConfigFile().write(this);
((VMRepositoryDescriptor)this.getDescriptor()).setVms(this.getVms());
return FormApply.success(".");
}
开发者ID:ravello,
项目名称:ravello-jenkins-plugin,
代码行数:8,
代码来源:RavelloVMRepository.java
示例2: doConfigSubmit
点赞 2
import hudson.util.FormApply; //导入依赖的package包/类
public HttpResponse doConfigSubmit(StaplerRequest req) throws ServletException, IOException {
repository = null; // otherwise bindJSON will never clear it once set
req.bindJSON(this, req.getSubmittedForm());
getConfigFile().write(this);
((BlueprintsRepositoryDescriptor)this.getDescriptor()).setBlueprints(this.getBlueprints());
return FormApply.success(".");
}
开发者ID:ravello,
项目名称:ravello-jenkins-plugin,
代码行数:8,
代码来源:RavelloCredentialsRepository.java
示例3: doConfigSubmit
点赞 2
import hudson.util.FormApply; //导入依赖的package包/类
@RequirePOST
public void doConfigSubmit(StaplerRequest req, StaplerResponse rsp)
throws IOException, ServletException, Descriptor.FormException {
checkPermission(CONFIGURE);
req.setCharacterEncoding("UTF-8");
JSONObject json = req.getSubmittedForm();
String newReferredItemName = Util.fixEmpty(json.optString("referredItemName"));
// prevent invalid configuration with bad failure modes (StackOverflowException etc.)
FormValidation result = ((DescriptorImpl)getDescriptor()).doCheckReferredItemName(newReferredItemName, this);
if (result.kind == FormValidation.Kind.ERROR) {
throw new IllegalArgumentException(result.getMessage(), result);
}
description = json.getString("description");
referredItemName = newReferredItemName;
forwardImmediately = json.optBoolean("forwardImmediately", false);
save();
String newName = json.getString("name");
if (newName != null && !newName.equals(name)) {
Hudson.checkGoodName(newName);
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
} else {
FormApply.success(".").generateResponse(req, rsp, this);
}
}
开发者ID:daniel-beck,
项目名称:jenkins-item-forwarder-plugin,
代码行数:32,
代码来源:ForwardingItem.java
示例4: doConfigSubmit
点赞 2
import hudson.util.FormApply; //导入依赖的package包/类
public HttpResponse doConfigSubmit(StaplerRequest req) throws ServletException, IOException {
config = null; // otherwise bindJSON will never clear it once set
req.bindJSON(this, req.getSubmittedForm());
getConfigFile().write(this);
return FormApply.success(".");
}
开发者ID:10000TB,
项目名称:Jenkins-Plugin-Examples,
代码行数:7,
代码来源:HeteroList.java