Package net.sf.basedb.core
Class RequestInformation
java.lang.Object
net.sf.basedb.core.RequestInformation
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:
- Last modified
- $Date$
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private final String
private final String
private Map<String,
PluginParameter<?>> private final List<PluginParameter<?>>
private final String
-
Constructor Summary
ConstructorDescriptionRequestInformation
(String command, String title, String description, List<PluginParameter<?>> parameters) RequestInformation
(String command, String title, String description, List<PluginParameter<?>> parameters, String jspPage) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Create a hash from parameter name to PluginParameter objects so that thegetParameter(String)
method doesn't have to look in the list.Get the command this request information object is valid for.Get a description of the request.The name of the jsp page to use for displaying the input form for requesting parameters.getParameter
(String name) Get the plugin parameter with the specified name.List<PluginParameter<?>>
Get a list containing the information about the parameters needed for the current request.getTitle()
Get the title of the request.
-
Field Details
-
command
-
description
-
title
-
parameters
-
jspPage
-
parameterMap
-
-
Constructor Details
-
RequestInformation
public RequestInformation(String command, String title, String description, List<PluginParameter<?>> parameters) -
RequestInformation
-
-
Method Details
-
getCommand
Get the command this request information object is valid for.- Returns:
- The name of the command
-
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
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
Get a list containing the information about the parameters needed for the current request.- Returns:
- A
List
withPluginParameter
:s
-
getParameter
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
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.
- If only the filename is returned, the JSP file is expected to be
located in a subdirectory to the
/plugins
directory, where the subdirectory is given by the package name of the plugin. Eg. the pluginnet.sf.basedb.plugins.APlugin
would have all it's JSP files located in the/plugins/net/sf/basedb/plugins
directory. - An absolute path starts with '/' and may or may not include the root directory of the BASE installation. If, for example, BASE is intalled to http://your.base.server.com/base, the following paths are equivalent /base/path/to/file.jsp, /path/to/file.jsp
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.
- If only the filename is returned, the JSP file is expected to be
located in a subdirectory to the
-
createParameterMap
private void createParameterMap()Create a hash from parameter name to PluginParameter objects so that thegetParameter(String)
method doesn't have to look in the list.
-