psdi.app.report

Class ReportUtil

  • java.lang.Object
    • psdi.app.report.ReportUtil
  • All Implemented Interfaces:
    ReportConstants


    public class ReportUtil
    extends java.lang.Object
    implements ReportConstants
    This is a Utility class for routines needed for report scheduling such as converting schedules to words for the UI and vice versa.
    • Field Detail

      • REPORT_LOGGER

        public static final MXLogger REPORT_LOGGER
      • lastPurgeOfReportHyperlinkUrl

        public static long lastPurgeOfReportHyperlinkUrl
      • lastPurgeOfReportWhere

        public static long lastPurgeOfReportWhere
    • Constructor Detail

      • ReportUtil

        public ReportUtil()
    • Method Detail

      • convertOnceToSchedule

        public static java.lang.String convertOnceToSchedule(java.util.Date date,
                                                             java.util.Locale locale,
                                                             java.util.TimeZone clientTimeZone)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        Convert a one-time schedule from the UI input to a cron task schedule pattern
        Throws:
        MXException
        java.rmi.RemoteException
      • verifySchedule

        @Deprecated
        public static void verifySchedule(MboRemote reportSched)
                                               throws MXException
        Deprecated. 
        Method called to verify data changes made to scheduling data fields. Substituted by Template Method Pattern, Beans need to inherit ReportScheduleCommonBean, and call ReportScheduleCommonBean.verifySchedule(MboRemote reportSchedule)
        Throws:
        MXException
      • qualifyWhere

        public static java.lang.String qualifyWhere(java.lang.String where,
                                                    java.lang.String baseTable)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getDBType

        public static java.lang.String getDBType()
                                          throws java.rmi.RemoteException,
                                                 MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • hasParameters

        public static boolean hasParameters(MboRemote reportRemote)
                                     throws java.rmi.RemoteException,
                                            MXException
        Check if the report has parameters
        Returns:
        boolean
        Throws:
        java.rmi.RemoteException
        MXException
      • calculateTotalReservedHours

        public static java.lang.String calculateTotalReservedHours(java.util.Calendar startReserve,
                                                                   java.util.Calendar endReserve)
                                                            throws java.rmi.RemoteException,
                                                                   MXException
        Take the beginning and ending reserve times from the calendars, compute and save the time difference in hours and minutes into a new calendar and then return it in a String value.
        Parameters:
        Calendar - startReserve
        Calendar - endReserve
        Returns:
        String
        Throws:
        java.rmi.RemoteException
        MXException
      • checkReserveTimeOverlaps

        public static void checkReserveTimeOverlaps(MboSetRemote reportProcReserveSet,
                                                    java.lang.String appname,
                                                    java.lang.String reportname,
                                                    java.util.Calendar startReserve,
                                                    java.util.Calendar endReserve,
                                                    java.lang.String day,
                                                    long currentMboUniqueIDValue)
                                             throws java.rmi.RemoteException,
                                                    MXException
        Using the beginning and ending reserve times from the current Mbo record, determine if these times conflict with any reserved time periods already entered.
        Parameters:
        MboSetRemote - reportProcReserveSet
        String - appname
        String - reportname
        Calendar - startReserve
        Calendar - endReserve
        String - daynum
        long - currentMboUniqueIDValue
        Throws:
        java.rmi.RemoteException
        MXException
      • validateAvailSchedulingTime

        public static boolean validateAvailSchedulingTime(java.lang.String appname,
                                                          java.lang.String reportname,
                                                          java.util.Date date,
                                                          java.lang.String scheduleType,
                                                          UserInfo userInfo)
                                                   throws java.rmi.RemoteException,
                                                          MXException
        Check that the schedule time chosen to run the report falls within the times the report is allowed to run as shown in the Schedule Availability section on the request page. For one-time reports an error is thrown here to indicate the problem. For recurring reports the error is thrown in the FldReportParameterSchedule validation class with an array of non-validate run times.
        Parameters:
        String - appname
        String - reportname
        Calendar - scheduleTime
        String - scheduleType
        UserInfo - userInfo
        Returns:
        boolean
        Throws:
        java.rmi.RemoteException
        MXException
      • toHourMinSecFromMiliSec

        public static java.lang.String toHourMinSecFromMiliSec(long runTimeMilliSeconds)
                                                        throws java.rmi.RemoteException,
                                                               MXException
        Take the beginning and ending reserve times from the calendars, compute and save the time difference in hours and minutes into a new calendar and then return it in a String value.
        Parameters:
        Integer - runTimeMilliSeconds
        Returns:
        String
        Throws:
        java.rmi.RemoteException
        MXException
      • resetScheduleAvailability

        public static void resetScheduleAvailability(java.lang.String currAppname,
                                                     java.lang.String currReportname,
                                                     UserInfo userInfo)
                                              throws MXException,
                                                     java.rmi.RemoteException
        This method must determine all the mirror images for a set of reserved times set for an appname/reportname combination. The premise of the following code is that each reserve record is processed in its entirety before the while loop is left to get the next ReportProcReserve Mbo. The ReportProcReserve Mbo can cause 4 types mirror images to be written. Example 1: 12:00 AM TO 11:59 PM If the reserve time spans the entire day no schedulable record will be written for that day. Example 2: 2:00 AM TO 11:59 PM If the reserve time span has a gap of time before the reserve time begins one schedulable record will be written covering that gap. Example 3: 12:00 AM TO 8:30 PM If the reserve time has a gap of time at the end of the day one schedulable record will be written covering the gap of time at the end of the day but the endschedulable time will not be known until the next Mbo is gotten or no more Mbo's are found. Example 4: 2:00 AM TO 8:30 PM If the reserve time has a gap of time before the reserve time begins and a gap of time after the reserve time ends two schedulable records will be written covering the first gap of time before the reserved time begins and the gap of time at the end of the day. The endschedulable time will not be known for the latter record until the next Mbo is gotten or no more Mbo's are found. The record for schedulabe time is written to the MboSet when there is a gap of time before the reserved time begins. When a gap after the reserved time exists all but the ending schedulable time is set in the ReportProcSched Mbo and the next time through the while loop will complete and write this record because the next record lets us know if there is another schedulable time in the same day or moves to a new day or perhaps there are no more reserved times. As a record moves through the while loop it will be either the first reserved time record for a certain day of the week or it will be a subsequent record for that day of the week that already had reserved times. These cases will determine the code going into the firstReserveRowForDay sections of code or !firstReserveRowForDay.
        Parameters:
        String - currAppname
        String - currReportname
        UserInfo - userInfo
        Throws:
        java.rmi.RemoteException
        MXException
      • addReportProcSchedulableRecord

        public static void addReportProcSchedulableRecord(MboRemote reportProcSched,
                                                          java.lang.String appname,
                                                          java.lang.String reportname,
                                                          java.lang.String day,
                                                          java.util.Date startSchedulable,
                                                          java.util.Date endSchedulable,
                                                          java.lang.String timezone)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        This Method adds a new record to the ReportProcSchedulable Mbo.
        Parameters:
        MboRemote - reportProcSchedulable
        String - appname
        String - reportname
        String - day
        Date - startSchedulable
        Date - endSchedulable
        Throws:
        MXException
        java.rmi.RemoteException
      • finishReportProcSchedulableRecord

        public static void finishReportProcSchedulableRecord(MboSetRemote reportProcSchedSet,
                                                             MboRemote reportProcSched,
                                                             java.lang.String appname,
                                                             java.lang.String reportname,
                                                             java.lang.String day,
                                                             java.lang.Integer dayNum,
                                                             java.util.Date startSchedulable,
                                                             boolean needsEndingTime,
                                                             boolean setFullDayAvailability,
                                                             java.lang.String timezone)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        This Method is used to do any final additions to the ReportProcSchedulable Mbo when either the next row of ReportProcReserve data read in is a for a different report or when the last row of ReportProcReserve data has been processed but the ReportProcSchedulable Mbo is still incomplete for the last report.
        Parameters:
        MboSetRemote - reportProcSchedulableSet
        MboRemote - reportProcSchedulable
        String - appname
        String - reportname
        String - day
        INteger - dayNum
        Date - startSchedulable
        boolean - needsEndingTime
        boolean - setFullDayAvailability
        Throws:
        MXException
        java.rmi.RemoteException
      • writeFullDayAvailability

        public static void writeFullDayAvailability(MboSetRemote reportProcSchedSet,
                                                    MboRemote reportProcSched,
                                                    java.lang.String appname,
                                                    java.lang.String reportname,
                                                    java.lang.Integer dayNum,
                                                    UserInfo userInfo,
                                                    java.lang.String timezone)
                                             throws MXException,
                                                    java.rmi.RemoteException
        This Method is used to write one entire day of availability so the available time to schedule the report is any time on this day.
        Parameters:
        MboSetRemote - reportProcSchedulableSet
        MboRemote - reportProcSchedulable
        String - appname
        String - reportname
        Integer - dayNum
        UserInfo - userInfo
        Throws:
        MXException
        java.rmi.RemoteException
      • scheduleEndTime

        public static void scheduleEndTime(int reserveStartMin,
                                           java.util.Calendar endSchedulableTime,
                                           java.util.Calendar startReserve)
                                    throws MXException,
                                           java.rmi.RemoteException
        This method figures the ending avail time based on the current reserve record start time.
        Parameters:
        int - reserveStartMin
        Calendar - endSchedulableTime
        Calendar - startReserve
        Throws:
        MXException
        java.rmi.RemoteException
      • scheduleStartTime

        public static void scheduleStartTime(int reserveEndMin,
                                             java.util.Calendar startSchedulableTime,
                                             java.util.Calendar endReserve)
                                      throws MXException,
                                             java.rmi.RemoteException
        This method figures the starting avail time based on the current reserve record start time.
        Parameters:
        reserveEndMin -
        startSchedulableTime -
        endReserve -
        Throws:
        MXException
        java.rmi.RemoteException
      • getDayName

        public static java.lang.String getDayName(java.lang.String dayNum,
                                                  UserInfo userInfo)
                                           throws MXException,
                                                  java.rmi.RemoteException
        This Method finds the DAY name stored in the DAYNAME domain for the dayNum value passed in. The dayNum MAXVALUE will correlate in the synonymdomain to find the corresponding day name for the week day number passed in.
        Parameters:
        String - dayNum
        UserInfo - userInfo
        Returns:
        String
        Throws:
        MXException
        java.rmi.RemoteException
      • convertDateToMXServer

        public static java.util.Date convertDateToMXServer(java.util.Locale clientLocale,
                                                           java.lang.String clientTimezone,
                                                           java.util.Date date)
                                                    throws MXException,
                                                           java.rmi.RemoteException
        This Method converts a TIME or DATE value from the client's specified timezone to the MX Server's timezone and returns the result.
        Parameters:
        Locale - clientLocale
        String - clientTimezone
        Date - date
        Returns:
        Date
        Throws:
        MXException
        java.rmi.RemoteException
      • convertDateToClientTimezone

        public static java.util.Date convertDateToClientTimezone(java.util.Locale clientLocale,
                                                                 java.lang.String clientTimezone,
                                                                 java.util.Date date)
                                                          throws MXException,
                                                                 java.rmi.RemoteException
        This Method converts a TIME or DATE value from the MX Server's timezone to the client's specified timezone and returns the result.
        Parameters:
        Locale - clientLocale
        String - clientTimezone
        Date - date
        Returns:
        Date
        Throws:
        MXException
        java.rmi.RemoteException
      • hasSubSelects

        public static boolean hasSubSelects(java.lang.String whereClause)
        This method determines whether or not the passed where clause contains one or more subqueries. Returns true if it does contain a subquery and false and if it does not.
        Parameters:
        String - whereClause
        Returns:
        true if the where clause does contain a subquery, false if it does not
      • getViewerURL

        public static java.lang.String getViewerURL(java.lang.String contextPath,
                                                    java.lang.String sessionId,
                                                    UserInfo userInfo,
                                                    java.util.Hashtable reportParams)
                                             throws MXException,
                                                    java.rmi.RemoteException
        This method returns the URL used to access BIRT reports. If a BROS server is in use, this will be different from the current application URL.
        Parameters:
        WebClientSession - clientSession
        String - contextPath
        Hashtable - reportParams
        Returns:
        String
        Throws:
        MXException
        java.rmi.RemoteException
      • getViewerURL

        public static java.lang.String getViewerURL(java.lang.String contextPath,
                                                    java.lang.String sessionId,
                                                    UserInfo userInfo,
                                                    java.util.Hashtable reportParams,
                                                    boolean isDirectPrint)
                                             throws MXException,
                                                    java.rmi.RemoteException
        This method returns the URL used to access BIRT reports. If a BROS server is in use, this will be different from the current application URL.
        Parameters:
        WebClientSession - clientSession
        String - contextPath
        Hashtable - reportParams
        boolean - isDirectPrint
        Returns:
        String
        Throws:
        MXException
        java.rmi.RemoteException
      • getViewerURLToFindBaseUrl

        public static java.lang.String getViewerURLToFindBaseUrl(java.lang.String contextPath,
                                                                 boolean isDirectPrint)
      • createReportName

        public static java.lang.String createReportName(java.lang.String appName,
                                                        java.lang.String userName)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Construct a unique file name in the format __.rptdesign. Userid is truncated to 15 characters and the timestamp converted to seconds to ensure the 50 char length of report.reportname is not exceeded. If there are characters in the userid that are invalid for file naming, maxuserid is used instead.
        Parameters:
        UserInfo - userInfo the userInfo for the current user
        String - appName the home application for the report
        Returns:
        String the report name
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • getUserFolderName

        public static java.lang.String getUserFolderName(UserInfo userInfo)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        Returns a string that uniquely identifies the user, which is used in creating a folder path for transient QBRs and file name for all QBRs. If the userid does not contain any characters that cannot be used, it is returned. If the user name does contain invalid characters, the maxuserid is returned. Characters may be invalid based on requirements from the operating system. This method is called twice during creation of a saved QBR and multiple times during the creation/execution of a transient QBR. It is not used for running saved reports, including QBRs.
        Parameters:
        userInfo -
        Returns:
        String a valid folder name that uniquely identifies the user
        Throws:
        MXException
        java.rmi.RemoteException
      • getUserFolderName

        public static java.lang.String getUserFolderName(java.lang.String userName)
                                                  throws MXException,
                                                         java.rmi.RemoteException
        Returns a string that uniquely identifies the user, which is used in creating a folder path for transient QBRs and file name for all QBRs. If the userid does not contain any characters that cannot be used, it is returned. If the user name does contain invalid characters, the maxuserid is returned. Characters may be invalid based on requirements from the operating system. This method is called twice during creation of a saved QBR and multiple times during the creation/execution of a transient QBR. It is not used for running saved reports, including QBRs.
        Parameters:
        userName -
        Returns:
        String a valid folder name that uniquely identifies the user
        Throws:
        MXException
        java.rmi.RemoteException
      • addParamstring

        public static void addParamstring(java.lang.String key,
                                          java.lang.String value,
                                          java.util.Hashtable reportParams)
      • updateReportLabelsAllLangs

        public static void updateReportLabelsAllLangs(UserInfo ui)
                                               throws MXException,
                                                      java.rmi.RemoteException
        For each enabled language, retrieve the values used in the replibrary presentation labels. The language of the passed UserInfo is modified to process each language.
        Parameters:
        userInfo - UserInfo that determines the current language
        Throws:
        MXException
        java.rmi.RemoteException
      • updateReportLabels

        public static void updateReportLabels(UserInfo ui)
                                       throws MXException,
                                              java.rmi.RemoteException
        Update labels for all report dialogs for the language in the passed UserInfo. Update either maxlabels or l_maxlabels depending on whether the current language is a base or secondary language.
        Parameters:
        userInfo - UserInfo that determines the current language
        Throws:
        MXException
        java.rmi.RemoteException
      • makeSafeForXML

        public static java.lang.String makeSafeForXML(java.lang.String value)
        Escape characters from the passed string value that are not safe in presentation XML.
        Parameters:
        value - the string to be escaped
        Returns:
        the string with any XML special characters replaced with character entities.
      • replaceString

        public static java.lang.String replaceString(java.lang.String str,
                                                     java.lang.String pattern,
                                                     java.lang.String replacement)
        Replace all occurrences of a pattern string with a replacement string.
        Parameters:
        str - String target string to search
        pattern - String to locate in the target
        replacement - String to replace pattern with
        Returns:
        String the string with the pattern replaced
      • getcurrentSecAttKeyRecord

        public static ReportSecAttKeyRecord getcurrentSecAttKeyRecord(UserInfo userInfo)
                                                               throws MXException,
                                                                      java.rmi.RemoteException
        Returns the key generated in last 24 hours. If no
        Parameters:
        userInfo -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getKey

        public static byte[] getKey(java.lang.String seqNumberString)
      • addToReportAttachDocs

        public static java.lang.String addToReportAttachDocs(java.lang.String userId,
                                                             java.lang.String url)
      • getReportAttachDocsUrl

        public static java.lang.String getReportAttachDocsUrl(java.lang.String userId,
                                                              java.lang.String key)
      • getRandomString

        public static java.lang.String getRandomString(int len)
      • getRandomString

        public static java.lang.String getRandomString()
      • formatWhere

        public static java.lang.String formatWhere(java.lang.String whereClause,
                                                   java.lang.String baseTable,
                                                   UserInfo ui)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Qualifies the passed where clause and formats using the passed UserInfo to convert db object names to lower case. If there is an order by clause, it is removed. If the passed value is null or empty, returns a default of 1=1.
        Parameters:
        whereClause - the where clause to be formatted
        baseTable - the table used for qualification
        userInfo - the UserInfo for the format
        Returns:
        a where clause formatted for usage in a report
        Throws:
        MXException
        java.rmi.RemoteException
      • addToReportBrosParam

        public static void addToReportBrosParam(java.util.Hashtable paramHashtable,
                                                boolean isSessionParam,
                                                long brosUniqueID,
                                                UserInfo userInfo)
                                         throws MXException,
                                                java.rmi.RemoteException
        Add all parameters of paramHashtable to REPORTBROSPARAM.
        Parameters:
        paramHashtable - the list of parameters
        isSessionParam - whether this list has to be stored as session parameter
        brosUniqueID - uniqueid of REPORTBROS table
        userInfo - User Info
        Throws:
        MXException
        java.rmi.RemoteException
      • addToReportBrosParam

        public static void addToReportBrosParam(java.lang.String paramName,
                                                java.lang.String ParamValue,
                                                boolean isSessionParam,
                                                long brosUniqueID,
                                                UserInfo userInfo)
                                         throws MXException,
                                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • addToReportBrosUrl

        public static void addToReportBrosUrl(java.util.Vector reporUrlParam,
                                              java.util.Vector securedAttachFlags,
                                              boolean isQpixUrl,
                                              long brosUniqueID,
                                              UserInfo userInfo)
                                       throws MXException,
                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getEmailAddress

        public static java.lang.String getEmailAddress(java.lang.String userId)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Returns the email address of the user with the passed in user ID.
        Parameters:
        userID - the userid
        Throws:
        MXException
        java.rmi.RemoteException
      • hasAttribute

        public static boolean hasAttribute(java.lang.String expression,
                                           java.lang.String objectName,
                                           java.util.Set validAttributes)
                                    throws MXException,
                                           java.rmi.RemoteException
        Takes an expression and splits on a string exp to determine if the attribute exists Returns true if an attribute exists
        Parameters:
        expression - the string to test
        objectName - the string representation of the mbo object
        validAttributes - optional set of valid attributes to validate against
        Throws:
        MXException
        java.rmi.RemoteException
      • hasAttribute

        public static boolean hasAttribute(Node expression,
                                           java.lang.String objectName,
                                           java.util.Set validAttributes)
                                    throws MXException,
                                           java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getValidAttributes

        public static java.util.Set getValidAttributes(MosDetailInfo detailInfo)
        Returns a set of valid attributes for the specified object structure detail. This list will exclude nonpersistent attributes as well as any excluded attributes. The objects in the report object structure must have excludeparentkey set to false or they will not be included.
        Parameters:
        MosDetailInfo - detailInfo the MosDetailInfo that includes the valid columns
        Returns:
        List a list of valid attributes for the object structure
      • getValidAttributes

        public static java.util.Set getValidAttributes(java.lang.String objectName)
                                                throws java.rmi.RemoteException
        Returns a set of valid attributes for the specified object, exluding nonpersistent attributes.
        Parameters:
        String - objectName the name of the object
        Returns:
        List a list of valid attributes for the object
        Throws:
        MXException, - RemoteException
        java.rmi.RemoteException
      • getMosDetailInfo

        public static MosDetailInfo getMosDetailInfo(java.lang.String intObjectName,
                                                     int objectID)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns the MosDetailInfo from the cache for the specified objectID in the specified object structure.
        Parameters:
        String - intObjectName the name of the object structure
        int - objectID the object ID that identifies an object in the object structure
        Returns:
        the MosDetailInfo for the specified object
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • getColumnName

        public static java.lang.String getColumnName(MboValueInfo mvi)
        Returns the name of the database column for the specified MboValueInfo. If the
        Parameters:
        String - objectName the name of the object
        Returns:
        the entity name for the specified object, or the extension view if one exists
        Throws:
        MXException, - RemoteException
      • getEntityName

        public static java.lang.String getEntityName(java.lang.String objectName)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns the name of the database object for the specified object name. If the object has an extension view, returns the view name, otherwise returns the table name.
        Parameters:
        String - objectName the name of the object
        Returns:
        the entity name for the specified object, or the extension view if one exists
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • getCurrentDateFunction

        public static java.lang.String getCurrentDateFunction()
                                                       throws java.rmi.RemoteException
        Returns sysdate, current timestamp, or getdate() depending on the database platform.
        Returns:
        a database-specific timestamp function string
        Throws:
        java.rmi.RemoteException
      • getCurrentTimestampFunction

        public static java.lang.String getCurrentTimestampFunction()
                                                            throws java.rmi.RemoteException
        Returns trunc(sysdate), current date, or convert(date, getdate()) depending on the database.
        Returns:
        a database-specific date function string
        Throws:
        java.rmi.RemoteException
      • parseExpression

        public static Node parseExpression(java.lang.String expression,
                                           com.ibm.icu.util.ULocale icuLocale)
                                    throws MXException
        Returns a parse tree of the provided expression that uses the decimal separator for the given locale. The expression is parsed using MaximoMacroParserHelper and FieldPlaceholderParserHelper.
        Parameters:
        expression -
        icuLocale -
        Returns:
        a parse tree of the provided expression or null if the expression cannot be parsed
        Throws:
        MXException
      • validateExpression

        public static void validateExpression(Node parsedExpr,
                                              java.lang.String objectName,
                                              java.util.Set validAttributes,
                                              java.lang.String category)
                                       throws MXException,
                                              java.rmi.RemoteException
        Validates the expression represented by the passed parse tree against the set of valid attributes and the contents of the report expression library.
        Parameters:
        parsedExp - the parse tree that represents the expression to be tested
        objectName - the string representation of the mbo object
        validAttributes - set of valid attributes to validate against
        Throws:
        MXException
        java.rmi.RemoteException
      • getExportReportList

        public static java.lang.String[] getExportReportList()
      • isMultiLang

        public static boolean isMultiLang()
                                   throws MXException,
                                          java.rmi.RemoteException
        Determines if the system is configured for multiple languages, as determined by the enabled flag in the Language object.
        Throws:
        MXException
        java.rmi.RemoteException
      • setLabelSyncFlag

        public static void setLabelSyncFlag()
                                     throws MXException,
                                            java.rmi.RemoteException
        Updates the SYNCREPORTLABELS maxvar to indicate that the labels for some languages might be outdated or missing. The flag is only set if multiple languages are enabled. This is called when a public ad hoc report is saved or when request pages are generated from Report Administration.
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • encrypt

        public static java.lang.String encrypt(java.lang.String source)
                                        throws java.lang.Exception
        Encrypts the passed string using an algorithm determined by the mxe.report.sec.useDESede property. When the property is set to true, the algorithm is DESede, otherwise it is DES. DESede is the recommended setting; DES is provided for backward compatibility.
        Parameters:
        source - the string to encrypt
        Returns:
        String the encrypted string
        Throws:
        java.lang.Exception
      • decrypt

        public static java.lang.String decrypt(java.lang.String source)
                                        throws java.lang.Exception
        Decrypts the passed string using an algorithm determined by the mxe.report.sec.useDESede property. When the property is set to true, the algorithm is DESede, otherwise it is DES. DESede is the recommended setting; DES is provided for backward compatibility.
        Parameters:
        source - the string to decrypt
        Returns:
        String the decrypted string
        Throws:
        java.lang.Exception
      • addToHyperlinkQueryUrl

        public static java.lang.String addToHyperlinkQueryUrl(java.lang.String sessionid,
                                                              java.lang.String queryUrl)
      • getHyperlinkQueryUrl

        public static java.util.HashMap getHyperlinkQueryUrl(java.lang.String sessionid,
                                                             java.lang.String maxhlparam)
      • addToReportWhere

        public static java.lang.String addToReportWhere(java.lang.String userId,
                                                        java.lang.String where,
                                                        java.lang.String displaywhere)
      • addToReportWhere

        public static java.lang.String addToReportWhere(java.lang.String userId,
                                                        java.lang.String where,
                                                        java.lang.String displaywhere,
                                                        java.lang.String reportName)
      • getReportWhere

        public static java.util.HashMap getReportWhere(java.lang.String userId,
                                                       java.lang.String whereId)
      • userSelectDynamicQueryEnabled

        public static boolean userSelectDynamicQueryEnabled()
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • excludeDynamicQuery

        public static boolean excludeDynamicQuery(MboRemote reportAdHoc)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Determines whether the application query should be excluded from the where clause applied to the ad hoc report at runtime. Returns true when the mxe.report.adhoc.UserSelectDynamicQuery is enabled, and the passed ad hoc report has a saved query and the addddynamicquery flag is set to false.
        Parameters:
        reportAdHoc - the ReportAdHoc object
        Returns:
        true if the application query should be excluded, false if not
        Throws:
        MXException
        java.rmi.RemoteException
      • getRelation

        public static RelationInfo getRelation(java.lang.String objectName,
                                               java.lang.String relationName)
                                        throws MXException,
                                               java.rmi.RemoteException
        Returns the RelationInfo from the relationship cache for the passed object name and relationship name. Relationships are retreived from the MboSetInfo of the object because this will include inherited relationships.
        Parameters:
        objectName - the object name
        relationName - the relationship name
        Throws:
        MXException - if the relationship is not found
        java.rmi.RemoteException
      • concatAttachmentPDFFiles

        public static void concatAttachmentPDFFiles(java.lang.String outPutDirPath,
                                                    java.lang.String outPutFilePath,
                                                    java.util.Vector listOfFiles,
                                                    MXLogger logger)
      • concatAttachmentPDFFiles

        public static void concatAttachmentPDFFiles(java.lang.String outPutDirPath,
                                                    java.lang.String outPutFilePath,
                                                    java.util.Vector listOfFiles,
                                                    boolean DuplexPrintEnabledOverride,
                                                    MXLogger logger)
      • addEmptyPage

        public static void addEmptyPage(com.lowagie.text.pdf.PdfCopy writer,
                                        java.lang.String emptyFilePath,
                                        MXLogger logger)
      • isOddPage

        public static boolean isOddPage(int pagesMerged)
      • createEmptyPdfFile

        public static boolean createEmptyPdfFile(java.lang.String filePath,
                                                 MXLogger logger)
      • getBooleanProperty

        public static boolean getBooleanProperty(java.lang.String propertyname)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • validateLocalFile

        public static boolean validateLocalFile(java.lang.String attchUrl)
      • convertAllPrintableAttachmentsOfThisMboToPDF

        public static int convertAllPrintableAttachmentsOfThisMboToPDF(MboRemote baseMbo,
                                                                       java.util.Vector listOfFilesVector,
                                                                       java.lang.String outputFolder,
                                                                       int currentDocIndex,
                                                                       MXLogger logger)
                                                                throws MXException,
                                                                       java.rmi.RemoteException
        Parameters:
        baseMbo -
        listOfFilesVector -
        pdfSaveOptions -
        outputFolder -
        currentDocIndex -
        conversionHandler -
        logger -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getFileForGivenUrl

        public static java.lang.String getFileForGivenUrl(java.lang.String imagePath,
                                                          boolean debugLocal)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • addAndCleanupDirectoty

        public static void addAndCleanupDirectoty(java.lang.String dirPath)
        This method stores the directory and deletes the directories older than 10 hours old, but the delete will happen only when this method is called after 10 to 11 hours. The delete code is executed in atleast 1 hour interval.
        Parameters:
        dirPath -
      • deleteFolder

        public static boolean deleteFolder(java.lang.String folderName)
      • deleteAllFilesFromFolder

        public static void deleteAllFilesFromFolder(java.io.File folder)
      • getByteArrayforUrl

        public static byte[] getByteArrayforUrl(java.lang.String docpath)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFileTypeList

        public static java.util.List getFileTypeList()
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns the supported list of ReportEmailFileTypeInfos from the REPORTEMAILFILE cache. This is used to populate the File Type radio button group in the Email sections on the request page and Schedule tab on the report list.
        Throws:
        MXException
        java.rmi.RemoteException
      • validateDPKey

        public static boolean validateDPKey(java.lang.String directPrintKey)
        Validates the format of the directPrintKey value. The expected format is RPT- followed by all numeric characters.