psdi.app.kpi

Class KPI

    • Constructor Detail

      • KPI

        public KPI(MboSet ms)
            throws MXException,
                   java.rmi.RemoteException
        Construct the KPI object
        Parameters:
        ms - Mbo set
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a mbo, defaulting the attributes shown below. Default values are :

        Attribute NameAttribute Value
        IsPublicTrue
        KPIDateServer Date
        FormatDECIMAL
        Real TimeNull
        Last KPI ValueNull
        OwnerCurrent user
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • run

        public void run()
                 throws MXException,
                        java.rmi.RemoteException
        Runs the current KPI. Makes a complete SQL from Select and Clause and runs it as a direct query. Direct JDBC call is made using DBManager
        Specified by:
        run in interface KPIRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • validateSQL

        public void validateSQL()
                         throws MXException,
                                java.rmi.RemoteException
        Validates the current current KPI
        Checks if query is other than Select
        Specified by:
        validateSQL in interface KPIRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        If the KPi hasn't been run , and it has been newly formed, then it is run.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.save()
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        Overrides the skipCopyField() in the Mbo. Since this method takes the MboValueInfo as its parameter just check to see if this field needs to be copied or skipped by using the data from the static HashSet. If this field does not need to be copied return true. The following are KPI fields that will be skipped without being copied to the newly duplicated KPI
        1. KPINAME
        Overrides:
        skipCopyField in class Mbo
        Throws:
        java.rmi.RemoteException
        MXException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Checks if this KPI is refrenced anywhere.
        Checks are made on KPIGraph portlet and KPi List portlet remotes, if a reference is not found then the KPI is deleted.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException("kpi", - "DeleteKPIL") is thrown when it is referenced by a KPILCONFIG object.
        MXApplicationException("kpi", - "DeleteKPIG") is thrown when it is referenced by a KPIGCONFIG object.
        MXException
        java.rmi.RemoteException
      • kpiInfo

        public java.util.Vector kpiInfo()
                                 throws MXException,
                                        java.rmi.RemoteException
        Returns all details about the current KPI as a Vector This method is called by UI layer basically for display
        Specified by:
        kpiInfo in interface KPIRemote
        Returns:
        Vector containing all information about this KPI
        Throws:
        MXException
        java.rmi.RemoteException
      • getComparisionKPIs

        public java.util.ArrayList getComparisionKPIs()
                                               throws MXException,
                                                      java.rmi.RemoteException
        Returns collection of KPI remotes that have to be compared with this KPI.
        KPITRENDCFG.COMPAREWITH is queried for this KPI
        Specified by:
        getComparisionKPIs in interface KPIRemote
        Returns:
        ArrayList of all kpis that are in trend analysis
        Throws:
        MXException
        java.rmi.RemoteException
      • getCustomDates

        public java.util.Date getCustomDates(boolean from)
                                      throws MXException,
                                             java.rmi.RemoteException
        This method returns the custom trend dates related to this KPI from KPIGTRENDCFG, its configuration table
        Specified by:
        getCustomDates in interface KPIRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.kpi.KPIRemote#getCustomDates()
      • getTrendRange

        public java.lang.String getTrendRange()
                                       throws MXException,
                                              java.rmi.RemoteException
        Returns trend range based on what was selected by the user The values could be

        • 2WEEKS
        • 2YEARS
        • 3MONTHS
        • 5YEARS
        • 6MONTHS
        • MONTH
        • WEEK
        • YEAR
          Specified by:
          getTrendRange in interface KPIRemote
          Returns:
          range related to trend analysis of this KPI
          Throws:
          MXException
          java.rmi.RemoteException
        • validateTrendInfo

          public void validateTrendInfo()
                                 throws MXException,
                                        java.rmi.RemoteException
          Validate whether trend information is correct for drawing chart and saving KPI.
          Range of start and end dates are validated for time range logic
          Specified by:
          validateTrendInfo in interface KPIRemote
          Throws:
          MXException
          java.rmi.RemoteException
        • delete

          public void delete(long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
          Description copied from class: Mbo
          Mark the object to be deleted depending on the access modifier. This will usually be overridden in the subclass of Mbo as there may be application specific rules as to if and when an object can be deleted. Object is not actually deleted in the database until save() is called. This method will also mark all associated Long Description and Translation Mbos for deletion.
          Specified by:
          delete in interface MboRemote
          Overrides:
          delete in class Mbo
          Parameters:
          accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
          Throws:
          MXException
          java.rmi.RemoteException
          See Also:
          Mbo.delete(long)
        • isClearRelatedKPI

          public boolean isClearRelatedKPI()
        • setClearRelatedKPI

          public void setClearRelatedKPI(boolean clearRelatedKPI)