jetbrains.buildServer.web.openapi.WebControllerManager Java Examples

The following examples show how to use jetbrains.buildServer.web.openapi.WebControllerManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KubeProfileEditController.java    From teamcity-kubernetes-plugin with Apache License 2.0 6 votes vote down vote up
public KubeProfileEditController(@NotNull final SBuildServer server,
                                 @NotNull final WebControllerManager web,
                                 @NotNull final PluginDescriptor pluginDescriptor,
                                 @NotNull final AgentPoolManager agentPoolManager,
                                 @NotNull final KubeAuthStrategyProvider authStrategyProvider,
                                 @NotNull final BuildAgentPodTemplateProviders podTemplateProviders,
                                 @NotNull final ChooserController.Namespaces namespacesChooser,
                                 @NotNull final ChooserController.Deployments deploymentsChooser,
                                 @NotNull final KubeDeleteImageDialogController kubeDeleteImageDialogController) {
    super(server);
    myPluginDescriptor = pluginDescriptor;
    myPath = pluginDescriptor.getPluginResourcesPath(EDIT_KUBE_HTML);
    myAgentPoolManager = agentPoolManager;
    myAuthStrategyProvider = authStrategyProvider;
    myPodTemplateProviders = podTemplateProviders;
    myNamespacesChooser = namespacesChooser;
    myDeploymentsChooser = deploymentsChooser;
    myKubeDeleteImageDialogController = kubeDeleteImageDialogController;
    web.registerController(myPath, this);
}
 
Example #2
Source File: UserTelegramSettingsExtension.java    From teamcity-telegram-plugin with Apache License 2.0 6 votes vote down vote up
public UserTelegramSettingsExtension(@NotNull WebControllerManager manager,
                                     @NotNull NotificationRulesManager rulesManager,
                                     @NotNull UserModel userModel,
                                     @NotNull PluginDescriptor descriptor,
                                     @NotNull TelegramSettingsManager settingsManager) {
  super(manager);
  this.rulesManager = rulesManager;
  this.userModel = userModel;
  this.settingsManager = settingsManager;

  setPluginName(TelegramSettingsPage.PLUGIN_NAME);
  setIncludeUrl(descriptor.getPluginResourcesPath("userTelegramSettings.jsp"));
  // This extension required by two places. Don't looks clear
  // but works...
  setPlaceId(PlaceId.NOTIFIER_SETTINGS_FRAGMENT);
  register();
  setPlaceId(PlaceId.MY_SETTINGS_NOTIFIER_SECTION);
  register();
}
 
Example #3
Source File: SlackNotifierSettingsController.java    From tcSlackBuildNotifier with MIT License 6 votes vote down vote up
public SlackNotifierSettingsController(@NotNull SBuildServer server,
                                       @NotNull ServerPaths serverPaths,
                                       @NotNull WebControllerManager manager,
                                       @NotNull SlackNotificationMainConfig config,
                                       SlackNotificationPayloadManager payloadManager,
                                       PluginDescriptor descriptor){

    this.server = server;
    this.serverPaths = serverPaths;
    this.manager = manager;
    this.config = config;
    this.payloadManager = payloadManager;
    this.descriptor = descriptor;

    manager.registerController(CONTROLLER_PATH, this);
}
 
Example #4
Source File: ManageSQSActionController.java    From TeamCity.SonarQubePlugin with Apache License 2.0 6 votes vote down vote up
public ManageSQSActionController(@NotNull final WebControllerManager controllerManager,
                                 @NotNull final SQSManager sqsManager,
                                 @NotNull final ProjectManager projectManager,
                                 @NotNull final SecurityContext securityContext,
                                 @NotNull final SQSInfoFactory sqsInfoFactory,
                                 @NotNull final ConfigActionFactory configActionFactory) {
    super(controllerManager);
    mySQSInfoFactory = sqsInfoFactory;
    myConfigActionFactory = configActionFactory;
    controllerManager.registerController("/admin/manageSonarServers.html", this);
    registerAction(this);

    mySqsManager = sqsManager;
    myProjectManager = projectManager;
    this.securityContext = securityContext;
}
 
Example #5
Source File: DownloadSymbolsController.java    From teamcity-symbol-server with Apache License 2.0 6 votes vote down vote up
public DownloadSymbolsController(@NotNull SBuildServer server,
                                 @NotNull WebControllerManager controllerManager,
                                 @NotNull AuthorizationInterceptor authInterceptor,
                                 @NotNull SecurityContextEx securityContext,
                                 @NotNull MetadataStorage buildMetadataStorage,
                                 @NotNull AuthHelper authHelper,
                                 @NotNull SymbolsCache symbolsCache) {
  super(server);
  mySecurityContext = securityContext;
  myBuildMetadataStorage = buildMetadataStorage;
  myAuthHelper = authHelper;
  mySymbolsCache = symbolsCache;
  final String path = SymbolsConstants.APP_SYMBOLS + "/**";
  controllerManager.registerController(path, this);
  authInterceptor.addPathNotRequiringAuth(path);
}
 
