Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

@ComponentImport vs. @JiraImport

Michael Wan January 7, 2019

What is the difference between @ComponentImport vs. @JiraImport ?

I've seen them used in these 2 tutorials, both with atlassian.spring.scanner.version = 1.2.13.

1. Getting started with Active Objects:

https://developer.atlassian.com/server/framework/atlassian-sdk/getting-started-with-active-objects/

@Scanned
public final class TodoServlet extends HttpServlet
{
@ComponentImport
private final ActiveObjects ao;

@Inject
public TodoServlet(ActiveObjects ao)
...

2. Creating a Jira report:

https://developer.atlassian.com/server/jira/platform/creating-a-jira-report/

@Scanned
public class SingleLevelGroupByReportExtended extends AbstractReport {
private static final Logger log = Logger.getLogger(SingleLevelGroupByReportExtended.class);

@JiraImport
private final SearchProvider searchProvider;
@JiraImport
private final SearchRequestService searchRequestService;
@JiraImport
private final IssueFactory issueFactory;
...


I've looked at Atlassian Spring Scanner doc (https://bitbucket.org/atlassian/atlassian-spring-scanner/src/1.2.x/) however I'm still not clear. Thanks.

 

 

1 answer

1 accepted

2 votes
Answer accepted
Michael Wan January 8, 2019

After carefully reading the doc again and try it out, @JiraImport is actually the product-specific version of @ComponentImport e.g. for JIRA, it is @JiraImport, for Confluence, it is @ConfluenceImport.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events