热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

com.atlassian.plugin.spring.scanner.annotation.export.ExportAsService.()方法的使用及代码示例

本文整理了Java中com.atlassian.plugin.spring.scanner.annotation.export.ExportAsService.<init>

本文整理了Java中com.atlassian.plugin.spring.scanner.annotation.export.ExportAsService.()方法的一些代码示例,展示了ExportAsService.()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExportAsService.()方法的具体详情如下:
包路径:com.atlassian.plugin.spring.scanner.annotation.export.ExportAsService
类名称:ExportAsService
方法名:

ExportAsService.介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.refapp/atlassian-refapp-sal-plugin

@ExportAsService
@Named("helpPathResolver")
public class RefImplHelpPathResolver implements HelpPathResolver {
/**
* RefApp doesn't have any specific help available for any plugins.
*/
public HelpPath getHelpPath(String key) {
return null;
}
}

代码示例来源:origin: com.atlassian.plugin/atlassian-spring-scanner-maven-test-service-exporting-plugin

/**
* This export is {@code ComponentImport}ed by the atlassian-spring-scanner-maven-test plugin
*/
@ExportAsService(DynamicallyImportedServiceFromAnotherPlugin.class)
@Component
@SuppressWarnings("unused")
public class DynamicallyImportedServiceFromAnotherPluginImpl implements DynamicallyImportedServiceFromAnotherPlugin {
}

代码示例来源:origin: com.atlassian.plugin/atlassian-spring-scanner-maven-test-service-exporting-plugin

/**
* This export is {@code ComponentImport}ed by the atlassian-spring-scanner-maven-test plugin
*/
@ExportAsService(ServiceTwoExportedFromAnotherPlugin.class)
@Component
@SuppressWarnings("unused")
public class ServiceTwoExportedFromAnotherPluginImpl implements ServiceTwoExportedFromAnotherPlugin {
}

代码示例来源:origin: com.atlassian.plugin/atlassian-spring-scanner-maven-test-service-exporting-plugin

/**
* This export is {@code ComponentImport}ed by the atlassian-spring-scanner-maven-test plugin
*/
@ExportAsService(ServiceExportedFromAnotherPlugin.class)
@Component
@SuppressWarnings("unused")
public class ServiceExportedFromAnotherPluginImpl implements ServiceExportedFromAnotherPlugin {
}

代码示例来源:origin: com.atlassian.refapp/atlassian-refapp-sal-plugin

/**
* Factory for creating SearchQueries
*/
@ExportAsService
@Named("searchQueryParser")
public class DefaultSearchQueryParser implements SearchQueryParser {
public SearchQuery parse(String query) {
return new DefaultSearchQuery(query);
}
}

代码示例来源:origin: com.atlassian.refapp/atlassian-refapp-sal-plugin

@Named("salLifecycleManager")
@ExportAsService(LifecycleManager.class)
public class RefimplLifecycleManager extends DefaultLifecycleManager {
public RefimplLifecycleManager(
final PluginEventManager pluginEventManager,
final PluginAccessor pluginAccessor,
final BundleContext bundleContext) {
super(pluginEventManager, pluginAccessor, bundleContext);
}
public boolean isApplicationSetUp() {
return true;
}
}

代码示例来源:origin: com.atlassian.plugins/atlassian-connect-core

@Component
@ExportAsService
public class ConnectJwtIssuerRegistry implements JwtIssuerRegistry {

private final ConnectAddonRegistry addonRegistry;
@Autowired
public ConnectJwtIssuerRegistry(@Qualifier("ConnectAddonRegistryMux") ConnectAddonRegistry addonRegistry) {
this.addOnRegistry= addonRegistry;
}
@Nullable
@Override
public JwtIssuer getIssuer(@Nonnull final String issuer) {
return addonRegistry.getSecret(issuer).map((secret) -> new ConnectJwtIssuer(issuer, secret)).orElse(null);
}
}

代码示例来源:origin: com.atlassian.plugins/atlassian-connect-server-core

/**
* JWT claim provider that injects a "sub" claim and a context user claim when tokens are generated
*/
@Component
@ExportAsService(JwtClaimWriter.class)
public class SubjectJwtClaimWriter implements JwtClaimWriter {
private final UserManager userManager;
@Autowired
public SubjectJwtClaimWriter(UserManager userManager) {
this.userManager = userManager;
}
public void write(@Nonnull JwtJsonBuilder builder) {
JwtUserContextBuilder.addUserContextObject(builder, Optional.ofNullable(userManager.getRemoteUser()));
}
}

代码示例来源:origin: com.atlassian.webhooks/atlassian-webhooks-plugin

@Component
@ExportAsService(WebhookRequestEnricher.class)
public class BuiltInWebhookEnricher implements WebhookRequestEnricher {
@Override
public void enrich(@Nonnull WebhookInvocation invocation) {
invocation.getRequestBuilder()
.header("X-Event-Key", invocation.getEvent().getId())
.header("X-Request-Id", invocation.getId());
}
@Override
public int getWeight() {
return 0;
}
}

