Package org.apache.wiki.ui.admin.beans
Class ModuleBean
java.lang.Object
org.apache.wiki.management.SimpleMBean
org.apache.wiki.ui.admin.SimpleAdminBean
org.apache.wiki.ui.admin.beans.ModuleBean
- All Implemented Interfaces:
DynamicMBean,AdminBean,GenericHTTPHandler
- Direct Known Subclasses:
FilterBean,PluginBean
public abstract class ModuleBean extends SimpleAdminBean
-
Field Summary
Fields inherited from class org.apache.wiki.ui.admin.SimpleAdminBean
m_engineFields inherited from class org.apache.wiki.management.SimpleMBean
m_beanInfo -
Constructor Summary
Constructors Constructor Description ModuleBean(Engine engine) -
Method Summary
Modifier and Type Method Description protected org.jdom2.ElementcontainerForModuleDetail(org.jdom2.Element root)StringdoGet(Context context)By default, this method creates a blob of HTML, listing all the attributes which can be read or written to.String[]getAttributeNames()This method must return a list of attributes which are exposed by the SimpleMBean.String[]getMethodNames()This method must return a list of operations which are to be exposed by the SimpleMBean.protected abstract org.jdom2.Elementheading()html blob describing the values of eachWikiModuleInfoinspected.protected abstract Collection<WikiModuleInfo>modules()Obtains the collection of modules which is going to be inspected atdoGet(WikiContext).protected abstract org.jdom2.ElementrowBody(WikiModuleInfo module)html blob describingElementdescribing attributesprotected org.jdom2.Elementtitle()protected StringvalidModuleVersion(WikiModuleInfo info)Methods inherited from class org.apache.wiki.ui.admin.SimpleAdminBean
doPost, getId, initializeMethods inherited from class org.apache.wiki.management.SimpleMBean
getAttribute, getAttributes, getDescription, getMBeanInfo, invoke, setAttribute, setAttributes
-
Constructor Details
-
ModuleBean
- Throws:
NotCompliantMBeanException
-
-
Method Details
-
getAttributeNames
This method must return a list of attributes which are exposed by the SimpleMBean. If there's a getXXX() method available, it'll be exposed as a getter, and if there's a setXXX() method available, it'll be exposed as a setter. For example:public void setFoo( String foo ) ... public String getFoo() ... public String[] getAttributeNames() { String[] attrs = { "foo" }; return attrs; }Also, methods starting with "is" are also recognized as getters (e.g.public boolean isFoo().)- Specified by:
getAttributeNamesin classSimpleMBean- Returns:
- An array of attribute names that can be get and optionally set.
-
getMethodNames
This method must return a list of operations which are to be exposed by the SimpleMBean. Note that using overloaded method names is not supported - only one will be exposed as a JMX method at random.- Specified by:
getMethodNamesin classSimpleMBean- Returns:
- An array of method names that should be exposed as JMX operations.
-
doGet
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:
doGetin interfaceGenericHTTPHandler- Overrides:
doGetin classSimpleAdminBean- Parameters:
context- associated WikiContext- Returns:
- the HTML for the bean
-
title
-
containerForModuleDetail
-
modules
Obtains the collection of modules which is going to be inspected atdoGet(WikiContext).- Returns:
- a collection of
WikiModuleInfo
-
heading
html blob describing the values of eachWikiModuleInfoinspected.- Returns:
Elementdescribing the values of eachWikiModuleInfoinspected.
-
rowBody
html blob describingElementdescribing attributes- Parameters:
module-WikiModuleInfoinspected.- Returns:
Elementdescribing theElementinspected.
-
validModuleVersion
-