public class ConfluencePluginUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PARENT_DIRECTORY_PROPERTY_KEY
Setting this system property will place all the plugin system's directories in a particular
parent directory in confluence-home.
|
static String |
PLUGIN_DESCRIPTOR_FILENAME |
Constructor and Description |
---|
ConfluencePluginUtils() |
Modifier and Type | Method and Description |
---|---|
static File |
createDirectoryIfDoesntExist(File directory)
Create a directory if there is no directory, otherwise do nothing.
|
static File |
getPluginsBaseDirectory(String homeLocation) |
static <T> T |
instantiatePluginModule(com.atlassian.plugin.Plugin plugin,
Class<T> cls)
Instantiates a plugin module.
|
public static final String PLUGIN_DESCRIPTOR_FILENAME
public static final String PARENT_DIRECTORY_PROPERTY_KEY
public static <T> T instantiatePluginModule(com.atlassian.plugin.Plugin plugin, Class<T> cls)
ContainerManagedPlugin
is implemented, otherwise falls back to creation and autowiring by the internal Spring container.plugin
- The plugin that contains the modulecls
- The class to instantiate and autowirepublic static File createDirectoryIfDoesntExist(File directory)
commons.io.FileUtils.forceMkdir()
instead as it has more
explicit error handling.directory
- the directory to create.com.atlassian.core.exception.InfrastructureException
- if a directory could not be created at that locationCopyright © 2003–2020 Atlassian. All rights reserved.