Package org.apache.felix.webconsole
Class SimpleWebConsolePlugin
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.felix.webconsole.AbstractWebConsolePlugin
org.apache.felix.webconsole.SimpleWebConsolePlugin
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
Deprecated.
SimpleWebConsolePlugin is an utility class that provides default
implementation of the
AbstractWebConsolePlugin
and supports the
following features:
- Methods for (un)registering the web console plugin service
- Default implementation for resource loading
- See Also:
-
Field Summary
Fields inherited from class org.apache.felix.webconsole.AbstractWebConsolePlugin
ATTR_FILEUPLOAD, ATTR_FILEUPLOAD_REPO, GET_RESOURCE_METHOD_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleWebConsolePlugin
(String label, String title, String[] css) Deprecated.Creates new Simple Web Console Plugin with the default category (null
)SimpleWebConsolePlugin
(String label, String title, String category, String[] css) Deprecated.Creates new Simple Web Console Plugin with the given category. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(BundleContext bundleContext) Deprecated.This method is called from the Felix Web Console to ensure the AbstractWebConsolePlugin is correctly setup.void
Deprecated.This method will close all service trackers, created bygetService(String)
method.Deprecated.This method should return category string which will be used to render the plugin in the navigation menu.final String
getLabel()
Deprecated.Retrieves the label.final Object
getService
(String serviceName) Deprecated.Gets the service with the specified class name.Deprecated.Returns the title for this plugin as returned byAbstractWebConsolePlugin.getTitle()
final String
getTitle()
Deprecated.Retrieves the title of the plug-in.final SimpleWebConsolePlugin
Deprecated.This is an utility method.final void
Deprecated.An utility method that removes the service, registered by theregister(BundleContext)
method.Methods inherited from class org.apache.felix.webconsole.AbstractWebConsolePlugin
getBrandingPlugin, getBundle, getParameter, getVariableResolver, log, log, setBrandingPlugin, setLogLevel
Methods inherited from class javax.servlet.http.HttpServlet
service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, init, log, log
-
Constructor Details
-
SimpleWebConsolePlugin
Deprecated.Creates new Simple Web Console Plugin with the default category (null
)- Parameters:
label
- the front label. SeeAbstractWebConsolePlugin.getLabel()
title
- the plugin title . SeeAbstractWebConsolePlugin.getTitle()
css
- the additional plugin CSS. SeeAbstractWebConsolePlugin.getCssReferences()
-
SimpleWebConsolePlugin
Deprecated.Creates new Simple Web Console Plugin with the given category.- Parameters:
label
- the front label. SeeAbstractWebConsolePlugin.getLabel()
title
- the plugin title . SeeAbstractWebConsolePlugin.getTitle()
category
- the plugin's navigation category. SeeAbstractWebConsolePlugin.getCategory()
css
- the additional plugin CSS. SeeAbstractWebConsolePlugin.getCssReferences()
-
-
Method Details
-
activate
Deprecated.Description copied from class:AbstractWebConsolePlugin
This method is called from the Felix Web Console to ensure the AbstractWebConsolePlugin is correctly setup. It is called right after the Web Console receives notification for plugin registration.- Overrides:
activate
in classAbstractWebConsolePlugin
- Parameters:
bundleContext
- the context of the plugin bundle
-
getServletName
Deprecated.Description copied from class:AbstractWebConsolePlugin
Returns the title for this plugin as returned byAbstractWebConsolePlugin.getTitle()
- Specified by:
getServletName
in interfaceServletConfig
- Overrides:
getServletName
in classAbstractWebConsolePlugin
- Returns:
- the name of this servlet instance
- See Also:
-
getLabel
Deprecated.Description copied from class:AbstractWebConsolePlugin
Retrieves the label. This is the last component in the servlet path. This method MUST be overridden, if theAbstractWebConsolePlugin()
constructor is used.- Specified by:
getLabel
in classAbstractWebConsolePlugin
- Returns:
- the label.
- See Also:
-
getTitle
Deprecated.Description copied from class:AbstractWebConsolePlugin
Retrieves the title of the plug-in. It is displayed in the page header and is also included in the title of the HTML document. This method MUST be overridden, if theAbstractWebConsolePlugin()
constructor is used.- Specified by:
getTitle
in classAbstractWebConsolePlugin
- Returns:
- the plugin title.
- See Also:
-
getCategory
Deprecated.Description copied from class:AbstractWebConsolePlugin
This method should return category string which will be used to render the plugin in the navigation menu. Default implementation returns null, which will result in the plugin link rendered as top level menu item. Concrete implementations wishing to be rendered as a sub-menu item under a category should override this method and return a string or definefelix.webconsole.category
OSGi property. Currently only single level categories are supported. So, this should be a simple String.- Overrides:
getCategory
in classAbstractWebConsolePlugin
- Returns:
- category
- See Also:
-
register
Deprecated.This is an utility method. It is used to register the plugin service. Don't forget to call theunregister()
when the plugin is no longer needed.- Parameters:
bc
- the bundle context used for service registration.- Returns:
- self
-
unregister
public final void unregister()Deprecated.An utility method that removes the service, registered by theregister(BundleContext)
method. -
getService
Deprecated.Gets the service with the specified class name. Will create a newServiceTracker
if the service is not already got.- Parameters:
serviceName
- the service name to obtain- Returns:
- the service or
null
if missing.
-
deactivate
public void deactivate()Deprecated.This method will close all service trackers, created bygetService(String)
method. If you override this method, don't forget to call the super.- Overrides:
deactivate
in classAbstractWebConsolePlugin
- See Also:
-
AbstractServlet