2.17.2: 2011-06-17

net.sf.basedb.core
Class RequestInformation

java.lang.Object
  extended by net.sf.basedb.core.RequestInformation

public class RequestInformation
extends Object

Get information about the parameters the plugin needs for a particular request. See PluginRequest for more information.

Version:
2.0
Author:
Enell, Nicklas
See Also:
PluginRequest
Last modified
$Date$

Field Summary
private  String command
           
private  String description
           
private  String jspPage
           
private  Map<String,PluginParameter<?>> parameterMap
           
private  List<PluginParameter<?>> parameters
           
private  String title
           
 
Constructor Summary
RequestInformation(String command, String title, String description, List<PluginParameter<?>> parameters)
           
RequestInformation(String command, String title, String description, List<PluginParameter<?>> parameters, String jspPage)
           
 
Method Summary
private  void createParameterMap()
          Create a hash from parameter name to PluginParameter objects so that the getParameter(String) method doesn't have to look in the list.
 String getCommand()
          Get the command this request information object is valid for.
 String getDescription()
          Get a description of the request.
 String getJspPage()
          The name of the jsp page to use for displaying the input form for requesting parameters.
 PluginParameter<?> getParameter(String name)
          Get the plugin parameter with the specified name.
 List<PluginParameter<?>> getParameters()
          Get a list containing the information about the parameters needed for the current request.
 String getTitle()
          Get the title of the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

command

private final String command

description

private final String description

title

private final String title

parameters

private final List<PluginParameter<?>> parameters

jspPage

private final String jspPage

parameterMap

private Map<String,PluginParameter<?>> parameterMap
Constructor Detail

RequestInformation

public RequestInformation(String command,
                          String title,
                          String description,
                          List<PluginParameter<?>> parameters)

RequestInformation

public RequestInformation(String command,
                          String title,
                          String description,
                          List<PluginParameter<?>> parameters,
                          String jspPage)
Method Detail

getCommand

public String getCommand()
Get the command this request information object is valid for.

Returns:
The name of the command

getTitle

public String getTitle()
Get the title of the request. A client application can use this text as a page header.

Returns:
A String object or null if not specified.

getDescription

public String getDescription()
Get a description of the request. A client application can use this information as a help text describing the current configuration page.

Returns:
A String object or null if not specified.

getParameters

public List<PluginParameter<?>> getParameters()
Get a list containing the information about the parameters needed for the current request.

Returns:
A List with PluginParameter:s

getParameter

public PluginParameter<?> getParameter(String name)
Get the plugin parameter with the specified name.

Parameters:
name - Name of the plugin parameter.
Returns:
The PluginParameter objec or null if no parameter with that name exists

getJspPage

public String getJspPage()
The name of the jsp page to use for displaying the input form for requesting parameters. This is only used by the web client application (or compatible). It is recommended that a plugin do not depend on the JSP page for parameter input.

This method can return an absolute path or only the filename of the JSP file.

The JSP page must conform to certain rules, ie. names of input fields, etc. See the BASE manual for more information.

Returns:
The name of the JSP page or null if this request doesn't require a JSP page.

createParameterMap

private void createParameterMap()
Create a hash from parameter name to PluginParameter objects so that the getParameter(String) method doesn't have to look in the list.


2.17.2: 2011-06-17