當前位置: 首頁>>代碼示例>>Java>>正文


Java PluginDescriptor類代碼示例

本文整理匯總了Java中jetbrains.buildServer.web.openapi.PluginDescriptor的典型用法代碼示例。如果您正苦於以下問題:Java PluginDescriptor類的具體用法?Java PluginDescriptor怎麽用?Java PluginDescriptor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PluginDescriptor類屬於jetbrains.buildServer.web.openapi包,在下文中一共展示了PluginDescriptor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: MsTeamsNotifierAdminPage

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
protected MsTeamsNotifierAdminPage(@NotNull PagePlaces pagePlaces,
                                 @NotNull PluginDescriptor descriptor,
                                 @NotNull SBuildServer sBuildServer,
                                 @NotNull MsTeamsNotificationMainSettings msteamsMainSettings
                                 ) {
    super(pagePlaces);
    this.sBuildServer = sBuildServer;
    this.msteamsMainSettings = msteamsMainSettings;

    setPluginName(PLUGIN_NAME);
    setIncludeUrl(descriptor.getPluginResourcesPath(PAGE));
    jspHome = descriptor.getPluginResourcesPath();
    setTabTitle(TAB_TITLE);
    ArrayList<String> after = new ArrayList<String>();
    after.add(AFTER_PAGE_ID);
    ArrayList<String> before = new ArrayList<String>();
    before.add(BEFORE_PAGE_ID);
    setPosition(PositionConstraint.between(after, before));
    register();
    Loggers.SERVER.info("MsTeams global configuration page registered");
}
 
開發者ID:spyder007,項目名稱:teamcity-msteams-notifier,代碼行數:22,代碼來源:MsTeamsNotifierAdminPage.java

示例2: MsTeamsNotifierSettingsController

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
public MsTeamsNotifierSettingsController(@NotNull SBuildServer server,
                                       @NotNull ServerPaths serverPaths,
                                       @NotNull WebControllerManager manager,
                                       @NotNull MsTeamsNotificationMainConfig config,
                                       MsTeamsNotificationPayloadManager 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);
}
 
開發者ID:spyder007,項目名稱:teamcity-msteams-notifier,代碼行數:17,代碼來源:MsTeamsNotifierSettingsController.java

示例3: createMockNotification_constructsValidNotification

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
@Test
public void createMockNotification_constructsValidNotification(){
    String expectedConfigDirectory = ".";
    ServerPaths serverPaths = mock(ServerPaths.class);
    when(serverPaths.getConfigDir()).thenReturn(expectedConfigDirectory);

    PluginDescriptor pluginDescriptor = mock(PluginDescriptor.class);

    MsTeamsNotificationMainConfig config = new MsTeamsNotificationMainConfig(serverPaths);

    MsTeamsNotificationPayloadManager payloadManager = new MsTeamsNotificationPayloadManager(sBuildServer);
    MsTeamsNotifierSettingsController controller = new MsTeamsNotifierSettingsController(
            sBuildServer, serverPaths, webControllerManager,
            config, payloadManager, pluginDescriptor);

    MsTeamsNotification notification = controller.createMockNotification("The Bot", "tokenthingy",
            MsTeamsNotificationMainConfig.DEFAULT_ICONURL, 5, true, true, true, true, true, null, null, null, null);

    assertNotNull(notification);
    assertEquals(MsTeamsNotificationMainConfig.DEFAULT_ICONURL, notification.getIconUrl());
}
 
開發者ID:spyder007,項目名稱:teamcity-msteams-notifier,代碼行數:22,代碼來源:MsTeamsNotificationSettingsControllerTest.java

示例4: KubeProfileEditController

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
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 KubeNamespaceChooserController kubeNamespaceChooserController,
                                 @NotNull final KubeDeploymentChooserController kubeDeploymentChooserController,
                                 @NotNull final KubeDeleteImageDialogController kubeDeleteImageDialogController) {
    super(server);
    myPluginDescriptor = pluginDescriptor;
    myPath = pluginDescriptor.getPluginResourcesPath(EDIT_KUBE_HTML);
    myAgentPoolManager = agentPoolManager;
    myAuthStrategyProvider = authStrategyProvider;
    myPodTemplateProviders = podTemplateProviders;
    myKubeNamespaceChooserController = kubeNamespaceChooserController;
    myKubeDeploymentChooserController = kubeDeploymentChooserController;
    myKubeDeleteImageDialogController = kubeDeleteImageDialogController;
    web.registerController(myPath, this);
}
 
開發者ID:JetBrains,項目名稱:teamcity-kubernetes-plugin,代碼行數:21,代碼來源:KubeProfileEditController.java

