本文整理汇总了Java中org.kohsuke.stapler.StaplerResponse.forwardToPreviousPage方法的典型用法代码示例。如果您正苦于以下问题:Java StaplerResponse.forwardToPreviousPage方法的具体用法?Java StaplerResponse.forwardToPreviousPage怎么用?Java StaplerResponse.forwardToPreviousPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kohsuke.stapler.StaplerResponse
的用法示例。
在下文中一共展示了StaplerResponse.forwardToPreviousPage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doClean
import org.kohsuke.stapler.StaplerResponse; //导入方法依赖的package包/类
@RequirePOST
public void doClean(StaplerRequest req, StaplerResponse res) throws IOException, ServletException {
// TODO switch to Jenkins.getActiveInstance() once 1.590+ is the baseline
Jenkins jenkins = Jenkins.getInstance();
if (jenkins == null) {
throw new IllegalStateException("Jenkins has not been started, or was already shut down");
}
final Job job = jenkins.getItemByFullName(req.getParameter("job"), Job.class);
Timer.get().submit(new Runnable() {
@Override
public void run() {
try {
job.logRotate();
} catch (Exception e) {
logger.log(Level.WARNING, "logRotate failed", e);
}
}
});
res.forwardToPreviousPage(req);
}
示例2: doRefresh
import org.kohsuke.stapler.StaplerResponse; //导入方法依赖的package包/类
@RequirePOST
public void doRefresh(StaplerRequest req, StaplerResponse res) throws IOException, ServletException {
refreshData();
res.forwardToPreviousPage(req);
}
示例3: doRefreshHook
import org.kohsuke.stapler.StaplerResponse; //导入方法依赖的package包/类
public void doRefreshHook(StaplerRequest request, StaplerResponse response) throws IOException, ServletException {
new GithubRepositoryService(getGithubRepository(request)).addHook(getAccessToken(request), getCurrentUserLogin(request));
response.forwardToPreviousPage(request);
}
示例4: doToggleNewUI
import org.kohsuke.stapler.StaplerResponse; //导入方法依赖的package包/类
public void doToggleNewUI(final StaplerRequest req, final StaplerResponse rsp) throws IOException, ServletException, InterruptedException {
toggleNewUI();
rsp.forwardToPreviousPage(req);
}
示例5: doBranchBuilds
import org.kohsuke.stapler.StaplerResponse; //导入方法依赖的package包/类
public void doBranchBuilds(final StaplerRequest req, final StaplerResponse rsp) throws IOException, ServletException, InterruptedException {
final String tab = req.getRestOfPath().replace("/", "");
handleBranchTabs(tab, req);
rsp.forwardToPreviousPage(req);
}