Is there a way that I can get a list of current application links in through the Java API in Confluence? I've found a bunch of different types of managers for Confluence but didn't see one for AppLinks https://developer.atlassian.com/display/CONFDEV/Accessing+Confluence+Components+from+Plugin+Modules
Community moderators have prevented the ability to post new answers.
Thanks guys, works for me. Just had to include this in my pom.xml:
<dependency>
<groupId>com.atlassian.applinks</groupId>
<artifactId>applinks-api</artifactId>
<version>3.2</version>
<scope>provided</scope>
</dependency>
And this in my atlassian-plugin.xml:
<component-import key="ApplicationLinkService">
<interface>com.atlassian.applinks.api.ApplicationLinkService</interface>
</component-import>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Docs about applinks are available at https://docs.atlassian.com/applinks-api/latest/
Example code:
import com.atlassian.applinks.api.*; import com.atlassian.applinks.api.application.jira.JiraApplicationType; public class Demo { private final ApplicationLinkService applicationLinkService; public Demo( final ApplicationLinkService applicationLinkService) { this.applicationLinkService = applicationLinkService } public void doSomething() { for(ApplicationLink applicationLink: this.applicationLinkService.getApplicationLinks(JiraApplicationType.class)) { //do stuff with JIRA } } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Related: in Jira this yields an error: `Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.applinks.api.ApplicationLinkService] is defined: Unsatisfied dependency of type [interface com.atlassian.applinks.api.ApplicationLinkService]: expected at least 1 matching bean` in this is needed in JIRA the answer by Boris Georgiev may be used
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use com.atlassian.applinks.api.ApplicationLinkService
ComponentLocator.getComponent(ApplicationLinkService.class)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.