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

Class ReportAdminService

    • Field Detail

      • PROPERTY_VIEWERURL

        public static final java.lang.String PROPERTY_VIEWERURL
        See Also:
        Constant Field Values
    • Constructor Detail

      • ReportAdminService

        public ReportAdminService(MXServer mxServer)
                           throws java.rmi.RemoteException
        Constructor
        Parameters:
        mxServer -
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
        Initializes the Report Queue Manager Task.
        Specified by:
        init in interface Service
        Overrides:
        init in class AppService
        See Also:
        Service
      • startBatchAllReportsImport

        public 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.
        Specified by:
        startBatchAllReportsImport in interface ReportAdminServiceRemote
        Parameters:
        userInfo - user information
        isSynchronous - when true, waits on the completion of the import
        Throws:
        java.rmi.RemoteException
        MXException
      • startBatchReportImport

        public void startBatchReportImport()
                                    throws java.rmi.RemoteException
        Import all reports which are not already imported. In MT they are imported for all active tenants.
        Specified by:
        startBatchReportImport in interface ReportAdminServiceRemote
        Throws:
        java.rmi.RemoteException
      • startBatchReportImport

        public void startBatchReportImport(boolean allTenants)
        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.
        Specified by:
        startBatchReportImport in interface ReportAdminServiceRemote
        Parameters:
        allTenants - when true, imports all active tenants. When false, imports DA and landlord.
        Throws:
        java.rmi.RemoteException
      • destroy

        public void destroy()
        If the Report Queue Manager Task is available, marks the task to shutdown and makes it available.
        Specified by:
        destroy in interface Service
        Overrides:
        destroy in class AppService
        See Also:
        Service
      • isAuthorized

        protected boolean isAuthorized(UserInfo userInfo,
                                       java.lang.String sigOptionName)
        Checks whether a sigoption is accessible to the user or not.
        Parameters:
        userInfo -
        sigOptionName -
        Returns:
      • updateReportDesign

        public 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.
        Specified by:
        updateReportDesign in interface ReportAdminServiceRemote
        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

        public 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.
        Specified by:
        updateReportDesign in interface ReportAdminServiceRemote
        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
      • importReport

        public void importReport(UserInfo userInfo,
                                 ReportImportInfo reportImportInfo,
                                 boolean fromUI)
                          throws MXException,
                                 java.rmi.RemoteException
        Imports the report information into appropriate tables in the database.
        Specified by:
        importReport in interface ReportAdminServiceRemote
        Parameters:
        userInfo - user information
        reportImportInfo - report import information to be used
        fromUI - was this import initiated from the Report Administration application?
        Throws:
        MXException
        java.rmi.RemoteException
      • importReport

        protected void importReport(UserInfo userInfo,
                                    ReportImportInfo reportImportInfo,
                                    boolean fromUI,
                                    boolean checkAuthorization)
                             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
        fromUI - was this import initiated from the Report Administration application?
        checkAuthorization - should the REPIMPREP security option be checked?
        Throws:
        MXException
        java.rmi.RemoteException
      • importReport

        protected void importReport(UserInfo userInfo,
                                    ReportImportInfo reportImportInfo,
                                    boolean fromUI,
                                    boolean checkAuthorization,
                                    boolean makePublic)
                             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
        fromUI - was this import initiated from the Report Administration application?
        checkAuthorization - should the REPIMPREP security option be checked?
        makePublic - should rights to this report be granted to the EVERYONE group?
        Throws:
        MXException
        java.rmi.RemoteException
      • importReportLibrary

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

        protected ReportLabelInfo[] getReportLabels(java.lang.String tempFolderName,
                                                    java.lang.String resourceName,
                                                    java.lang.String langCode)
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • prepareReportForRun

        public 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.
        Specified by:
        prepareReportForRun in interface ReportAdminServiceRemote
        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
      • prepareReportForRun

        protected ReportRunInfo prepareReportForRun(UserInfo userInfo,
                                                    java.lang.String reportName,
                                                    java.lang.String appName,
                                                    boolean authorizationCheck)
                                             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
        authorizationCheck - a flag to indicate whether authorization check should be performed or not.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • prepareReportForExport

        protected ReportRunInfo prepareReportForExport(UserInfo userInfo,
                                                       java.lang.String reportName,
                                                       java.lang.String appName)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Prepares the report for export. Extracts the report out from the database and prepares a copy of it in the file system.
        Parameters:
        userInfo -
        reportName -
        appName -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • prepareReportLibraryForExport

        public ReportRunInfo prepareReportLibraryForExport(UserInfo userInfo,
                                                           java.lang.String reportName)
                                                    throws MXException,
                                                           java.rmi.RemoteException
        Prepares the report library for export. Extracts the report out from the database and prepares a copy of it in the file system.
        Parameters:
        userInfo -
        reportName -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • prepareReportDesignForRun

        public ReportRunInfo prepareReportDesignForRun(UserInfo userInfo,
                                                       java.lang.String reportName,
                                                       boolean extractAll)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Prepares the report for run. Extracts the report out from the database and prepares a copy of it in the file system.
        Parameters:
        userInfo -
        reportName -
        extractAll -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • prepareReportDesignForRun

        public ReportRunInfo prepareReportDesignForRun(UserInfo userInfo,
                                                       java.lang.String reportName,
                                                       boolean extractAll,
                                                       boolean forExport)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Prepares the report for run. Extracts the report out from the database and prepares a copy of it in the file system.
        Parameters:
        userInfo -
        reportName -
        extractAll -
        forExport - true if the report is being exported, false if it is being executed
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • localizeLabelsForRun

        protected void localizeLabelsForRun(UserInfo userInfo,
                                            java.lang.String reportName,
                                            java.lang.String tempReportFolderPath,
                                            boolean extractAll)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getReportLabelsFromDB

        protected java.util.HashMap getReportLabelsFromDB(UserInfo userInfo,
                                                          java.lang.String reportName)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • createUniqueTempFolder

        public static java.lang.String createUniqueTempFolder(java.lang.String parentFolderName)
      • extractResourcesFromByteArray

        public void extractResourcesFromByteArray(java.io.ByteArrayInputStream resources,
                                                  java.lang.String outputFolder)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • exportReport

        public byte[] exportReport(UserInfo userInfo,
                                   java.lang.String reportName,
                                   java.lang.String appName)
                            throws MXException,
                                   java.rmi.RemoteException
        Exports the report design and all resources.
        Specified by:
        exportReport in interface ReportAdminServiceRemote
        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
      • getExportReportFolder

        public 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.
        Specified by:
        getExportReportFolder in interface ReportAdminServiceRemote
        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
      • exportReportLibrary

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

        public 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).
        Specified by:
        getReportLibraryNameList in interface ReportAdminServiceRemote
        Parameters:
        userInfo - user information
        Returns:
        ArrayList a list of the report library names
        Throws:
        MXException
        java.rmi.RemoteException
      • getReportNameList

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

        public java.util.TreeMap getReportNameList(UserInfo userInfo,
                                                   int reportType)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Returns list of report names. (used for the exporting report files of a certain type).
        Specified by:
        getReportNameList in interface ReportAdminServiceRemote
        Parameters:
        userInfo - user information
        reportType - the report type: REPORTTYPE_REPORT, REPORTTYPE_QBR, or REPORTTYPE_REPORT_AND_QBR
        Returns:
        ArrayList a list of the report names
        Throws:
        MXException
        java.rmi.RemoteException
      • getDateFormat

        public java.lang.String getDateFormat(UserInfo userInfo)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTimeFormat

        public java.lang.String getTimeFormat(UserInfo userInfo)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getDateTimeFormat

        public java.lang.String getDateTimeFormat(UserInfo userInfo)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getDateTimeFormat

        public java.lang.String getDateTimeFormat(UserInfo userInfo,
                                                  java.lang.String objectName,
                                                  java.lang.String attributeName)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getNumberFormat

        public java.lang.String getNumberFormat(UserInfo userInfo)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getDecimalFormat

        public java.lang.String getDecimalFormat(UserInfo userInfo,
                                                 int fractionDigits)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getNumberFormat

        public java.lang.String getNumberFormat(UserInfo userInfo,
                                                java.lang.String objectName,
                                                java.lang.String attributeName)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • runReportWithAttachments

        public 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
        Creates a pdf file of all records and their attachments similar to the one done for Direct Print with Attachments. It returns the file path of the resulting file. The userInfo should not be system user info. It should be the user who is running the report.
        Specified by:
        runReportWithAttachments in interface ReportAdminServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • runReportInImmediateMode

        public 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.
        Specified by:
        runReportInImmediateMode in interface ReportAdminServiceRemote
        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

        public 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.
        Specified by:
        runReportInImmediateMode in interface ReportAdminServiceRemote
        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

        public 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.
        Specified by:
        runReport in interface ReportAdminServiceRemote
        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

        public 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.
        Specified by:
        runReport in interface ReportAdminServiceRemote
        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
      • runReport

        public 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,
                                boolean scheduled)
                         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
      • checkAuthorizationToRunReport

        protected void checkAuthorizationToRunReport(UserInfo userInfo,
                                                     java.lang.String reportName,
                                                     java.lang.String appName)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Checks for the authorization to run report. If authorization is not granted throws exception.
        Parameters:
        userInfo -
        reportName -
        appName -
        Throws:
        MXException
        java.rmi.RemoteException
      • isOverloaded

        public boolean isOverloaded()
                             throws MXException,
                                    java.rmi.RemoteException
        Returns whether the report engine is overloaded or not (as set by the max concurrent reports setting).
        Specified by:
        isOverloaded in interface ReportAdminServiceRemote
        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

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

        public 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.
        Specified by:
        addActiveThread in interface ReportAdminServiceRemote
        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

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

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

        public void setActiveThreadsFromScriptContext(java.lang.String contextThreadName,
                                                      java.util.HashSet listOfActiveThreads)
                                               throws MXException,
                                                      java.rmi.RemoteException
        List of Active threads from the scriptcontext.
        Specified by:
        setActiveThreadsFromScriptContext in interface ReportAdminServiceRemote
        Parameters:
        listOfActiveThreads - list of active threads
        Throws:
        MXException
        java.rmi.RemoteException
      • getLocaleByLangCode

        protected java.util.Locale getLocaleByLangCode(UserInfo userInfo)
      • copyReportFile

        protected void copyReportFile(java.lang.String tempFolder,
                                      java.lang.String reportFileName,
                                      java.lang.String designFileContent,
                                      java.io.InputStream resourcesStream)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • createFileFromString

        protected void createFileFromString(java.lang.String reportFileName,
                                            java.lang.String designFileContent)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • exportReportImportInputInfo

        public 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.
        Specified by:
        exportReportImportInputInfo in interface ReportAdminServiceRemote
        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

        public 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.
        Specified by:
        exportLibraryImportInputInfo in interface ReportAdminServiceRemote
        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
      • createReportDesign

        public void createReportDesign(UserInfo userInfo,
                                       CreateReportInputInfo reportInputInfo)
                                throws MXException,
                                       java.rmi.RemoteException
        Creates a report based on the input provided. Used by QBR/Create Report functionality. A report design consists of one or more CreateListReportInputInfo list reports. If there is only one in the report, the style is List. If the report includes more than one CreateListReportInputInfo, the style is Detail and the first one in the list is the master or parent report, with the remaining being detail reports.
        Specified by:
        createReportDesign in interface ReportAdminServiceRemote
        Parameters:
        userInfo - user information
        reportInputInfo - input to create the report
        Throws:
        MXException
        java.rmi.RemoteException
      • getFileContent

        public byte[] getFileContent(java.lang.String fileName)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • createResourcesZip

        public byte[] createResourcesZip(java.io.File[] files)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isAuthorizedToRunReport

        public 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.
        Specified by:
        isAuthorizedToRunReport in interface ReportAdminServiceRemote
        Parameters:
        userInfo - user information
        reportName - name of the report
        appName - application for which the report belongs
        Throws:
        MXException
        java.rmi.RemoteException
      • getReportViewerURL

        public 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.
        Specified by:
        getReportViewerURL in interface ReportAdminServiceRemote
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • isReportJobCancelled

        public boolean isReportJobCancelled(long reportJobId)
                                     throws MXException,
                                            java.rmi.RemoteException
        Returns true if the request report job is canceled, otherwise false.
        Specified by:
        isReportJobCancelled in interface ReportAdminServiceRemote
        Parameters:
        reportJobId -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • updateRuntimeReportDesign

        protected void updateRuntimeReportDesign(UserInfo userInfo,
                                                 java.lang.String reportName,
                                                 java.lang.String tempReportFolderPath)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • exportTransientQBRContent

        public void exportTransientQBRContent(java.lang.String brosId,
                                              MXSession session)
      • getTransientQBRParamsMboSet

        public MboSetRemote getTransientQBRParamsMboSet(java.lang.String brosId,
                                                        MXSession session)
      • removeBROSReport

        public void removeBROSReport(java.lang.String brosId)
                              throws java.rmi.RemoteException,
                                     MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • createBROSUniqueTempFolder

        public static java.lang.String createBROSUniqueTempFolder(java.lang.String parentFolderName)
      • sendEmail

        public 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.
        Specified by:
        sendEmail in interface ReportAdminServiceRemote
        Parameters:
        logger - logger to use for logging, can be null.
        userInfo -
        templateID - Comm Template Id
        to -
        from -
        report - Scheduled Report Instance
        replacer - Optional TextReplacement instance
        Throws:
        java.rmi.RemoteException
        MXException
      • getReport

        public 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.
        Specified by:
        getReport in interface ReportAdminServiceRemote
        Parameters:
        userInfo -
        reportName -
        appName -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • deleteNeededFileFromAttachmentTempDirectory

        public void deleteNeededFileFromAttachmentTempDirectory(java.lang.String outputFolder,
                                                                java.util.Vector listOfFilesVector,
                                                                MXLogger logger)