Example #6
Source File: PhabricatorPlugin.java    From TeamCity-Phabricator-Plugin with MIT License 6 votes vote down vote up
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;
}
 
Example #7
Source File: DownloadSourcesController.java    From teamcity-symbol-server with Apache License 2.0 5 votes vote down vote up
public DownloadSourcesController(@NotNull SBuildServer server,
                                 @NotNull WebControllerManager webManager,
                                 @NotNull AuthorizationInterceptor authInterceptor,
                                 @NotNull AuthHelper authHelper) {
  super(server);
  myAuthHelper = authHelper;
  final String path = SymbolsConstants.APP_SOURCES + "/**";
  webManager.registerController(path, this);
  authInterceptor.addPathNotRequiringAuth(path);
}
 
Example #8
Source File: SlackNotificationBuildTabExtension.java    From tcSlackBuildNotifier with MIT License 5 votes vote down vote up
protected SlackNotificationBuildTabExtension(
           PagePlaces pagePlaces, ProjectManager projectManager,
           ProjectSettingsManager settings, WebControllerManager manager,
           PluginDescriptor pluginDescriptor) {
	//super(myTitle, myTitle, null, projectManager);
	super(SLACK_NOTIFICATIONS, "Slack", manager, projectManager);
	this.projSettings = settings;
	myPluginPath = pluginDescriptor.getPluginResourcesPath();
}
 
Example #9
Source File: SlackNotificationIndexPageController.java    From tcSlackBuildNotifier with MIT License 5 votes vote down vote up
public SlackNotificationIndexPageController(SBuildServer server, WebControllerManager webManager,
                                               ProjectSettingsManager settings, PluginDescriptor pluginDescriptor, SlackNotificationPayloadManager manager,
                                               SlackNotificationMainSettings configSettings) {
    super(server);
    myWebManager = webManager;
    myServer = server;
    mySettings = settings;
    myPluginDescriptor = pluginDescriptor;
    myMainSettings = configSettings;
    myManager = manager;
}
 
Example #10
Source File: SlackNotificationAjaxSettingsListPageController.java    From tcSlackBuildNotifier with MIT License 5 votes vote down vote up
public SlackNotificationAjaxSettingsListPageController(SBuildServer server, WebControllerManager webManager,
                                                          ProjectSettingsManager settings, SlackNotificationPayloadManager manager, PluginDescriptor pluginDescriptor,
                                                          SlackNotificationMainSettings mainSettings) {
    super(server);
    myWebManager = webManager;
    myServer = server;
    mySettings = settings;
    myPluginDescriptor = pluginDescriptor;
    myManager = manager;
       myMainSettings = mainSettings;
}
 
Example #11
Source File: SlackNotificationAjaxEditPageController.java    From tcSlackBuildNotifier with MIT License 5 votes vote down vote up
public SlackNotificationAjaxEditPageController(SBuildServer server, WebControllerManager webManager,
                                                  ProjectSettingsManager settings, SlackNotificationProjectSettings whSettings, SlackNotificationPayloadManager manager,
                                                  PluginDescriptor pluginDescriptor, SlackNotificationMainSettings mainSettings) {
    super(server);
    myWebManager = webManager;
    myServer = server;
    mySettings = settings;
    myPluginPath = pluginDescriptor.getPluginResourcesPath();
    myManager = manager;
       myMainSettings = mainSettings;
}
 
Example #12
Source File: BuildSummaryLinkExtension.java    From TeamCity.SonarQubePlugin with Apache License 2.0 5 votes vote down vote up
public BuildSummaryLinkExtension(@NotNull final WebControllerManager manager,
                                 @NotNull final PluginDescriptor pluginDescriptor,
                                 @NotNull final SBuildServer server) {
    super(manager, PlaceId.BUILD_SUMMARY, pluginDescriptor.getPluginName(), "buildSummary.jsp");
    myServer = server;
    register();
}
 
Example #13
Source File: LoginViaOAuthController.java    From teamcity-oauth with Apache License 2.0 5 votes vote down vote up
public LoginViaOAuthController(@NotNull final WebControllerManager webManager,
                               @NotNull final AuthorizationInterceptor authInterceptor,
                               @NotNull final AuthenticationSchemeProperties schemeProperties,
                               @NotNull final OAuthClient authClient) {
    this.schemeProperties = schemeProperties;
    this.authClient = authClient;
    webManager.registerController(PluginConstants.Web.LOGIN_PATH, this);
    authInterceptor.addPathNotRequiringAuth(PluginConstants.Web.LOGIN_PATH);
}
 
