Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.web.dhtml
Interface DHTMLClientService

    public interface DHTMLClientService

DHTML APIs provide APIs for users. With DHTML APIs, users can easily embed the DHTML pages or components into their own JSPs. All the methods in this interface can be invoked by remote server (RMI).

Support the running of multiple report sets in one session, and a report set can include one or more reports.

Descriptions of some key terms:

sessionId: the key of the session in the server (generated by the server automatically when you log in), and users can invoke DHTMLUtil.getSessionID(HttpServletRequest request) to get the key.

rptSetId: the key of the report set in DHTML (generated automatically after the report set has been run), and users can invoke DHTMLUtil.getRptSetId(HttpServletRequest request) to get the key.

rptName: the key of the report in DHTML (retrieved from the report set after the report set has been run), and users can invoke DHTMLUtil.getRptName(HttpServletRequest request) to get the key.

Note of using this DHTML API:

You must follow a certain order for the method which use the parameters "sessionId", "rptSetId" and "rptName" in dhtml.jsp. For example: getCurrentPageNumber(String sessionId, String rptSetId, String rptName) must be called after the code "Map tmpmap = DHTMLUtil.runReport(request, params);", because the parameters are offered after the report set has been run. If the wrong order is used, a jsp error will be generated. And there is no specified order for the other API methods that do not use the parameters.

Method Summary
`int` | `createDHTMLSession(java.lang.String sessionId, java.lang.String UserName)` Checks and creates DHTML Session information.
`java.lang.String` | `createReportSetId()` Gets the id generated after the reportt set has been initialized for opening or cancelling a report set.
`void` | `expire(java.lang.String sessionId)` Destroys user session when it expires.
`byte[]` | `exportReport(java.lang.String sessionId, java.lang.String rptSetId, java.lang.String rptName)` Returns the result of the current page of the active report.
`java.lang.String[]` | `getAllRptNames(java.lang.String rptSetId)` Gets names of all reports in the report set.
`boolean` | `getCanRedo(java.lang.String sessionId, java.lang.String rptSetId, java.lang.String rptName)` Determines whether a redo action can be performed or not.
`boolean` | `getCanUndo(java.lang.String sessionId, java.lang.String rptSetId, java.lang.String rptName)` Determines whether an undo action can be performed or not.
`java.lang.String` | `getCatalogName(java.lang.String rptSetId)` Gets the catalog name of the report set.
`java.lang.String` | `getCatalogName(java.lang.String userName, java.lang.String resourcePath)` Gets the real path of the catalog.
`int` | `getCurrentPageNumber(java.lang.String sessionId, java.lang.String rptSetId, java.lang.String rptName)` Gets the current page number.
`java.lang.String` | `getCurrentStyle(java.lang.String sessionId, java.lang.String rptSetId, java.lang.String rptName)` Gets current style name.
`java.lang.String` | `getCurReportId(java.lang.String rptSetId)` Gets the name of the active report in the report set.
`DHTMLConfig` | `getDHTMLConfig()` Gets a DHTMLConfig instance.
`DHTMLDataInfo` | `getDHTMLDataInfo()` Gets a DHTMLDataInfo instance.
`DHTMLWriter` | `getDHTMLWriter(java.lang.String sessionId, java.lang.String rptSetId)` Gets a DHTMLWriter instance.
`java.lang.String[]` | `getOpenedRptNames(java.lang.String rptSetId)` Gets names of all open reports in the report set.
`java.lang.String` | `getRptCountry(java.lang.String sessionId, java.lang.String rptSetId, java.lang.String rptName)` Gets the country information used by the report set.
`java.lang.String` | `getRptEncoding(java.lang.String sessionId, java.lang.String rptSetId, java.lang.String rptName)` Gets the encoding used by the report set.
`java.lang.String` | `getRptLanguage(java.lang.String sessionId, java.lang.String rptSetId, java.lang.String rptName)` Gets the language used by the report set.
`java.lang.String` | `getRptSetDisplayName(java.lang.String rptSetId)` Gets the display name of the report set.
`java.lang.String` | `getRptSheetDisplayName(java.lang.String rptSetId, java.lang.String rptName)` Gets the display name of the report sheet.
`java.util.Vector` | `getRuntimeDHTMLReportsStatus(java.lang.String userID)` Query DHTML all running report status, including both front end and background mode.
`java.lang.String[][]` | `getStyleList()` Gets the display name and CSS path of the style list.
`java.lang.String[]` | `getSubReportKeys(java.lang.String rptSetId, java.lang.String rptName)` Gets the list of keys of all engines related to the current report.
`int` | `getTotalPageNumnber(java.lang.String sessionId, java.lang.String rptSetId, java.lang.String rptName)` Gets the total physical page number.
`boolean` | `isCloseWindow(java.lang.String sessionId)` Gets the mode of closing window for a specified user.
`java.lang.String[]` | `parseRuntimeID(java.lang.String runtimeID)` Builds an array from a runtimeID.
`void` | `setCloseWindow(boolean closeWindow)` Sets the mode of closing window for all users.
`void` | `setCloseWindow(java.lang.String sessionId, boolean closeWindow)` Sets the mode of closing window for a specified user.

