com.ibm.tivoli.maximo.fdmbo

Class JSONConversionUtil

  • java.lang.Object
    • com.ibm.tivoli.maximo.fdmbo.JSONConversionUtil


  • public class JSONConversionUtil
    extends java.lang.Object
    Utility class for all JSON conversions
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String convertFromJSONDate(java.lang.String data, java.lang.String dateFormatType, java.lang.String dateFormat)
      Apply rules to this level recursively
      static void convertToJSONDate(java.util.Date input, com.ibm.json.java.JSONObject jo, java.lang.String propName, java.lang.String formatType, java.lang.String dateFormat, UserInfo userInfo)
      Apply rules to this level recursively
      static java.lang.String getJSONType(int maxType)
      Get Maximo type
      protected static java.lang.String getJSONType(java.lang.String propName, java.lang.Object o) 
      static void setToJSON(java.lang.String type, java.lang.String propName, java.lang.String formattedValue, com.ibm.json.java.JSONObject jo, java.lang.String formatType, java.lang.String dateFormat, UserInfo userInfo)
      Apply rules to this level recursively
      • Methods inherited from class java.lang.Object

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

      • JSONConversionUtil

        public JSONConversionUtil()
    • Method Detail

      • setToJSON

        public static void setToJSON(java.lang.String type,
                                     java.lang.String propName,
                                     java.lang.String formattedValue,
                                     com.ibm.json.java.JSONObject jo,
                                     java.lang.String formatType,
                                     java.lang.String dateFormat,
                                     UserInfo userInfo)
                              throws MXException,
                                     java.rmi.RemoteException
        Apply rules to this level recursively
        Parameters:
        element - the JDOM Element
        mbo - the current mbo
        info - the MosDetailInfo for this level
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • convertFromJSONDate

        public static java.lang.String convertFromJSONDate(java.lang.String data,
                                                           java.lang.String dateFormatType,
                                                           java.lang.String dateFormat)
                                                    throws MXException,
                                                           java.rmi.RemoteException
        Apply rules to this level recursively
        Parameters:
        element - the JDOM Element
        mbo - the current mbo
        info - the MosDetailInfo for this level
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • convertToJSONDate

        public static void convertToJSONDate(java.util.Date input,
                                             com.ibm.json.java.JSONObject jo,
                                             java.lang.String propName,
                                             java.lang.String formatType,
                                             java.lang.String dateFormat,
                                             UserInfo userInfo)
                                      throws MXException,
                                             java.rmi.RemoteException
        Apply rules to this level recursively
        Parameters:
        element - the JDOM Element
        mbo - the current mbo
        info - the MosDetailInfo for this level
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • getJSONType

        public static java.lang.String getJSONType(int maxType)
        Get Maximo type
        Parameters:
        type - Maximo type as integer
        Returns:
        Maximo type
      • getJSONType

        protected static java.lang.String getJSONType(java.lang.String propName,
                                                      java.lang.Object o)
                                               throws java.rmi.RemoteException,
                                                      MXException
        Throws:
        java.rmi.RemoteException
        MXException