Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Way to get list of current Application Links through Java API (i.e. ApplicationLinksManager or something?)

Jason Nguyen April 17, 2014

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

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Jason Nguyen April 17, 2014

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>

Sachin Dhamale June 22, 2014

Thanx it work for me

VivekS May 9, 2016

now maven says version 3.2 not found.

2 votes
Daniel Wester
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 17, 2014

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
        }
   }
}

OscarRyz November 13, 2015

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

2 votes
Boris Georgiev _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 17, 2014

Use com.atlassian.applinks.api.ApplicationLinkService

ComponentLocator.getComponent(ApplicationLinkService.class)

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events