示例5: BuildScanCrumbSummaryExtension

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
public BuildScanCrumbSummaryExtension(
    @NotNull PagePlaces pagePlaces,
    @NotNull PluginDescriptor pluginDescriptor,
    @NotNull SBuildServer buildServer,
    @NotNull BuildScanDisplayArbiter buildScanDisplayArbiter,
    @NotNull BuildScanLookup buildScanLookup
) {
    super(pagePlaces, PlaceId.BUILD_SUMMARY, "buildScan", pluginDescriptor.getPluginResourcesPath("buildScanCrumbSummary.jsp"));
    setPosition(PositionConstraint.last());

    this.buildServer = buildServer;
    this.buildScanDisplayArbiter = buildScanDisplayArbiter;
    this.buildScanLookup = buildScanLookup;

    LOGGER.info(String.format("Registered %s. %s-%s", getClass().getSimpleName(), pluginDescriptor.getPluginName(), pluginDescriptor.getPluginVersion()));
}
 
開發者ID:etiennestuder,項目名稱:teamcity-build-scan-plugin,代碼行數:17,代碼來源:BuildScanCrumbSummaryExtension.java

示例6: UserTelegramSettingsExtension

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
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();
}
 
開發者ID:dancing-elf,項目名稱:teamcity-telegram-plugin,代碼行數:20,代碼來源:UserTelegramSettingsExtension.java

示例7: Controller

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
public Controller(@NotNull SBuildServer server,
                  @NotNull PluginDescriptor descriptor,
                  @NotNull ServerPaths serverPaths,
                  @NotNull WebControllerManager manager,
                  @NotNull ServerConfigurations configurations,
                  @NotNull final ProjectManager projectManager,
                  @NotNull ProjectSettingsManager projectSettingsManager) throws IOException {
  manager.registerController(CONTROLLER_PATH, this);
  Controller.configurations = configurations;
  this.myProjectManager = projectManager;
  this.projectSettingsManager = projectSettingsManager;
  this.configFilePath = (new File(serverPaths.getConfigDir(), CONFIG_FILE)).getCanonicalPath();
  this.listPagePath = descriptor.getPluginResourcesPath(LIST_PAGE);
  this.editPagePath = descriptor.getPluginResourcesPath(EDIT_PAGE);
  this.editTemplPagePath = descriptor.getPluginResourcesPath(EDIT_TEMPL_PAGE);
  this.errorPagePath = descriptor.getPluginResourcesPath(ERROR_PAGE);
}
 
開發者ID:IIIEII,項目名稱:ServerConfigurations,代碼行數:18,代碼來源:Controller.java

示例8: AnalyticsTrackerImpl

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
public AnalyticsTrackerImpl(@NotNull final PluginDescriptor pluginDescriptor, SBuildServer buildServer, @NotNull MetricRegistry metricRegistry, BuildTriggerProperties buildTriggerProperties) {
    this.metricRegistry = metricRegistry;
    this.buildTriggerProperties = buildTriggerProperties;
    this.pluginVersion = pluginDescriptor.getPluginVersion();
    this.teamCityVersion = buildServer.getFullServerVersion();
    String trackingId = pluginDescriptor.getParameterValue("AnalyticsTrackingId");

    boolean enabled = this.buildTriggerProperties.isAnalyticsEnabled();
    LOG.info(String.format("AnalyticsTrackerImpl instantiated for plugin version %s in teamcity version %s. Tracking enabled: %s.",
            pluginVersion, teamCityVersion, enabled));
    try {
        GoogleAnalyticsConfig config = new GoogleAnalyticsConfig()
                .setEnabled(enabled);
        ga = new GoogleAnalytics(config, trackingId);
    }
    catch (Throwable e) {
        LOG.warn("Analytics initialisation failed. Disabling analytics", e);
    }
}
 
開發者ID:matt-richardson,項目名稱:teamcity-octopus-build-trigger-plugin,代碼行數:20,代碼來源:AnalyticsTrackerImpl.java

示例9: YammerAdminPage

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
public YammerAdminPage(@NotNull PagePlaces pagePlaces,
                       @NotNull PluginDescriptor descriptor,
                       @NotNull SBuildServer sBuildServer,
                       @NotNull YammerNotificationMainSettings yammerMainSettings
) {
    super(pagePlaces);
    this.sBuildServer = sBuildServer;
    this.yammerMainSettings = yammerMainSettings;
    setPluginName(PLUGIN_NAME);
    setIncludeUrl(descriptor.getPluginResourcesPath(ADMIN_PAGE));
    jspHome = descriptor.getPluginResourcesPath();
    setTabTitle(TAB_TITLE);
    ArrayList<String> after = new ArrayList<String>();
    after.add(AFTER_PAGE_ID);
    ArrayList<String> before = new ArrayList<String>();
    before.add(BEFORE_PAGE_ID);
    setPosition(PositionConstraint.between(after, before));
    register();

}
 
開發者ID:iguissouma,項目名稱:teamcity-yammer-notifier,代碼行數:21,代碼來源:YammerAdminPage.java

