jet.web.dhtml
Interface DHtmlAPI

All Superinterfaces:
SimpleDHtmlAPI

public interface DHtmlAPI
extends SimpleDHtmlAPI

DHTML API provides the API interface for users. With DHTML API, user can easily embed the DHTML page or components into their own JSPs.

Support multi-report running in one session

Descriptions of the special parameters:
runtime id: the key for a report running in server (generated by server automatically when you run a report).
session id: the key for the session in server (generated by server automatically when you login).


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)
          Copies a part of the 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(javax.servlet.http.HttpServletRequest request, javax.servlet.http.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(javax.servlet.http.HttpServletRequest request)
          Deprecated.  
 UserPreferenceManager getUserPreferenceManager()
          Gets the User Preference Manager.
 UserSession getUserSession(javax.servlet.http.HttpServletRequest request)
          Deprecated.  
 void mainPage(java.lang.String id, java.io.PrintWriter out)
          Deprecated. %serverhome%/public_html/dhtmljsp/index.jsp 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(jet.server.intf.jrs.ExResourceManager rmg)
          Sets the Resource Manager.
 void setSkins(java.io.File file)
          Deprecated. DHTMLConfig.setDHTMLSkins 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.
 
Methods inherited from interface jet.web.dhtml.SimpleDHtmlAPI
addExpiryListener, checkUser, checkUser, closeDHTMLReport, copyOctet, copyRstFile, copyText, customizeToolbar, customizeToolbar, destroy, dispatch, expire, getAutoRefresh, getDHTMLToolkit, getFilterDisplayNameSortType, getHelpImagePath, getHostName, getImagePath, getJS_CSSPath, getMainPage, getMaxConcurrent, getNewOpenedRuntimeId, getOpenedReports, getPath, getQueueSize, getRefreshInterval, getReportName, getReportScroll, getReportsId, getReportTimeout, getRscPath, getRscUri, getRstFileName, getRSTRemoteFullPath, getRuntimesId, getRuntimesId, getSearchDisplayNameSortType, getSortDisplayNameSortType, getStyle, getTitle, getTitle, getURI, getUserAutoRefresh, getUserEncoding, initMainPage, isAdvanceUserEnabled, isAdvanceUserEnabled, isCreateEnabled, isCreateEnabled, isDetailReport, isDisplayNameSortEnabled, isDrillEnabled, isDrillEnabled, isExportEnabled, isExportEnabled, isFilterEnabled, isFilterEnabled, isFirstDetail, isFrameEnabled, isFrameEnabled, isIgnoreServerSetting, isLastDetail, isLocalSave, isMainMenuVisible, isMenuEnabled, isMenuEnabled, isNavEnabled, isNavEnabled, isNavibarVisible, isPopupMenuEnabled, isPopupMenuEnabled, isPrintEnabled, isPrintEnabled, isRefreshEnabled, isRefreshEnabled, isResetEnabled, isResetEnabled, isRestrictAction, isSaveEnabled, isSaveEnabled, isSaveResultEnabled, isSaveResultEnabled, isSearchEnabled, isSearchEnabled, isSkinEnabled, isSkinEnabled, isSortEnabled, isSortEnabled, isStyleEnabled, isStyleEnabled, isSupport, isTocEnabled, isTocEnabled, isTocGroupbyNameVisible, isTocGroupbyNameVisible, isTocVisible, isToolbarEnabled, isToolbarEnabled, isToolbarVisible, isUnredoEnabled, isUnredoEnabled, isUserbarEnabled, isUserbarEnabled, isUserbarVisible, isZoomEnabled, isZoomEnabled, mainPage, publishRptCss, setAdvanceUserEnabled, setAdvanceUserEnabled, setApplyToOpenedReports, setAutoRefresh, setContextPath, setCreateEnabled, setCreateEnabled, setCssFolder, setDebug, setDHTMLJSPPath, setDisplayNameSortEnabled, setDrillEnabled, setDrillEnabled, setErrorPage, setExportEnabled, setExportEnabled, setFilterDisplayNameSortType, setFilterEnabled, setFilterEnabled, setFrameEnabled, setFrameEnabled, setHelpImagePath, setHostName, setIgnoreServerSetting, setImageFolder, setImagePath, setJS_CSSPath, setJsFolder, setMainMenuVisible, setMainPage, setMenuEnabled, setMenuEnabled, setNavEnabled, setNavEnabled, setNavibarVisible, setPath, setPopupMenuEnabled, setPopupMenuEnabled, setPrintEnabled, setPrintEnabled, setRefreshEnabled, setRefreshEnabled, setRefreshInterval, setReportNum, setReportScroll, setReportTimeout, setResetEnabled, setResetEnabled, setSaveEnabled, setSaveEnabled, setSaveResultEnabled, setSaveResultEnabled, setSearchDisplayNameSortType, setSearchEnabled, setSearchEnabled, setSkinEnabled, setSkinEnabled, setSkins, setSortDisplayNameSortType, setSortEnabled, setSortEnabled, setStyle, setStyleEnabled, setStyleEnabled, setTitle, setTitle, setTocEnabled, setTocEnabled, setTocGroupbyNameVisible, setTocGroupbyNameVisible, setTocVisible, setToolbarEnabled, setToolbarEnabled, setToolbarVisible, setUnredoEnabled, setUnredoEnabled, setURI, setUserAgent, setUserAutoRefresh, setUserbarEnabled, setUserbarEnabled, setUserbarVisible, setZoomEnabled, setZoomEnabled, welcomePage
 

Method Detail

setResourceManager

void setResourceManager(jet.server.intf.jrs.ExResourceManager rmg)
Sets the Resource Manager.

Parameters:
rmg - the Resource Manager.
See Also:
jet.server.intf.jrs.ExResourceManager.

getResourceManager

ResourceManager getResourceManager()
Gets the Resource Manager.

Returns:
the Resource Manager.
See Also:
jet.server.api.ResourceManager.

setUserPreferenceManager

void setUserPreferenceManager(UserPreferenceManager upm)
Sets the User Preference Manager.

Parameters:
upm - the User Preference Manager.

getUserPreferenceManager

UserPreferenceManager getUserPreferenceManager()
Gets the User Preference Manager.

Parameters:
upm - the User Preference Manager.
See Also:
jet.server.api.UserPreferenceManager.

setUserDHTMLPreferenceManager

void setUserDHTMLPreferenceManager(UserPreferenceManager upm)
Sets the User DHTML Preference Manager.

Parameters:
upm - the User DHTML Preference Manager.
See Also:
jet.server.api.UserPreferenceManager.

getUserDHTMLPreferenceManager

UserPreferenceManager getUserDHTMLPreferenceManager()
Gets the User DHTML Preference Manager.

Returns:
the User DHTML Preference Manager.
See Also:
jet.server.api.UserPreferenceManager.

setSkins

void setSkins(java.io.File file)
              throws java.io.IOException
Deprecated. DHTMLConfig.setDHTMLSkins Sets the skin file path and file name.

Parameters:
file - the skin file path and name.
Throws:
java.io.IOException

publishRptCss

void publishRptCss(java.lang.String id,
                   java.io.PrintWriter out)
                   throws java.io.IOException
Outputs the CSS definition list of current report.

Parameters:
id - can be the report runtime id or the user session id.
When it is the user session id (Deprecated, it cannot be used in multiple reports mode), it indicates the only report in the session.
When it is the report runtime id, it indicates the report specified by this runtime id in the session.
out - the PrintWriter.
Throws:
java.io.IOException

mainPage

void mainPage(java.lang.String id,
              java.io.PrintWriter out)
              throws java.io.IOException,
                     RptServerException
Deprecated. %serverhome%/public_html/dhtmljsp/index.jsp Outputs the content of the DHTML default main page.

Parameters:
id - can be the report runtime id or the user session id.
When it is the user session id (Deprecated, it cannot be used in multiple reports mode), it indicates the only report in the session.
When it is the report runtime id, it indicates the report specified by this runtime id in the session.
out - the PrintWriter.
Throws:
java.io.IOException
RptServerException

welcomePage

void welcomePage(java.lang.String id,
                 java.io.PrintWriter out,
                 java.util.Hashtable params)
                 throws java.io.IOException,
                        RptServerException
Outputs the content of the DHTML default welcome page. This method must be invoked otherwise the main page will not be invoked.

Parameters:
id - the session id.
out - the PrintWriter.
params - parameters needed to run the report.
If you are going to use relative path in dhtml, param params should contain three parameters 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)).
Throws:
java.io.IOException
RptServerException

