Package de.xima.fc.plugin
Class PluginHelper
- java.lang.Object
-
- de.xima.fc.plugin.PluginHelper
-
public class PluginHelper extends Object
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description PluginHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T extends IFCPlugin>
booleancanPluginBeRegistered(PluginRuntime prtm, Class<T> pluginClass)
static EPluginCompatibility
checkPluginVersion(PluginManifest manifest)
static EPluginCompatibility
checkPluginVersion(String requiredFCVersionStr)
static org.reflections.Reflections
createReflections(File file)
Creates reflections for the given file if it is an jarstatic List<? extends Class<? extends IFCPlugin>>
getAllPlugins(PluginRuntime pluginRuntime)
static List<? extends Class<? extends IFCPlugin>>
getAllPlugins(org.reflections.Reflections reflect)
static List<IBundleProperties>
getBundleProperties(org.reflections.Reflections reflect)
Method to loadIBundleProperties
from the givenReflections
static String
getDisplayName(IFCPlugin plugin, Locale locale)
Returns the display name of the plugin if it is not null.static File
getPluginFolder(PluginRuntime runtime)
Deprecated.static File
getPluginFolder(String scopeKey, String runtimeKey)
Deprecated.static File
getPluginJarFile(PluginRuntime rtm)
Deprecated.static File
getPluginJarFile(String scopeKey, String runtimeKey)
Deprecated.static PluginManifest
getPluginManifest(PluginRuntime pluginRuntime)
static PluginManifest
getPluginManifest(File jarFile)
static File
getPluginMetaFile(PluginRuntime rtm)
Deprecated.static File
getPluginMetaFile(String scopeKey, String runtimeKey)
Deprecated.static org.apache.commons.configuration.PropertiesConfiguration
getPluginProperties(PluginRuntime rtm)
Deprecated.static org.apache.commons.configuration.PropertiesConfiguration
getPluginProperties(String scopeKey, String runtimeKey)
Deprecated.static File
getPluginPropertiesFile(PluginRuntime rtm)
Deprecated.static File
getPluginPropertiesFile(String scopeKey, String runtimeKey)
Deprecated.static String
getScopeKey(Mandant man)
Deprecated.static boolean
hasRemotePlugins(org.reflections.Reflections reflect)
static boolean
hasServerTypeAnnotation(org.reflections.Reflections reflections)
Checks forFcServerType
annotation inside a givenReflections
object.static boolean
isPluginJar(File file)
Tests if the given file is a jar and contains FORMCYCLE-plugins of the typeIFCPlugin
static boolean
isSystemScope(String scopeKey)
static <T extends IFCPlugin>
TregisterPlugin(boolean install, boolean initialize, PluginRuntime prtm, Class<T> clazz)
static void
removeJarFileCacheEntries(JarFile jarToDelete)
Deprecated.static void
savePluginProperties(PluginRuntime rtm, Properties props)
Deprecated.static void
savePluginProperties(String scopeKey, String runtimeKey, Properties props)
Deprecated.
-
-
-
Method Detail
-
checkPluginVersion
public static EPluginCompatibility checkPluginVersion(PluginManifest manifest)
-
checkPluginVersion
public static EPluginCompatibility checkPluginVersion(String requiredFCVersionStr)
-
getPluginManifest
public static PluginManifest getPluginManifest(PluginRuntime pluginRuntime)
-
getPluginManifest
public static PluginManifest getPluginManifest(File jarFile)
-
registerPlugin
public static <T extends IFCPlugin> T registerPlugin(boolean install, boolean initialize, PluginRuntime prtm, Class<T> clazz) throws InstantiationException, IllegalAccessException, FCPluginException
-
canPluginBeRegistered
public static <T extends IFCPlugin> boolean canPluginBeRegistered(PluginRuntime prtm, Class<T> pluginClass)
-
isSystemScope
public static boolean isSystemScope(String scopeKey)
-
isPluginJar
public static boolean isPluginJar(File file)
Tests if the given file is a jar and contains FORMCYCLE-plugins of the typeIFCPlugin
-
getBundleProperties
public static List<IBundleProperties> getBundleProperties(org.reflections.Reflections reflect)
Method to loadIBundleProperties
from the givenReflections
- Parameters:
reflect
-Reflections
- Returns:
- IBundleProperties
-
createReflections
public static org.reflections.Reflections createReflections(File file) throws MalformedURLException
Creates reflections for the given file if it is an jar- Parameters:
file
-File
- Returns:
Reflections
- Throws:
MalformedURLException
- if the file-url is malformed
-
getAllPlugins
public static List<? extends Class<? extends IFCPlugin>> getAllPlugins(org.reflections.Reflections reflect)
-
getAllPlugins
public static List<? extends Class<? extends IFCPlugin>> getAllPlugins(PluginRuntime pluginRuntime)
-
hasRemotePlugins
public static boolean hasRemotePlugins(org.reflections.Reflections reflect)
-
hasServerTypeAnnotation
public static boolean hasServerTypeAnnotation(org.reflections.Reflections reflections)
Checks forFcServerType
annotation inside a givenReflections
object.- Parameters:
reflections
-- Returns:
true
if anyFcServerType
annotation was found, otherwisefalse
-
getDisplayName
public static String getDisplayName(IFCPlugin plugin, Locale locale)
Returns the display name of the plugin if it is not null. Otherwise returns the plugin name.
-
removeJarFileCacheEntries
@Deprecated public static void removeJarFileCacheEntries(JarFile jarToDelete)
Deprecated.
-
getScopeKey
@Deprecated public static String getScopeKey(Mandant man)
Deprecated.
-
getPluginFolder
@Deprecated public static File getPluginFolder(PluginRuntime runtime)
Deprecated.
-
getPluginFolder
@Deprecated public static File getPluginFolder(String scopeKey, String runtimeKey)
Deprecated.
-
getPluginPropertiesFile
@Deprecated public static File getPluginPropertiesFile(PluginRuntime rtm)
Deprecated.
-
getPluginPropertiesFile
@Deprecated public static File getPluginPropertiesFile(String scopeKey, String runtimeKey)
Deprecated.
-
getPluginMetaFile
@Deprecated public static File getPluginMetaFile(PluginRuntime rtm)
Deprecated.
-
getPluginMetaFile
@Deprecated public static File getPluginMetaFile(String scopeKey, String runtimeKey)
Deprecated.
-
getPluginJarFile
@Deprecated public static File getPluginJarFile(PluginRuntime rtm)
Deprecated.
-
getPluginJarFile
@Deprecated public static File getPluginJarFile(String scopeKey, String runtimeKey)
Deprecated.
-
savePluginProperties
@Deprecated public static void savePluginProperties(PluginRuntime rtm, Properties props) throws IOException
Deprecated.- Throws:
IOException
-
savePluginProperties
@Deprecated public static void savePluginProperties(String scopeKey, String runtimeKey, Properties props) throws IOException
Deprecated.- Throws:
IOException
-
getPluginProperties
@Deprecated public static org.apache.commons.configuration.PropertiesConfiguration getPluginProperties(PluginRuntime rtm)
Deprecated.
-
getPluginProperties
@Deprecated public static org.apache.commons.configuration.PropertiesConfiguration getPluginProperties(String scopeKey, String runtimeKey)
Deprecated.
-
-