jet.server.api
Interface RptServer

All Known Subinterfaces:
HttpRptServer

public interface RptServer

RptServer is an interface for using JReport Server. This interface defines methods to initialize an RptServer, to start/restart an RptServer, to shutdown an RptServer, to get resource information about the RptServer, to run a report, to submit a scheduled task etc.
This interface starts it's own private JReport Server instance of which there can only be one active on a system.
This interface is designed to be called from an Java application program. If you are using a JSP program use the subclass HttpRptServer. Use the following code to create a new RptServer.

     //set report home
     System.getProperties().put("reporthome", "C:\\JReport\\Server");
     
     //creates instance of RptServer
     HttpUtil.initEnv(System.getProperties());
     RptServer server = HttpUtil.getHttpRptServer();
 
To communicate to an existing JReport Server there are two options.
1. Use the jet.server.api.rmi.RemoteRptServer to use the rmi protocol.
 
    // Set reporthome and set the RMI security file location in case we connect remotely
    System.getProperties().put("reporthome","C:\\JReport\\Server");             
    System.getProperties().put("jrs.rmi.auth_file", "C:\\JReport\\Server\\bin\\rmi.auth");
 
     // get a RemoteRptServer instance
     RemoteRptServer server = RemoteReportServerToolkit.getRemoteRptServer(host, port);
 
2. Use the JReport Client API, see api/jet/client/api/JRClient.


