psdi.webclient.beans.report

Class ReportScheduleCommonBean

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.http.HttpSessionBindingListener, DataBeanListener
    Direct Known Subclasses:
    ReportSchedAllBean, ReportSchedBean, SchedConfirmBean


    public abstract class ReportScheduleCommonBean
    extends DataBean
    Inherit this abstract class in order to use standard validation and fixes on ReportSchedule MBOs at your Report Schedule Bean classes.
    This is an implementation of the Template Method Pattern.
    Since:
    7.5
    See Also:
    ReportSchedAllBean}, {@link ReportSchedBean}, {@link SchedConfirmBean}
    • Constructor Detail

      • ReportScheduleCommonBean

        public ReportScheduleCommonBean()
    • Method Detail

      • initialize

        protected void initialize()
                           throws MXException,
                                  java.rmi.RemoteException
        Description copied from class: DataBean
        Typically called after the DataBean gets a new MboSetRemote On the MboSetRemote it sets the app, the app defaults, user defaults If the remote is an instanceof NonPersistentMboSetRemote then setup is called on it and sets the current row to 0. If the DataBean isn't bound to a table then initialize fetches the first mbo (sets the current row to 0). If this method is overridden under most case you will want to call super.initalize at the end of the the new initialize method.
        Overrides:
        initialize in class DataBean
        Throws:
        MXException
        java.rmi.RemoteException
      • verifyReportSchedule

        protected final void verifyReportSchedule(MboRemote reportScheduleMbo)
                                           throws MXException
        Verifies if data on report scheduling is good to be saved.
        Template Method Pattern
        Parameters:
        reportScheduleMbo - MboSetRemote containing REPORTSCHED entries
        Throws:
        MXException - if fails on any check
      • fixReportSchedule

        protected final void fixReportSchedule(MboRemote reportScheduleMbo)
                                        throws MXException
        Automated fixes to reports scheduling data.
        Template Method Pattern
        Parameters:
        reportScheduleMbo -
        Throws:
        MXException
      • getReport

        protected MboRemote getReport(MboRemote reportSched)
                               throws MXException,
                                      java.rmi.RemoteException,
                                      MXApplicationException
        Returns the REPORT entry attached to this REPORTSCHED by the REPORT relationship.
        Parameters:
        reportSched -
        Returns:
        MboRemote instance for the Report MBO attached to given ReportSchedule.
        Throws:
        MXException
        java.rmi.RemoteException
        MXApplicationException - - if not REPORT was found.
      • checkEmailTargets

        protected void checkEmailTargets(MboRemote reportSched)
                                  throws java.rmi.RemoteException,
                                         MXException,
                                         MXApplicationException
        Performs checks on REPORTSCHED.EMAILUSERS:
        1. Checks if each email address correspond to a Maximo User e-mail;
          validation is done against EMAIL.EMAILADDRESS entries.
        Parameters:
        addresses - - a String list of addresses to be checked
        Throws:
        MXApplicationException - - case one or more addresses are not valid
        java.rmi.RemoteException
        MXException
        MXApplicationException - - if fails.
      • fixEmailSubject

        protected void fixEmailSubject(MboRemote reportSched,
                                       MboRemote reportRemote)
                                throws MXException,
                                       java.rmi.RemoteException
        E-mail Subject (REPORTSCHED.EMAILSUBJECT) should not be null, defaulting to scheduled report name (REPORT.DESCRIPTION).
        Parameters:
        reportSched -
        reportRemote -
        Throws:
        MXException
        java.rmi.RemoteException