|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.felix.webconsole.AbstractWebConsolePlugin
org.apache.felix.webconsole.SimpleWebConsolePlugin
public abstract class SimpleWebConsolePlugin
SimpleWebConsolePlugin is an utility class that provides default
implementation of the AbstractWebConsolePlugin
and supports the
following features:
Field Summary |
---|
Fields inherited from class org.apache.felix.webconsole.AbstractWebConsolePlugin |
---|
ATTR_FILEUPLOAD, GET_RESOURCE_METHOD_NAME |
Constructor Summary | |
---|---|
SimpleWebConsolePlugin(String label,
String title,
String[] css)
Creates new Simple Web Console Plugin. |
Method Summary | |
---|---|
void |
deactivate()
This method will close all service trackers, created by getService(String) method. |
protected String[] |
getCssReferences()
Returns a list of CSS reference paths or null if no
additional CSS files are provided by the plugin. |
String |
getLabel()
Retrieves the label. |
protected URL |
getResource(String path)
Called internally by AbstractWebConsolePlugin to load resources. |
Object |
getService(String serviceName)
Gets the service with the specified class name. |
String |
getTitle()
Retrieves the title of the plug-in. |
SimpleWebConsolePlugin |
register(BundleContext bc)
This is an utility method. |
void |
unregister()
An utility method that removes the service, registered by the register(BundleContext) method. |
Methods inherited from class org.apache.felix.webconsole.AbstractWebConsolePlugin |
---|
activate, doGet, endResponse, getBrandingPlugin, getBundle, getBundleContext, getParameter, getResourceProvider, getServletName, isHtmlRequest, log, log, readTemplateFile, renderContent, renderTopNavigation, sendRedirect, setBrandingPlugin, setLogLevel, startResponse |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleWebConsolePlugin(String label, String title, String[] css)
label
- the front label. See
AbstractWebConsolePlugin.getLabel()
title
- the plugin title . See
AbstractWebConsolePlugin.getTitle()
css
- the additional plugin CSS. See
AbstractWebConsolePlugin.getCssReferences()
Method Detail |
---|
public final String getLabel()
AbstractWebConsolePlugin
AbstractWebConsolePlugin.AbstractWebConsolePlugin()
constructor is used.
getLabel
in class AbstractWebConsolePlugin
AbstractWebConsolePlugin.getLabel()
public final String getTitle()
AbstractWebConsolePlugin
AbstractWebConsolePlugin.AbstractWebConsolePlugin()
constructor is used.
getTitle
in class AbstractWebConsolePlugin
AbstractWebConsolePlugin.getTitle()
protected final String[] getCssReferences()
AbstractWebConsolePlugin
null
if no
additional CSS files are provided by the plugin.
The result is an array of strings which are used as the value of
the href
attribute of the <link>
elements
placed in the head section of the HTML generated. If the reference is
a relative path, it is turned into an absolute path by prepending the
value of the WebConsoleConstants.ATTR_APP_ROOT
request attribute.
getCssReferences
in class AbstractWebConsolePlugin
null
if no such CSS files are required.AbstractWebConsolePlugin.getCssReferences()
protected URL getResource(String path)
AbstractWebConsolePlugin
to load resources.
This particular implementation depends on the label. As example, if the
plugin is accessed as /system/console/abc
, and the plugin
resources are accessed like /system/console/abc/res/logo.gif
,
the code here will try load resource /res/logo.gif
from the
bundle, providing the plugin.
path
- the path to read.
null
if not found.public final SimpleWebConsolePlugin register(BundleContext bc)
unregister()
when the plugin is no longer
needed.
bc
- the bundle context used for service registration.
public final void unregister()
register(BundleContext)
method.
public final Object getService(String serviceName)
ServiceTracker
if the service is not already got.
serviceName
- the service name to obtain
null
if missing.public void deactivate()
getService(String)
method. If you override this method, don't
forget to call the super.
deactivate
in class AbstractWebConsolePlugin
AbstractWebConsolePlugin.deactivate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |