Package com.netscape.cmscore.registry
Class PluginRegistry
- java.lang.Object
-
- com.netscape.cmscore.registry.PluginRegistry
-
public class PluginRegistry extends java.lang.Object
This represents the registry subsystem that manages mulitple types of plugin information. The plugin information includes id, name, classname, and description.
-
-
Constructor Summary
Constructors Constructor Description PluginRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPluginInfo(java.lang.String type, java.lang.String id, com.netscape.certsrv.registry.IPluginInfo info)
void
addPluginInfo(java.lang.String type, java.lang.String id, com.netscape.certsrv.registry.IPluginInfo info, int saveConfig)
com.netscape.certsrv.registry.IPluginInfo
createPluginInfo(java.lang.String name, java.lang.String desc, java.lang.String classPath)
IConfigStore
getConfigStore()
Returns the root configuration storage of this system.IConfigStore
getFileConfigStore()
Returns handle to the registry configuration file.java.util.Enumeration<java.lang.String>
getIds(java.lang.String type)
Returns a list of identifiers of the given type.com.netscape.certsrv.registry.IPluginInfo
getPluginInfo(java.lang.String type, java.lang.String id)
Retrieves the plugin information.java.util.Enumeration<java.lang.String>
getTypeNames()
Returns all type names.void
init(IConfigStore config, java.lang.String defaultRegistryFile)
Initializes this subsystem with the given configuration store.void
loadPlugin(IConfigStore config, java.lang.String type, java.lang.String id)
Load plugins of the given type.void
loadPlugins(IConfigStore config, java.lang.String type)
Load plugins of the given type.void
rebuildConfigStore(java.util.Locale locale)
void
removePluginInfo(java.lang.String type, java.lang.String id)
void
shutdown()
Stops this system.void
startup()
Notifies this subsystem if owner is in running mode.
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(IConfigStore config, java.lang.String defaultRegistryFile) throws java.lang.Exception
Initializes this subsystem with the given configuration store.- Parameters:
config
- configuration store- Throws:
EBaseException
- failed to initializejava.lang.Exception
-
loadPlugins
public void loadPlugins(IConfigStore config, java.lang.String type) throws EBaseException
Load plugins of the given type.- Throws:
EBaseException
-
createPluginInfo
public com.netscape.certsrv.registry.IPluginInfo createPluginInfo(java.lang.String name, java.lang.String desc, java.lang.String classPath)
-
loadPlugin
public void loadPlugin(IConfigStore config, java.lang.String type, java.lang.String id) throws EBaseException
Load plugins of the given type.- Throws:
EBaseException
-
removePluginInfo
public void removePluginInfo(java.lang.String type, java.lang.String id) throws com.netscape.certsrv.registry.ERegistryException
- Throws:
com.netscape.certsrv.registry.ERegistryException
-
addPluginInfo
public void addPluginInfo(java.lang.String type, java.lang.String id, com.netscape.certsrv.registry.IPluginInfo info) throws com.netscape.certsrv.registry.ERegistryException
- Throws:
com.netscape.certsrv.registry.ERegistryException
-
addPluginInfo
public void addPluginInfo(java.lang.String type, java.lang.String id, com.netscape.certsrv.registry.IPluginInfo info, int saveConfig) throws com.netscape.certsrv.registry.ERegistryException
- Throws:
com.netscape.certsrv.registry.ERegistryException
-
rebuildConfigStore
public void rebuildConfigStore(java.util.Locale locale) throws com.netscape.certsrv.registry.ERegistryException
- Throws:
com.netscape.certsrv.registry.ERegistryException
-
startup
public void startup() throws EBaseException
Notifies this subsystem if owner is in running mode.- Throws:
EBaseException
-
shutdown
public void shutdown()
Stops this system. The owner may call shutdown anytime after initialization.
-
getConfigStore
public IConfigStore getConfigStore()
Returns the root configuration storage of this system.- Returns:
- configuration store of this subsystem
-
getFileConfigStore
public IConfigStore getFileConfigStore()
Returns handle to the registry configuration file.
-
getTypeNames
public java.util.Enumeration<java.lang.String> getTypeNames()
Returns all type names.
-
getIds
public java.util.Enumeration<java.lang.String> getIds(java.lang.String type)
Returns a list of identifiers of the given type.
-
getPluginInfo
public com.netscape.certsrv.registry.IPluginInfo getPluginInfo(java.lang.String type, java.lang.String id)
Retrieves the plugin information.
-
-