Example #14
Source File: PluginConfiguration.java    From teamcity-oauth with Apache License 2.0 5 votes vote down vote up
@Bean
public LoginViaOAuthController loginController(WebControllerManager webManager,
                                        AuthorizationInterceptor authInterceptor,
                                        AuthenticationSchemeProperties schemeProperties,
                                        OAuthClient authClient) {
    return new LoginViaOAuthController(webManager, authInterceptor, schemeProperties, authClient);
}
 
Example #15
Source File: IndexSymbolsBuildFeature.java    From teamcity-symbol-server with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #16
Source File: S3PreSignedUrlController.java    From teamcity-s3-artifact-storage-plugin with Apache License 2.0 5 votes vote down vote up
public S3PreSignedUrlController(@NotNull WebControllerManager web,
                                @NotNull RunningBuildsManagerEx runningBuildsManager,
                                @NotNull S3PreSignedUrlProvider preSignedUrlProvider,
                                @NotNull ServerArtifactStorageSettingsProvider storageSettingsProvider) {
  myRunningBuildsManager = runningBuildsManager;
  myPreSignedUrlProvider = preSignedUrlProvider;
  myStorageSettingsProvider = storageSettingsProvider;
  web.registerController(ARTEFACTS_S3_UPLOAD_PRESIGN_URLS_HTML, this);
}
 
Example #17
Source File: S3SettingsController.java    From teamcity-s3-artifact-storage-plugin with Apache License 2.0 5 votes vote down vote up
public S3SettingsController(@NotNull final WebControllerManager manager,
                            @NotNull final PluginDescriptor descriptor,
                            @NotNull final ServerPaths serverPaths) {
  myServerPaths = serverPaths;
  final String path = descriptor.getPluginResourcesPath(S3Constants.S3_SETTINGS_PATH + ".html");
  manager.registerController(path, this);
  myHandlers.put("buckets", new BucketsResourceHandler());
  myHandlers.put("bucketLocation", new BucketLocationHandler());
}
 
Example #18
Source File: TelegramSettingsController.java    From teamcity-telegram-plugin with Apache License 2.0 5 votes vote down vote up
public TelegramSettingsController(@NotNull WebControllerManager webManager,
                                  @NotNull TelegramSettingsManager settingsManager,
                                  @NotNull TelegramBotManager botManager) {
  webManager.registerController("/telegram/notifierSettings.html", this);
  this.settingsManager = settingsManager;
  this.botManager = botManager;
}
 
Example #19
Source File: KubeDeleteImageDialogController.java    From teamcity-kubernetes-plugin with Apache License 2.0 5 votes vote down vote up
public KubeDeleteImageDialogController(WebControllerManager web,
                                       PluginDescriptor pluginDescriptor,
                                       CloudManagerBase cloudManager) {
    myPluginDescriptor = pluginDescriptor;
    myCloudManager = cloudManager;
    web.registerController(getUrl(), this);
}
 
Example #20
Source File: AllureReportBuildSummaryExtension.java    From allure-teamcity with Apache License 2.0 5 votes vote down vote up
public AllureReportBuildSummaryExtension(@NotNull final SBuildServer server,
                                         @NotNull final WebControllerManager manager,
                                         @NotNull final PluginDescriptor pluginDescriptor) {
    super(manager, PlaceId.BUILD_SUMMARY, pluginDescriptor.getPluginName(), "buildSummary.jsp");
    this.server = server;
    register();
}
 
Example #21
Source File: ChooserController.java    From teamcity-kubernetes-plugin with Apache License 2.0 5 votes vote down vote up
public ChooserController(WebControllerManager web,
                         PluginDescriptor pluginDescriptor,
                         KubeAuthStrategyProvider authStrategyProvider) {
    myPluginDescriptor = pluginDescriptor;
    myAuthStrategyProvider = authStrategyProvider;
    web.registerController(getUrl(), this);
}
 
Example #22
Source File: ReportsController.java    From appengine-tck with Apache License 2.0 4 votes vote down vote up
public ReportsController(@NotNull final ReportsDescriptor descriptor, @NotNull final WebControllerManager web) {
    web.registerController(descriptor.getFeaturePath(), this);
    this.viewPath = descriptor.getViewPath();
}
 
Example #23
Source File: ChooserController.java    From teamcity-kubernetes-plugin with Apache License 2.0 4 votes vote down vote up
public Namespaces(final WebControllerManager web,
                  final PluginDescriptor pluginDescriptor,
                  final KubeAuthStrategyProvider authStrategyProvider) {
    super(web, pluginDescriptor, authStrategyProvider);
}
 
Example #24
Source File: ChooserController.java    From teamcity-kubernetes-plugin with Apache License 2.0 4 votes vote down vote up
public Deployments(final WebControllerManager web,
                   final PluginDescriptor pluginDescriptor,
                   final KubeAuthStrategyProvider authStrategyProvider) {
    super(web, pluginDescriptor, authStrategyProvider);
}