Vaules under pluginSettings = pluginSettingsFactory.createGlobalSettings()?

Hello,

I have this code:

import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.atlassian.sal.api.pluginsettings.PluginSettings
import com.atlassian.sal.api.pluginsettings.PluginSettingsFactory
import com.atlassian.applinks.api.ApplicationLinkService
import com.atlassian.applinks.core.DefaultApplicationLinkService

ApplicationLinkService applicationLinkService = ComponentAccessor.getComponent(ApplicationLinkService)

@WithPlugin(‘com.atlassian.applinks.applinks-plugin’)
@PluginModule
DefaultApplicationLinkService defaultApplicationLinkService;

@WithPlugin(‘com.atlassian.sal.jira’)
@PluginModule
PluginSettingsFactory pluginSettingsFactory;

String url = “https://jira-dev01.mydomain.com/
String rpcUrlKey
String displayUrlKey
applicationLinkService.getApplicationLinks().each{

  • def appLinkType = it.getType()*
  • def appLinkID = it.getId()*
  • log.error it.getRpcUrl()*
  • rpcUrlKey = “applinks.admin.” + appLinkID + “.rpc.url”*
  • displayUrlKey = “applinks.admin.” + appLinkID + “.display.url”;*

}

PluginSettings pluginSettings = pluginSettingsFactory.createGlobalSettings();
pluginSettings.put(rpcUrlKey, url)
pluginSettings.put(displayUrlKey, url)

log.error pluginSettings.get(rpcUrlKey)
log.error pluginSettings.get(displayUrlKey)

In general it king of works, but part of it was created by someone else and I don’t understand one thing, how this person figured out this string
rpcUrlKey = “applinks.admin.” + appLinkID + “.rpc.url”*

there is no method pluginSettings.get() so how to figure out what is available there…
I can’t find anywhere why “applinks.admin.” + appLinkID + “.rpc.url” is correct value.

Best regards,
Lukasz

I think I kind of finally found an answer:
How to update the URL for an application link | Atlassian Support | Atlassian Documentation

and there with SQL … like:

SELECT PS.id, PE.property_key, PS.propertyvalue, PE.propertytype, PE.property_key FROM propertystring PS
INNER JOIN propertyentry PE
ON PS.id = PE.id WHERE PE.property_key LIKE ‘%e82e59da-acf4-3b09-90f9-0cda367e5946%’;

I could find all what is available for my all link.

someone knows the other way?

BR,
Lukasz