org.apache.wiki.ui.admin
Class SimpleAdminBean

java.lang.Object
  extended by org.apache.wiki.management.SimpleMBean
      extended by org.apache.wiki.ui.admin.SimpleAdminBean
All Implemented Interfaces:
DynamicMBean, AdminBean, GenericHTTPHandler
Direct Known Subclasses:
CoreBean, PluginBean, SearchManagerBean, UserBean

public abstract class SimpleAdminBean
extends SimpleMBean
implements AdminBean

Provides an easy-to-use interface for JSPWiki AdminBeans, which also are JMX MBeans. This class provides a default interface for the doGet() and doPost() interfaces by using the introspection capabilities of the SimpleMBean.

Since:
2.5.52

Field Summary
protected  WikiEngine m_engine
          Provides access to a WikiEngine instance to which this AdminBean belongs to.
 
Fields inherited from class org.apache.wiki.management.SimpleMBean
m_beanInfo
 
Fields inherited from interface org.apache.wiki.ui.admin.AdminBean
CORE, EDITOR, UNKNOWN
 
Constructor Summary
protected SimpleAdminBean()
          Constructor reserved for subclasses only.
 
Method Summary
 String doGet(WikiContext context)
          By default, this method creates a blob of HTML, listing all the attributes which can be read or written to.
 String doPost(WikiContext context)
          Not implemented yet.
 String getId()
          By default, this method returns the class name of the bean.
 void initialize(WikiEngine engine)
          Initialize the AdminBean by setting up a WikiEngine instance internally.
 
Methods inherited from class org.apache.wiki.management.SimpleMBean
getAttribute, getAttributeNames, getAttributes, getDescription, getMBeanInfo, getMethodNames, invoke, setAttribute, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.wiki.ui.admin.AdminBean
getTitle, getType
 

Field Detail

m_engine

protected WikiEngine m_engine
Provides access to a WikiEngine instance to which this AdminBean belongs to.

Constructor Detail

SimpleAdminBean

protected SimpleAdminBean()
                   throws NotCompliantMBeanException
Constructor reserved for subclasses only.

Throws:
NotCompliantMBeanException
Method Detail

initialize

public void initialize(WikiEngine engine)
Initialize the AdminBean by setting up a WikiEngine instance internally.

Specified by:
initialize in interface AdminBean

doGet

public String doGet(WikiContext context)
By default, this method creates a blob of HTML, listing all the attributes which can be read or written to. If the attribute is read-only, a readonly input widget is created. The value is determined by the toString() method of the attribute.

Specified by:
doGet in interface GenericHTTPHandler
Returns:
the HTML for the bean

doPost

public String doPost(WikiContext context)
Not implemented yet.

Specified by:
doPost in interface GenericHTTPHandler
Returns:
the response string resulting from the POST

getId

public String getId()
By default, this method returns the class name of the bean. This is suitable, if you have a singleton bean.

Specified by:
getId in interface GenericHTTPHandler
Returns:
the identifier for the bean


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.