|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
DHTML API provides the API interface for users. With DHTML API, user can easily embed the DHTML page or components into the JSP of themselves. Support multi-report running in one session Descriptions of the special parameters: runtime id: the key of all reports running in server(generated by server automatically when you run a report). session id: the key of the session in server(generated by server automatically when you login).
| Field Summary |
| Method Summary | |
void |
copyOctet(java.io.InputStream in,
java.io.OutputStream out)
Opens an input stream of octet data. |
void |
copyOctet(java.lang.String id,
java.io.OutputStream out,
java.lang.String translate)
Outputs the content of the specified binary file to the OutputStream. |
void |
copyRstFile(java.lang.String id,
java.io.OutputStream out)
Copy a part result file into the byte array. |
void |
copyText(java.lang.String id,
java.io.PrintWriter out,
java.lang.String translate)
Outputs the content of the specified text file to the PrintWriter. |
int |
dispatch(java.lang.String id,
java.io.OutputStream sout,
java.util.Hashtable params)
Responses and processes all the requests from DHTML client. |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
The same as javax.servlet.http.HttpServlet doGet method. |
ResourceManager |
getResourceManager()
Gets the Resource Manager. |
UserPreferenceManager |
getUserDHTMLPreferenceManager()
Gets the User DHTML Preference Manager. |
java.lang.String |
getUserID(HttpServletRequest request)
Gets the user session id. |
UserPreferenceManager |
getUserPreferenceManager()
Gets the User Preference Manager. |
UserSession |
getUserSession(HttpServletRequest request)
Gets the user session. |
void |
mainPage(java.lang.String id,
java.io.PrintWriter out)
Outputs the content of the DHTML default main page. |
java.io.InputStream |
openOctet(java.lang.String id,
java.lang.String translate)
Opens an InputStream of the specified binary file. |
void |
publishConnect(java.lang.String id,
java.io.OutputStream out)
Outputs the connection page. |
void |
publishDynamicCss(java.lang.String id,
java.io.PrintWriter out)
Outputs the dynamic css definition of current report content. |
void |
publishRptCss(java.lang.String id,
java.io.PrintWriter out)
Outputs the CSS definition list of current report. |
void |
setResourceManager(ResourceManager rmg)
Sets the Resource Manager. |
void |
setSkins(java.io.File file)
Sets the skin file path and file name. |
void |
setUserDHTMLPreferenceManager(UserPreferenceManager upm)
Sets the User DHTML Preference Manager. |
void |
setUserPreferenceManager(UserPreferenceManager upm)
Sets the User Preference Manager. |
void |
welcomePage(java.lang.String id,
java.io.PrintWriter out,
java.util.Hashtable params)
Outputs the content of the DHTML default welcome page. |
| Method Detail |
public void setResourceManager(ResourceManager rmg)
rmg - the Resource Managerpublic ResourceManager getResourceManager()
ResourceManagerpublic void setUserPreferenceManager(UserPreferenceManager upm)
upm - the User Preference Managerpublic UserPreferenceManager getUserPreferenceManager()
UserPreferenceManagerpublic void setUserDHTMLPreferenceManager(UserPreferenceManager upm)
upm - the User DHTML Preference Manager.public UserPreferenceManager getUserDHTMLPreferenceManager()
public void setSkins(java.io.File file)
throws java.io.IOException
file - skin file path and name
java.io.IOException
public void publishRptCss(java.lang.String id,
java.io.PrintWriter out)
throws java.io.IOException
id - can be the report runtime id or the user session id.
When it is the user session id(Deprecated, it can't be used in multiple reports mode), it indicates the only report in session.
When it is the report runtime id, it indicates the report specified by this runtime id in session.out - the PrintWriter
java.io.IOException
public void mainPage(java.lang.String id,
java.io.PrintWriter out)
throws java.io.IOException,
RptServerException
id - can be the report runtime id or the user session id.
When it is the user session id(Deprecated, it can't be used in multiple reports mode), it indicates the only report in session.
When it is the report runtime id, it indicates the report specified by this runtime id in session.out - the PrintWriter
java.io.IOException
RptServerException
public void welcomePage(java.lang.String id,
java.io.PrintWriter out,
java.util.Hashtable params)
throws java.io.IOException,
RptServerException
id - the session idout - the PrintWriterparams - parameters needed to run the report
If you will use relative path in dhtml, param params should contain three parameter as following :
DHTMLConstant.DHTML_SERVLET_PATH, the value is dhtml servlet path that can be got like this: HttpUtil.getWebAppUrl(HttpServletRequest request, HttpUtil.getJSPWebAppName(APIConst.APPNAME_DHTML)),
DHTMLConstant.DHTML_JSP_PATH, the value is dhtml jsp path that can be got like this:: HttpUtil.getWebAppUrl(HttpServletRequest request, HttpUtil.getJSPWebAppName(APIConst.APPNAME_DHTMLJSP)),
DHTMLConstant.DHTML_HELP_PATH, the value is dhtml help servlet path that can be got like this:: HttpUtil.getWebAppUrl(HttpServletRequest request, HttpUtil.getJSPWebAppName(APIConst.APPNAME_HELP)).
java.io.IOException
RptServerException
public int dispatch(java.lang.String id,
java.io.OutputStream sout,
java.util.Hashtable params)
throws RptServerException,
java.io.IOException
id - the session idsout - the OutputStreamparams - client request query in hashtable type
If you will use relative path in dhtml, param params should contain three parameter as following :
DHTMLConstant.DHTML_SERVLET_PATH, the value is dhtml servlet path that can be got like this: HttpUtil.getWebAppUrl(HttpServletRequest request, HttpUtil.getJSPWebAppName(APIConst.APPNAME_DHTML)),
DHTMLConstant.DHTML_JSP_PATH, the value is dhtml jsp path that can be got like this:: HttpUtil.getWebAppUrl(HttpServletRequest request, HttpUtil.getJSPWebAppName(APIConst.APPNAME_DHTMLJSP)),
DHTMLConstant.DHTML_HELP_PATH, the value is dhtml help servlet path that can be got like this:: HttpUtil.getWebAppUrl(HttpServletRequest request, HttpUtil.getJSPWebAppName(APIConst.APPNAME_HELP)).
RptServerException
java.io.IOException
public void copyText(java.lang.String id,
java.io.PrintWriter out,
java.lang.String translate)
throws java.io.IOException
id - can be the report runtime id or the user session id.
When it is the user session id(Deprecated, it can't be used in multiple reports mode), it indicates the only report in session.
When it is the report runtime id, it indicates the report specified by this runtime id in session.out - the PrintWritertranslate - the text file name
java.io.IOException
public void copyOctet(java.lang.String id,
java.io.OutputStream out,
java.lang.String translate)
throws java.io.IOException
id - can be the report runtime id or the user session id.
When it is the user session id(Deprecated, it can't be used in multiple reports mode), it indicates the only report in session.
When it is the report runtime id, it indicates the report specified by this runtime id in session.out - the OutputStreamtranslate - octet file name
java.io.IOException
public void copyOctet(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
in - any octet data source as a input stream.out - response output stream.
java.io.IOException
public java.io.InputStream openOctet(java.lang.String id,
java.lang.String translate)
throws java.io.IOException
id - can be the report runtime id or the user session id.
When it is the user session id(Deprecated, it can't be used in multiple reports mode), it indicates the only report in session.
When it is the report runtime id, it indicates the report specified by this runtime id in session.translate - the binary file name
java.io.IOException
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
request - HttpServletRequest.response - HttpServletResponse.
ServletException
java.io.IOException
public void publishConnect(java.lang.String id,
java.io.OutputStream out)
throws java.io.IOException
id - can be the report runtime id or the user session id.
When it is the user session id(Deprecated, it can't be used in multiple reports mode), it indicates the only report in session.
When it is the report runtime id, it indicates the report specified by this runtime id in session.out - the OutputStream
java.io.IOException
public void publishDynamicCss(java.lang.String id,
java.io.PrintWriter out)
throws java.io.IOException
id - can be the report runtime id or the user session id.
When it is the user session id(Deprecated, it can't be used in multiple reports mode), it indicates the only report in session.
When it is the report runtime id, it indicates the report specified by this runtime id in session.out - the PrintWriter
java.io.IOException
public void copyRstFile(java.lang.String id,
java.io.OutputStream out)
throws java.io.IOException
id - can be the report runtime id or the user session id.
When it is the user session id(Deprecated, it can't be used in multiple reports mode), it indicates the only report in session.
When it is the report runtime id, it indicates the report specified by this runtime id in session.out - the OutputStream
java.io.IOExceptionpublic UserSession getUserSession(HttpServletRequest request)
request - the HttpServletRequest
UserSessionpublic java.lang.String getUserID(HttpServletRequest request)
request - the HttpServletRequest
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||