Method Summary
 boolean canAutoRefresh(java.lang.String name)
          This method is used to determine if the pipeline html page is set to auto-refresh.
 java.lang.String copySchedules(java.lang.String[] taskids, java.lang.String user)
          Copies the selected scheduled tasks.
 java.lang.String deleteCRDSchedules(java.util.Vector taskids, java.lang.String user)
          Deletes the selected Cached Report Data (CRD) schedules.
 java.lang.String deleteCubeSchedules(java.util.Vector taskids, java.lang.String user)
          Deletes the selected cube schedules.
 java.lang.String deleteSchedules(java.lang.String[] taskids, java.lang.String user)
          Deletes the selected scheduled tasks.
 void delScriptFile(java.lang.String filename)
          Deprecated.  
 boolean disableScheduledTask(java.lang.String taskID)
          Disables a scheduled task using the specified task ID.
 java.lang.String disableSchedules(java.lang.String[] taskids, java.lang.String user)
          Disables the selected scheduled tasks.
 void dumpEnginesInfo()
          Invokes this method to dump all currently active engines' instant information (status)
 boolean enableScheduledTask(java.lang.String taskID)
          Enables a scheduled task using the specified task ID.
 java.lang.String enableSchedules(java.lang.String[] taskids, java.lang.String user)
          Enables the selected scheduled tasks.
 ExportedFileList exportResult(java.lang.String userID, java.lang.String resultFileName, java.util.Properties props)
          Exports a report result to RST, HTML, PDF, TEXT, Excel, XML, RTF and PS.
 java.lang.String exportResultToOneFormat(java.lang.String userID, java.lang.String resultFileName, java.util.Properties props)
          Exports a report result to RST, HTML, PDF, TEXT, Excel, XML, RTF or PS.
 java.lang.String exportScripts(java.lang.String userID, java.lang.String[] taskIDs)
          Generates run scripts for the specified tasks.
 java.util.Vector getActiveTasks()
          Gets active tasks.
 java.util.Vector getActiveTasksByUser(java.lang.String userId)
          Gets active tasks by submitter.
 AdminService getAdminService()
          Gets the admin service of the report server.
 AliasMappingManager getAliasMappingManager()
          Gets the alias mapping manager.
 CatalogInfo getCatalogInfo(java.lang.String userID, java.lang.String catalog, int catVerNumber)
          Gets the CatalogInfo of the specific version of the catalog.
 ClusterMonitor getClusterMonitor()
          Gets the cluster monitor.
 ClusterService getClusterService()
          Gets the report cluster service.
 CompletedTaskTable getCompletedTaskTable()
          Gets the CompletedTaskTable.
 CRDManager getCRDManager()
          Gets the CRD manager.
 java.util.Properties getCRDTask(java.lang.String taskID)
          Gets the properties of a CRD task using the specified task ID.
 CubeManager getCubeManager()
          Get the cube manager.
 java.util.Properties getCubeTask(java.lang.String taskID)
          Gets the properties of a cube task using the specified task ID.
 java.util.GregorianCalendar getCurrentCalendar()
          Gets the current calendar.
 DashboardListenerManager getDashboardListenerManager()
          Gets the Dashboard listener Manager.
 DHTMLClientService getDHTMLClientService()
          Gets the DHTMLClientService.
 DynamicConnectionService getDynamicConnectionService()
          Gets the DynamicConnection service.
 java.util.List getEngineErrors(java.lang.String resultFile)
          Gets the engine errors after running a report.
 java.lang.String getFilenames(java.lang.String name, int index)
          This method is used to get the order index's html file names.
 GlobalNLSLibrary getGlobalNLSLibrary()
          Gets the Global NLS Library.
 jet.web.dhtml.HelpAPI getHelpService()
          Gets the HelpAPI.
 com.jinfonet.ibus.InformationBusManager getInformationBusManager()
          Gets the Information Bus Manager of JReport Server.
 InteractiveReportTaskService getInteractiveReportTaskService()
          Gets the InteractiveReport task service.
 LargeReportManager getLargeReportManager()
          Deprecated. As of v8, replaced by getOndemandReportManager()
 java.lang.String getLicenceExpiredDate()
          Gets the expiration date of the server license
 java.util.Hashtable getMediaTray()
          Gets the names of printers' media tray.
 MonitorService getMonitorService()
          Gets the monitor service of the server.
 NLSLibraryManager getNLSLibraryManager()
          Gets the NLS Library Manager of JReport Server.
 OndemandReportManager getOndemandReportManager()
          Gets the OndemandReportManager.
 java.lang.String[] getPaperList()
          Gets the print paper list.
 ParameterRecorder getParameterRecorder()
          Gets the report parameter recorder to allow the user to get and set historical parameter value.
 java.util.Vector getPrinters()
          Gets the names of printers.
 ProfileManager getProfileManager()
          Gets the function profile manager, which is used to manage the function profiles.
 RemoteFileService getRemoteFileService()
          Gets RemoteFileService object which running at this RptServer.
 ReportInfo getReportInfo(java.lang.String userID, java.lang.String catalog, int catVerNumber, java.lang.String report, int rptVerNumber)
          Gets ReportInfo of specific version of catalog and report.
 ReportInfo getReportInfo(java.lang.String userID, java.lang.String catalog, int catVerNumber, java.lang.String report, int rptVerNumber, java.util.Hashtable ht)
          Gets the ReportInfo of the specific version of the catalog and report.
 ReportInfo getReportInfo(java.lang.String userID, java.lang.String catalog, java.lang.String report)
          Gets the ReportInfo of the specific catalog and report.
 ResourceManager getResourceManager()
          Gets the ResourceManager.
 ResourceNLSManager getResourceNLSManager()
          Gets the NLS manager for server resource names
 ResultVersionTable getResultVersionTable()
          Gets the ResultVersionTable.
 RstResultInfo getRstResultInfo(java.lang.String rst)
          Gets the RstResultInfo of the specific rst file.
 java.util.Vector getSchedCRDTasks()
          Gets the scheduled CRD tasks.
 java.util.Vector getSchedCRDTasksByUser(java.lang.String userId)
          Gets the scheduled CRD tasks by submitter.
 java.util.Vector getSchedCubeTasks()
          Gets the scheduled cube tasks.
 java.util.Vector getSchedCubeTasksByUser(java.lang.String userId)
          Gets the scheduled cube tasks by submitter.
 java.util.Properties getScheduledTask(java.lang.String taskID)
          Gets the properties of a scheduled task using the specified task ID.
 java.util.Vector getScheduledTasks()
          Gets the scheduled tasks.
 java.util.Vector getScheduledTasksByUser(java.lang.String userId)
          Gets the scheduled tasks by submitter
 java.lang.String[] getScriptsList()
          Deprecated.  
 SecurityWebAdaptor getSecurityWebAdaptor()
          Gets the SecurityWebAdaptor.
 ServerEnv getServerEnv()
          Gets the ServerEnv.
 jet.server.service.ServiceManager getServiceManager()
          Gets the Service Manager.
 SimpleDHtmlAPI getSimpleDHtmlService()
          Gets the SimpleDHtmlAPI.
 SystemPerformanceInfo getSystemPerformanceInfo()
          Gets the System Performance information of which this RptServer instance is running.
 TaskAuditor getTaskAuditor()
          Get the Task Auditor.
 TempResultOwnerManager getTempResultOwnerManager()
          Gets the TempResultOwnerManager.
 TriggerManager getTriggerManager()
          Opens the TriggerManager interface.
 UserPreferenceManager getUserDHTMLPreferenceManager()
          Gets the preference manager to allow the user to and save his/her dhtml preference.
 UserPreferenceManager getUserPreferenceManager()
          Gets the preference manager to allow the user to get and save his/her preference.
 UserSessionManager getUserSessionManager()
          Gets the UserSessionManager.
 VersionAmountLimitTable getVersionAmountLimitTable()
          Gets the VersionAmountTable.
 WebUIConfig getWebUIConfig()
          Gets the WebUIConfig.
 void init(java.util.Properties svrProps)
          Initializes RptServer.
 boolean isClusterEnable()
          Checks if this server has the cluster feature.
 boolean isFreeVirtualAppliance()
          Checks if this server is free virtual appliance.
 boolean isHtmlPipeLine(java.lang.String name)
          This method is used to determine if the temp result is the pipeline html.
 boolean isRunningQueue()
          Checks if the running report is managed by a running report queue
 boolean isScriptFileExist(java.lang.String filename)
          Deprecated.  
 boolean isStarted()
          Checks if the server is running.
 boolean isTaskQueueFull(int priority)
          Returns whether the task queue is full.
 boolean isTempResultReady(java.lang.String tempResultName)
          Checks if the temporary result is ready.
 java.lang.String loadScheduledFromFile(java.lang.String fileName)
          Loads scheduled tasks from an exported schedule file.
 java.lang.String loadScriptFromFile(java.lang.String filename)
          Deprecated.  
 java.util.Properties[] parseScripts(java.lang.String scripts)
          Parses given scripts, and transfers corresponding task into Properties object.
 void publishResultToVersion(java.lang.String userid, java.util.Properties ht)
          Publishes report result to version system when viewing report result
 boolean removeScheduledTask(java.lang.String taskID)
          Removes a scheduled task using the specified task ID.
 void restart(java.util.Properties svrProps)
          Restarts the RptServer.
 java.lang.String runReport(java.lang.String userID, java.lang.String catalog, java.lang.String report, java.util.Properties propParams)
          Runs an on-demand report immediately and waits for it.
 java.lang.String runReportNotWaitResult(java.lang.String userID, java.lang.String catalog, java.lang.String report, java.util.Properties propParams)
          Runs an on-demand report in the background.
 java.lang.String runReportWithTimeouts(java.lang.String userID, java.lang.String catalog, java.lang.String report, java.util.Properties propParams, long timeouts)
          Runs an on-demand report immediately with timeouts.
 java.lang.String runTask(java.lang.String userID, java.util.Properties propTask)
          Runs a scheduled task immediately and returns the completed task ID.
 long runTestReport(java.util.Properties ht)
          Runs a test report.
 java.lang.String saveScheduledToFile(java.lang.String[] taskid, java.lang.String fileName, boolean bOverWrite)
          Saves scheduled tasks to a schedule script file.
 java.lang.String saveScheduledToScriptFile(java.lang.String[] taskid)
          Deprecated.  
 boolean saveScriptToFile(java.lang.String script, java.lang.String filename)
          Deprecated.  
 void setJDBCConnection(java.lang.String userID, java.lang.String catalog, java.lang.String jdbcURL, java.lang.String dbUser, java.lang.String dbPswd, java.lang.String jdbcDriver)
          Deprecated. Replaced by properties jrs.jdbc_url, jrs.jdbc_driver and jrs.jdbc_connection_object for running reports.
 void setRefreshed(java.lang.String name, boolean isRefreshed)
          This method is used for setting if the first pipeline html page is refreshed.
 void setTempResultOwnerManager(TempResultOwnerManager ownerMan)
          Sets the TempResultOwnerManager.
 void setUserSessionManager(UserSessionManager ssnMan)
          Sets the UserSessionManager.
 void shutdown()
          Shuts down the RptServer.
 void start()
          Starts the RptServer.
 boolean stopActiveTask(java.lang.String taskID)
          Stops a scheduled task using the task ID.
 boolean stopActiveTaskByUser(java.lang.String taskID, java.lang.String userId)
          Stops a scheduled task using the task ID and submitter.
 java.lang.String submitScheduledTask(java.lang.String userID, java.util.Properties propScheduledTask)
          Submits a scheduled task and returns the task ID.
 java.lang.Object[] submitScheduledTasks(java.lang.String userID, java.util.Properties[] tasks)
          Submits a set of scheduled tasks and returns the task IDs.
 java.lang.String waitTempResultReady(java.lang.String tempResultName)
          Waits for the temporary result to be ready and returns a status message.
 

