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

Get Confluence Application LInks from Bandana Context

Jonathan Martin May 1, 2014

I've been searching the Java docs and the Confluence DB (v5.4.4) on my machine for a way to grab the JIRA application link information in my space blueprint.

I've found that the JIRA application link is stored in the bandana table and that I have access to the BandanaManager. However, I'm not sure the best way to pull all of the JIRA application link related values.

Here are the values for the keys in my DB I'd like to access:

applinks.admin.d88b547a-0526-3b94-8e3b-3cdbfc313623.type    <string>jira</string>
applinks.admin.d88b547a-0526-3b94-8e3b-3cdbfc313623.name    <string>JIRA</string>
applinks.admin.d88b547a-0526-3b94-8e3b-3cdbfc313623.display.url    <string>http://myurl...</string>
applinks.admin.d88b547a-0526-3b94-8e3b-3cdbfc313623.rpc.url    <string>http://myurl...</string>
applinks.admin.d88b547a-0526-3b94-8e3b-3cdbfc313623.primary    <string>true</string>

Would I have to do the following just to grab these values?

  1. Get all keys using BandanaManager
  2. Iterate the keys and extract all keys that start with applinks.admin.Iterate the extracted keys and pull out the one with a type value of "jira".
  3. Get the server ID from that value (d88b547a-0526-3b94-8e3b-3cdbfc313623).
  4. Iterate the keys again extracting all values that match applinks.admin.<serverId>.etc
  5. Check if it's the primary applink when I hit the ".primary" suffixed key.
  6. If not, do steps 1-5 again.
  7. If so, parse the xml values.

This seems rather complex and not very efficient. Is there a better way to get the info for the JIRA primary app link my plugin?

Any help would be greatly appreciated.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
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.
May 1, 2014
Jonathan Martin May 1, 2014

Great thanks. This worked perfectly.

TAGS
AUG Leaders

Atlassian Community Events