dispatch

int dispatch(java.lang.String id,
             java.io.OutputStream sout,
             java.util.Hashtable params)
             throws jet.exception.InvalidParameterException,
                    RptServerException,
                    java.io.IOException
Responses and processes all the requests from DHTML client.

Parameters:
id - the session id.
sout - the OutputStream.
params - client request query in hashtable type.
If you are going to use relative path in dhtml, param params should contain three parameters 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)).
Throws:
jet.exception.InvalidParameterException
RptServerException
java.io.IOException

copyText

void copyText(java.lang.String id,
              java.io.PrintWriter out,
              java.lang.String translate)
              throws java.io.IOException
Outputs the content of the specified text file to the PrintWriter.

Parameters:
id - can be the report runtime id or the user session id.
When it is the user session id (Deprecated, it cannot be used in multiple reports mode), it indicates the only report in the session.
When it is the report runtime id, it indicates the report specified by this runtime id in the session.
out - the PrintWriter.
translate - the text file name.
Throws:
java.io.IOException

copyOctet

void copyOctet(java.lang.String id,
               java.io.OutputStream out,
               java.lang.String translate)
               throws java.io.IOException
Outputs the content of the specified binary file to the OutputStream.

Parameters:
id - can be the report runtime id or the user session id.
When it is the user session id (Deprecated, it cannot be used in multiple reports mode), it indicates the only report in the session.
When it is the report runtime id, it indicates the report specified by this runtime id in the session.
out - the OutputStream.
translate - octet file name.
Throws:
java.io.IOException

