Community moderators have prevented the ability to post new answers.
Hi Marc,
Use PluginAccessor#isPluginModuleEnabled(completeKey). Example:
public MyAction(PluginAccessor pluginAccessor) { this.pluginAccessor = pluginAccessor; }
boolean myMethod() {
return pluginAccessor.isPluginModuleEnabled("org.marc:my-plugin-module-key");
}
Note that PluginController allows you to control the plugin too:
public MyAction(PluginController pluginController) { this.pluginController = pluginController; }
void myMethodToDisable() {
pluginController.disablePluginModule("org.marc:my-plugin-module-key");
}
Hi Marc,
Sorry your question initially wasn't very clear.
If you want to do it through code, try this
Collection<Plugin> plugins = ComponentAccessor.getPluginAccessor().getPlugins(); for(Plugin plugin:plugins){ //If it is the servlet plugin thaty ou are after if(plugin.getModuleDescriptor().getPluginKey() == <key of your servlet module>){ //Check if it is enabled plugin.isEnabled(); //Do something } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Iam Soory but your code-examble doesn't work under jira 5.1.3...
The mothode getModuleDescriptor() need a string as parameter and the methode
isEnabled()is deprecated.
Can you write a new example-code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc,
Refer to "Viewing Installed Plugins" at
https://confluence.atlassian.com/display/JIRA/Managing+JIRA's+Plugins
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello nbhushan,
Iam looking for a java-code, to query the plugin-module-step. I know that user can enable and disable the completly plugin or some plugin-module (plugin-components).
My develop plugin consist of 3 plugin-modules (IssueTabPanel, Servlet, Gadget). The IssueTabPanel can only work when Servlet-module is enabel. How can I check it in my java-code?
Best regards
MarC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.