psdi.app.sla

Class SLA

  • All Implemented Interfaces:
    java.rmi.Remote, SLARemote, MboConstants, MboRemote, StatefulMboRemote, MaxRemoteProxy


    public class SLA
    extends StatefulMbo
    implements SLARemote
    The MBO to represent a Service Level Agreement.

    This is a system level object.

    See Service Level Agreements Package Description for details.

    The key attribute for this object is SLANUM.

    The attributes in this object are as follows:

    Attribute NameDescription
    SLANUMSLA identification number
    SLATYPEThe SLA type
    OBJECTNAMEThe name of the mbo object that this SLA applies to
    DESCRIPTIONShort description of this SLA
    STATUSThe status of this SLA
    STATUSDATEThe date and time when the status of this SLA was last changed
    STARTDATEStart date of this SLA
    ENDDATEEnd date of this SLA
    REVIEWDATEThis is the date when an SLA is up for review/renegotiation
    RANKINGThis is the numerical attribute that is used to compare/evaluate multiple SLAs and determine which SLA is applied to a record. If multiple, valid SLAs are applied to a record, this attribute determines the order in which the SLAs are applied. If one SLA is applied, this Ranking determines which single SLA to resolve to
    COMMODITYGROUPService catalog group ID
    COMMODITYService catalog
    PARENTSLANUMParent SLA number
    ORGIDOptional ID of the organization that this SLA is defined for
    SITEIDOptional ID of the site that this SLA is defined for
    COMPANYName of the vendor that
    SLAORGIDOrganization ID for the SLA calendar
    SLACALENDARThe Calendar is used in conjunction with the SLA Shift to determine which SLA is eligible to be applied to a record based on the time/date of when the record was created
    SLASHIFTThe Shift is used in conjunction with the SLA Calendar to determine which SLA is eligible to be applied to a record based on the time/date of when the record was created
    CALCORGIDOrganization ID for the calculation calendar
    CALCCALENDARThe Calendar is used in conjunction with the Calculation Shift for setting values on a record when the SLA is applied
    CALCSHIFTThe Shift is used in conjunction with the Calculation Calendar for setting values on a record when the SLA is applied.
    CREATEDBYThe name of the user who created this SLA
    CREATEDATEThe date when this SLA is created
    CHANGEDBYThe name of the user who last updated this SLA
    CHANGEDATEThe date when this SLA is last updated
    ESCALATIONReference to the associated escalation
    DESCRIPTION_LONGDESCRIPTIONLong description of this SLA
    CONDITIONThis is the SQL condition that expresses when an SLA is applicable to a record in MAXIMO
    • Constructor Detail

      • SLA

        public SLA(MboSet ms)
            throws MXException,
                   java.rmi.RemoteException
        Constructs the SLA object.
        Parameters:
        ms - MboSet
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a new SLA object. Sets field defaults to:

        Attribute NameAttribute Value
        STATUSDRAFT
        SLATYPECUSTOMER
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Overwitten for SLA's MBO. Delete is not allowed,
        • If the SLA is listed in the RELATEDSLA table (as a child)
        • If the SLA is listed in the SLARECORDS table (there are records associated with this SLA)
        • If the SLA is active
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Overwitten for SLA to delete the following related objects,
        • SLACOMMITMENTS
        • SLAASSETLOC
        • SLAKPI
        • SLACONTRACT
        • SLARECORDS
        • RELATEDSLAS
        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)
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        Duplicates an SLA record. This will duplicate these related objects,
        • SLACOMMITMENTS
        • SLAASSETLOC
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • 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 SLA fields will be skipped without being copied to the newly duplicated SLA
        1. slanum
        2. escalation
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        The - MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        True,if the field does not need to be copied.In all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Override the appValidate action to sync up the escalation id.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • defineEscalation

        public void defineEscalation(int row)
                              throws MXException,
                                     java.rmi.RemoteException
        This method is invoked when the Defin Escalation button is clicked. It creates a new reference point and a new escalation id it does not exist already.
        Specified by:
        defineEscalation in interface SLARemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        SLA.defineEscalation(int row)
      • checkRelatedSLAs

        public boolean checkRelatedSLAs(MboRemote commitment)
                                 throws MXException,
                                        java.rmi.RemoteException
        Same as validateRelatedSLAs() except that it checks for only one commitment and it does not throw an exception, only popups a warning message
        Throws:
        MXException
        java.rmi.RemoteException
      • validateRelatedSLAs

        public boolean validateRelatedSLAs()
                                    throws MXException,
                                           java.rmi.RemoteException
        validate commitment stringency of the commitments against that of the parents/childern
        Throws:
        MXException
        java.rmi.RemoteException
      • validateRelatedSLA

        public boolean validateRelatedSLA(MboRemote sla,
                                          boolean isParent)
                                   throws MXException,
                                          java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • addAssets

        public void addAssets(MboSetRemote assetSet)
                       throws MXException,
                              java.rmi.RemoteException
        This method is called by the SelectAssetsBean to added the currently selected assets to the slaassetloc table as relationship.
        Specified by:
        addAssets in interface SLARemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.sla.addAssets(MboSetRemote assetSet)
      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Since the SLA does not have status history, SLADUMMYSTATUS object is created as a place holder for it.
        Specified by:
        getStatusHistory in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • enableFields

        public void enableFields(java.lang.String prevStatus)
                          throws MXException
        Central place for disable/enable SLA/commitments fields based on status.
        Throws:
        MXException
      • enableCalendarFields

        public void enableCalendarFields(boolean setCalcOrg)
                                  throws MXException,
                                         java.rmi.RemoteException
        Decides if the calendar field set needs to be enabled, based on the Applies To objectname. In the current version only enables them if the applies to is TICKET or WORKORDER. setCalcOrg parameter decides if the orgid will be set from the orgid of this SLA.
        Throws:
        MXException
        java.rmi.RemoteException
      • resetCalendarFields

        public void resetCalendarFields(java.lang.String whichOrg)
                                 throws MXException,
                                        java.rmi.RemoteException
        Helper function that clear the calendar field set The whichOrg parameter tells which calendar set (appliyto or calculation) to clear.
        Throws:
        MXException
        java.rmi.RemoteException
      • getCalendarFields

        public java.util.Vector getCalendarFields(boolean includeOrg)
        Get all the calendar fields. This includes the orgid fiels if includeOrg is true.
      • getSlaCalendarFields

        public java.util.Vector getSlaCalendarFields(boolean includeOrg)
        Get the sla calendar field set
      • getCalcCalendarFields

        public java.util.Vector getCalcCalendarFields(boolean includeOrg)
        Get he calculation calendar field set.
      • setOrgID

        public void setOrgID()
                      throws MXException,
                             java.rmi.RemoteException
        set the default APPLYTO_ORG to be the same as the orgid, if it is null
        Throws:
        MXException
        java.rmi.RemoteException
      • getMboSet

        public MboSetRemote getMboSet(java.lang.String name)
                               throws MXException,
                                      java.rmi.RemoteException
        Override this method to provide dynamic set for selecting kpis, related slas, etc. This will exclude the objects that are already selected, even if they are not saved yet.
        Specified by:
        getMboSet in interface MboRemote
        Overrides:
        getMboSet in class Mbo
        Parameters:
        name - The relationship provided to retrieve a related mboSet, usually using foreign keys. For example, "psdi.app.workorder.WOSetRemote.ASSET" is a relationship for the work order object to access the asset Set where "workorder.assetnum=asset.assetnum". The relationship can also be chained. Such as ASSET.ASSETSTATUS.
        Returns:
        The returned related set specified through the relationship.
        Throws:
        MXException - "A relationship called {0} does not exist for the {1} business object" exception will be thrown if the relationship was not found. "Unknown Object" exception will be thrown if the database object can not be found through the relationship.
        java.rmi.RemoteException
        See Also:
        Mbo.getMboSet(String)
      • getsitesByOrg

        public MboSetRemote getsitesByOrg()
                                   throws MXException,
                                          java.rmi.RemoteException
        This function gets the MboSet of sites that belong to the currently selected org
        Returns:
        null if the orgid is null
        Throws:
        MXException
        java.rmi.RemoteException
      • validateCompanyOrg

        public boolean validateCompanyOrg(java.lang.String company,
                                          java.lang.String orgid)
                                   throws MXException,
                                          java.rmi.RemoteException
        Validates that a company is defined for an organization.
        Parameters:
        company - Company name
        orgid - Organization ID
        Returns:
        true if the company is defined for the org
        Throws:
        MXException
        java.rmi.RemoteException