|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.fmj.registry.Registry
public class Registry
This is a registry of Plugins, Protocol prefixes, Content prefixes, and MIME types. The registry may be serialized to an XML. The XML file is nominally located in ${user.home}/.fmj.registry.xml This object is used by the PackageManager and the PluginManager for persisting data across sessions. Currently the Registry does not store the supported input and output formats for Plugins. This may be supported by adding CDATA sections that are serialized Format objects. However, it would be good to be able to clear the stored formats, and refresh the supported formats by introspecting the Plugins. Sometimes the installed plugins may be updated, and the list of supported formats may change for the same plugin class. Nevertheless, the present situation is that the PluginManager will need to determine supported formats upon loading informatin from this Registry. TODO separate the persistence mechanism from this object, so that it may be updated/plugged-in. TODO perhaps remove reliance on JDOM. Although JDOM makes it easy to program, it is another jar to ship.
Field Summary | |
---|---|
static int |
NUM_PLUGIN_TYPES
|
Method Summary | |
---|---|
boolean |
addDevice(CaptureDeviceInfo newDevice)
|
void |
addMimeType(java.lang.String extension,
java.lang.String type)
|
void |
commit()
Write the registry to file. |
java.util.Vector<java.lang.String> |
getContentPrefixList()
|
java.lang.String |
getDefaultExtension(java.lang.String mimeType)
|
java.util.Vector<CaptureDeviceInfo> |
getDeviceList()
|
java.util.List |
getExtensions(java.lang.String mimeType)
|
static Registry |
getInstance()
Get the singleton. |
java.util.Hashtable |
getMimeTable()
|
java.lang.String |
getMimeType(java.lang.String extension)
|
java.util.List<java.lang.String> |
getPluginList(int pluginType)
pluginType = [1..NUM_PLUGIN_TYPES] |
java.util.Vector<java.lang.String> |
getProtocolPrefixList()
|
boolean |
removeDevice(CaptureDeviceInfo device)
|
boolean |
removeMimeType(java.lang.String fileExtension)
|
void |
setContentPrefixList(java.util.List<java.lang.String> list)
Prefices for determining Handlers for content of particular MIME types. |
void |
setPluginList(int pluginType,
java.util.List<java.lang.String> plugins)
Plugin list of PluginInfo objects = { classname, inputFormats, outputFormats, pluginType}; |
void |
setProtocolPrefixList(java.util.List<java.lang.String> list)
Prefices for determining URL Handlers for content delivered via particular protocol. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NUM_PLUGIN_TYPES
Method Detail |
---|
public static Registry getInstance()
public void commit() throws java.io.IOException
java.io.IOException
public java.util.List<java.lang.String> getPluginList(int pluginType)
public void setPluginList(int pluginType, java.util.List<java.lang.String> plugins)
pluginType
- range of [1..NUM_PLUGIN_TYPES]plugins
- public void setProtocolPrefixList(java.util.List<java.lang.String> list)
public java.util.Vector<java.lang.String> getProtocolPrefixList()
public void setContentPrefixList(java.util.List<java.lang.String> list)
public java.util.Vector<java.lang.String> getContentPrefixList()
public void addMimeType(java.lang.String extension, java.lang.String type)
public java.lang.String getMimeType(java.lang.String extension)
public java.lang.String getDefaultExtension(java.lang.String mimeType)
public java.util.Hashtable getMimeTable()
public boolean removeMimeType(java.lang.String fileExtension)
public java.util.List getExtensions(java.lang.String mimeType)
public java.util.Vector<CaptureDeviceInfo> getDeviceList()
public boolean addDevice(CaptureDeviceInfo newDevice)
public boolean removeDevice(CaptureDeviceInfo device)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |