com.atlassian.plugin.util
Class PluginUtils

java.lang.Object
  extended by com.atlassian.plugin.util.PluginUtils

public class PluginUtils
extends java.lang.Object

General plugin utility methods

Since:
2.1

Constructor Summary
PluginUtils()
           
 
Method Summary
static boolean doesModuleElementApplyToApplication(org.dom4j.Element element, java.util.Set<java.lang.String> keys)
          Determines if a module element applies to the current application by matching the 'application' attribute to the set of keys.
static boolean doesPluginRequireRestart(Plugin plugin)
          Determines if a plugin requires a restart after being installed at runtime.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginUtils

public PluginUtils()
Method Detail

doesPluginRequireRestart

public static boolean doesPluginRequireRestart(Plugin plugin)
Determines if a plugin requires a restart after being installed at runtime. Looks for the annotation RequiresRestart on the plugin's module descriptors.

Parameters:
plugin - The plugin that was just installed at runtime, but not yet enabled
Returns:
True if a restart is required
Since:
2.1

doesModuleElementApplyToApplication

public static boolean doesModuleElementApplyToApplication(org.dom4j.Element element,
                                                          java.util.Set<java.lang.String> keys)
Determines if a module element applies to the current application by matching the 'application' attribute to the set of keys. If the application is specified, but isn't in the set, we return false

Parameters:
element - The module element
keys - The set of application keys
Returns:
True if it should apply, false otherwise
Since:
2.2.0


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.