public abstract class Plugin
extends java.lang.Object
Plugin subclass is specified in the plug-in JAR file by using the following property in the
manifest:
Plugin-Class: pluginClassNameThe location of the plug-in JAR file is specified in the IBM Content Navigator
AppConfig.xml file. An
administrator can edit this file by adding the plug-in to the IBM Content Navigator configuration by using the IBM
Content Navigator administration tool.
| Constructor and Description |
|---|
Plugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
applicationAdd(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
Add plug-in from the web client.
|
void |
applicationInit(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
Initializes this plug-in in the web client.
|
void |
applicationRemove(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
Removes this plug-in from the web client.
|
void |
applicationTerminate(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
Terminates this plug-in in the web client.
|
boolean |
awaitScriptLoad()
Returns a Boolean value that indicates whether the web client will wait for the script to finish loading before
proceeding to load the desktop.
|
void |
configurationSaved(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
Provides an option for the plug-in to verify the configuration after saving.
|
java.lang.String |
configurationSaving(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks,
java.lang.String configuration)
Provides an option for the plug-in to update the configuration before saving.
|
PluginAction[] |
getActions()
Provides a list of actions that this plug-in adds to the main toolbar of the web client.
|
PluginAsyncTaskType[] |
getAsyncTaskTypes()
Provides a list of asynchronous task types that are provided by this plug-in.
|
java.lang.String |
getConfigurationDijitClass()
Returns the name of a Dojo
dijit class that provides a configuration interface widget for this
plug-in. |
java.lang.String |
getCopyright()
Provides the copyright license for this plug-in.
|
java.lang.String |
getCSSFileName()
Deprecated.
Use getCSSFileNames() instead.
|
java.lang.String[] |
getCSSFileNames()
Returns the names of CSS files that contains styles for this plug-in.
|
java.lang.String |
getDebugCSSFileName()
Deprecated.
Use getDebugCSSFileNames() instead.
|
java.lang.String[] |
getDebugCSSFileNames()
Returns debug versions of the CSS files returned by getCSSFileNames.
|
java.lang.String |
getDebugScript()
Returns the name of a debug version of the JavaScript file provided by getScript().
|
java.lang.String |
getDojoModule()
Returns the name of a Dojo module or widget that is contained in the resources for this plug-in.
|
java.lang.Class<?>[] |
getEventHandlers()
Provides a list of event handler classes defined by the plug-in.
|
PluginFeature[] |
getFeatures()
Specifies custom features that are provided by this plug-in.
|
java.util.Map<java.lang.String,java.lang.String> |
getGzippedScripts()
Provides a map of script filenames and their corresponding gzipped filenames that are provided by this plug-in.
|
abstract java.lang.String |
getId()
Provides an identifier for the plug-in.
|
java.util.jar.JarFile |
getJarFile()
Returns the JAR file that this plug-in is loaded from.
|
PluginLayout[] |
getLayouts()
Specifies one or more custom layouts that are provided by this plug-in.
|
PluginMenu[] |
getMenus()
Provides a list of menus defined by the plug-in.
|
PluginMenuType[] |
getMenuTypes()
Provides a list of new menu types defined by the plug-in.
|
abstract java.lang.String |
getName(java.util.Locale locale)
Provides a descriptive name for this plug-in.
|
PluginNotificationListener[] |
getNotificationListeners()
Provides a list of plug-in notification listener classes defined by the plug-in.
|
PluginODAuthenticationService |
getODAuthenticationService()
Provides a custom service used for Content Manager OnDemand single sign-on (SSO).
|
PluginOpenAction[] |
getOpenActions()
Provides a list of open actions that this plug-in provides for supported items.
|
PluginAPI[] |
getPluginAPIs()
Provides a list of APIs defined by the plug-in.
|
java.lang.String |
getPluginClassFolderPath() |
java.lang.String[] |
getPluginDependencies()
Provides a list of identifiers (the plug-in Ids) of all the plug-ins that this plug-in depends on.
|
java.lang.String |
getPluginMessageResourcesName()
Returns the base name of the plug-in message resources file.
Example: "com.ibm.ecm.extension.pluginName.nls.ServicesMessages" |
java.lang.String |
getPluginRelativeWebContentPath()
Returns the relative path of the WebContent directory from getPluginClassFolderPath() if the directory is located
outside of the plug-in package.
Example: "../../WebContent" |
static Plugin |
getPluginViaStream(java.io.InputStream pluginInputStream) |
PluginRepositoryType[] |
getRepositoryTypes()
Provides a list of repository types defined by the plug-in.
|
PluginRequestFilter[] |
getRequestFilters()
Provides a list of filters that are run before a requested service.
|
java.io.InputStream |
getResourceAsStream(java.lang.String resourceName) |
java.io.InputStream |
getResourceAsStream(java.lang.String resourceName,
boolean disableCache) |
long |
getResourceDate(java.lang.String resourceName) |
PluginResponseFilter[] |
getResponseFilters()
Provides a list of filters that are run after a requested service.
|
java.lang.Class<?> |
getRestResourceClass()
Allow the plugin to return a REST resource class
|
PluginFeature[] |
getRuntimeFeatures(javax.servlet.http.HttpServletRequest request)
Specifies runtime custom features provided by this plug-in in addition to the features returned by
getFeatures(). |
java.lang.String |
getScript()
Returns the name of a JavaScript file provided by this plug-in.
|
PluginService[] |
getServices()
Provides a list of services that are provided by this plug-in.
|
abstract java.lang.String |
getVersion()
Provides a version indicator for this plug-in.
|
PluginViewerDef[] |
getViewers()
Provides a list of viewers that are provided by this plug-in.
|
boolean |
isInitialized()
Returns a Boolean value that indicates whether this plug-in is loaded and initialized.
|
void |
setInitialized(boolean initialized)
Sets the plug-in initialized status for this plug-in.
|
void |
setJarFile(java.util.jar.JarFile jarFile)
For Internal Use Only.
|
void |
setPluginClassFolderPath(java.lang.String path) |
public final void setPluginClassFolderPath(java.lang.String path)
public final java.lang.String getPluginClassFolderPath()
public void applicationInit(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
throws java.lang.Exception
java.lang.Exceptionpublic void applicationAdd(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
throws java.lang.Exception
java.lang.Exceptionpublic void applicationRemove(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
throws java.lang.Exception
java.lang.Exceptionpublic final boolean isInitialized()
true if the plug-in is loaded and initialized.public final void setInitialized(boolean initialized)
initialized - A Boolean value that indicates whether this plug-in is initialized.public java.lang.String configurationSaving(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks,
java.lang.String configuration)
configuration - The configuration to be savedpublic void configurationSaved(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
public void applicationTerminate(javax.servlet.http.HttpServletRequest request,
PluginServiceCallbacks callbacks)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Class<?> getRestResourceClass()
Class instance that defines one or more REST resources. The root endpoint defined in
the provided class must be the plugin's id (validated during plugin registration). The class will be
added to the set of classes provided by the PluginRestApplication class, accessed via
http(s)://host_name:port/navigator/plugin-rest/plugin_id requests.public final java.util.jar.JarFile getJarFile()
JarFile object for the JAR file that this plug-in is loaded from or
null if the plug-in was loaded from the classpath.public final void setJarFile(java.util.jar.JarFile jarFile)
jarFile - The JAR file that this plug-in is loaded from.public abstract java.lang.String getId()
Important: This identifier is used in path names and URLs so it must contain only alphanumeric characters.
public abstract java.lang.String getName(java.util.Locale locale)
locale - The locale currently in use. The name should be returned in the language for this locale if it is
translated.public abstract java.lang.String getVersion()
String representation of the version indicator for the plug-in.public java.lang.String getCopyright()
String representation of the license for the plug-in.public java.lang.String getScript()
public java.lang.String getDebugScript()
public boolean awaitScriptLoad()
ecm.model.desktop.onPluginLoaded(pluginId)
to notify the web client that it has finished loading. This can be used to guarantee that data retrieved asynchronously
or advising functions declared by the plug-in are available before desktop lifecycle events occur, for example,
onDesktopLoaded and onLogin. Note that the web client will wait up to 10 sec to be notified
by the plug-in so that desktop loading is not blocked by a long running plug-in.true if the web client will wait for the script to finish loading.public java.lang.String getDojoModule()
dojo.registerModulePath mapping to allow modules or widgets with
mapped path names to be loaded by using the dojo.require method. A specified module can be the
directory or package name for a set of Dojo modules or widgets.public java.lang.String getCSSFileName()
public java.lang.String[] getCSSFileNames()
public java.lang.String getDebugCSSFileName()
public java.lang.String[] getDebugCSSFileNames()
public PluginAction[] getActions()
PluginAction objects. The plug-in
should return the same set of objects on every call.public PluginOpenAction[] getOpenActions()
PluginOpenAction objects. The
plug-in should return the same set of objects on every call.public PluginRequestFilter[] getRequestFilters()
PluginRequestFilter objects.public PluginResponseFilter[] getResponseFilters()
PluginResponseFilter objects.public PluginService[] getServices()
PluginService objects. The plug-in should return
the same set of objects on every call. If there are no services defined by the plug-in, the call should
return an empty array.public PluginAsyncTaskType[] getAsyncTaskTypes()
PluginAsyncTaskType objects.
The plug-in should return the same set of objects on every call. If there are no asynchronous tasks
defined by the plug-in, the call should return an empty array.public PluginODAuthenticationService getODAuthenticationService()
PluginODAuthenticationService object used
as an authentication exit for Content Manager OnDemand single sign-on.public java.lang.String getConfigurationDijitClass()
dijit class that provides a configuration interface widget for this
plug-in. The widget must extend the ecm.widget.admin.PluginConfigurationPane widget. An instance of
the widget is created and displayed in the IBM Content Navigator administration tool for configuration that is
specific to the plug-in.
Refer to the documentation on ecm.widget.admin.PluginConfigurationPane for more information on what is required for a plug-in configuration user interface.
public PluginViewerDef[] getViewers()
Note: Typically, a plug-in does not define multiple viewers. However, this method can be used to provide multiple configurations of the same viewer, such as a view-only version and an editing mode version of the same viewer.
public PluginLayout[] getLayouts()
public PluginFeature[] getFeatures()
public PluginFeature[] getRuntimeFeatures(javax.servlet.http.HttpServletRequest request)
getFeatures(). The features are always returned to the client, and therefore, need to be filtered, for example,
per desktop, based on the user access, etc, as needed by the plug-in before returning.request - Request to get parameters from.public PluginMenuType[] getMenuTypes()
public PluginMenu[] getMenus()
public PluginRepositoryType[] getRepositoryTypes()
public PluginAPI[] getPluginAPIs()
public java.lang.String[] getPluginDependencies()
public java.lang.Class<?>[] getEventHandlers()
Observes
or
ObservesAsyncThe first parameter can optionally define other annotations to subscribe to specific events only.
public PluginNotificationListener[] getNotificationListeners()
public java.lang.String getPluginMessageResourcesName()
public java.lang.String getPluginRelativeWebContentPath()
public java.io.InputStream getResourceAsStream(java.lang.String resourceName,
boolean disableCache)
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getResourceAsStream(java.lang.String resourceName)
throws java.io.IOException
java.io.IOExceptionpublic long getResourceDate(java.lang.String resourceName)
throws java.io.IOException
java.io.IOExceptionpublic static Plugin getPluginViaStream(java.io.InputStream pluginInputStream) throws java.lang.Exception
java.lang.Exceptionpublic java.util.Map<java.lang.String,java.lang.String> getGzippedScripts()