示例10: PasswordResetController

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
public PasswordResetController(final SBuildServer sBuildServer,
                               final WebControllerManager webControllerManager,
                               final PluginDescriptor pluginDescriptor,
                               final AuthorizationInterceptor authorisationInterceptor,
                               final UserModel userModel,
                               final SBuildServer buildServer,
                               final SmtpConfigProcessor smtpConfigProcessor
                               ) {
    super(sBuildServer);
    this.webControllerManager = webControllerManager;
    this.pluginDescriptor = pluginDescriptor;
    this.authorisationInterceptor = authorisationInterceptor;
    this.userModel = userModel;
    this.buildServer = buildServer;
    this.smtpConfigProcessor = smtpConfigProcessor;
    this.logger = Loggers.SERVER;
}
 
開發者ID:dbf256,項目名稱:teamcity-password-reset-plugin,代碼行數:18,代碼來源:PasswordResetController.java

示例11: PhabricatorPlugin

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的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

示例12: validateRuntimeConfiguration

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
/**
 * Validates the runtime configuration to ensure that the native TFS binaries have been loaded
 * @param pluginDescriptor The plugin information needed to set the path.
 */
private static synchronized void validateRuntimeConfiguration(@NotNull PluginDescriptor pluginDescriptor) {
    if (runtimeSet) {
        LOG.debug("TFS binaries have already been loaded, skipping load");
        return;
    }

    runtimeSet = true;

    File pluginRoot = pluginDescriptor.getPluginRoot();
    if (!pluginRoot.exists()) {
        LOG.error(String.format("Plugin root could not be found or does not exist!"));
        return;
    }

    // Locate the file
    File libDir = new File(pluginRoot, "server/lib/tfs");
    if (libDir.exists()){
        LOG.debug("Setting native TFS library path: " + libDir.toString());
        System.setProperty("com.microsoft.tfs.jni.native.base-directory", libDir.getAbsolutePath());
    }
    else {
        LOG.warn("Cannot locate native TFS library path: " + libDir);
    }
}
 
開發者ID:dpiessens,項目名稱:tfs-worktiem-plugin,代碼行數:29,代碼來源:TfsJavaDataProvider.java

示例13: VMWareCloudClientFactory

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
public VMWareCloudClientFactory(@NotNull final CloudRegistrar cloudRegistrar,
                                @NotNull final PluginDescriptor pluginDescriptor,
                                @NotNull final ServerPaths serverPaths,
                                @NotNull final CloudInstancesProvider instancesProvider,
                                @NotNull final CloudManagerBase cloudManager,
                                @NotNull final ServerSettings serverSettings,
                                @NotNull final VmwareUpdateTaskManager updateTaskManager) {
  super(cloudRegistrar);
  myInstancesProvider = instancesProvider;
  myIdxStorage = new File(serverPaths.getPluginDataDirectory(), "vmwareIdx");
  myCloudManager = cloudManager;
  myUpdateTaskManager = updateTaskManager;
  if (!myIdxStorage.exists()){
    myIdxStorage.mkdirs();
  }
  myHtmlPath = pluginDescriptor.getPluginResourcesPath("vmware-settings.html");
  myServerSettings = serverSettings;
}
 
開發者ID:JetBrains,項目名稱:teamcity-vmware-plugin,代碼行數:19,代碼來源:VMWareCloudClientFactory.java

示例14: SlackNotifierSettingsController

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
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);
}
 
開發者ID:PeteGoo,項目名稱:tcSlackBuildNotifier,代碼行數:17,代碼來源:SlackNotifierSettingsController.java

示例15: SlackNotifierAdminPage

import jetbrains.buildServer.web.openapi.PluginDescriptor; //導入依賴的package包/類
protected SlackNotifierAdminPage(@NotNull PagePlaces pagePlaces,
                                 @NotNull PluginDescriptor descriptor,
                                 @NotNull SBuildServer sBuildServer,
                                 @NotNull SlackNotificationMainSettings slackMainSettings
                                 ) {
    super(pagePlaces);
    this.sBuildServer = sBuildServer;
    this.slackMainSettings = slackMainSettings;

    setPluginName(PLUGIN_NAME);
    setIncludeUrl(descriptor.getPluginResourcesPath(PAGE));
    jspHome = descriptor.getPluginResourcesPath();
    setTabTitle(TAB_TITLE);
    ArrayList<String> after = new ArrayList<String>();
    after.add(AFTER_PAGE_ID);
    ArrayList<String> before = new ArrayList<String>();
    before.add(BEFORE_PAGE_ID);
    setPosition(PositionConstraint.between(after, before));
    register();
    Loggers.SERVER.info("Slack global configuration page registered");
}
 
開發者ID:PeteGoo,項目名稱:tcSlackBuildNotifier,代碼行數:22,代碼來源:SlackNotifierAdminPage.java


注:本文中的jetbrains.buildServer.web.openapi.PluginDescriptor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。