Method Detail

init

void init(java.util.Properties svrProps)
Initializes RptServer. This method must be called after the RptServer object is created.

Parameters:
svrProps - properties of the server. These properties related to the implementation of the RptServer. For the jet.server.jrserver.JRRptServer of JReport's implementation, the property "reporthome" must be set, and other properties are optional. The properties are:
  • reporthome or install.root: Must be set. for example, c:/JReport/Server.
  • jrs.isMyServer: Indicates if the HTTP server is a JReport standalone server. The default value is "false".
  • temp_dir or jrs.dir.temp: The path of the temp directory. The default value is "/temp" in reporthome.
  • history_dir or jrs.dir.history: The directory where all the versions of report results will be maintained. The default value is "/history" in reporthome.
  • auth_scheme: It specifies the scheme of authentication. Its value must be Basic or Digest. The default value is Basic.
  • default_doc: The home page of the JReport Server User Guide. It is an HTML file. If it is not set or the file it specifies cannot be loaded, the default home page of JReport Server will be used. The path is relative to reporthome , for example, help/userguide/server/index.htm.
  • isConvertedServletPath: This property specifies whether your web server decodes the path if it contains special characters. This information is used for JRServlet to determine whether it needs to convert that path. If you don't specify this property, your web server is not supposed to decode the path.
  • vError: Enables output of error messages of JReport Engine. Available values are true/false.
  • vDebug: Enables output of debug messages of JReport Engine. Available values are true/false.
  • logFile: Transfers output messages of JReport engine to the file /logs/engine.log of reporthome or other file as specified.

start

void start()
Starts the RptServer. This method must be called after the RptServer object is initialized.


isStarted

boolean isStarted()
Checks if the server is running.

Returns:
if the server is running.

restart

void restart(java.util.Properties svrProps)
Restarts the RptServer. This method will shut down RptServer first, then call the start(...) method.

Parameters:
svrProps - properties of the server. These properties are related to the implementation of RptServer.

shutdown

void shutdown()
Shuts down the RptServer.


getServerEnv

ServerEnv getServerEnv()
Gets the ServerEnv.

Returns:
the ServerEnv.
See Also:
ServerEnv

getResourceManager

ResourceManager getResourceManager()
Gets the ResourceManager.

Returns:
the ResourceManager.
See Also:
ResourceManager

getSecurityWebAdaptor

SecurityWebAdaptor getSecurityWebAdaptor()
Gets the SecurityWebAdaptor.

Returns:
the SecurityWebAdaptor
See Also:
SecurityWebAdaptor

getSimpleDHtmlService

SimpleDHtmlAPI getSimpleDHtmlService()
Gets the SimpleDHtmlAPI.

Returns:
the SimpleDHtmlAPI.
See Also:
SimpleDHtmlAPI

getDHTMLClientService

DHTMLClientService getDHTMLClientService()
Gets the DHTMLClientService.

Returns:
the DHTMLClientService.
See Also:
DHTMLClientService

getRemoteFileService

RemoteFileService getRemoteFileService()
Gets RemoteFileService object which running at this RptServer.

Returns:
the RemoteFileSerice running at the RptServer, null if the remote server can not be connected to
See Also:
RemoteFileService

getHelpService

jet.web.dhtml.HelpAPI getHelpService()
Gets the HelpAPI.

Returns:
the HelpAPI.
See Also:
HelpAPI

getTempResultOwnerManager

TempResultOwnerManager getTempResultOwnerManager()
Gets the TempResultOwnerManager.

Returns:
the TempResultOwnerManager.
See Also:
TempResultOwnerManager

getLargeReportManager

LargeReportManager getLargeReportManager()
Deprecated. As of v8, replaced by getOndemandReportManager()

Gets the LargeReportManager.

Returns:
the LargeReportManager.
See Also:
LargeReportManager

setTempResultOwnerManager

void setTempResultOwnerManager(TempResultOwnerManager ownerMan)
Sets the TempResultOwnerManager.

Parameters:
ownerMan - the TempResultOwnerManager.
See Also:
TempResultOwnerManager

getUserSessionManager

UserSessionManager getUserSessionManager()
Gets the UserSessionManager.

Returns:
the UserSessionManager.
See Also:
UserSessionManager

setUserSessionManager

void setUserSessionManager(UserSessionManager ssnMan)
Sets the UserSessionManager.

Parameters:
ssnMan - the UserSessionManager.
See Also:
UserSessionManager

getRstResultInfo

RstResultInfo getRstResultInfo(java.lang.String rst)
Gets the RstResultInfo of the specific rst file.

