Class PluginUtils
java.lang.Object
com.atlassian.plugin.internal.util.PluginUtils
General plugin utility methods
- Since:
- 2.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringSystem property for storing and retrieving the time the plugin system will wait for the enabling of a plugin in seconds.static final StringThe default number of seconds that a plugin should wait for its dependencies to become enabled.static final StringUsed to disable the file cache should that be desired.static final StringUsed to customise the size of the LRU cache for batch web resources. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandoesModuleElementApplyToApplication(org.dom4j.Element element, Set<Application> applications, InstallationMode installationMode) Determines if a module element applies to the current application by matching the 'application' attribute to the set of applications.static booleandoesPluginRequireRestart(Plugin plugin) Determines if a plugin requires a restart after being installed at runtime.static intGets a list of all the module keys in a plugin that require restart.static boolean
-
Field Details
-
ATLASSIAN_DEV_MODE
- See Also:
-
ATLASSIAN_PLUGINS_ENABLE_WAIT
System property for storing and retrieving the time the plugin system will wait for the enabling of a plugin in seconds.- Since:
- 2.3.6
- See Also:
-
DEFAULT_ATLASSIAN_PLUGINS_ENABLE_WAIT_SECONDS
The default number of seconds that a plugin should wait for its dependencies to become enabled. Currently 300s.- Since:
- 3.1.0
- See Also:
-
WEBRESOURCE_FILE_CACHE_SIZE
Used to customise the size of the LRU cache for batch web resources. This effectively controls how many files will be created by the file cache. Providing a negative number results in undefined behaviour.- Since:
- 2.13.0
-
WEBRESOURCE_DISABLE_FILE_CACHE
Used to disable the file cache should that be desired. Setting this value to true will disable the file caching completely for all places it is used.- Since:
- 2.13.0
-
-
Constructor Details
-
PluginUtils
public PluginUtils()
-
-
Method Details
-
doesPluginRequireRestart
Determines if a plugin requires a restart after being installed at runtime. Looks for the annotationRequiresRestarton 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
-
getPluginModulesThatRequireRestart
Gets a list of all the module keys in a plugin that require restart. Looks for the annotationRequiresRestarton the plugin's module descriptors.- Parameters:
plugin- The plugin- Returns:
- A unique set of module keys
- Since:
- 2.5.0
-
doesModuleElementApplyToApplication
public static boolean doesModuleElementApplyToApplication(org.dom4j.Element element, Set<Application> applications, InstallationMode installationMode) Determines if a module element applies to the current application by matching the 'application' attribute to the set of applications. If the application is specified, but isn't in the set, we return false- Parameters:
element- The module elementapplications- The set of application applications- Returns:
- True if it should apply, false otherwise
- Since:
- 2.2.0
-
getDefaultEnablingWaitPeriod
public static int getDefaultEnablingWaitPeriod()- Returns:
- The default enabling waiting period in seconds
- Since:
- 2.3.6
-
isAtlassianDevMode
public static boolean isAtlassianDevMode()
-