代码示例来源:origin: com.atlassian.plugins/atlassian-connect-core

/**
* JWT claim provider that injects a "sub" claim and a context user claim when tokens are generated
*/
@Component
@ExportAsService(JwtClaimWriter.class)
public class SubjectJwtClaimWriter implements JwtClaimWriter {
private final UserManager userManager;
@Autowired
public SubjectJwtClaimWriter(UserManager userManager) {
this.userManager = userManager;
}
public void write(@Nonnull JwtJsonBuilder builder) {
JwtUserContextBuilder.addUserContextObject(builder, Optional.ofNullable(userManager.getRemoteUser()));
}
}

代码示例来源:origin: com.atlassian.plugin.automation/jira-automation-spi

@Named
@ExportAsService
public class JiraCronExpressionValidator
{
private final CronExpressionValidator cronExpressionValidator;
@Inject
public JiraCronExpressionValidator(@ComponentImport CronExpressionValidator cronExpressionValidator)
{
this.crOnExpressionValidator= cronExpressionValidator;
}
public boolean isValidExpression(final String expression)
{
return cronExpressionValidator.isValid(expression);
}
}

代码示例来源:origin: com.atlassian.web/atlassian-servlet-plugin

/**
* Rejects multipart requests.
*
* @since 5.1.3
*/
@ExportAsService
@Component
public class MultipartForwardAuthorizer implements ForwardAuthorizer {
public Optional authorizeForward(final HttpServletRequest source, final URI target) {
if (source.getContentType() != null && source.getContentType().toLowerCase().contains("multipart/form-data")) {
return of(false);
} else {
return empty();
}
}
}

代码示例来源:origin: com.atlassian.plugin.automation/jira-automation-spi

@Named
@ExportAsService
public class JiraBuildNumberService implements BuildNumberService
{
private final int applicationBuildNumber;
@Inject
public JiraBuildNumberService(@ComponentImport final BuildUtilsInfo buildUtilsInfo)
{
applicatiOnBuildNumber= buildUtilsInfo.getApplicationBuildNumber();
}
@Override
public long getBuildNumber()
{
return applicationBuildNumber;
}
}

代码示例来源:origin: com.atlassian.webhooks/atlassian-webhooks-plugin

@Component
@ExportAsService({WebhookPayloadProvider.class})
public class DiagnosticsPayloadProvider implements WebhookPayloadProvider {
@Override
public int getWeight() {
return 100000; // very low priority
}
@Override
public void setPayload(@Nonnull WebhookInvocation invocation, @Nonnull WebhookPayloadBuilder builder) {
builder.body("{\"test\": true}".getBytes(StandardCharsets.UTF_8), "application/json");
}
@Override
public boolean supports(@Nonnull WebhookInvocation invocation) {
return invocation.getEvent() == WebhookDiagnosticsEvent.PING;
}
}

代码示例来源:origin: com.atlassian.web/atlassian-servlet-plugin

/**
* Authorizes forwards if they're targeted at host-relative locations.
*
* @since 4.0.0
*/
@ExportAsService
@Component
public class HostForwardAuthorizer implements ForwardAuthorizer {
public Optional authorizeForward(final HttpServletRequest source, final URI target) {
final Optional host = ofNullable(target.getHost());
if (host.isPresent()) {
return of(false);
} else {
return empty();
}
}
}

代码示例来源:origin: com.atlassian.refapp/atlassian-refapp-sal-plugin

@ExportAsService
@Named("httpContext")
public class RefImplHttpContext implements HttpContext {
@Override
public HttpServletRequest getRequest() {
return ServletContextThreadLocal.getRequest();
}
@Override
public HttpServletResponse getResponse() {
return ServletContextThreadLocal.getResponse();
}
@Override
public HttpSession getSession(boolean create) {
final HttpServletRequest request = getRequest();
if (request == null)
return null;
return request.getSession(create);
}
}

代码示例来源:origin: com.atlassian.plugins/atlassian-connect-server-core

@Component
@ExportAsService
public class ConnectJwtIssuerRegistry implements JwtIssuerRegistry {

private final ConnectAddonRegistry addonRegistry;
private final DarkFeatureManager darkFeatureManager;
@Autowired
public ConnectJwtIssuerRegistry(ConnectAddonRegistry addonRegistry, DarkFeatureManager darkFeatureManager) {
this.addOnRegistry= addonRegistry;
this.darkFeatureManager = darkFeatureManager;
}
@Nullable
@Override
public JwtIssuer getIssuer(@Nonnull final String issuer) {
if (!darkFeatureManager.isFeatureEnabledForAllUsers(DelegatingConnectAddonInformationProvider.PLUGIN_SETTINGS_FEATURE_FLAG)) {
return null;
}
return addonRegistry.getSecret(issuer).map((secret) -> new ConnectJwtIssuer(issuer, secret)).orElse(null);
}
}

代码示例来源:origin: com.atlassian.refapp/atlassian-refapp-sal-plugin