Parameters:
rst - the real path of the rst file, for example, c:\temp\rst.
Returns:
the RstResultInfo.
See Also:
RstResultInfo

getReportInfo

ReportInfo getReportInfo(java.lang.String userID,
                         java.lang.String catalog,
                         java.lang.String report)
Gets the ReportInfo of the specific catalog and report.

Parameters:
userID - the user ID.
catalog - the catalog path in JReport Report server, for example, /SampleReports/SampleReports.cat.
report - the report name, for example, /SampleReports/CustomerAnalysis.cls.
Returns:
the ReportInfo.
See Also:
ReportInfo

getCatalogInfo

CatalogInfo getCatalogInfo(java.lang.String userID,
                           java.lang.String catalog,
                           int catVerNumber)
Gets the CatalogInfo of the specific version of the catalog.

Parameters:
userID - the user ID.
catalog - the catalog path in JReport Report server, for example, /SampleReports/SampleReports.cat.
catVerNumber - version number of the catalog
Returns:
the CatalogInfo.
See Also:
CatalogInfo

getReportInfo

ReportInfo getReportInfo(java.lang.String userID,
                         java.lang.String catalog,
                         int catVerNumber,
                         java.lang.String report,
                         int rptVerNumber)
Gets ReportInfo of specific version of catalog and report.

Parameters:
userID - the user ID.
catalog - the catalog path in JReport Report server, for example, /SampleReports/SampleReports.cat.
catVerNumber - version number of the catalog
report - the report name, for example, /SampleReports/CustomerAnalysis.cls.
rptVerNumber - version number of the report
Returns:
the ReportInfo.
See Also:
ReportInfo

getReportInfo

ReportInfo getReportInfo(java.lang.String userID,
                         java.lang.String catalog,
                         int catVerNumber,
                         java.lang.String report,
                         int rptVerNumber,
                         java.util.Hashtable ht)
Gets the ReportInfo of the specific version of the catalog and report.

Parameters:
userID - the user ID.
catalog - the catalog path in JReport Report server, for example, /SampleReports/SampleReports.cat.
catVerNumber - version number of the catalog
report - the report name, for example, /SampleReports/CustomerAnalysis.cls.
rptVerNumber - version number of the report
ht - a hashtable containing some additional properties such as catalog DB connection information.
Returns:
the ReportInfo.
See Also:
ReportInfo

submitScheduledTask

java.lang.String submitScheduledTask(java.lang.String userID,
                                     java.util.Properties propScheduledTask)
                                     throws RptServerException
Submits a scheduled task and returns the task ID.

Parameters:
userID - the user ID.
propScheduledTask - the properties of the scheduled task. Please see the file for the instruction of the scheduled task properties.
Returns:
the task ID.
Throws:
RptServerException - if an RptServerException occurs.

runTask

java.lang.String runTask(java.lang.String userID,
                         java.util.Properties propTask)
                         throws RptServerException
Runs a scheduled task immediately and returns the completed task ID. The schedule information will be ignored if it exists in the task properties.

Parameters:
userID - the user ID.
propTask - the properties of the task. Please see the file for the instruction of the scheduled task properties.
Returns:
the completed task ID.
Throws:
RptServerException - if an RptServerException occurs.

runReport

java.lang.String runReport(java.lang.String userID,
                           java.lang.String catalog,
                           java.lang.String report,
                           java.util.Properties propParams)
                           throws RptServerException,
                                  TooManyReportsException
Runs an on-demand report immediately and waits for it. After the report is complete, return the temporary result name.

Parameters:
userID - the user ID.
catalog - the catalog path in the report server, for example,/SunVMDemo/SunVMDemo.cat.
report - the report name, for example, invoice.cls.
propParams - the properties that contains APIConst.TAG_WHERE_PORTION, APIConst.TAG_NAMED_WHERE_PORTION, APIConst.TAG_WHERE_CLAUSE, APIConst.TAG_USE_DEF_DB_USER, APIConst.TAG_USE_NEW_DB_PSWD, APIConst.TAG_DB_USER, APIConst.TAG_DB_PSWD, APIConst.TAG_JDBC_URL, APIConst.TAG_JDBC_DRIVER, APIConst.TAG_JDBC_CONNECTION_OBJECT and the parameter values of the report. For each report parameter in the properties, the key is APIConst.TAG_PARAM_PREFIX + PARAMETER_NAME, the value is the value of the parameter. If the parameter supports multiple choices, the roperty value must be an array consisting of the values of the parameter.
      Example: Running a report with user's JDBC connection object (APIConst.TAG_JDBC_CONNECTION_OBJECT).
      //creates the java.sql.Connection object.
      java.sql.Connection myCon = java.sql.DriverManager.getConnection(dbUrl);

      //sets the parameter APIConst.TAG_JDBC_CONNECTION_OBJECT(jrs.jdbc_connection_object) to run a report.
      propParams.put(APIConst.TAG_JDBC_CONNECTION_OBJECT, myCon);

      //runs the report using this java.sql.Connection object instead of
      //the default DB settings in the catalog.
      rptServer.runReport(userID, catalog, report, propParams);
      
Returns:
the temporary result name.
Throws:
RptServerException - if an RptServerException occurs.
TooManyReportsException

runReportNotWaitResult

java.lang.String runReportNotWaitResult(java.lang.String userID,
                                        java.lang.String catalog,
                                        java.lang.String report,
                                        java.util.Properties propParams)
                                        throws RptServerException,
                                               TooManyReportsException
Runs an on-demand report in the background. Before the report is complete, return the temporary result name. Use the methods isTempResultReady(...) and waitTempResultReady(...) to wait until the temporary result is ready.

