com.ibm.tivoli.maximo.report.birt.admin

Interface ReportAdminServiceRemote

    • Method Detail

      • importReport

        void importReport(UserInfo userInfo,
                          ReportImportInfo reportImportInfo,
                          boolean fromUI)
                   throws MXException,
                          java.rmi.RemoteException
        Imports the report information into appropriate tables in the database.
        Parameters:
        userInfo - user information
        reportImportInfo - report import information to be used
        Throws:
        MXException
        java.rmi.RemoteException
      • exportReport

        byte[] exportReport(UserInfo userInfo,
                            java.lang.String reportName,
                            java.lang.String appName)
                     throws MXException,
                            java.rmi.RemoteException
        Exports the report design and all resources.
        Parameters:
        userInfo - user information
        reportName - report name to export
        appName - application name that the report belongs to
        Returns:
        byte[] a zip output of the report design and all associated resources.
        Throws:
        MXException
        java.rmi.RemoteException
      • exportReportLibrary

        byte[] exportReportLibrary(UserInfo userInfo,
                                   java.lang.String reportName)
                            throws MXException,
                                   java.rmi.RemoteException
        Exports the report library design and all resources.
        Parameters:
        userInfo - user information
        reportName - report library name to export
        Returns:
        a zip output of the report library design and all associated resources.
        Throws:
        MXException
        java.rmi.RemoteException
      • getExportReportFolder

        java.lang.String getExportReportFolder(UserInfo userInfo,
                                               java.lang.String reportName,
                                               java.lang.String appName)
                                        throws MXException,
                                               java.rmi.RemoteException
        Returns the folder name to be used to export the report.
        Parameters:
        userInfo - user information
        reportName - report name
        appName - application name that the report belongs to
        Returns:
        String the folder name to be used to export the report.
        Throws:
        MXException
        java.rmi.RemoteException
      • exportReportImportInputInfo

        java.lang.String exportReportImportInputInfo(UserInfo userInfo,
                                                     java.lang.String reportName,
                                                     java.lang.String appName)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Exports the information to be used as input to import the report in XML format.
        Parameters:
        userInfo - user information
        reportName - report name
        appName - application name that the report belongs to
        Returns:
        String the information to be used as input to import the report in XML format.
        Throws:
        MXException
        java.rmi.RemoteException
      • exportLibraryImportInputInfo

        java.lang.String exportLibraryImportInputInfo(UserInfo userInfo,
                                                      java.lang.String reportName)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Exports the information to be used as input to import the report library in XML format.
        Parameters:
        userInfo - user information
        reportName - report name
        Returns:
        String the information to be used as input to import the report library in XML format.
        Throws:
        MXException
        java.rmi.RemoteException
      • importReportLibrary

        void importReportLibrary(UserInfo userInfo,
                                 ReportImportInfo reportImportInfo)
                          throws MXException,
                                 java.rmi.RemoteException
        Imports the report library information into appropriate tables in the database.
        Parameters:
        userInfo - user information
        reportImportInfo - report import information to be used
        Throws:
        MXException
        java.rmi.RemoteException
      • getReportLibraryNameList

        java.util.ArrayList getReportLibraryNameList(UserInfo userInfo)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns a list of the report library names. (used for the exporting all library files).
        Parameters:
        userInfo - user information
        Returns:
        ArrayList a list of the report library names
        Throws:
        MXException
        java.rmi.RemoteException
      • getReportNameList

        java.util.TreeMap getReportNameList(UserInfo userInfo)
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns list of report names. (used for the exporting all report files).
        Parameters:
        userInfo - user information
        Returns:
        ArrayList a list of the report names
        Throws:
        MXException
        java.rmi.RemoteException
      • getReportNameList

        java.util.TreeMap getReportNameList(UserInfo userInfo,
                                            int reportType)
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns list of report names. (used for the exporting all report files of a certain type).
        Parameters:
        userInfo - user information
        reportType - the report type; report, QBR, or both
        Returns:
        ArrayList a list of the report names
        Throws:
        MXException
        java.rmi.RemoteException
      • prepareReportForRun

        ReportRunInfo prepareReportForRun(UserInfo userInfo,
                                          java.lang.String reportName,
                                          java.lang.String appName)
                                   throws MXException,
                                          java.rmi.RemoteException
        Prepares a report for run. Exports the report from the database to a temporary file system. Also, exports all dependent report library information. NOTE: This is an internal method and should not be used by any client program. If this is used, then make sure to call the cleanupReportResources method appropriately to cleanup the temporary files.
        Parameters:
        userInfo - user information
        reportName - report name
        appName - application name that the report belongs to
        Returns:
        ReportRunInfo report run information
        Throws:
        MXException
        java.rmi.RemoteException
      • cleanupReportResources

        void cleanupReportResources(ReportRunInfo reportRunInfo)
                             throws MXException,
                                    java.rmi.RemoteException
        Removes all the temporary files created as part of the prepareReportForRun method call.
        Parameters:
        reportRunInfo - report run information
        Throws:
        MXException
        java.rmi.RemoteException
      • runReportInImmediateMode

        byte[] runReportInImmediateMode(UserInfo userInfo,
                                        java.lang.String reportName,
                                        java.lang.String appName,
                                        ReportParameterData parameterData,
                                        java.lang.String outputFileName,
                                        java.lang.String outputFormat)
                                 throws MXException,
                                        java.rmi.RemoteException
        Executes the report and returns the report output in the appropriate format. If the output format requested is PDF, then returns the output as PDF. If the output format requested is HTML, then returns the output in ZIP format as multiple files are involved.
        Parameters:
        userInfo - user information
        reportName - report name
        appName - application name that the report belongs to
        parameterData - parameter data to be used for the report
        outputFileName - output file name
        outputFormat - output format
        Returns:
        byte[] report output. If the output format requested is PDF, then returns the output as PDF. If the output format requested is HTML, then returns the output in ZIP format as multiple files are involved.
        Throws:
        MXException
        java.rmi.RemoteException
      • runReportInImmediateMode

        byte[] runReportInImmediateMode(UserInfo userInfo,
                                        java.lang.String reportName,
                                        java.lang.String appName,
                                        ReportParameterData parameterData,
                                        java.lang.String outputFileName,
                                        java.lang.String outputFormat,
                                        java.util.Map additionalInfoMap)
                                 throws MXException,
                                        java.rmi.RemoteException
        Executes the report and returns the report output in the appropriate format. If the output format requested is PDF, then returns the output as PDF. If the output format requested is HTML, then returns the output in ZIP format as multiple files are involved.
        Parameters:
        userInfo - user information
        reportName - report name
        appName - application name that the report belongs to
        parameterData - parameter data to be used for the report
        outputFileName - output file name
        outputFormat - output format
        additionalInfoMap - additional information to be passed to the report.
        Returns:
        byte[] report output. If the output format requested is PDF, then returns the output as PDF. If the output format requested is HTML, then returns the output in ZIP format as multiple files are involved.
        Throws:
        MXException
        java.rmi.RemoteException
      • runReport

        byte[] runReport(UserInfo userInfo,
                         java.lang.String reportName,
                         java.lang.String appName,
                         ReportParameterData parameterData,
                         java.lang.String outputFileName,
                         java.lang.String outputFormat)
                  throws MXException,
                         java.rmi.RemoteException
        Executes the report and returns the report output in the appropriate format. If the output format requested is PDF, then returns the output as PDF. If the output format requested is HTML, then returns the output in ZIP format as multiple files are involved.
        Parameters:
        userInfo - user information
        reportName - report name
        appName - application name that the report belongs to
        parameterData - parameter data to be used for the report
        outputFileName - output file name
        outputFormat - output format (OUTPUT_FORMAT_PDF or OUTPUT_FORMAT_HTML)
        Returns:
        byte[] report output. If the output format requested is PDF, then returns the output as PDF. If the output format requested is HTML, then returns the output in ZIP format as multiple files are involved.
        Throws:
        MXException
        java.rmi.RemoteException
      • runReport

        byte[] runReport(UserInfo userInfo,
                         java.lang.String reportName,
                         java.lang.String appName,
                         ReportParameterData parameterData,
                         java.lang.String outputFileName,
                         java.lang.String outputFormat,
                         java.util.Map additionalInfoMap)
                  throws MXException,
                         java.rmi.RemoteException
        Executes the report and returns the report output in the appropriate format. If the output format requested is PDF, then returns the output as PDF. If the output format requested is HTML, then returns the output in ZIP format as multiple files are involved.
        Parameters:
        userInfo - user information
        reportName - report name
        appName - application name that the report belongs to
        parameterData - parameter data to be used for the report
        outputFileName - output file name
        outputFormat - output format (OUTPUT_FORMAT_PDF or OUTPUT_FORMAT_HTML)
        additionalInfoMap - additional information to be passed to the report.
        Returns:
        byte[] report output. If the output format requested is PDF, then returns the output as PDF. If the output format requested is HTML, then returns the output in ZIP format as multiple files are involved.
        Throws:
        MXException
        java.rmi.RemoteException
      • runReportWithAttachments

        java.lang.String runReportWithAttachments(UserInfo userInfo,
                                                  java.lang.String reportName,
                                                  java.lang.String appName,
                                                  ReportParameterData parameterData,
                                                  java.lang.String outputFileName,
                                                  java.lang.String outputFormat)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • runReportWithAttachments

        java.lang.String runReportWithAttachments(UserInfo userInfo,
                                                  java.lang.String reportName,
                                                  java.lang.String appName,
                                                  ReportParameterData parameterData,
                                                  java.lang.String outputFileName,
                                                  java.lang.String outputFormat,
                                                  boolean withAttachment,
                                                  java.util.Map additionalInfoMap)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • isOverloaded

        boolean isOverloaded()
                      throws MXException,
                             java.rmi.RemoteException
        Returns whether the report engine is overloaded or not (as set by the max concurrent reports setting).
        Returns:
        boolean true, if the report engine is overloaded executing reports (as set by the max concurrent reports setting), otherwise false.
        Throws:
        MXException
        java.rmi.RemoteException
      • getReportEngineState

        int getReportEngineState()
                          throws MXException,
                                 java.rmi.RemoteException
        Returns the state of the report engine based on current activity and the max concurrent reports setting.
        Returns:
        THREAD_AVAILABLE There is a thread available to process the report
        Throws:
        MXException
        java.rmi.RemoteException
      • addActiveThread

        java.lang.Long addActiveThread(java.lang.String threadName,
                                       java.lang.String reportName,
                                       java.lang.String appName,
                                       java.lang.String userName,
                                       boolean scheduledJob)
                                throws MXException,
                                       java.rmi.RemoteException
        Adds active thread information to the list of actively running report threads.
        Parameters:
        threadName - name of the thread
        reportName - report name being executed by the thread
        appName - application name that the report belongs to
        userName - user name (context in which the report is executed)
        scheduledJob - a flag to indicate whether this is a scheduled job or not.
        Throws:
        MXException
        java.rmi.RemoteException
      • removeActiveThread

        void removeActiveThread(java.lang.String threadName)
                         throws MXException,
                                java.rmi.RemoteException
        Removes the active thread information from the list of actively running report threads.
        Parameters:
        threadName - name of the thread.
        Throws:
        MXException
        java.rmi.RemoteException
      • renewActiveThread

        void renewActiveThread(java.lang.String threadName)
                        throws MXException,
                               java.rmi.RemoteException
        Renews the lease information on the active thread.
        Parameters:
        threadName - name of the thread
        Throws:
        MXException
        java.rmi.RemoteException
      • setActiveThreadsFromScriptContext

        void setActiveThreadsFromScriptContext(java.lang.String contextThreadName,
                                               java.util.HashSet listOfActiveThreads)
                                        throws MXException,
                                               java.rmi.RemoteException
        Set the list of active threads from ScriptContext
        Parameters:
        threadName - name of the thread
        listOfActiveThreads - List of Active Threads
        Throws:
        MXException
        java.rmi.RemoteException
      • createReportUsageLog

        void createReportUsageLog(UserInfo userInfo,
                                  ReportUsageLogInfo usageLogInfo)
                           throws MXException,
                                  java.rmi.RemoteException
        Creates a report usage log entry based on the information provided.
        Parameters:
        userInfo - user information
        usageLogInfo - report usage log information
        Throws:
        MXException
        java.rmi.RemoteException
      • createReportDesign

        void createReportDesign(UserInfo userInfo,
                                CreateReportInputInfo reportInputInfo)
                         throws MXException,
                                java.rmi.RemoteException
        Creates a report based on the input provided. A report is comprised of a series of list reports.
        Parameters:
        userInfo - user information
        reportInputInfo - input to create the report
        Throws:
        MXException
        java.rmi.RemoteException
      • isAuthorizedToRunReport

        boolean isAuthorizedToRunReport(UserInfo userInfo,
                                        java.lang.String reportName,
                                        java.lang.String appName)
                                 throws MXException,
                                        java.rmi.RemoteException
        Returns whether the report is authorized for run or not. NOTE: This code adds some additional logic to authorize temporary reports that are created via the createListReport API that are not saved/imported to the database.
        Parameters:
        userInfo - user information
        reportName - name of the report
        appName - application for which the report belongs
        Throws:
        MXException
        java.rmi.RemoteException
      • getReportViewerURL

        java.lang.String getReportViewerURL()
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns the report viewer URL. This is used for cases where a cluster or a dedicated report server is setup to run the immediate run reports from the browser. Returns null, if the property mxe.report.birt.viewerurl is not defined or has a null value.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • cancelReportJob

        void cancelReportJob(long reportJobId)
                      throws MXException,
                             java.rmi.RemoteException
        Cancels a report job identified by the reportJobId
        Parameters:
        reportJobId -
        Throws:
        MXException
        java.rmi.RemoteException
      • cancelReportJobOnThisServer

        void cancelReportJobOnThisServer(long reportJobId)
                                  throws MXException,
                                         java.rmi.RemoteException
        Cancels a report job identified by the reportJobId
        Parameters:
        reportJobId -
        Throws:
        MXException
        java.rmi.RemoteException
      • isReportJobCancelled

        boolean isReportJobCancelled(long reportJobId)
                              throws MXException,
                                     java.rmi.RemoteException
        Returns true if the request report job is canceled, otherwise false.
        Parameters:
        reportJobId -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • updateReportDesign

        byte[] updateReportDesign(UserInfo userInfo,
                                  java.lang.String reportName,
                                  java.lang.String appName,
                                  boolean saveChanges)
                           throws MXException,
                                  java.rmi.RemoteException
        Updates the report design with all identified fixes. If specified, saves the update to the database. Returns the modified report design, which can be exported to the report source directory.
        Parameters:
        userInfo - user information
        reportName - name of the report
        appName - application name that the report belongs to
        saveChanges - should the update design be saved to the reportdesign table
        Returns:
        byte[] the modified report design, null if the design was not modified.
        Throws:
        MXException
        java.rmi.RemoteException
      • updateReportDesign

        byte[] updateReportDesign(UserInfo userInfo,
                                  java.lang.String reportName,
                                  java.lang.String appName,
                                  boolean saveChanges,
                                  java.lang.String updateType)
                           throws MXException,
                                  java.rmi.RemoteException
        Updates the report design with the identified fix, or all fixes if no update type is provided. If specified, saves the update to the database. Returns the modified report design, which can be exported to the report source directory.
        Parameters:
        userInfo - user information
        reportName - name of the report
        appName - application name that the report belongs to
        saveChanges - should the update design be saved to the reportdesign table
        updateType - the specific update to be applied, or all updates if null
        Returns:
        byte[] the modified report design, null if the design was not modified.
        Throws:
        MXException
        java.rmi.RemoteException
      • startBatchAllReportsImport

        void startBatchAllReportsImport(UserInfo userInfo,
                                        boolean isSynchronous)
                                 throws MXException,
                                        java.rmi.RemoteException
        Import all reports. In MT they are imported only for the current tenant context.
        Parameters:
        userInfo - user information
        Throws:
        MXException
        java.rmi.RemoteException
      • startBatchReportImport

        void startBatchReportImport()
                             throws java.rmi.RemoteException
        Import all reports which are not already imported. In MT these reports are imported for all tenants with active status.
        Throws:
        java.rmi.RemoteException
      • startBatchReportImport

        void startBatchReportImport(boolean allTenants)
                             throws java.rmi.RemoteException
        Import all reports which are not already imported. In MT these reports are imported for all tenants when allTenants is true, and just DA and landlord when false.
        Parameters:
        allTenants - in MT, imports for all tenants when true, and just DA and landlord when false
        Throws:
        java.rmi.RemoteException
      • sendEmail

        void sendEmail(MXLogger logger,
                       UserInfo userInfo,
                       java.lang.String templateID,
                       java.lang.String[] to,
                       java.lang.String from,
                       MboRemote report,
                       TextReplacement replacer)
                throws java.rmi.RemoteException,
                       MXException
        Sends and email using the given Comm Template Id for the provided userInfo and scheduled report instance. Optionally a TextReplacements can be pass that can replace any additional placeholders with replacement values in the message and subject.
        Parameters:
        logger - logger to use for logging, can be null.
        userInfo - optional userInfo
        templateID - Comm Template Id
        to - array of "to" email addresses
        from - from email address
        report - Scheduled Report Instance
        replacer - Optional TextReplacement instance
        Throws:
        java.rmi.RemoteException
        MXException
      • getReport

        MboRemote getReport(UserInfo userInfo,
                            java.lang.String reportName,
                            java.lang.String appName)
                     throws java.rmi.RemoteException,
                            MXException
        Given the userInfo, reportName, and appName, return the report instance.
        Parameters:
        userInfo -
        reportName -
        appName -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException