当前位置: 首页>>代码示例>>Java>>正文


Java BaseController类代码示例

本文整理汇总了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;
}
 
开发者ID:halfmatthalfcat,项目名称:TeamCity-Phabricator-Plugin,代码行数:20,代码来源:PhabricatorPlugin.java

示例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));
    }
  });
}
 
开发者ID:JetBrains,项目名称:teamcity-torrent-plugin,代码行数:27,代码来源:TorrentSettingsAdminPage.java

示例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;
        }
    });
}
 
开发者ID:blackducksoftware,项目名称:hub-teamcity,代码行数:14,代码来源:BaseRunType.java

示例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;
}
 
开发者ID:JetBrains,项目名称:teamcity-symbol-server,代码行数:14,代码来源:IndexSymbolsBuildFeature.java

示例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;
}
 
开发者ID:JetBrains,项目名称:teamcity-runas-plugin,代码行数:16,代码来源:RunAsRunTypeExtension.java

示例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);
}
 
开发者ID:JetBrains,项目名称:teamcity-symbol-server,代码行数:7,代码来源:DownloadSymbolsControllerTest.java


注:本文中的jetbrains.buildServer.controllers.BaseController类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。