|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.utgenome.gwt.utgb.server.RequestHandlerBase
org.utgenome.gwt.utgb.server.WebTrackBase
public abstract class WebTrackBase
| Constructor Summary | |
|---|---|
WebTrackBase()
|
|
| Method Summary | ||
|---|---|---|
String |
createSQL(String sqlTemplate,
Object... args)
Create an SQL from a given template and variable assignments. |
|
String |
createSQLFromFile(String sqlFileName,
Object... args)
Create an SQL from a given file (relative to the caller class) and variable assignments. |
|
static String |
createSQLStatement(String sqlTemplate,
Object... args)
|
|
String |
getActionPrefix(javax.servlet.http.HttpServletRequest request)
Return the action prefix of the request |
|
String |
getActionSuffix(javax.servlet.http.HttpServletRequest request)
Return the action suffix attached to the request |
|
org.xerial.db.sql.DatabaseAccess |
getDatabaseAccess(String databaseID)
Retrieves the database access |
|
static String |
getHTTPRequestQueryString(javax.servlet.http.HttpServletRequest request)
|
|
static String |
getProjectRootPath()
Returns the path to the project root folder |
|
String |
getTrackConfigProperty(String key,
String defaultValue)
Get the property written in the track-config.xml file |
|
|
loadJSON(Reader jsonStream,
Class<T> resultClass)
load the json data, and converts them into a list of result class instances |
|
|
loadJSON(Reader jsonStream,
Class<T> resultClass,
org.xerial.util.ObjectHandler<T> resultHandler)
Load JSON data from the stream and convert the JSON data into Object of the given resultClass. |
|
BufferedReader |
openAction(javax.servlet.http.HttpServletRequest request,
String path)
Opens a BufferedReader that reads data from another action |
|
BufferedReader |
openAction(javax.servlet.http.HttpServletRequest request,
String path,
boolean bypassRequestParameter)
|
|
|
toJSON(String databaseID,
String sql,
Class<T> resultClass,
javax.servlet.http.HttpServletResponse response)
|
|
| Methods inherited from class org.utgenome.gwt.utgb.server.RequestHandlerBase |
|---|
doGet, doPost, handle, validate |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebTrackBase()
| Method Detail |
|---|
public static String createSQLStatement(String sqlTemplate,
Object... args)
throws UTGBException
UTGBException
public org.xerial.db.sql.DatabaseAccess getDatabaseAccess(String databaseID)
throws UTGBException
name -
UTGBException
public String getTrackConfigProperty(String key,
String defaultValue)
key -
public <T> void toJSON(String databaseID,
String sql,
Class<T> resultClass,
javax.servlet.http.HttpServletResponse response)
throws UTGBException,
IOException
T - databaseID - sql - classType -
UTGBException
IOException
public <T> void loadJSON(Reader jsonStream,
Class<T> resultClass,
org.xerial.util.ObjectHandler<T> resultHandler)
throws UTGBException,
IOException
T - jsonStream - resultClass - resultHandler -
UTGBException
IOException
public <T> List<T> loadJSON(Reader jsonStream,
Class<T> resultClass)
throws UTGBException,
IOException
T - jsonStream - resultClass -
UTGBException
IOException
public BufferedReader openAction(javax.servlet.http.HttpServletRequest request,
String path)
throws javax.servlet.ServletException,
IOException
request - path - path to the another action. e.g. "hello"
javax.servlet.ServletException
IOException
public BufferedReader openAction(javax.servlet.http.HttpServletRequest request,
String path,
boolean bypassRequestParameter)
throws javax.servlet.ServletException,
IOException
request - path - bypassRequestParameter -
javax.servlet.ServletException
IOExceptionpublic static String getHTTPRequestQueryString(javax.servlet.http.HttpServletRequest request)
public String createSQLFromFile(String sqlFileName,
Object... args)
throws IOException,
UTGBException
sqlFileName - an SQL (text) file name, which contains a single sql expression. This SQL file can contain variables
$1, $2, ..., where each of them corresponds to the args of this methodargs - values each of them are assigned to the corresponding variable in the SQL
IOException - when failed to read the file
UTGBException - UTGBErrorCode.InvalidSQLSyntax
public String createSQL(String sqlTemplate,
Object... args)
throws UTGBException
sqlTemplate - an SQL template, which can contain variables $1, $2, ..., each of them corresponds to the args of this
methodargs - variable assignments
UTGBException - UTGBErrorCode.InvalidSQLSyntaxpublic static String getProjectRootPath()
public String getActionSuffix(javax.servlet.http.HttpServletRequest request)
request -
public String getActionPrefix(javax.servlet.http.HttpServletRequest request)
request -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||