wt.enterprise.tabularresults
Class StdTemplateProcessor
java.lang.Object
wt.enterprise.tabularresults.TabularQueryResultsService
wt.enterprise.tabularresults.StdTemplateProcessor
- All Implemented Interfaces:
- Externalizable, Serializable, TemplateProcessor
- public class StdTemplateProcessor
- extends TabularQueryResultsService
- implements TemplateProcessor
The class StdTemplateProcessor is an extension of TabularQueryResultsService
so that it has access to the table processing functionality of TabularQueryResultsService
and extends TemplateProcessor so to be accessable from URLProcessor via a
wt.service.properties entry and is able to select a template to process.
This class's main purpose is to be able to test the various template processors
that build tables.
To use this class, you need to place an entry into wt.service.properties
that is the name of your query class is a subclass of BasicQueryService.
In particular, you have to name your subclass as "queryname"Query where
"queryname" should be meaningful relative to the query. At that point you
should name your service in wt.service.properties as "queryname" and also
name the HTML template that is to be used "queryname".html and place it
in codebase\templates\ObjectProperties.
- See Also:
,
Serialized Form
Methods inherited from class wt.enterprise.tabularresults.TabularQueryResultsService |
addColumn, deleteColumn, getDataFormatService, getQuery, getQueryResults, getTableFormatService, hasColumn, loadClass, printFailedTableMessage, printTable, setAllColumnsProperties, setAllHeadersProperties, setColumnProperties, setDataFormatServiceName, setHeader, setHeaderProperties, setQueryServiceName, setRowProperties, setTableFormatServiceName, setTableProperties, TabularQueryResultsService |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CODEBASE
private static String CODEBASE
VERBOSE
private static boolean VERBOSE
RESOURCE
private static final String RESOURCE
- See Also:
- Constant Field Values
contextObj
private Object contextObj
currentAction
private String currentAction
EXTERNALIZATION_VERSION_UID
public static final long EXTERNALIZATION_VERSION_UID
- See Also:
- Constant Field Values
StdTemplateProcessor
public StdTemplateProcessor()
handleRequest
public void handleRequest(HTTPRequest req,
HTTPResponse resp)
throws WTException
- This is a concrete implementation of the TemplateProcessor interface
method handleRequest. It will assume that the action being passed is
also the name of the HTML template to be used where that HTML template
is located in codebase\templates\ObjectProperties
- Specified by:
handleRequest
in interface TemplateProcessor
- Parameters:
req
- An HTTPRequest object that holds all of the HTTP informationresp
- An HTTPResponse object provides the return output stream
- Returns:
- void
- Throws:
WTException
getContextObj
public Object getContextObj()
- Get the contextual object of a TemplateProcessor instance.
- Overrides:
getContextObj
in class TabularQueryResultsService
- Returns:
- Object
setContextObj
public void setContextObj(Object context)
- Set the value of the contextual object of the TemplateProcessor.
- Overrides:
setContextObj
in class TabularQueryResultsService
- Parameters:
context
-
getTemplate
public HTMLTemplate getTemplate(Vector preferences)
throws WTException
- Throws:
WTException
printAttributes
public void printAttributes(Properties parameters,
Locale locale,
OutputStream os)
- This is a service function so that the user can see an enumeration
of all of the derived properties that are available the object passed
in the oid of the HTTP GET or POST.
- Parameters:
parameters
- The parameters from the HTTP GET or POSTlocale
- The locale context for printing out location sensitive stringsos
- The output stream to present the derived attributes
- Returns:
- void
readExternal
public void readExternal(ObjectInput input)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal
in interface Externalizable
- Throws:
IOException
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput output)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Throws:
IOException