@ExportAsService
@Named("timeZoneManager")
public class RefimplTimeZoneManager implements TimeZoneManager {
@Nonnull
public TimeZone getUserTimeZone() {
return getDefaultTimeZone();
}
@Nonnull
public TimeZone getDefaultTimeZone() {
return TimeZone.getDefault();
}
@Override
@Nonnull
public TimeZone getUserTimeZone(@Nonnull UserKey user) {
Preconditions.checkNotNull(user);
return getDefaultTimeZone();
}
}

代码示例来源:origin: com.atlassian.refapp/atlassian-refapp-sal-plugin

@ExportAsService
@Named("RefimplProjectManager")
public class RefimplProjectManager implements ProjectManager {
private static final String CHARLIE_KEYS = "charlie.keys";
private final PluginSettingsFactory pluginSettingsFactory;
@Inject
public RefimplProjectManager(PluginSettingsFactory pluginSettingsFactory) {
this.pluginSettingsFactory = pluginSettingsFactory;
}
/**
* Get all project keys
*
* @return All the project keys
*/
public Collection getAllProjectKeys() {
List charlies = (List) pluginSettingsFactory.createGlobalSettings().get(CHARLIE_KEYS);
if (charlies == null) {
charlies = new ArrayList();
}
return charlies;
}
}

代码示例来源:origin: com.adaptavist.arquillian.atlassian/test-plugin-scanner-1

@ExportAsService({MyPluginComponent.class})
@Named("myPluginComponent")
public class MyPluginComponentImpl implements MyPluginComponent {
@ComponentImport
private final ApplicationProperties applicationProperties;
@Inject
public MyPluginComponentImpl(final ApplicationProperties applicationProperties) {
this.applicatiOnProperties= applicationProperties;
}
public String getName() {
if (null != applicationProperties) {
return "myComponent:" + applicationProperties.getDisplayName();
}
return "myComponent";
}
}

推荐阅读
  • Gradle 是 Android Studio 中默认的构建工具,了解其基本配置对于开发效率的提升至关重要。本文将详细介绍如何在 Gradle 中定义和使用共享变量,以确保项目的一致性和可维护性。 ... [详细]
  • 本文详细介绍了如何使用C#实现不同类型的系统服务账户(如Windows服务、计划任务和IIS应用池)的密码重置方法。 ... [详细]
  • spring boot使用jetty无法启动 ... [详细]
  • RTThread线程间通信
    线程中通信在裸机编程中,经常会使用全局变量进行功能间的通信,如某些功能可能由于一些操作而改变全局变量的值,另一个功能对此全局变量进行读取& ... [详细]
  • CentOS7通过RealVNC实现多人使用服务器桌面
    背景:公司研发团队通过VNC登录到CentOS服务器的桌面实现软件开发工作为防止数据外泄,需要在RealVNC设置禁止传输文件、访问粘贴板等策略过程&# ... [详细]
  • 在使用mybatis进行mapper.xml测试的时候发生必须为元素类型“mapper”声明属性“namespace”的错误项目目录结构UserMapper和UserMappe ... [详细]
  • 本文探讨了如何使用Scrapy框架构建高效的数据采集系统,以及如何通过异步处理技术提升数据存储的效率。同时,文章还介绍了针对不同网站采用的不同采集策略。 ... [详细]
  • egg实现登录鉴权(七):权限管理
    权限管理包含三部分:访问页面的权限,操作功能的权限和获取数据权限。页面权限:登录用户所属角色的可访问页面的权限功能权限:登录用户所属角色的可访问页面的操作权限数据权限:登录用户所属 ... [详细]
  • 【MySQL】frm文件解析
    官网说明:http:dev.mysql.comdocinternalsenfrm-file-format.htmlfrm是MySQL表结构定义文件,通常frm文件是不会损坏的,但是如果 ... [详细]
  • 利用Node.js实现PSD文件的高效切图
    本文介绍了如何通过Node.js及其psd2json模块,快速实现PSD文件的自动化切图过程,以适应项目中频繁的界面更新需求。此方法不仅提高了工作效率,还简化了从设计稿到实际应用的转换流程。 ... [详细]
  • 本文详细介绍了在 CentOS 系统中如何创建和管理 SWAP 分区,包括临时创建交换文件、永久性增加交换空间的方法,以及如何手动释放内存缓存。 ... [详细]
  • Beetl是一款先进的Java模板引擎,以其丰富的功能、直观的语法、卓越的性能和易于维护的特点著称。它不仅适用于高响应需求的大型网站,也适合功能复杂的CMS管理系统,提供了一种全新的模板开发体验。 ... [详细]
  • 小编给大家分享一下Vue3中如何提高开发效率,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获, ... [详细]
  • 本文详细介绍了如何在 Node.js 环境中利用 Nodemailer 库实现邮件发送功能,包括环境配置、代码实现及常见问题解决方法。 ... [详细]
  • 尽管Medium是一个优秀的发布平台,但在其之外拥有自己的博客仍然非常重要。这不仅提供了另一个与读者互动的渠道,还能确保您的内容安全。本文将介绍如何使用Bash脚本将Medium文章迁移到个人博客。 ... [详细]
author-avatar
阳光映像YGYX
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有