Parameters:
userID - the user ID.
catalog - the catalog path in the report server, for example, /SunVMDemo/SunVMDemo.cat.
report - the report name, for example, invoice.cls.
propParams - the properties that contain APIConst.TAG_WHERE_PORTION, APIConst.TAG_NAMED_WHERE_PORTION, APIConst.TAG_WHERE_CLAUSE, APIConst.TAG_USE_DEF_DB_USER, APIConst.TAG_USE_NEW_DB_PSWD, APIConst.TAG_DB_USER, APIConst.TAG_DB_PSWD, APIConst.TAG_JDBC_URL, APIConst.TAG_JDBC_DRIVER, APIConst.TAG_JDBC_CONNECTION_OBJECT and the parameter values of the report.
For each report parameter in the properties, the key is APIConst.TAG_PARAM_PREFIX + PARAMETER_NAME, the value is the value of the parameter. If the parameter supports multiple choices, the property value must be an array consisting of the values of the parameter.
      Example: Running a report with user's JDBC connection object (APIConst.TAG_JDBC_CONNECTION_OBJECT).
      //creates the java.sql.Connection object.
      java.sql.Connection myCon = java.sql.DriverManager.getConnection(dbUrl);

      //sets the parameter APIConst.TAG_JDBC_CONNECTION_OBJECT(jrs.jdbc_connection_object) to run a report.
      propParams.put(APIConst.TAG_JDBC_CONNECTION_OBJECT, myCon);

      //runs the report using this java.sql.Connection object instead of
      //the default DB settings in the catalog.
      rptServer.runReportNotWaitResult(userID, catalog, report, propParams);
      
Returns:
the temporary result name.
Throws:
RptServerException - if an RptServerException occurs.
TooManyReportsException

runReportWithTimeouts

java.lang.String runReportWithTimeouts(java.lang.String userID,
                                       java.lang.String catalog,
                                       java.lang.String report,
                                       java.util.Properties propParams,
                                       long timeouts)
                                       throws RptServerException,
                                              TooManyReportsException
Runs an on-demand report immediately with timeouts. When timeouts is reached, this method will add the temporary result name into the Background Tasks List and return the temporary result name. After calling this method, you can use the methods isTempResultReady(...) and waitTempResultReady(...) to check/wait until the temporary result is ready.

Parameters:
userID - the user ID.
catalog - the catalog path in the report server, for example, /SunVMDemo/SunVMDemo.cat.
report - the report name, for example, invoice.cls.
propParams - the properties that contain APIConst.TAG_WHERE_PORTION, APIConst.TAG_NAMED_WHERE_PORTION, APIConst.TAG_WHERE_CLAUSE, APIConst.TAG_USE_DEF_DB_USER, APIConst.TAG_USE_NEW_DB_PSWD, APIConst.TAG_DB_USER, APIConst.TAG_DB_PSWD, APIConst.TAG_JDBC_URL, APIConst.TAG_JDBC_DRIVER, APIConst.TAG_JDBC_CONNECTION_OBJECT and the parameter values of the report.
For each report parameter in the properties, the key is APIConst.TAG_PARAM_PREFIX + PARAMETER_NAME, the value is the value of the parameter. If the parameter supports multiple choices, the property value must be an array consisting of the values of the parameter.
      Example: Running a report with user's JDBC connection object (APIConst.TAG_JDBC_CONNECTION_OBJECT).
      //creates the java.sql.Connection object.
      java.sql.Connection myCon = java.sql.DriverManager.getConnection(dbUrl);

      //sets the parameter APIConst.TAG_JDBC_CONNECTION_OBJECT(jrs.jdbc_connection_object) to run a report.
      propParams.put(APIConst.TAG_JDBC_CONNECTION_OBJECT, myCon);

      //runs the report using this java.sql.Connection object instead of
      //the default DB settings in the catalog.
      rptServer.runReportWithTimeouts(userID, catalog, report, propParams, jet.server.api.http.HttpUtil.getReportWaitTimeouts());
      
timeouts - the timeouts in milliseconds.
Returns:
the temporary result name.
Throws:
RptServerException - if an RptServerException occurs.
TooManyReportsException - if a TooManyReportsException occurs.

isTempResultReady

boolean isTempResultReady(java.lang.String tempResultName)
                          throws RptServerException
Checks if the temporary result is ready.

Parameters:
tempResultName - the temporary result name.
Returns:
if the temporary result is ready.
Throws:
RptServerException - if an RptServerException occurs.

waitTempResultReady

java.lang.String waitTempResultReady(java.lang.String tempResultName)
                                     throws java.lang.InterruptedException
Waits for the temporary result to be ready and returns a status message.

Parameters:
tempResultName - the temporary result name.
Returns:
the error message. null if no error.
Throws:
java.lang.InterruptedException - if an InterruptedException occurs.

exportResultToOneFormat

java.lang.String exportResultToOneFormat(java.lang.String userID,
                                         java.lang.String resultFileName,
                                         java.util.Properties props)
                                         throws RptServerException
Exports a report result to RST, HTML, PDF, TEXT, Excel, XML, RTF or PS.

Parameters:
userID - the user ID.
resultFileName - the real file name of the result, for example, c:\JReport\Server\temp\18238181130.temp.
props - the properties that contains APIConst.TAG_RESULT_TYPE. About properties for each result type, see the help document Appendix 7: Properties for scheduling reports via URL..
Returns:
the temporary result name.
Throws:
RptServerException - if an RptServerException occurs.

exportResult

ExportedFileList exportResult(java.lang.String userID,
                              java.lang.String resultFileName,
                              java.util.Properties props)
                              throws RptServerException
Exports a report result to RST, HTML, PDF, TEXT, Excel, XML, RTF and PS.

Parameters:
userID - the user ID.
resultFileName - the real file name of the result, for example, c:\JReport\Server\temp\18238181130.temp.
props - the properties APIConst.TAG_RST, APIConst.TAG_PDF, APIConst.TAG_TEXT, APIConst.TAG_EXCEL and APIConst.TAG_PS. Value of these properties is true or false. The properties APIConst.TAG_HTML, APIConst.TAG_XML and APIConst.TAG_RTF. Value of these properties is file name without path (for example, invoice and invoice.rtf). About properties for each result type,see the help document Appendix 7: Properties for scheduling reports via URL.".
Returns:
the exported file list.
Throws:
RptServerException - if an RptServerException occurs.

