|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--blackboard.platform.plugin.PlugInManager
The PlugInManager is responsible for maintaining plugin
definitions for the system. It acts as a broker for application code
to access plugin definitions, and organizes plugins based on which
virtual installation they were installed to.
Additionally, the PlugInManager is responsible for initializing system
permissions for PlugIns as they are loaded into the system.
Within a virtual installation, plugins are uniquely identified by their
unique handle, a combination of two pieces of information: the vendor id, and the
handle. An example would be something like bb-webeq. However, file system
and URL references include the bbuid associated with the virtual installation.
E.g., bb-webeq-[vid] is the URL.
File system is laid out a little differently from the URL, /vi/[vid]/plugins/bb-webeq/webapp for the executable code, and /plugins/bbuid/bb-webeq/config for configuration data.
PlugIn| Field Summary | |
static java.lang.String |
BUILDING_BLOCKS_CATALOG
|
| Constructor Summary | |
PlugInManager()
|
|
| Method Summary | |
void |
deactivatePlugIn(Id id)
Sets plugins status to inactive and unregisters the webapp |
void |
disablePlugIn(Id id)
Disables the plugin specified by Id. |
void |
enablePlugIn(Id id)
Enables the specified plugin. |
java.util.List |
getAvailableContentHandlers()
Deprecated. a filtering iterator is the preferred method for getting this information |
java.util.List |
getAvailablePlugIns()
Deprecated. plugin availability can be determined either through a filtering interator, or by examining the available property directly. |
ContentHandler |
getContentHandler(java.lang.String handle)
Returns the ContentHandler for the given handle in the current
virtual installation. |
java.util.List |
getContentHandlers()
Returns a list of installed content handlers. |
Version |
getPlatformVersion()
Returns the current platform version. |
PlugIn |
getPlugIn(Id id)
Returns the PlugIn identified by the specified Id. |
protected PlugIn |
getPlugIn(Id id,
VirtualInstallation vi)
Simply returns the identified plugin for the specified virtual installation |
PlugIn |
getPlugIn(java.lang.String vid,
java.lang.String handle)
Returns the plug-in for the given vendor id and handle. |
java.io.File |
getPlugInDir(PlugIn plugIn)
Gets the root directory for a plugin |
java.util.List |
getPlugIns()
Returns a list of installed plug-ins. |
java.io.File |
getPlugInsConfigDirectory()
Deprecated. due to virtual installation layout changes, this method is no longer valid. Use PlugInConfig instead. |
java.io.File |
getPlugInsDirectory(VirtualInstallation vi)
Returns the plug-ins directory. |
java.lang.Class |
getServiceInterface()
Returns the Class for this interface implementation. |
java.io.File |
getTempDirectory()
Returns the upload temp space. |
void |
refreshCachedInfo()
Loads the plugin and content handler definitions into an in-memory cache. |
void |
registerModule(Module module,
java.sql.Connection conn)
Registers the specified module in the database. |
void |
reInit()
|
protected void |
removeNavigationItemCache()
Internal method to update all relevant loaders to refresh caches |
void |
removePlugIn(Id id)
Deletes the specified plugin. |
void |
serviceInit(ConfigurationService config)
Initialization method called by framework at system startup. |
void |
serviceShutdown()
Implementation method required for service implementations. |
void |
serviceStartup()
Implementation method required for service implementations. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String BUILDING_BLOCKS_CATALOG
| Constructor Detail |
public PlugInManager()
| Method Detail |
public void serviceInit(ConfigurationService config)
throws InitializationException
config - configuration service for application
InitializationException - thrown if the it cannot access required services,
or cannot load the plugin data into the cache
public void refreshCachedInfo()
throws InitializationException
InitializationException - thrown if the data cannot be loaded for
any reason. This should result in a fatal startup error.
public void reInit()
throws PersistenceException
PersistenceExceptionpublic java.lang.Class getServiceInterface()
public void serviceShutdown()
public void serviceStartup()
public java.io.File getPlugInsConfigDirectory()
PlugInConfig instead.
null. See below.public java.io.File getTempDirectory()
public Version getPlatformVersion()
public PlugIn getPlugIn(java.lang.String vid,
java.lang.String handle)
vid - the vendor id. Typically this is a four character alphanumeric keyhandle - a unique key assigned by the vendor. Typically this is simply an
alphanumeric key.
PlugIn matching the vendor id and handle within
the current VirtualInstallation. If no VirtualInstallation
is detected, null is returned.public PlugIn getPlugIn(Id id)
PlugIn identified by the specified Id. The object
is retrieved from the current VirtualInstallation cache. If no Virtual Installation
is currently set, null is returned.
id - Id of the plugin to return
null if Virtual Installation is not set, or if there
is no matching PlugIn.
protected PlugIn getPlugIn(Id id,
VirtualInstallation vi)
id - Id of the plugin to retrieve.vi - Virtual Installation containing plugin
public java.util.List getPlugIns()
VirtualInstallation.
If no VirtualInstallation is detected, null is returned.public java.util.List getAvailablePlugIns()
public ContentHandler getContentHandler(java.lang.String handle)
ContentHandler for the given handle in the current
virtual installation.
handle - the unique string handle for the plugin
ContentHandler installed in the current virtual installation.
If a virtual installation is not obtained from context, null is returned.public java.util.List getContentHandlers()
null is returnedpublic java.util.List getAvailableContentHandlers()
public void removePlugIn(Id id)
throws PersistenceException
id - plugin to remove
PersistenceException - thrown if the database cannot be updated. The plugin remains enabled.
public void disablePlugIn(Id id)
throws PersistenceException
id - plugin to disable.
PersistenceException
public void enablePlugIn(Id id)
throws PersistenceException
id - plugin to enable
PersistenceException
public void deactivatePlugIn(Id id)
throws PersistenceException
id - plugin to deactivate
PersistenceException
public void registerModule(Module module,
java.sql.Connection conn)
throws PersistenceException
module - Module to persistconn - Database connection. Caller is assumed to control the transaction.
PersistenceExceptionprotected void removeNavigationItemCache()
public java.io.File getPlugInDir(PlugIn plugIn)
plugIn - plugin to retrieve directory
public java.io.File getPlugInsDirectory(VirtualInstallation vi)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||