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


Java PluginSettingsFactory类代码示例

本文整理汇总了Java中com.atlassian.sal.api.pluginsettings.PluginSettingsFactory的典型用法代码示例。如果您正苦于以下问题:Java PluginSettingsFactory类的具体用法?Java PluginSettingsFactory怎么用?Java PluginSettingsFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PluginSettingsFactory类属于com.atlassian.sal.api.pluginsettings包,在下文中一共展示了PluginSettingsFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: gettingSettingsForNewRepoReturnsDefaultSettingsTest

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
@Test
public void gettingSettingsForNewRepoReturnsDefaultSettingsTest() {
  final PermissionValidationService permService = mock(PermissionValidationService.class);
  final PluginSettingsFactory factory = mock(PluginSettingsFactory.class);
  final PluginSettings pluginSettings = mock(PluginSettings.class);
  final Repository repository = mock(Repository.class);

  when(repository.getId()).thenReturn(1);
  when(factory.createSettingsForKey(PluginMetadata.getPluginKey())).thenReturn(pluginSettings);

  final DefaultPullRequestTriggerSettingsService service = new DefaultPullRequestTriggerSettingsService(permService, factory);

  final PullRequestTriggerSettings settings = service.getPullRequestTriggerSettings(repository);

  assertEquals(new ImmutablePullRequestTriggerSettings(), settings);
}
 
开发者ID:RichRelevance,项目名称:StashPRTriggerPlugin,代码行数:17,代码来源:SettingsTest.java

示例2: settingsCanBeSavedTest

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
@Test
public void settingsCanBeSavedTest() {
  final PermissionValidationService permService = mock(PermissionValidationService.class);
  final PluginSettingsFactory factory = mock(PluginSettingsFactory.class);
  final PluginSettings pluginSettings = mock(PluginSettings.class);
  final Repository repository = mock(Repository.class);

  when(repository.getId()).thenReturn(1);
  when(factory.createSettingsForKey(PluginMetadata.getPluginKey())).thenReturn(pluginSettings);
  when(pluginSettings.put("1", settingsMapEnabled)).thenReturn(settingsMapEnabled);
  when(pluginSettings.get("1")).thenReturn(settingsMapEnabled);

  final DefaultPullRequestTriggerSettingsService service = new DefaultPullRequestTriggerSettingsService(permService, factory);

  service.setPullRequestTriggerSettings(repository, settingsEnabled);
  final PullRequestTriggerSettings settings = service.getPullRequestTriggerSettings(repository);

  InOrder inOrder = inOrder(pluginSettings);
  inOrder.verify(pluginSettings).put("1", settingsMapEnabled);
  inOrder.verify(pluginSettings).get("1");

  assertEquals(settingsEnabled, settings);
  assertNotSame(new ImmutablePullRequestTriggerSettings(), settings);
}
 
开发者ID:RichRelevance,项目名称:StashPRTriggerPlugin,代码行数:25,代码来源:SettingsTest.java

示例3: gettingSettingsForBranchReturnsBranchesMatchingNameTest

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
@Test
public void gettingSettingsForBranchReturnsBranchesMatchingNameTest() {
  final PermissionValidationService permService = mock(PermissionValidationService.class);
  final PluginSettingsFactory factory = mock(PluginSettingsFactory.class);
  final PluginSettings pluginSettings = mock(PluginSettings.class);
  final Repository repository = mock(Repository.class);

  when(repository.getId()).thenReturn(1);
  when(factory.createSettingsForKey(PluginMetadata.getPluginKey())).thenReturn(pluginSettings);
  when(pluginSettings.get("branchList:1")).thenReturn(expandedBranchList());
  when(pluginSettings.get(branchName + ":1")).thenReturn(branchSettingsMap);
  when(pluginSettings.get(anotherBranchName + ":1")).thenReturn(anotherBranchMap);

  final DefaultPullRequestTriggerSettingsService service = new DefaultPullRequestTriggerSettingsService(permService, factory);

  final List<BranchSettings> settingsList = service.getBranchSettingsForBranch(repository, branchName);

  assertEquals(Lists.newArrayList(immutableBranchSettings), settingsList);
}
 
开发者ID:RichRelevance,项目名称:StashPRTriggerPlugin,代码行数:20,代码来源:SettingsTest.java

示例4: gettingSettingsForBranchReturnsBranchesMatchingRegexTest

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
@Test
public void gettingSettingsForBranchReturnsBranchesMatchingRegexTest() {
  final PermissionValidationService permService = mock(PermissionValidationService.class);
  final PluginSettingsFactory factory = mock(PluginSettingsFactory.class);
  final PluginSettings pluginSettings = mock(PluginSettings.class);
  final Repository repository = mock(Repository.class);

  when(repository.getId()).thenReturn(1);
  when(factory.createSettingsForKey(PluginMetadata.getPluginKey())).thenReturn(pluginSettings);
  when(pluginSettings.get("branchList:1")).thenReturn(regexBranchList());
  when(pluginSettings.get(regexBranchPattern + ":1")).thenReturn(regexBranchMap);

  final DefaultPullRequestTriggerSettingsService service = new DefaultPullRequestTriggerSettingsService(permService, factory);

  final List<BranchSettings> settingsList = service.getBranchSettingsForBranch(repository, anotherBranchName);

  assertEquals(Lists.newArrayList(regexBranchSettings), settingsList);
}
 
