本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}