getResultVersionTable

ResultVersionTable getResultVersionTable()
Gets the ResultVersionTable.

Returns:
the ResultVersionTable.
See Also:
ResultVersionTable

getScheduledTask

java.util.Properties getScheduledTask(java.lang.String taskID)
Gets the properties of a scheduled task using the specified task ID.

Parameters:
taskID - the task ID.
Returns:
the properties of a scheduled task.

removeScheduledTask

boolean removeScheduledTask(java.lang.String taskID)
Removes a scheduled task using the specified task ID.

Parameters:
taskID - the task ID.
Returns:
if the scheduled task is removed.

enableScheduledTask

boolean enableScheduledTask(java.lang.String taskID)
Enables a scheduled task using the specified task ID.

Parameters:
taskID - the task ID.
Returns:
if the scheduled task is enabled.

disableScheduledTask

boolean disableScheduledTask(java.lang.String taskID)
Disables a scheduled task using the specified task ID.

Parameters:
taskID - the task ID.
Returns:
if the scheduled task is disabled.

stopActiveTask

boolean stopActiveTask(java.lang.String taskID)
Stops a scheduled task using the task ID.

Parameters:
taskID - the task ID.
Returns:
if the scheduled task stops.

stopActiveTaskByUser

boolean stopActiveTaskByUser(java.lang.String taskID,
                             java.lang.String userId)
Stops a scheduled task using the task ID and submitter.

Parameters:
taskID - the task ID.
userId - the submitter
Returns:
if the scheduled task stops.
Since:
JREntServer V6

getScheduledTasks

java.util.Vector getScheduledTasks()
Gets the scheduled tasks.

Returns:
scheduled tasks. The Vector contains Properties objects. Each Properties object includes the properties of a scheduled task.

getScheduledTasksByUser

java.util.Vector getScheduledTasksByUser(java.lang.String userId)
Gets the scheduled tasks by submitter

Parameters:
userId - the submitter
Returns:
scheduled tasks. The Vector contains Properties objects. Each Properties object includes the properties of a scheduled task.
Since:
JREntServer V6

getActiveTasks

java.util.Vector getActiveTasks()
Gets active tasks.

Returns:
active tasks. The Vector contains jet.server.api.ActiveTaskRecord objects. Each ActiveTaskRecord object contains information of an active task in the report server.
See Also:
ActiveTaskRecord

getActiveTasksByUser

java.util.Vector getActiveTasksByUser(java.lang.String userId)
Gets active tasks by submitter.

Parameters:
userId - the submitter
Returns:
active tasks. The Vector contains jet.server.api.ActiveTaskRecord objects. Each ActiveTaskRecord object contains information of an active task in the report server.
Since:
JREntServer V6
See Also:
ActiveTaskRecord

getCompletedTaskTable

CompletedTaskTable getCompletedTaskTable()
Gets the CompletedTaskTable.

Returns:
the CompletedTaskTable.
See Also:
CompletedTaskTable

getPrinters

java.util.Vector getPrinters()
Gets the names of printers.

Returns:
the names of printers.

getMediaTray

java.util.Hashtable getMediaTray()
Gets the names of printers' media tray.

Returns:
Hashtable of media tray.

setJDBCConnection

void setJDBCConnection(java.lang.String userID,
                       java.lang.String catalog,
                       java.lang.String jdbcURL,
                       java.lang.String dbUser,
                       java.lang.String dbPswd,
                       java.lang.String jdbcDriver)
                       throws RptServerException
Deprecated. Replaced by properties jrs.jdbc_url, jrs.jdbc_driver and jrs.jdbc_connection_object for running reports.

Changes the JDBC connection information of a catalog.

Parameters:
catalog - the full path catalog name on the resource tree.
userID - the user ID.
jdbcURL - the URL of the JDBC connection. The value null means that the value is not changed.
dbUser - the user ID of the JDBC connection. The value null means that the value is not changed.
dbPswd - the password of the JDBC connection. The value null means that the value is not changed.
jdbcDriver - the JDBC driver of the JDBC connection. The value null means that the value is not changed.
Throws:
RptServerException - if an RptServerException occurs.

publishResultToVersion

void publishResultToVersion(java.lang.String userid,
                            java.util.Properties ht)
                            throws RptServerException
Publishes report result to version system when viewing report result

Parameters:
userid - user ID
ht - properties of the report result, including catalog name, report name, temp result file name, parameters if this report has any parameter.
Throws:
RptServerException - if an RptServerException occurs.

getVersionAmountLimitTable

VersionAmountLimitTable getVersionAmountLimitTable()
Gets the VersionAmountTable.

Returns:
the VersionAmountTable.
See Also:
VersionAmountTable

isRunningQueue

boolean isRunningQueue()
Checks if the running report is managed by a running report queue

Returns:
If a report queue is running, return true, otherwise return false

isTaskQueueFull

boolean isTaskQueueFull(int priority)
Returns whether the task queue is full.

Returns:
If the task queue is full return true, otherwise return false

saveScheduledToFile

java.lang.String saveScheduledToFile(java.lang.String[] taskid,
                                     java.lang.String fileName,
                                     boolean bOverWrite)
Saves scheduled tasks to a schedule script file.

Parameters:
taskid - The id of the task which will be saved to file
fileName - The saved scheduled task file's name
bOverWrite - If to replace the existing Schedule file
Returns:
The output message to client side

loadScheduledFromFile

java.lang.String loadScheduledFromFile(java.lang.String fileName)
Loads scheduled tasks from an exported schedule file.

Parameters:
fileName - The schedule task's fileName which will be loaded
Returns:
return the output message to client side

saveScheduledToScriptFile

java.lang.String saveScheduledToScriptFile(java.lang.String[] taskid)
Deprecated. 

Saves scheduled tasks to a script file.

Parameters:
taskid - The id of the task which will be save to file
fileName - The saved scheduled task file's name
bOverWrite - If to replace the existing Schedule file
Returns:
The output message to client side

