|
2.8.0: 2008-09-08 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.util.PluginInfo
public class PluginInfo
A PluginInfo
object is used to keep information about
external plugin located in a jar file.
Field Summary | |
---|---|
private About |
about
The about information from the plugin |
private String |
className
The classname of the plugin |
private List<PluginConfigInfo> |
configs
The list with belonging configurations |
private static String |
configurationImportFile
The path in a jar-file to the file that holds configurations to import |
private String |
jarPath
The path to the jarfile the plugin is located in. |
private String |
minBaseVersion
The BASE version that the plugin at least requires |
private static String |
xmlFile
The name of a XML-file that holds information about each plugin class in the jar file. |
Constructor Summary | |
---|---|
PluginInfo(String jarPath,
String className,
String minBaseVersion,
About about,
List<PluginConfigInfo> configs)
Creates a new PluginInfo object. |
Method Summary | |
---|---|
About |
getAbout()
Gets the about information that is set for this plugin |
String |
getClassName()
Gets the class name for the plugin |
List<PluginConfigInfo> |
getConfigurations()
Gets information about the configurations that come together with the plugin in the jar. |
String |
getConfigurationsPath()
The path inside a jar to the xml-file that holds the pluginconfigurations that can be imported. |
String |
getJarPath()
Gets the name of the jar file holding this plugin |
String |
getMinBaseVersion()
Gets the lowest version of BASE that the plugin is compatible with |
static List<PluginInfo> |
loadFromJar(File jarFile)
Gets a list with PluginInfo objects, one for every plugin listed
in the base-plugins.xml file, which is located in the jar-file's META-INF
directory. |
private static boolean |
versionCompatible(String version)
Gets if a version is compatible with current major.minor-version of BASE |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String jarPath
private String className
private String minBaseVersion
private About about
private List<PluginConfigInfo> configs
private static final String xmlFile
private static final String configurationImportFile
Constructor Detail |
---|
public PluginInfo(String jarPath, String className, String minBaseVersion, About about, List<PluginConfigInfo> configs)
PluginInfo
object.
jarPath
- The path to the jar file in which the class is located.className
- The plugin's class nameminBaseVersion
- BASE version that the plugin at least requiresabout
- Information about the plugin.configs
- A list with configurations for this plugin.Method Detail |
---|
public static List<PluginInfo> loadFromJar(File jarFile) throws JDOMException
PluginInfo
objects, one for every plugin listed
in the base-plugins.xml file, which is located in the jar-file's META-INF
directory. Plugins which class file couldn't be found or the class doesn't implement
Plugin
will not be included in the list but already
installed plugins will.
jarFile
- The jar file to load the plugin info from.
JDOMException
- If any error loading the XML-documentpublic String getClassName()
public String getJarPath()
public String getMinBaseVersion()
public About getAbout()
public List<PluginConfigInfo> getConfigurations()
public String getConfigurationsPath()
private static boolean versionCompatible(String version)
version
- The version to test
|
2.8.0: 2008-09-08 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |