leafchat.core.api
Interface PluginList

All Superinterfaces:
Singleton

public interface PluginList
extends Singleton

Provides a list of all plugins for information and can save a jar file that includes selected plugins for use by plugin developers.


Method Summary
 java.io.File getCoreJar()
          Deprecated. Use getCoreJars() instead
 java.io.File[] getCoreJars()
           
 PluginInfo[] getPluginList()
           
 PluginInfo loadPluginFile(java.io.File f)
          Loads a plugin.
 void saveAPIJar(java.lang.String[] packages, java.io.File target)
          Saves a jar file containing all API classes.
 void unloadPluginFile(PluginInfo plugin)
          Unloads a plugin.
 

Method Detail

getPluginList

PluginInfo[] getPluginList()
Returns:
Array of all plugins installed in the system

getCoreJar

java.io.File getCoreJar()
Deprecated. Use getCoreJars() instead

Used to return the core jar, but there are now multiple core jars.

Returns:
Never returns
Throws:
java.lang.UnsupportedOperationException

getCoreJars

java.io.File[] getCoreJars()
Returns:
leafChat core jar files

loadPluginFile

PluginInfo loadPluginFile(java.io.File f)
                          throws GeneralException
Loads a plugin.

Parameters:
f - File to load
Returns:
Loaded plugin
Throws:
GeneralException - If anything went wrong

unloadPluginFile

void unloadPluginFile(PluginInfo plugin)
                      throws GeneralException
Unloads a plugin.

Parameters:
plugin - Plugin to unload
Throws:
GeneralException - If any error occurs

saveAPIJar

void saveAPIJar(java.lang.String[] packages,
                java.io.File target)
                throws GeneralException
Saves a jar file containing all API classes.

Parameters:
packages - Array of plugin packages to include or null to include all plugin exports.
target - Target jar file (will be overwritten if it exists)
Throws:
GeneralException - If there are any file access errors etc.


Copyright © 2011 Samuel Marshall. All rights reserved.