public class ConfluencePluginUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONFLUENCE_APPLICATION_KEY
Deprecated.
since 3.4
|
static Set<String> |
CONFLUENCE_APPLICATION_KEYS
Deprecated.
since 3.4
|
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 |
createDirectoryIfDoesntExist(String directoryLocation)
Deprecated.
since 4.0. Use
createDirectoryIfDoesntExist(java.io.File) , or better still use
commons.io.FileUtils.forceMkdir() directly. |
static File |
getBundledPluginDirectory(BootstrapManager bootstrapManager)
Deprecated.
since 3.4, use com.atlassian.confluence.plugin.PluginDirectoryProvider#getBundledPluginDirectory
If running before bootstrap use getBundledPluginDirectory(HomeLocator homeLocator), the homeLocator
returns the correct confluence home even if bootstrap hasn't been initialised.
|
static File |
getBundledPluginDirectory(com.atlassian.config.HomeLocator homeLocator)
Deprecated.
since 3.4, use com.atlassian.confluence.plugin.PluginDirectoryProvider#getBundledPluginDirectory
Finds the bundled plugins directory in the confluence home. If it doesn't
exist the directory is created.
|
static File |
getPluginDirectory(BootstrapManager bootstrapManager)
Deprecated.
since 3.4, use com.atlassian.confluence.plugin.PluginDirectoryProvider#getPluginDirectory
|
static File |
getPluginsBaseDirectory(String homeLocation) |
static File |
getPluginsPersistentCacheDirectory(BootstrapManager bootstrapManager)
Deprecated.
since 3.4, use com.atlassian.confluence.plugin.PluginDirectoryProvider#getPluginsPersistentCacheDirectory
If running before bootstrap use getBundledPluginDirectory(HomeLocator homeLocator), the homeLocator
returns the correct confluence home even if bootstrap hasn't been initialised.
|
static File |
getPluginsPersistentCacheDirectory(com.atlassian.config.HomeLocator homeLocator)
Deprecated.
since 3.4, use com.atlassian.confluence.plugin.PluginDirectoryProvider#getPluginsPersistentCacheDirectory
Finds the plugins persistent cache directory in the confluence home. If it doesn't
exist the directory is created.
|
static File |
getPluginTempDirectory(BootstrapManager bootstrapManager)
Deprecated.
since 3.4, use com.atlassian.confluence.plugin.PluginDirectoryProvider#getPluginTempDirectory
If running before bootstrap use getPluginTempDirectory(HomeLocator homeLocator), the homeLocator
returns the correct confluence home even if bootstrap hasn't been initialised.
|
static File |
getPluginTempDirectory(com.atlassian.config.HomeLocator homeLocator)
Deprecated.
since 3.4, use com.atlassian.confluence.plugin.PluginDirectoryProvider#getPluginTempDirectory
Finds the plugins-temp directory in the confluence home. If it doesn't
exist the directory is created.
|
static <T> T |
instantiatePluginModule(com.atlassian.plugin.Plugin plugin,
Class<T> cls)
Instantiates a plugin module.
|
@Deprecated public static final String CONFLUENCE_APPLICATION_KEY
@Deprecated public static final Set<String> CONFLUENCE_APPLICATION_KEYS
public static final String PLUGIN_DESCRIPTOR_FILENAME
public static final String PARENT_DIRECTORY_PROPERTY_KEY
@Deprecated public static File getPluginDirectory(BootstrapManager bootstrapManager)
bootstrapManager
- - used to get the confluence home directory@Deprecated public static File getPluginTempDirectory(BootstrapManager bootstrapManager)
bootstrapManager
- - used to get the confluence home directory@Deprecated public static File getPluginTempDirectory(com.atlassian.config.HomeLocator homeLocator)
homeLocator
- - used to get the confluence home directory@Deprecated public static File getBundledPluginDirectory(BootstrapManager bootstrapManager)
bootstrapManager
- - used to get the confluence home directory@Deprecated public static File getBundledPluginDirectory(com.atlassian.config.HomeLocator homeLocator)
homeLocator
- - used to get the confluence home directory@Deprecated public static File getPluginsPersistentCacheDirectory(BootstrapManager bootstrapManager)
bootstrapManager
- - used to get the confluence home directory@Deprecated public static File getPluginsPersistentCacheDirectory(com.atlassian.config.HomeLocator homeLocator)
homeLocator
- - used to get the confluence home directorypublic 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 autowire@Deprecated public static File createDirectoryIfDoesntExist(String directoryLocation)
createDirectoryIfDoesntExist(java.io.File)
, or better still use
commons.io.FileUtils.forceMkdir()
directly.public 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–2016 Atlassian. All rights reserved.