Class SimplePluginHelper
java.lang.Object
com.atlassian.diagnostics.internal.SimplePluginHelper
- All Implemented Interfaces:
PluginDetailsSupplier,PluginHelper
-
Constructor Summary
ConstructorsConstructorDescriptionSimplePluginHelper(CallingBundleResolver callingBundleResolver, com.atlassian.sal.api.message.I18nResolver i18nResolver, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.metadata.PluginMetadataManager pluginMetadataManager) -
Method Summary
Modifier and TypeMethodDescriptionOptional<org.osgi.framework.Bundle> getPluginDetails(String pluginKey, String pluginVersion) getPluginName(String pluginKey) booleanisUserInstalled(org.osgi.framework.Bundle bundle)
-
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
- Specified by:
getCallingBundlein interfacePluginHelper- 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
- Specified by:
getPluginDetailsin interfacePluginDetailsSupplier
-
getPluginName
- Specified by:
getPluginNamein interfacePluginHelper- Parameters:
pluginKey- the plugin key to resolve- Returns:
- the name of the resolved plugin, or
pluginKeyif the name could not determined
-
isUserInstalled
public boolean isUserInstalled(org.osgi.framework.Bundle bundle) - Specified by:
isUserInstalledin interfacePluginHelper- Parameters:
bundle- the bundle, possiblynull- Returns:
trueif the bundle is a non-bundled plugin, otherwisefalse
-