copyOctet

void copyOctet(java.io.InputStream in,
               java.io.OutputStream out)
               throws java.io.IOException
Opens an input stream of octet data.

Parameters:
in - any octet data source as an input stream.
out - response output stream.
Throws:
java.io.IOException

openOctet

java.io.InputStream openOctet(java.lang.String id,
                              java.lang.String translate)
                              throws java.io.IOException
Opens an InputStream of the specified binary file.

Parameters:
id - can be the report runtime id or the user session id.
When it is the user session id (Deprecated, it cannot be used in multiple reports mode), it indicates the only report in the session.
When it is the report runtime id, it indicates the report specified by this runtime id in the session.
translate - the binary file name
Returns:
the InputStream
Throws:
java.io.IOException

doGet

void doGet(javax.servlet.http.HttpServletRequest request,
           javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
The same as javax.servlet.http.HttpServlet doGet method.

Parameters:
request - HttpServletRequest.
response - HttpServletResponse.
Throws:
javax.servlet.ServletException
java.io.IOException

publishConnect

void publishConnect(java.lang.String id,
                    java.io.OutputStream out)
                    throws java.io.IOException
Outputs the connection page.

Parameters:
id - can be the report runtime id or the user session id.
When it is the user session id (Deprecated, it cannot be used in multiple reports mode), it indicates the only report in the session.
When it is the report runtime id, it indicates the report specified by this runtime id in the session.
out - the OutputStream.
Throws:
java.io.IOException

publishDynamicCss

void publishDynamicCss(java.lang.String id,
                       java.io.PrintWriter out)
                       throws java.io.IOException
Outputs the dynamic css definition of current report content.

Parameters:
id - can be the report runtime id or the user session id.
When it is the user session id (Deprecated, it cannot be used in multiple reports mode), it indicates the only report in the session.
When it is the report runtime id, it indicates the report specified by this runtime id in the session.
out - the PrintWriter.
Throws:
java.io.IOException

copyRstFile

void copyRstFile(java.lang.String id,
                 java.io.OutputStream out)
                 throws java.io.IOException
Copies a part of the result file into the byte array. This method only gets a part of the contents each time.
You must call this method many times until it returns null.

Parameters:
id - can be the report runtime id or the user session id.
When it is the user session id (Deprecated, it cannot be used in multiple reports mode), it indicates the only report in the session.
When it is the report runtime id, it indicates the report specified by this runtime id in the session.
out - the OutputStream.
Throws:
java.io.IOException

getUserSession

UserSession getUserSession(javax.servlet.http.HttpServletRequest request)
Deprecated. 

Gets the user session.

Parameters:
request - the HttpServletRequest.
Returns:
UserSession.
See Also:
jet.server.api.UserSession.

getUserID

java.lang.String getUserID(javax.servlet.http.HttpServletRequest request)
Deprecated. 

Gets the user session id.

Parameters:
request - the HttpServletRequest
Returns:
the user session id