开发者ID:RichRelevance,项目名称:StashPRTriggerPlugin,代码行数:19,代码来源:SettingsTest.java

示例5: gettingSettingsForBranchReturnsBranchesWithPartialNameMatchesTest

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
@Test
public void gettingSettingsForBranchReturnsBranchesWithPartialNameMatchesTest() {
  final PermissionValidationService permService = mock(PermissionValidationService.class);
  final PluginSettingsFactory factory = mock(PluginSettingsFactory.class);
  final PluginSettings pluginSettings = mock(PluginSettings.class);
  final Repository repository = mock(Repository.class);

  when(repository.getId()).thenReturn(1);
  when(factory.createSettingsForKey(PluginMetadata.getPluginKey())).thenReturn(pluginSettings);
  when(pluginSettings.get("branchList:1")).thenReturn(expandedBranchList());
  when(pluginSettings.get(branchName + ":1")).thenReturn(branchSettingsMap);
  when(pluginSettings.get(anotherBranchName + ":1")).thenReturn(anotherBranchMap);

  final DefaultPullRequestTriggerSettingsService service = new DefaultPullRequestTriggerSettingsService(permService, factory);

  final List<BranchSettings> settingsList = service.getBranchSettingsForBranch(repository, anotherBranchName);

  assertEquals(Lists.newArrayList(anotherBranchSettings), settingsList);
}
 
开发者ID:RichRelevance,项目名称:StashPRTriggerPlugin,代码行数:20,代码来源:SettingsTest.java

示例6: gettingSettingsForBranchReturnsAllBranchesMatchingNameTest

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
@Test
public void gettingSettingsForBranchReturnsAllBranchesMatchingNameTest() {
  final PermissionValidationService permService = mock(PermissionValidationService.class);
  final PluginSettingsFactory factory = mock(PluginSettingsFactory.class);
  final PluginSettings pluginSettings = mock(PluginSettings.class);
  final Repository repository = mock(Repository.class);

  when(repository.getId()).thenReturn(1);
  when(factory.createSettingsForKey(PluginMetadata.getPluginKey())).thenReturn(pluginSettings);
  when(pluginSettings.get("branchList:1")).thenReturn(regexExpandedBranchList());
  when(pluginSettings.get(branchName + ":1")).thenReturn(branchSettingsMap);
  when(pluginSettings.get(regexBranchPattern + ":1")).thenReturn(regexBranchMap);

  final DefaultPullRequestTriggerSettingsService service = new DefaultPullRequestTriggerSettingsService(permService, factory);

  final List<BranchSettings> settingsList = service.getBranchSettingsForBranch(repository, branchName);

  assertEquals(Lists.newArrayList(immutableBranchSettings, regexBranchSettings), settingsList);
}
 
开发者ID:RichRelevance,项目名称:StashPRTriggerPlugin,代码行数:20,代码来源:SettingsTest.java

示例7: HubBambooServlet

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
public HubBambooServlet(final UserManager userManager, final LoginUriProvider loginUriProvider,
        final TemplateRenderer renderer, final PluginSettingsFactory pluginSettingsFactory) {
    this.userManager = userManager;
    this.loginUriProvider = loginUriProvider;
    this.renderer = renderer;
    this.pluginSettingsFactory = pluginSettingsFactory;

}
 
开发者ID:blackducksoftware,项目名称:hub-bamboo,代码行数:9,代码来源:HubBambooServlet.java

示例8: HubConfigController

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
public HubConfigController(final UserManager userManager, final PluginSettingsFactory pluginSettingsFactory,
        final TransactionTemplate transactionTemplate, final PluginAccessor pluginAccessor) {
    this.userManager = userManager;
    this.pluginSettingsFactory = pluginSettingsFactory;
    this.transactionTemplate = transactionTemplate;
    this.pluginAccessor = pluginAccessor;
}
 
开发者ID:blackducksoftware,项目名称:hub-bamboo,代码行数:8,代码来源:HubConfigController.java

示例9: HubJiraServlet

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
public HubJiraServlet(final UserManager userManager, final LoginUriProvider loginUriProvider,
        final TemplateRenderer renderer, final PluginSettingsFactory pluginSettingsFactory) {
    this.userManager = userManager;
    this.loginUriProvider = loginUriProvider;
    this.renderer = renderer;
    this.pluginSettingsFactory = pluginSettingsFactory;
}
 
