psdi.app.sla

Class SLAAssetLoc

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


    public class SLAAssetLoc
    extends Mbo
    implements SLAAssetLocRemote
    MBO to represent a relationship between a Service Level Agreement and an asset, location or asset type.

    See SLA Package Description for details.

    The key attribute for this object is SLANum.

    The attributes in this object are as follows:

    Attribute NameDescription
    SLANUMThe identification of the SLA in this relationship
    ASSETNUMThe identification of the asset in this relationship. If this field is not empty, the location and assettype fields should be.
    ASSETTYPEAsset type string in this relationship. If this field is not empty, the location and assetnum fields should be.
    LOCATIONThe identification of the location in this relationship. If this field is not empty, the assetnum and assettype fields should be.
    DESCRIPTIONThe short description of the associated asset or location. This should be empty if the assettype is not. This is a non-persistent field. The value is loaded from the asset or location table.
    DESCRIPTION_LONGDESCRIPTIONThe long description of the associated asset or location. This should be empty if the assettype is not.
    SITEIDThe site id of the associated asset or location. This should be empty if the assettype is not.
    • Constructor Detail

      • SLAAssetLoc

        public SLAAssetLoc(MboSet ms)
                    throws MXException,
                           java.rmi.RemoteException
        Constructs the SLAAssetLoc object.

        Parameters:
        ms -
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • setDescription

        public void setDescription()
                            throws MXException,
                                   java.rmi.RemoteException
        Helper function that sets the non-persistent description field based on whether an asset or a location is selected.
        Throws:
        MXException
        java.rmi.RemoteException
      • setDescription

        public void setDescription(MboRemote mbo)
                            throws MXException,
                                   java.rmi.RemoteException
        Helper function that sets the non-persistent description field from the mbo object passed in from the parameter.
        Throws:
        MXException
        java.rmi.RemoteException
      • setAssetNum

        public void setAssetNum()
                         throws MXException,
                                java.rmi.RemoteException
        Set the siteid and clear the location when assetnum is set.
        Throws:
        MXException
        java.rmi.RemoteException
      • setLocationID

        public void setLocationID()
                           throws MXException,
                                  java.rmi.RemoteException
        Set the siteid and clear the assetnum when location is set.
        Throws:
        MXException
        java.rmi.RemoteException
      • validateAsset

        public void validateAsset(java.lang.String assetNum)
                           throws MXException,
                                  java.rmi.RemoteException
        Validate if the assetnum is allowed for the current user
        Parameters:
        assetNum -
        Throws:
        MXException
        java.rmi.RemoteException
      • validateLocation

        public void validateLocation(java.lang.String location)
                              throws MXException,
                                     java.rmi.RemoteException
        Validate if the location is allowed for the current user
        Parameters:
        location -
        Throws:
        MXException
        java.rmi.RemoteException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a slaassetloc. Set the slanum to that of the owner SLA.
        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
        Can this slaassetloc be deleted?
        If the owner SLA is active then this slaasstloc object cannot be deleted.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • enableFields

        public void enableFields()
                          throws MXException,
                                 java.rmi.RemoteException
        Disable/enable the slaassetloc fields based on the SLA status.
        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 not. If this field does not need to be copied return true. The following is a list of fields that are not copied from the source slaassetloc to the target slaassetloc.
        1. SLANUM
        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, otherwise return false.
        Throws:
        java.rmi.RemoteException
        MXException