Class SimplePluginHelper

java.lang.Object
com.atlassian.diagnostics.internal.SimplePluginHelper
All Implemented Interfaces:
PluginDetailsSupplier, PluginHelper

public class SimplePluginHelper extends Object implements PluginHelper
  • Constructor Details

    • SimplePluginHelper

      public SimplePluginHelper(CallingBundleResolver callingBundleResolver, com.atlassian.sal.api.message.I18nResolver i18nResolver, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.metadata.PluginMetadataManager pluginMetadataManager)
  • Method Details

    • getCallingBundle

      @Nonnull public Optional<org.osgi.framework.Bundle> getCallingBundle()
      Specified by:
      getCallingBundle in interface PluginHelper
      Returns:
      the OSGI bundle from which the current call-site has been called, or Optional.empty() if not called from an OSGI bundle, or the bundle cannot be determined
    • getPluginDetails

      @Nonnull public PluginDetails getPluginDetails(@Nonnull String pluginKey, String pluginVersion)
      Specified by:
      getPluginDetails in interface PluginDetailsSupplier
    • getPluginName

      @Nonnull public String getPluginName(@Nonnull String pluginKey)
      Specified by:
      getPluginName in interface PluginHelper
      Parameters:
      pluginKey - the plugin key to resolve
      Returns:
      the name of the resolved plugin, or pluginKey if the name could not determined
    • isUserInstalled

      public boolean isUserInstalled(org.osgi.framework.Bundle bundle)
      Specified by:
      isUserInstalled in interface PluginHelper
      Parameters:
      bundle - the bundle, possibly null
      Returns:
      true if the bundle is a non-bundled plugin, otherwise false