Method Detail

### createDHTMLSession

    int createDHTMLSession(java.lang.String sessionId,
                           java.lang.String UserName)

  Checks and creates DHTML Session information.

  Parameters:
    `sessionId` - the user session id.
    `UserName` - user name.
  Returns:
    value 1 -- check or create session ok. 2 -- check or create session error.

### createReportSetId

    java.lang.String createReportSetId()

  Gets the id generated after the reportt set has been initialized for opening or cancelling a report set.

  Returns:
    report set id.

### expire

    void expire(java.lang.String sessionId)

  Destroys user session when it expires.

  Parameters:
    `sessionId` - the user session id.

### exportReport

    byte[] exportReport(java.lang.String sessionId,
                        java.lang.String rptSetId,
                        java.lang.String rptName)
                        throws JDException

  Returns the result of the current page of the active report.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    the result of the current page of the active report.
  Throws:
    `JDException`

### getAllRptNames

    java.lang.String[] getAllRptNames(java.lang.String rptSetId)

  Gets names of all reports in the report set.

  Parameters:
    `rptSetId` - the report set id.
  Returns:
    names of all reports in the report set.

### getCanUndo

    boolean getCanUndo(java.lang.String sessionId,
                       java.lang.String rptSetId,
                       java.lang.String rptName)

  Determines whether an undo action can be performed or not.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    true if an undo action can be performed; false otherwise.

### getCanRedo

    boolean getCanRedo(java.lang.String sessionId,
                       java.lang.String rptSetId,
                       java.lang.String rptName)

  Determines whether a redo action can be performed or not.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    true if a redo action can be performed; false otherwise.

### getCatalogName

    java.lang.String getCatalogName(java.lang.String rptSetId)

  Gets the catalog name of the report set.

  Parameters:
    `rptSetId` - the report set id.
  Returns:
    the catalog name of the report set.

### getCatalogName

    java.lang.String getCatalogName(java.lang.String userName,
                                    java.lang.String resourcePath)

  Gets the real path of the catalog.

  Parameters:
    `userName` - the user name.
    `resourcePath` - the relative path of the catalog resources.
  Returns:
    the real path of the catalog.

### isCloseWindow

    boolean isCloseWindow(java.lang.String sessionId)

  Gets the mode of closing window for a specified user.

  Parameters:
    `sessionId` - the user session id.
  Returns:
    the mode of closing window. true -- close the window. false -- keep the window open.

### getCurrentPageNumber

    int getCurrentPageNumber(java.lang.String sessionId,
                             java.lang.String rptSetId,
                             java.lang.String rptName)

  Gets the current page number.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    the current page number.

### getCurrentStyle

    java.lang.String getCurrentStyle(java.lang.String sessionId,
                                     java.lang.String rptSetId,
                                     java.lang.String rptName)

  Gets current style name.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    String, current style name.

### getCurReportId

    java.lang.String getCurReportId(java.lang.String rptSetId)

  Gets the name of the active report in the report set.

  Parameters:
    `rptSetId` - the report set id.
  Returns:
    the name of the active report in the report set.

