|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.freehep.application.studio.PluginMap
public class PluginMap
Data structure that supports operations on installed plugins and libraries. FIXME: 1. getActivePlugins is called again from getActiveLibraries 2. do I need version checking in getActivePlugins ?
Constructor Summary | |
---|---|
PluginMap(Studio application)
Constructs PluginMap by scanning application extension directories. |
Method Summary | |
---|---|
PluginMap |
add(Collection<PluginInfo> plugins)
Creates a PluginMap that can be used to download and install the specified plugins. |
boolean |
commit(PluginMap update)
Installs plugins and libraries contained in the update map. |
Map<String,LibInfo> |
getActiveLibraries()
|
Map<String,PluginInfo> |
getActivePlugins()
Returns a map of names to descriptors for all currently active plugins. |
Set<PluginInfo> |
getDependentPlugins(PluginInfo plugin)
Returns a set of dependents (direct and transient) of the specified plugin. |
Map<File,String> |
getDownloads()
Returns a "path to url" map of library files in this map. |
URL[] |
getExtensionClasspath()
|
List<LibInfo> |
getLibraries()
Returns a list of all library descriptors in this map. |
LibInfo |
getLibrary(String id,
PluginDir dir)
Returns library descriptor for the specified ID and directory. |
PluginInfo |
getPlugin(String name)
Returns active plugin descriptor with the specified name. |
PluginInfo |
getPlugin(String name,
PluginDir dir)
Returns a plugin descriptor for the specified plugin name and directory. |
List<PluginInfo> |
getPlugins()
Returns a list of all plugin descriptors in this map. |
Map<String,PluginInfo> |
getPlugins(PluginDir dir)
Returns a map of plugin names to descriptors in the specified directory. |
void |
purge()
Purges unused libraries. |
boolean |
remove(Collection<PluginInfo> plugins)
Removes the specified plugins from this map and deletes (or marks for deletion) the files that are no longer needed. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginMap(Studio application)
Method Detail |
---|
public PluginMap add(Collection<PluginInfo> plugins)
getDownloads()
.
Once the files are downloaded, it can be passed to the master map's #commit()
method to install or update the plugins.
plugins
- Collection of plugins to be installed.
Must contain all required dependencies.
public boolean commit(PluginMap update)
update
-
public boolean remove(Collection<PluginInfo> plugins)
plugins
- Collection of plugins to be removed.
Should not contain dependencies of other plugins - no checking is done by this method.
public Map<File,String> getDownloads()
add(java.util.Collection)
.
public void purge()
public Map<String,PluginInfo> getActivePlugins()
public Map<String,LibInfo> getActiveLibraries()
public URL[] getExtensionClasspath()
public List<PluginInfo> getPlugins()
public Map<String,PluginInfo> getPlugins(PluginDir dir)
public PluginInfo getPlugin(String name)
public PluginInfo getPlugin(String name, PluginDir dir)
public List<LibInfo> getLibraries()
public LibInfo getLibrary(String id, PluginDir dir)
public Set<PluginInfo> getDependentPlugins(PluginInfo plugin)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |