本文整理汇总了Java中jetbrains.buildServer.controllers.BaseController类的典型用法代码示例。如果您正苦于以下问题:Java BaseController类的具体用法?Java BaseController怎么用?Java BaseController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BaseController类属于jetbrains.buildServer.controllers包,在下文中一共展示了BaseController类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PhabricatorPlugin
import jetbrains.buildServer.controllers.BaseController; //导入依赖的package包/类
public PhabricatorPlugin(
@NotNull final PluginDescriptor pluginDescriptor,
@NotNull final WebControllerManager webControllerManager
){
final String jsp = pluginDescriptor.getPluginResourcesPath("tcPhabSettings.jsp");
final String html = pluginDescriptor.getPluginResourcesPath("tcPhabSettings.html");
webControllerManager.registerController(html, new BaseController() {
@Override
protected ModelAndView doHandle(@NotNull HttpServletRequest httpServletRequest, @NotNull HttpServletResponse httpServletResponse) throws Exception {
ModelAndView mv = new ModelAndView(jsp);
mv.getModel().put("requestUrl", html);
mv.getModel().put("buildTypeId", getBuildTypeIdParameter(httpServletRequest));
return mv;
}
});
this.myEditUrl = html;
}
示例2: TorrentSettingsAdminPage
import jetbrains.buildServer.controllers.BaseController; //导入依赖的package包/类
public TorrentSettingsAdminPage(@NotNull PagePlaces pagePlaces,
@NotNull WebControllerManager controllerManager,
@NotNull PluginDescriptor descriptor,
@NotNull TorrentTrackerManager torrentTrackerManager,
@NotNull TorrentConfigurator torrentConfigurator,
@NotNull ServerTorrentsDirectorySeeder torrentSeeder) {
super(pagePlaces, TAB_ID, descriptor.getPluginResourcesPath("torrentSettings.jsp"), "Torrent Settings");
myTorrentTrackerManager = torrentTrackerManager;
myTorrentConfigurator = torrentConfigurator;
myTorrentSeeder = torrentSeeder;
register();
controllerManager.registerController("/admin/torrentSettings.html", new BaseController() {
@Override
protected ModelAndView doHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response) throws Exception {
if (request.getParameter("save") != null) {
boolean seedingEnabled = request.getParameter("seedingEnabled")!=null;
boolean downloadEnabled = request.getParameter("downloadEnabled")!=null;
myTorrentConfigurator.setSeedingEnabled(seedingEnabled);
myTorrentConfigurator.setDownloadEnabled(downloadEnabled);
myTorrentConfigurator.persistConfiguration();
}
return new ModelAndView(new RedirectView(request.getContextPath() + "/admin/admin.html?item=" + TAB_ID));
}
});
}
示例3: registerView
import jetbrains.buildServer.controllers.BaseController; //导入依赖的package包/类
protected void registerView(@NotNull final String url, @NotNull final String jsp) {
viewUrl = pluginDescriptor.getPluginResourcesPath(url);
final String actualJsp = pluginDescriptor.getPluginResourcesPath(jsp);
webControllerManager.registerController(viewUrl, new BaseController() {
@Override
protected ModelAndView doHandle(final HttpServletRequest request, final HttpServletResponse response) {
final ModelAndView modelAndView = new ModelAndView(actualJsp);
modelAndView.getModel().put("controllerUrl", viewUrl);
return modelAndView;
}
});
}
示例4: IndexSymbolsBuildFeature
import jetbrains.buildServer.controllers.BaseController; //导入依赖的package包/类
public IndexSymbolsBuildFeature(final PluginDescriptor pluginDescriptor, final WebControllerManager web) {
final String jsp = pluginDescriptor.getPluginResourcesPath("editSymbolsBuildFeatureParams.jsp");
final String html = pluginDescriptor.getPluginResourcesPath("symbolIndexerSettings.html");
web.registerController(html, new BaseController() {
@Override
protected ModelAndView doHandle(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
return new ModelAndView(jsp);
}
});
myEditParametersUrl = html;
}
示例5: registerView
import jetbrains.buildServer.controllers.BaseController; //导入依赖的package包/类
private String registerView(@NotNull final PluginDescriptor description,
@NotNull final WebControllerManager wcm,
@NotNull final String url,
@NotNull final String jsp) {
final String actualUrl = description.getPluginResourcesPath(url);
final String actualJsp = description.getPluginResourcesPath(jsp);
wcm.registerController(actualUrl, new BaseController() {
@Override
protected ModelAndView doHandle(@NotNull final HttpServletRequest request, @NotNull final HttpServletResponse response) throws Exception {
return new ModelAndView(actualJsp);
}
});
return actualUrl;
}
示例6: createController
import jetbrains.buildServer.controllers.BaseController; //导入依赖的package包/类
@Override
protected BaseController createController() throws IOException {
AuthorizationInterceptor authInterceptor = myFixture.getSingletonService(AuthorizationInterceptor.class);
AuthHelper authHelper = new AuthHelper(myFixture.getLoginConfiguration(), myFixture.getUserModel(), myFixture.getSingletonService(HttpAuthenticationManager.class));
return new DownloadSymbolsController(myServer, myWebManager, authInterceptor, myFixture.getSecurityContext(), myBuildMetadataStorage, authHelper);
}