### getDHTMLConfig

    DHTMLConfig getDHTMLConfig()

  Gets a DHTMLConfig instance.

  Returns:
    a DHTMLConfig instance.

### getDHTMLDataInfo

    DHTMLDataInfo getDHTMLDataInfo()

  Gets a DHTMLDataInfo instance.

  Returns:
    a DHTMLDataInfo instance.

### getDHTMLWriter

    DHTMLWriter getDHTMLWriter(java.lang.String sessionId,
                               java.lang.String rptSetId)

  Gets a DHTMLWriter instance.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
  Returns:
    a DHTMLWriter instance.

### getOpenedRptNames

    java.lang.String[] getOpenedRptNames(java.lang.String rptSetId)

  Gets names of all open reports in the report set.

  Parameters:
    `rptSetId` - the report set id.
  Returns:
    names of all open reports in the report set.

### getRptLanguage

    java.lang.String getRptLanguage(java.lang.String sessionId,
                                    java.lang.String rptSetId,
                                    java.lang.String rptName)

  Gets the language used by the report set.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    the language used by the report set.

### getRptEncoding

    java.lang.String getRptEncoding(java.lang.String sessionId,
                                    java.lang.String rptSetId,
                                    java.lang.String rptName)

  Gets the encoding used by the report set.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    the encoding used by the report set.

### getRptCountry

    java.lang.String getRptCountry(java.lang.String sessionId,
                                   java.lang.String rptSetId,
                                   java.lang.String rptName)

  Gets the country information used by the report set.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    the country information used by the report set.

### getRptSetDisplayName

    java.lang.String getRptSetDisplayName(java.lang.String rptSetId)

  Gets the display name of the report set.

  Parameters:
    `rptSetId` - the report set id.
  Returns:
    the display name of the report set.

### getRptSheetDisplayName

    java.lang.String getRptSheetDisplayName(java.lang.String rptSetId,
                                            java.lang.String rptName)

  Gets the display name of the report sheet.

  Parameters:
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    the display name of the report sheet.

### getStyleList

    java.lang.String[][] getStyleList()

  Gets the display name and CSS path of the style list.

  Returns:
    String[][], first array member is style name, second is CSS file's path.

### getTotalPageNumnber

    int getTotalPageNumnber(java.lang.String sessionId,
                            java.lang.String rptSetId,
                            java.lang.String rptName)

  Gets the total physical page number.

  Parameters:
    `sessionId` - the user session id.
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    The total physical page number.

### setCloseWindow

    void setCloseWindow(java.lang.String sessionId,
                        boolean closeWindow)

  Sets the mode of closing window for a specified user.

  Parameters:
    `sessionId` - the user session id.
    `closeWindow` - if true, the window will be closed; otherwise the window will not be closed.

### setCloseWindow

    void setCloseWindow(boolean closeWindow)

  Sets the mode of closing window for all users.

  Parameters:
    `closeWindow` - if true, the window will be closed; otherwise the window will not be closed.

### getSubReportKeys

    java.lang.String[] getSubReportKeys(java.lang.String rptSetId,
                                        java.lang.String rptName)

  Gets the list of keys of all engines related to the current report.

  Parameters:
    `rptSetId` - the report set id.
    `rptName` - the report name.
  Returns:
    the list of keys of all engines related to the current report.

### parseRuntimeID

    java.lang.String[] parseRuntimeID(java.lang.String runtimeID)

  Builds an array from a runtimeID.

  Parameters:
    `runtimeID` - runtime id. supported runtimeID format: SessionID-RptSetId-RptName SessionID-RptSetId
  Returns:
    an array. [SessionID,RptSetId,RptName] or [SessionID,RptSetId]

### getRuntimeDHTMLReportsStatus

    java.util.Vector getRuntimeDHTMLReportsStatus(java.lang.String userID)

  Query DHTML all running report status, including both front end and background mode. status include BackgroundMode,ReportName,TaskID,StartTime,FinishTime,ReportStatus,ReportParameters.. Code Simple: Vector reports = DHTMLClientService.getRuntimeDHTMLReportsStatus(â€śadminâ€?; for(int i=0;i
  Parameters:
    `userID` - login user name.
  Returns:
    a List include DHTMLRunTimeReportInfo class.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD