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:
  `javax.management.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_engine`

### 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

Constructors
`ModuleBean​(Engine engine)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected org.jdom2.Element` `containerForModuleDetail​(org.jdom2.Element root)`
`java.lang.String` `doGet​(Context context)` By default, this method creates a blob of HTML, listing all the attributes which can be read or written to.
`java.lang.String[]` `getAttributeNames()` This method must return a list of attributes which are exposed by the SimpleMBean.
`java.lang.String[]` `getMethodNames()` This method must return a list of operations which are to be exposed by the SimpleMBean.
`protected abstract org.jdom2.Element` `heading()` html blob describing the values of each `WikiModuleInfo` inspected.
`protected abstract java.util.Collection<WikiModuleInfo>` `modules()` Obtains the collection of modules which is going to be inspected at `doGet(Context)`.
`protected abstract org.jdom2.Element` `rowBody​(WikiModuleInfo module)` html blob describing`Element` describing attributes
`protected org.jdom2.Element` `title()`
`protected java.lang.String` `validModuleVersion​(WikiModuleInfo info)`

### Methods inherited from class org.apache.wiki.ui.admin.SimpleAdminBean

`doPost, getId, initialize`

### Methods inherited from class org.apache.wiki.management.SimpleMBean

`getAttribute, getAttributes, getDescription, getMBeanInfo, 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`

### Constructor Detail

#### ModuleBean

    public ModuleBean​(Engine engine)
               throws javax.management.NotCompliantMBeanException

Throws:
  `javax.management.NotCompliantMBeanException`

### Method Detail

#### getAttributeNames

    public java.lang.String[] 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:
  `getAttributeNames` in class `SimpleMBean`
Returns:
  An array of attribute names that can be get and optionally set.

#### getMethodNames

    public java.lang.String[] 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:
  `getMethodNames` in class `SimpleMBean`
Returns:
  An array of method names that should be exposed as JMX operations.

#### doGet

    public java.lang.String doGet​(Context 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`
Overrides:
  `doGet` in class `SimpleAdminBean`
Parameters:
  `context` - associated WikiContext
Returns:
  the HTML for the bean

#### title

    protected org.jdom2.Element title()

#### containerForModuleDetail

    protected org.jdom2.Element containerForModuleDetail​(org.jdom2.Element root)

#### modules

    protected abstract java.util.Collection<WikiModuleInfo> modules()

Obtains the collection of modules which is going to be inspected at `doGet(Context)`.

Returns:
  a collection of `WikiModuleInfo`

#### heading

    protected abstract org.jdom2.Element heading()

html blob describing the values of each `WikiModuleInfo` inspected.

Returns:
  `Element` describing the values of each `WikiModuleInfo` inspected.

#### rowBody

    protected abstract org.jdom2.Element rowBody​(WikiModuleInfo module)

html blob describing`Element` describing attributes

Parameters:
  `module` - `WikiModuleInfo` inspected.
Returns:
  `Element` describing the `Element` inspected.

#### validModuleVersion

    protected java.lang.String validModuleVersion​(WikiModuleInfo info)