热门标签 | 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";
}
}

推荐阅读
  • 深入解析 Android 中 EditText 的 getLayoutParams 方法及其代码应用实例 ... [详细]
  • 本指南从零开始介绍Scala编程语言的基础知识,重点讲解了Scala解释器REPL(读取-求值-打印-循环)的使用方法。REPL是Scala开发中的重要工具,能够帮助初学者快速理解和实践Scala的基本语法和特性。通过详细的示例和练习,读者将能够熟练掌握Scala的基础概念和编程技巧。 ... [详细]
  • Android中将独立SO库封装进JAR包并实现SO库的加载与调用
    在Android开发中,将独立的SO库封装进JAR包并实现其加载与调用是一个常见的需求。本文详细介绍了如何将SO库嵌入到JAR包中,并确保在外部应用调用该JAR包时能够正确加载和使用这些SO库。通过这种方式,开发者可以更方便地管理和分发包含原生代码的库文件,提高开发效率和代码复用性。文章还探讨了常见的问题及其解决方案,帮助开发者避免在实际应用中遇到的坑。 ... [详细]
  • 在前文探讨了Spring如何为特定的bean选择合适的通知器后,本文将进一步深入分析Spring AOP框架中代理对象的生成机制。具体而言,我们将详细解析如何通过代理技术将通知器(Advisor)中包含的通知(Advice)应用到目标bean上,以实现切面编程的核心功能。 ... [详细]
  • 在Java Web服务开发中,Apache CXF 和 Axis2 是两个广泛使用的框架。CXF 由于其与 Spring 框架的无缝集成能力,以及更简便的部署方式,成为了许多开发者的首选。本文将详细介绍如何使用 CXF 框架进行 Web 服务的开发,包括环境搭建、服务发布和客户端调用等关键步骤,为开发者提供一个全面的实践指南。 ... [详细]
  • 分享一款基于Java开发的经典贪吃蛇游戏实现
    本文介绍了一款使用Java语言开发的经典贪吃蛇游戏的实现。游戏主要由两个核心类组成:`GameFrame` 和 `GamePanel`。`GameFrame` 类负责设置游戏窗口的标题、关闭按钮以及是否允许调整窗口大小,并初始化数据模型以支持绘制操作。`GamePanel` 类则负责管理游戏中的蛇和苹果的逻辑与渲染,确保游戏的流畅运行和良好的用户体验。 ... [详细]
  • 在Java项目中,当两个文件进行互相调用时出现了函数错误。具体问题出现在 `MainFrame.java` 文件中,该文件位于 `cn.javass.bookmgr` 包下,并且导入了 `java.awt.BorderLayout` 和 `java.awt.Event` 等相关类。为了确保项目的正常运行,请求提供专业的解决方案,以解决函数调用中的错误。建议从类路径、依赖关系和方法签名等方面入手,进行全面排查和调试。 ... [详细]
  • NOIP2000的单词接龙问题与常见的成语接龙游戏有异曲同工之妙。题目要求在给定的一组单词中,从指定的起始字母开始,构建最长的“单词链”。每个单词在链中最多可出现两次。本文将详细解析该题目的解法,并分享学习过程中的心得体会。 ... [详细]
  • 开发日志:201521044091 《Java编程基础》第11周学习心得与总结
    开发日志:201521044091 《Java编程基础》第11周学习心得与总结 ... [详细]
  • Java中不同类型的常量池(字符串常量池、Class常量池和运行时常量池)的对比与关联分析
    在研究Java虚拟机的过程中,笔者发现存在多种类型的常量池,包括字符串常量池、Class常量池和运行时常量池。通过查阅CSDN、博客园等相关资料,对这些常量池的特性、用途及其相互关系进行了详细探讨。本文将深入分析这三种常量池的差异与联系,帮助读者更好地理解Java虚拟机的内部机制。 ... [详细]
  • 在深入掌握Spring框架的事务管理之前,了解其背后的数据库事务基础至关重要。Spring的事务管理功能虽然强大且灵活,但其核心依赖于数据库自身的事务处理机制。因此,熟悉数据库事务的基本概念和特性是必不可少的。这包括事务的ACID属性、隔离级别以及常见的事务管理策略等。通过这些基础知识的学习,可以更好地理解和应用Spring中的事务管理配置。 ... [详细]
  • 第六章:枚举类型与switch结构的应用分析
    第六章深入探讨了枚举类型与 `switch` 结构在编程中的应用。枚举类型(`enum`)是一种将一组相关常量组织在一起的数据类型,广泛存在于多种编程语言中。例如,在 Cocoa 框架中,处理文本对齐时常用 `NSTextAlignment` 枚举来表示不同的对齐方式。通过结合 `switch` 结构,可以更清晰、高效地实现基于枚举值的逻辑分支,提高代码的可读性和维护性。 ... [详细]
  • 在使用SSH框架进行项目开发时,经常会遇到一些常见的问题。例如,在Spring配置文件中配置AOP事务声明后,进行单元测试时可能会出现“No Hibernate Session bound to thread”的错误。本文将详细探讨这一问题的原因,并提供有效的解决方案,帮助开发者顺利解决此类问题。 ... [详细]
  • 本文详细探讨了Java事件处理机制的核心概念与实现原理,内容浅显易懂,适合初学者逐步掌握。通过具体的示例和详细的解释,读者可以深入了解Java事件模型的工作方式及其在实际开发中的应用。 ... [详细]
  • Java能否直接通过HTTP将字节流绕过HEAP写入SD卡? ... [详细]
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社区 版权所有