things.common.help
Class Helper

java.lang.Object
  extended by things.common.help.Helper

public class Helper
extends java.lang.Object

A rich helper.

Version:
1.0

Version History

EPG - Initial - 10 SEP 08
 
Author:
Erich P. Gatejen

Constructor Summary
Helper()
          Default constructor.
Helper(java.lang.String user, java.lang.String title, java.lang.String information)
          Constructor.
 
Method Summary
 void add(boolean required, java.lang.String name, java.lang.String helpText)
          Add a property.
 void add(boolean required, java.lang.String name, java.lang.String helpText, java.lang.String... values)
          Add a property with value suggestions.
 java.util.List<HelpItem> getHelp()
          Get the help list.
static Helper getHelper(java.lang.String className)
          Get a helper from a class name.
 java.util.List<Helper> getReferences()
          Get the reference list.
 java.lang.String getUser()
          Get the user.
 java.lang.String information()
          Provide detailed information.
 void inherit(java.lang.Class<?> helpful)
          Inherit help from another class' helper.
 void inherit(Helper helper)
          Inherit help from another class' helper, including references.
 void reference(java.lang.Class<?> helpful)
          Reference help from another class' helper.
 void reference(Helper helper)
          Reference help from another class' helper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Helper

public Helper()
Default constructor.


Helper

public Helper(java.lang.String user,
              java.lang.String title,
              java.lang.String information)
Constructor.

Parameters:
user - the user of this help. All added items will be tagged with this user.
title - the title for this area.
information - helpful text about the user.
Method Detail

getHelp

public java.util.List<HelpItem> getHelp()
Get the help list.

Returns:
the properties
See Also:
ThingsMarkup

getReferences

public java.util.List<Helper> getReferences()
Get the reference list. Teh referenced help should be treated as a second level during rendering.

Returns:
the properties
See Also:
ThingsMarkup

information

public java.lang.String information()
Provide detailed information. It should use ThingsMarkup for gimmicks.

Returns:
The text of the information.
See Also:
ThingsMarkup

getUser

public java.lang.String getUser()
Get the user.

Returns:
The user or null if one is not set.

add

public void add(boolean required,
                java.lang.String name,
                java.lang.String helpText)
Add a property.

Parameters:
required -
name -
helpText -

add

public void add(boolean required,
                java.lang.String name,
                java.lang.String helpText,
                java.lang.String... values)
Add a property with value suggestions.

Parameters:
required -
name -
values - values as name/description pairs. This really should be an even number. An odd number leave drop the final name string.
helpText -

inherit

public void inherit(Helper helper)
Inherit help from another class' helper, including references. Call this and add in order, since they will be presented as an ordered list.

Parameters:
helper - the helper.

inherit

public void inherit(java.lang.Class<?> helpful)
Inherit help from another class' helper. Call this and add in order, since they will be presented as an ordered list.

Parameters:
helpful - the helpful class from which we can get a helper. Sucks I have to instantiate one of these.

reference

public void reference(Helper helper)
Reference help from another class' helper. Call this and add in order, since they will be presented as an ordered list.

Parameters:
helper - the helper.

reference

public void reference(java.lang.Class<?> helpful)
Reference help from another class' helper. Call this and add in order, since they will be presented as an ordered list.

Parameters:
helpful - the helpful class from which we can get a helper. Sucks I have to instantiate one of these.

getHelper

public static Helper getHelper(java.lang.String className)
Get a helper from a class name. It'll return null if it isn't found.

Returns:
the helper.


Things.