psdi.iface.mos

Class MboXMLUtil

  • java.lang.Object
    • psdi.iface.mos.MboXMLUtil


  • public class MboXMLUtil
    extends java.lang.Object
    Conversion from XML to Mbo companent
    • Field Detail

      • INTEGRATIONLOGGER

        public static final MXLogger INTEGRATIONLOGGER
    • Constructor Detail

      • MboXMLUtil

        public MboXMLUtil()
    • Method Detail

      • xmlToMboSet

        public static MboSetRemote xmlToMboSet(UserInfo info,
                                               ObjectList data,
                                               java.util.Map params,
                                               MXTransaction trans)
                                        throws java.rmi.RemoteException,
                                               MXException
        Creates MboSet and converts XML data to it
        Parameters:
        info - Give refrence to User Info object.
        data - List of XML data.
        Returns:
        MboSet filled with data from XML.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • xmlToMboSet

        public static MboSetRemote xmlToMboSet(UserInfo info,
                                               ObjectList data,
                                               java.util.Map params,
                                               MXTransaction trans,
                                               java.lang.String appName)
                                        throws java.rmi.RemoteException,
                                               MXException
        Creates MboSet and converts XML data to it
        Parameters:
        info - Give refrence to User Info object.
        data - List of XML data.
        Returns:
        MboSet filled with data from XML.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • xmlToMboSet

        public static MboSetRemote xmlToMboSet(MboSetRemote mboSet,
                                               ObjectList data,
                                               int mboAction)
                                        throws java.rmi.RemoteException,
                                               MXException
        Converts XML data to existing MboSet
        Parameters:
        mboSet - Give refrence to existing MboSet object.
        data - List of XML data.
        Returns:
        MboSet filled with data from XML.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • xmlToMboSet

        public static MboSetRemote xmlToMboSet(MboSetRemote mboSet,
                                               ObjectList data)
                                        throws java.rmi.RemoteException,
                                               MXException
        Converts XML data to existing MboSet
        Parameters:
        mboSet - Give refrence to existing MboSet object.
        data - List of XML data.
        Returns:
        MboSet filled with data from XML.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • xmlToMbo

        public static void xmlToMbo(MboRemote mbo,
                                    StructureObject data)
                             throws java.rmi.RemoteException,
                                    MXException
        Converts XML data to existing Mbo
        Parameters:
        mbo - Give refrence to existing Mbo object.
        data - XML data.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • xmlToMbo

        public static void xmlToMbo(MboRemote mbo,
                                    StructureObject strucObject,
                                    java.util.Iterator columns,
                                    long accessModifier)
                             throws java.rmi.RemoteException,
                                    MXException
        Converts XML data to all specified columns in a Mbo
        Parameters:
        mbo - Give refrence to Mbo object.
        strucObject - XML data.
        columns - Columns Iterator.
        accessModifier - accessModifier to set the data.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • mosXmlToMbo

        public static void mosXmlToMbo(MboRemote mbo,
                                       StructureObject strucObject,
                                       java.util.Map data,
                                       long accessModifier,
                                       boolean skipKeys)
                                throws java.rmi.RemoteException,
                                       MXException
        Converts XML data to Mbo's based on Object Structure Definition
        Parameters:
        mbo - Give refrence to Mbo object.
        strucObject - XML data.
        data - Map of of data needed to be set.
        accessModifier - accessModifier to set the data.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getMosName

        public static java.lang.String getMosName(org.jdom2.Document doc)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Gets Object Struture Name from a top level of Document
        Parameters:
        doc - JDOM Documnt around XML data
        Returns:
        object structure name
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getKeyValues

        public static java.lang.String[] getKeyValues(MboSetInfo mboSetInfo,
                                                      java.lang.String[] keys,
                                                      StructureObject strucObject)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Create array of keys from data dictionary
        Parameters:
        mboSetInfo - Informnation of the Integration Object
        keys - Key array
        strucObject - Reference to structureData Object for the current data.
        Returns:
        Array of data or specified keys in a mbo
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getFullKeyValue

        public static java.lang.String getFullKeyValue(MboSetInfo mboSetInfo,
                                                       java.lang.String[] keys,
                                                       java.lang.Object data)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Create array of keys from data dictionary and concat it together
        Parameters:
        mboSetInfo - Informnation of the Integration Object
        keys - Key array
        data - Reference to structureData Object for the current data.
        Returns:
        Keys value concatinated together
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getDisplayKeyValue

        public static java.lang.String getDisplayKeyValue(MboSetInfo mboSetInfo,
                                                          java.lang.String[] keys,
                                                          java.lang.Object data)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Create array of keys and key values from data dictionary and concat it together
        Parameters:
        mboSetInfo - Informnation of the Integration Object
        keys - Key array
        data - Reference to structureData Object for the current data.
        Returns:
        Keys value concatinated together
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • checkDefaultValues

        public static boolean checkDefaultValues(MboValueInfo mvi,
                                                 java.lang.String name,
                                                 StructureObject strucObject)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Check default Value and how to process it
        Parameters:
        mvi - Informnation of the Mbo Attribute
        name - Attribute Name
        strucObject - Reference to structureData Object for the current data.
        Returns:
        TRUE or FALSE
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • convertAction

        public static int convertAction(java.lang.String action)
                                 throws MXException,
                                        java.rmi.RemoteException
        Converts action in XML to the MboSet Constant
        Parameters:
        action - XML action
        Returns:
        MboSet constants
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • checkRowstamp

        public static void checkRowstamp(MboRemote mbo,
                                         StructureObject strucObject)
                                  throws MXException,
                                         java.rmi.RemoteException
        Default method to check rowstamp attribte against row stamp of the mbo.
        Parameters:
        mbo - Give refrence to Mbo object.
        strucObject - XML data.
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception