org.apache.felix.ipojo.webconsole
Class IPOJOPlugin

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.felix.webconsole.AbstractWebConsolePlugin
              extended by org.apache.felix.ipojo.webconsole.IPOJOPlugin
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class IPOJOPlugin
extends AbstractWebConsolePlugin

iPOJO Web Console plugin.

Author:
Felix Project Team
See Also:
Serialized Form

Field Summary
protected  String[] m_css
          CSS files used by the plugin.
 
Fields inherited from class org.apache.felix.webconsole.AbstractWebConsolePlugin
ATTR_FILEUPLOAD, GET_RESOURCE_METHOD_NAME
 
Constructor Summary
IPOJOPlugin()
          Instantiates the plugin.
 
Method Summary
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
          Endpoint dealing with JSON requests.
protected  String[] getCssReferences()
          Get the CSS used by the plugin.
 String getLabel()
          Gets the plugin label.
 URL getResource(String path)
          Allows loading the 'ui' folder as web resource.
 String getTitle()
          Gets the plugin title.
protected  void renderContent(HttpServletRequest request, HttpServletResponse response)
          This methods is called by the web console when the plugin is required.
 
Methods inherited from class org.apache.felix.webconsole.AbstractWebConsolePlugin
activate, deactivate, endResponse, getBrandingPlugin, getBundle, getBundleContext, getParameter, getResourceProvider, getServletName, isHtmlRequest, log, log, readTemplateFile, 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
 

Field Detail

m_css

protected String[] m_css
CSS files used by the plugin.

Constructor Detail

IPOJOPlugin

public IPOJOPlugin()
Instantiates the plugin. This method loads all template files.

Method Detail

renderContent

protected void renderContent(HttpServletRequest request,
                             HttpServletResponse response)
                      throws ServletException,
                             IOException
This methods is called by the web console when the plugin is required. This methods writes the corresponding page (loads template and set variables).

Specified by:
renderContent in class AbstractWebConsolePlugin
Parameters:
request - the request
response - the response
Throws:
ServletException - something bad happened
IOException - something bad happened
See Also:
AbstractWebConsolePlugin.renderContent( javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Endpoint dealing with JSON requests.

Overrides:
doGet in class AbstractWebConsolePlugin
Parameters:
request - the request
response - the response
Throws:
ServletException - if an error occurred
IOException - if an error occurred
See Also:
(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

getResource

public URL getResource(String path)
Allows loading the 'ui' folder as web resource.

Parameters:
path - the resource path
Returns:
the internal resource url.

getLabel

public String getLabel()
Gets the plugin label.

Specified by:
getLabel in class AbstractWebConsolePlugin
Returns:
the label.
See Also:
AbstractWebConsolePlugin.getLabel()

getTitle

public String getTitle()
Gets the plugin title.

Specified by:
getTitle in class AbstractWebConsolePlugin
Returns:
the title
See Also:
AbstractWebConsolePlugin.getTitle()

getCssReferences

protected String[] getCssReferences()
Get the CSS used by the plugin.

Overrides:
getCssReferences in class AbstractWebConsolePlugin
Returns:
the list of CSS
See Also:
AbstractWebConsolePlugin.getCssReferences()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.