copySchedules

java.lang.String copySchedules(java.lang.String[] taskids,
                               java.lang.String user)
Copies the selected scheduled tasks.

Parameters:
taskids - All selected schedule task ids
user - the user
Returns:
the output message to client side

deleteSchedules

java.lang.String deleteSchedules(java.lang.String[] taskids,
                                 java.lang.String user)
Deletes the selected scheduled tasks.

Parameters:
taskids - All selected schedule task ids
user - the user
Returns:
the output message to client side

enableSchedules

java.lang.String enableSchedules(java.lang.String[] taskids,
                                 java.lang.String user)
Enables the selected scheduled tasks.

Parameters:
taskids - All selected schedule task ids
user - the user
Returns:
the output message to client side

disableSchedules

java.lang.String disableSchedules(java.lang.String[] taskids,
                                  java.lang.String user)
Disables the selected scheduled tasks.

Parameters:
taskids - All selected schedule task ids
user - the user
Returns:
the output message to client side

getFilenames

java.lang.String getFilenames(java.lang.String name,
                              int index)
This method is used to get the order index's html file names.

Parameters:
name - : the key of the html file name, or example, the key of the html file name 32646870_1.html is 32646870.
index - : the order of the html file name
Returns:
: The order index's html file names

canAutoRefresh

boolean canAutoRefresh(java.lang.String name)
This method is used to determine if the pipeline html page is set to auto-refresh.

Parameters:
name - the key of the html file name, for example, the key of the html filename 32646870_1.html is 32646870.
Returns:
: if set to auto-refresh

setRefreshed

void setRefreshed(java.lang.String name,
                  boolean isRefreshed)
This method is used for setting if the first pipeline html page is refreshed.

Parameters:
name - the key of the html file name, for example, the key of the html filename 32646870_1.html is 32646870.
isRefreshed - if the first pipeline html page is refreshed

isHtmlPipeLine

boolean isHtmlPipeLine(java.lang.String name)
This method is used to determine if the temp result is the pipeline html.

Parameters:
name - : the key of the html file name, for example, the key of the html filename 32646870_1.html is 32646870.
Returns:
: if the temp result is the pipeline html

getClusterService

ClusterService getClusterService()
Gets the report cluster service. It provides active report members' information and load balancer etc.

Returns:
the ClusterService object.

getAdminService

AdminService getAdminService()
Gets the admin service of the report server.

Returns:
the AdminService object. If the RptServer instance is a remote wrapped server, which is gotten by calling RemoteReportServerToolkit, this method will throw UnsupportedOperationException always, for remote server API does not support administration functions.
See Also:
jet.server.api.

getMonitorService

MonitorService getMonitorService()
Gets the monitor service of the server.

Returns:
the MonitorService object.
See Also:
jet.server.api.monitor.

getClusterMonitor

ClusterMonitor getClusterMonitor()
Gets the cluster monitor. It provides active report members' monitor.

Returns:
the ClusterMonitor object.

isClusterEnable

boolean isClusterEnable()
Checks if this server has the cluster feature.

Returns:
true if the server has the cluster feature, otherwise false.

getParameterRecorder

ParameterRecorder getParameterRecorder()
Gets the report parameter recorder to allow the user to get and set historical parameter value.

Returns:
the preference manager.

getUserPreferenceManager

UserPreferenceManager getUserPreferenceManager()
Gets the preference manager to allow the user to get and save his/her preference.

Returns:
the preference manager.

getUserDHTMLPreferenceManager

UserPreferenceManager getUserDHTMLPreferenceManager()
Gets the preference manager to allow the user to and save his/her dhtml preference.

Returns:
the preference manager.

getProfileManager

ProfileManager getProfileManager()
Gets the function profile manager, which is used to manage the function profiles. Profile is predefined for users to specify available functions. A profile defines a set of functions which will be available for end-user when opening a report. Only administrator can add/remove/update profiles.

Returns:
the function profile manager.

runTestReport

long runTestReport(java.util.Properties ht)
                   throws RptServerException
Runs a test report.

Parameters:
ht - run report needed information, such as report, catalog and submitter, etc.
Returns:
the time cost
Throws:
RptServerException

getScriptsList

java.lang.String[] getScriptsList()
Deprecated. 

This method will get an array including all scheduler script file names.

Returns:
A String array

loadScriptFromFile

java.lang.String loadScriptFromFile(java.lang.String filename)
Deprecated. 

This method will return script's string.

Parameters:
filename - - A String of the schedule script file name
Returns:
The selected script file will be converted to a string

saveScriptToFile

boolean saveScriptToFile(java.lang.String script,
                         java.lang.String filename)
Deprecated. 

This method will save script string to file system.

Parameters:
script - - A String object of Scheduler's script text
filename - - File name that the script will be stored with.
Returns:
Return true if the operation is successful or else false;

isScriptFileExist

boolean isScriptFileExist(java.lang.String filename)
Deprecated. 

This method tests whether the specified script file exists.

Parameters:
filename - - File name that will be tested
Returns:
Return true if the script file exists or else false.

delScriptFile

void delScriptFile(java.lang.String filename)
Deprecated. 

This method will delete the specified script file.

Parameters:
filename - - File name that will be deleted

getOndemandReportManager

OndemandReportManager getOndemandReportManager()
Gets the OndemandReportManager.

Returns:
the OndemandReportManager.
See Also:
OndemandReportReportManager

exportScripts

java.lang.String exportScripts(java.lang.String userID,
                               java.lang.String[] taskIDs)
Generates run scripts for the specified tasks.

Parameters:
taskIDs: - specifiedspecified tasks' ID
userID: - specifiedspecified user id
Returns:
scripts string

parseScripts

java.util.Properties[] parseScripts(java.lang.String scripts)
                                    throws RptServerException
Parses given scripts, and transfers corresponding task into Properties object.

Parameters:
scripts - contents of the scripts
Returns:
Properties array whose order corresponds to that of tasks described in scripts. Properties object can be submitted to the Server by using the jet.server.api.RptServer.submitScheduledTask method.
Throws:
RptServerException