开发者ID:blackducksoftware,项目名称:hub-jira,代码行数:8,代码来源:HubJiraServlet.java

示例10: HubJiraConfigController

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
public HubJiraConfigController(final UserManager userManager, final PluginSettingsFactory pluginSettingsFactory, final TransactionTemplate transactionTemplate, final ProjectManager projectManager, final HubMonitor hubMonitor,
        final GroupPickerSearchService groupPickerSearchService, final FieldManager fieldManager) {
    this.userManager = userManager;
    this.pluginSettingsFactory = pluginSettingsFactory;
    this.transactionTemplate = transactionTemplate;
    this.projectManager = projectManager;
    this.hubMonitor = hubMonitor;
    this.groupPickerSearchService = groupPickerSearchService;
    this.fieldManager = fieldManager;

    i18nProperties = new Properties();
    populateI18nProperties();
}
 
开发者ID:blackducksoftware,项目名称:hub-jira,代码行数:14,代码来源:HubJiraConfigController.java

示例11: IssueEventListener

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
public IssueEventListener(final EventPublisher eventPublisher, final PluginSettingsFactory pluginSettingsFactory, final JiraServices jiraServices) {
    this.eventPublisher = eventPublisher;
    this.pluginSettingsFactory = pluginSettingsFactory;
    this.jiraServices = jiraServices;
    this.hubIssueTrackerPropertyHandler = new HubIssueTrackerPropertyHandler();
    this.executorService = createExecutorService();
}
 
开发者ID:blackducksoftware,项目名称:hub-jira,代码行数:8,代码来源:IssueEventListener.java

示例12: ConfigureDvcsOrganizations

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
public ConfigureDvcsOrganizations(@ComponentImport EventPublisher eventPublisher, OrganizationService organizationService,
        @ComponentImport FeatureManager featureManager, PluginFeatureDetector featuresDetector,
        @ComponentImport PluginSettingsFactory pluginSettingsFactory, OAuthStore oAuthStore, SyncDisabledHelper syncDisabledHelper)
{
    this.eventPublisher = eventPublisher;
    this.organizationService = organizationService;
    this.featureManager = featureManager;
    this.featuresDetector = featuresDetector;
    this.oAuthStore = oAuthStore;
    this.invalidOrganizationsManager = new InvalidOrganizationsManagerImpl(pluginSettingsFactory);
    this.syncDisabledHelper = syncDisabledHelper;
}
 
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:13,代码来源:ConfigureDvcsOrganizations.java

示例13: DeferredBitbucketLinker

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
@Autowired
public DeferredBitbucketLinker(@Qualifier ("bitbucketLinker") final BitbucketLinker bitbucketLinker,
        final ClusterLockServiceFactory clusterLockServiceFactory,
        @ComponentImport final PluginSettingsFactory pluginSettingsFactory)
{
    this.bitbucketLinker = bitbucketLinker;
    this.clusterLockService = clusterLockServiceFactory.getClusterLockService();
    this.pluginSettingsFactory = checkNotNull(pluginSettingsFactory);
}
 
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:10,代码来源:DeferredBitbucketLinker.java

示例14: SecSignIDAuthenticator

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
/**
 * Constructor
 * @param templateRenderer the template renderer
 * @param authenticationContext the authentication context to check whether a user is logged.
 * @param pluginSettingsFactory the plugin factory for access to plugin settings
 * @param ao the active objects instance
 */
public SecSignIDAuthenticator(ApplicationProperties applicationProperties, TemplateRenderer templateRenderer, I18nResolver i18nResolver, JiraAuthenticationContext authenticationContext, PluginSettingsFactory pluginSettingsFactory, ActiveObjects ao, UserManager userManager) {
    this.applicationProperties = applicationProperties;
    this.templateRenderer = templateRenderer;
    this.i18nResolver = i18nResolver;
    this.authenticationContext = authenticationContext;
    this.pluginSettingsFactory = pluginSettingsFactory;
    this.ao = ao;
    this.userManager = userManager;
}
 
开发者ID:SecSign,项目名称:SecSign-ID-JIRA-Plugin,代码行数:17,代码来源:SecSignIDAuthenticator.java

示例15: Admin

import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory; //导入依赖的package包/类
/**
 * Constructor
 *
 * @param pluginSettingsFactory object to save data
 * @param userManager           manage users of JIRA
 * @param i18nResolver          translate
 */
public Admin(PluginSettingsFactory pluginSettingsFactory, UserManager userManager, I18nResolver i18nResolver) {
    this.modelo = new LatchModel(pluginSettingsFactory);
    this.request = ServletActionContext.getRequest();
    this.i18nResolver = i18nResolver;
    this.jiraAuthenticationContext = ComponentAccessor.getJiraAuthenticationContext();
    this.userManager = userManager;
}
 
开发者ID:ElevenPaths,项目名称:latch-plugin-jira,代码行数:15,代码来源:Admin.java


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