ORG.oclc.gadgets
Class DatabaseList
java.lang.Object
|
+--ORG.oclc.gadgets.DatabaseList
- public class DatabaseList
- extends Object
- implements GadgetBuilder
The DatabaseList class is a gadget that builds an HTML String
containing a list of anchors containing database names that a user
has access to. It uses the parameters contained
in a RequestManager object and the parameters for the gadget read
from the configuration files to build the appropriate output.
If an error occurs, an empty string("") is returned.
The parameters to the gadget are:
anchorcommand - the URL command action to put in the anchor.
dbnames - a comma space separated list of dbnames to
build the list from. If ommitted, all databases the user has
access to is built.
For efficiency purposes, the database list string is generated for
a user only if it does not exist. The formatted string is stored
in the user state as the entity named DatabaseList.
Each subsequent request for the data is simply a retrieval from
the user state for the saved string.
Method Summary |
String |
buildit(RequestManager rMngr,
String name)
Generates a String containing the HTML for the database anchors
using the parameters containined in the RequestManager object
and the name of the gadget. |
String |
toString()
Generates a String representation of the object. |
DatabaseList
public DatabaseList()
buildit
public String buildit(RequestManager rMngr,
String name)
- Generates a String containing the HTML for the database anchors
using the parameters containined in the RequestManager object
and the name of the gadget.
- Specified by:
- buildit in interface GadgetBuilder
- Parameters:
rMngr
- object containing input parameters for the request.name
- the name of the gadget - the section name in the configuration
file defining the particular gadget.- Returns:
- String
toString
public String toString()
- Generates a String representation of the object.
- Specified by:
- toString in interface GadgetBuilder
- Returns:
- String
- Overrides:
- toString in class Object