getTriggerManager

TriggerManager getTriggerManager()
Opens the TriggerManager interface.

Returns:
a TriggerManager interface

submitScheduledTasks

java.lang.Object[] submitScheduledTasks(java.lang.String userID,
                                        java.util.Properties[] tasks)
                                        throws RptServerException
Submits a set of scheduled tasks and returns the task IDs.

Parameters:
userID - the user ID.
tasks - An array of Properties. Each Properties object in the array describes a task. Please see the file for the instruction of the scheduled task properties.
Returns:
Object array that corresponds to array of the submitted tasks. When the submission of the corresponding task is successful, it is the taskID; when failed, it is Exception.
Throws:
RptServerException
Since:
8.00

getPaperList

java.lang.String[] getPaperList()
Gets the print paper list.

Returns:
string array that corresponds to the list of print paper type.

dumpEnginesInfo

void dumpEnginesInfo()
Invokes this method to dump all currently active engines' instant information (status)


getEngineErrors

java.util.List getEngineErrors(java.lang.String resultFile)
Gets the engine errors after running a report.

Parameters:
resultFile - the result file
Returns:
the engine errors after running a report.

getWebUIConfig

WebUIConfig getWebUIConfig()
Gets the WebUIConfig.

Returns:
the WebUIConfig
See Also:
WebUIConfig

isFreeVirtualAppliance

boolean isFreeVirtualAppliance()
Checks if this server is free virtual appliance.

Returns:
whether this server is free virtual appliance.

getLicenceExpiredDate

java.lang.String getLicenceExpiredDate()
Gets the expiration date of the server license

Returns:
a String object representing a date in the format "yyyy-mm-dd" or "Never" representing never expired.

getCRDTask

java.util.Properties getCRDTask(java.lang.String taskID)
Gets the properties of a CRD task using the specified task ID.

Parameters:
taskID - the task ID.
Returns:
the properties of the CRD task.

getSchedCRDTasks

java.util.Vector getSchedCRDTasks()
Gets the scheduled CRD tasks.

Returns:
scheduled CRD tasks. The Vector contains Properties objects. Each Properties object includes the properties of a scheduled CRD task.

getSchedCRDTasksByUser

java.util.Vector getSchedCRDTasksByUser(java.lang.String userId)
Gets the scheduled CRD tasks by submitter.

Parameters:
userId - the submitter
Returns:
scheduled CRD tasks. The Vector contains Properties objects. Each Properties object includes the properties of a scheduled CRD task.
Since:
JREntServer V6

deleteCRDSchedules

java.lang.String deleteCRDSchedules(java.util.Vector taskids,
                                    java.lang.String user)
Deletes the selected Cached Report Data (CRD) schedules.

Parameters:
taskids - All selected CRD schedule task ids
user - the user
Returns:
the output message to client side

getCRDManager

CRDManager getCRDManager()
Gets the CRD manager.

Returns:
CRD manager

getCubeTask

java.util.Properties getCubeTask(java.lang.String taskID)
Gets the properties of a cube task using the specified task ID.

Parameters:
taskID - the task ID.
Returns:
the properties of the cube task.
Since:
version 12

getSchedCubeTasks

java.util.Vector getSchedCubeTasks()
Gets the scheduled cube tasks.

Returns:
scheduled cube tasks. The Vector contains Properties objects. Each Properties object includes the properties of a scheduled cube task.
Since:
version 12

getSchedCubeTasksByUser

java.util.Vector getSchedCubeTasksByUser(java.lang.String userId)
Gets the scheduled cube tasks by submitter.

Parameters:
userId - the submitter
Returns:
scheduled cube tasks. The Vector contains Properties objects. Each Properties object includes the properties of a scheduled cube task.
Since:
version 12

deleteCubeSchedules

java.lang.String deleteCubeSchedules(java.util.Vector taskids,
                                     java.lang.String user)
Deletes the selected cube schedules.

Parameters:
taskids - All selected cube schedule task ids
user - the user
Returns:
the output message to client side
Since:
version 12

getCubeManager

CubeManager getCubeManager()
Get the cube manager.

Returns:
cube manager
Since:
version 12

getServiceManager

jet.server.service.ServiceManager getServiceManager()
Gets the Service Manager.

Returns:
Service Manger

getCurrentCalendar

java.util.GregorianCalendar getCurrentCalendar()
Gets the current calendar.

Returns:
current calendar

getAliasMappingManager

AliasMappingManager getAliasMappingManager()
Gets the alias mapping manager.

Returns:
the alias mapping manager

getGlobalNLSLibrary

GlobalNLSLibrary getGlobalNLSLibrary()
Gets the Global NLS Library.

Returns:
the Global NLS Library

getResourceNLSManager

ResourceNLSManager getResourceNLSManager()
Gets the NLS manager for server resource names

Returns:
the server resource name NLS manager.

getTaskAuditor

TaskAuditor getTaskAuditor()
Get the Task Auditor.

Returns:
the Task Auditor.

getDashboardListenerManager

DashboardListenerManager getDashboardListenerManager()
Gets the Dashboard listener Manager.

Returns:
the Dashboard listener Manger

getSystemPerformanceInfo

SystemPerformanceInfo getSystemPerformanceInfo()
Gets the System Performance information of which this RptServer instance is running.

Returns:

getInteractiveReportTaskService

InteractiveReportTaskService getInteractiveReportTaskService()
Gets the InteractiveReport task service.

Returns:

getDynamicConnectionService

DynamicConnectionService getDynamicConnectionService()
Gets the DynamicConnection service.


getInformationBusManager

com.jinfonet.ibus.InformationBusManager getInformationBusManager()
Gets the Information Bus Manager of JReport Server.

Returns:
InformationBusManager.

getNLSLibraryManager

NLSLibraryManager getNLSLibraryManager()
Gets the NLS Library Manager of JReport Server.

Returns:
NLSLibraryManager