private boolean hasSystemModules(Plugin plugin) { for (ModuleDescriptor descriptor : plugin.getModuleDescriptors()) { if (descriptor.isSystemModule()) { return true; } } return false; } }
public boolean isFinished() { for (ModuleDescriptor desc : plugin.getModuleDescriptors()) { if (!pluginAccessor.isPluginModuleEnabled(desc.getCompleteKey()) && desc instanceof UnrecognisedModuleDescriptor) { return false; } } return true; }
public boolean apply(Plugin input) { return !PluginState.ENABLED.equals(input.getPluginState()); } }
public static String getPluginVersion(PluginAccessor pluginAccessor) { return pluginAccessor.getPlugin(PLUGIN_KEY).getPluginInformation().getVersion(); }
@Override public boolean matches(Plugin plugin) { return plugin != null && !pluginAccessor.isPluginEnabled(plugin.getKey()); } });
public boolean isPluginEnabled(Plugin plugin) { return pluginManager.isPluginEnabled(plugin.getKey()); }
@Override protected void loadClass(Plugin plugin, String clazz) throws PluginParseException { try { // this should have been done once by the plugin container so should never throw exception. this.moduleClass = plugin.loadClass(clazz, null); } catch (ClassNotFoundException e) { throw new PluginParseException("cannot load component class", e); } }
public boolean isFinished() { for (ModuleDescriptor descriptor : descriptors) { ModuleDescriptor<?> module = pluginAccessor.getEnabledPluginModule(descriptor.getCompleteKey()); if (module != null) { return false; } } return true; }
private Extractor getContentPermissionExtractor() { ModuleDescriptor extractorDescriptor = pluginAccessor.getEnabledPluginModule("confluence.extractors.core:contentPermissionsExtractor"); if (extractorDescriptor != null) { return (Extractor) extractorDescriptor.getModule(); } return null; } }
/** * Returns a module descriptor identified by key. * * @param key The key of the module descriptor * @return The module descriptor */ protected ModuleDescriptor<?> getDescriptor(final String key) { return pluginAccessor.getPlugin(Constants.PLUGIN_KEY) .getModuleDescriptor(key); } }
@Override public void doUpgrade(boolean setupMode) throws Exception { // UPM can be enabled by setting the property string with key // "jira.plugin.state-.com.atlassian.upm.atlassian-universal-plugin-manager-plugin" to "true". // However, by the time the Upgrade Tasks are run, the plugin system has been started and a restart is required // for the change to the property string to take effect. // Therefore, we will use the PluginController to enable the UPM plugin. Plugin plugin = pluginAccessor.getPlugin(UPM_KEY); if (plugin != null && plugin.getPluginState() != PluginState.ENABLED) { pluginController.enablePlugins(UPM_KEY); } }
public JiraXmlRpcService(PluginAccessor pluginAccessor) { this.soapService = ((JiraSoapService) pluginAccessor.getPluginModule("com.atlassian.jira.ext.rpc:soap").getModule()); }
public boolean isModuleEnabled(ModuleDescriptor module) { return pluginManager.isPluginModuleEnabled(module.getCompleteKey()); }
private void upmVersion(Map<String, String> container) { Plugin plugin = pluginAccessor.getPlugin("com.atlassian.upm.atlassian-universal-plugin-manager-plugin"); if (plugin != null) { container.put("Universal Plugin Manager", plugin.getPluginInformation().getVersion()); } }
public boolean isPluginEnabled(final Plugin plugin) { return pluginAccessor.isPluginEnabled(plugin.getKey()); }
private void speakeasyVersion(Map<String, String> container) { Plugin plugin = pluginAccessor.getPlugin("com.atlassian.labs.speakeasy-plugin"); if (plugin != null) { container.put("Speakeasy", plugin.getPluginInformation().getVersion()); } }
private boolean isPluginEnabled(final Plugin plugin) { return (plugin != null) && pluginAccessor.isPluginEnabled(plugin.getKey()); }
private void applinksVersion(Map<String, String> container) { Plugin plugin = pluginAccessor.getPlugin("com.atlassian.applinks.applinks-plugin"); if (plugin != null) { container.put("Application Links", plugin.getPluginInformation().getVersion()); } } }
private void aoVersion(Map<String, String> container) { Plugin plugin = pluginAccessor.getPlugin("com.atlassian.activeobjects.activeobjects-plugin"); if (plugin != null) { container.put("Active Objects", plugin.getPluginInformation().getVersion()); } }