psdi.app.sla

Class SLAFinder

  • java.lang.Object
    • psdi.app.sla.SLAFinder


  • public class SLAFinder
    extends java.lang.Object
    The SLAFinder class is responsible for finding the SLAs(Service Level Agreements) that applies to any MBO object. It's also responsible for calculating contact/response/resolution date/time. The following is the sample code snipet that calls this class:
    SLAFinder slaFinder = new SLAFinder(this);
    java.util.List targetSlas = slaFinder.getTargetSLAs();
    java.util.List targetCommitments = slaFinder.getTargetCommitments();
    ...
    • Constructor Summary

      Constructors 
      Constructor and Description
      SLAFinder(Mbo mbo)
      Constructor of SLAFinder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void applySLAs()
      Find appliable slas and apply them to the current mbo, meaning,
      create slarecords rows.
      void calculateMeasurements()
      Calculate target dates for the current object.
      This version we calculate,
      target contact/response/resolution dates for TICKETS target response/resolution dates for work orders.
      MboRemote calculateSLARecordsTimes(MboRemote slaR)
      Call the target date calculation algorithm for the slarecords passed in.
      void clearTargetDates()
      Clear the target dates.
      java.util.List getAppliableSLAs(java.lang.String extraWhere, boolean all)
      This method finds all alliable SLAs for the mbo object.
      MboSetRemote getAppliableSLAsAsMboSet(java.lang.String extraWhere, boolean all)
      Returns the alliable SLAs as a mbo set.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SLAFinder

        public SLAFinder(Mbo mbo)
        Constructor of SLAFinder. Do not pass null in the parameter mbo!
    • Method Detail

      • applySLAs

        public void applySLAs()
                       throws MXException,
                              java.rmi.RemoteException
        Find appliable slas and apply them to the current mbo, meaning,
        • create slarecords rows.
        • calculate target dates.
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateMeasurements

        public void calculateMeasurements()
                                   throws MXException,
                                          java.rmi.RemoteException
        Calculate target dates for the current object.
        This version we calculate,
        • target contact/response/resolution dates for TICKETS
        • target response/resolution dates for work orders.
        Throws:
        MXException
        java.rmi.RemoteException
      • clearTargetDates

        public void clearTargetDates()
                              throws MXException,
                                     java.rmi.RemoteException
        Clear the target dates. This is called when SLAs are removed from an object.
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateSLARecordsTimes

        public MboRemote calculateSLARecordsTimes(MboRemote slaR)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Call the target date calculation algorithm for the slarecords passed in.
        Throws:
        MXException
        java.rmi.RemoteException
      • getAppliableSLAs

        public java.util.List getAppliableSLAs(java.lang.String extraWhere,
                                               boolean all)
                                        throws MXException,
                                               java.rmi.RemoteException
        This method finds all alliable SLAs for the mbo object. It finds all SLAs that
        1. have status = ACTIVE
        2. the objectname equals the object name of the current mbo object or the super object

        If parameter all is true, it will also apply these,
        3. The other header attributes (siteid/orgid/company/commoditygroup/commodity)
        4. The classstructure id. 5. The apply clause in the SLA covers the current mbo object
        6. The sla calendar
        Throws:
        MXException
        java.rmi.RemoteException
      • getAppliableSLAsAsMboSet

        public MboSetRemote getAppliableSLAsAsMboSet(java.lang.String extraWhere,
                                                     boolean all)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns the alliable SLAs as a mbo set.
        Throws:
        MXException
        java.rmi.RemoteException