com.ibm.tivoli.maximo.map

Class MapDataUtils

  • java.lang.Object
    • com.ibm.tivoli.maximo.map.MapDataUtils


  • public class MapDataUtils
    extends java.lang.Object
    Common methods for map control (and other classes that access map related features).
    • Constructor Detail

      • MapDataUtils

        public MapDataUtils()
    • Method Detail

      • loadAttributesFromTemplate

        public java.util.Map loadAttributesFromTemplate(java.lang.String template,
                                                        java.lang.String objectName,
                                                        MboRemote appMbo,
                                                        UserInfo userInfo)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getLinearGraphicsbyWhereClause

        public java.util.List getLinearGraphicsbyWhereClause(java.lang.String whereClause,
                                                             java.lang.String objectName,
                                                             MboRemote appMbo,
                                                             UserInfo userInfo)
                                                      throws java.rmi.RemoteException,
                                                             MXException,
                                                             javax.script.ScriptException
        Method to return a list of Graphics IDs for a particular object that matches the where clause
        Parameters:
        whereClause -
        objectName -
        appMbo -
        userInfo -
        Returns:
        List of graphics ids
        Throws:
        java.rmi.RemoteException
        MXException
        javax.script.ScriptException
      • getLinearLayerGraphicInfo

        public java.lang.String getLinearLayerGraphicInfo(MboRemote mbo,
                                                          java.lang.String objectname,
                                                          java.lang.String relationship,
                                                          java.lang.String msgTemplate,
                                                          java.lang.String mapName,
                                                          UserInfo userinfo,
                                                          java.util.Map attributes)
                                                   throws java.rmi.RemoteException,
                                                          MXException
        Method to create the HTML code for the Linear Graphic attribute.
        Parameters:
        objectname -
        mapName -
        userinfo -
        attributes -
        Returns:
        String with the HTML
        Throws:
        java.rmi.RemoteException
        MXException
      • deleteLinearSegment

        public java.lang.String deleteLinearSegment(MboRemote appMbo,
                                                    java.lang.String objectName,
                                                    java.lang.String relationship,
                                                    java.util.Map attributes,
                                                    UserInfo userinfo)
                                             throws java.rmi.RemoteException,
                                                    MXException
        Method to delete Linear Graphic Segments.
        Parameters:
        objectname -
        userinfo -
        attributes -
        Returns:
        String
        Throws:
        java.rmi.RemoteException
        MXException
      • getGISData

        public com.ibm.json.java.JSONObject getGISData(MboRemote currentMbo)
                                                throws java.rmi.RemoteException,
                                                       MXException
        Return GIS data for the current MBO.
        Parameters:
        currentMbo - the current mbo
        Returns:
        the gIS data
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getGISDataFromGisable

        public com.ibm.json.java.JSONObject getGISDataFromGisable(GISable gisMbo)
                                                           throws java.rmi.RemoteException,
                                                                  MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getLBSData

        public com.ibm.json.java.JSONObject getLBSData(MboRemote currentMbo)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Return the current LBS data.
        Parameters:
        currentMbo - the current mbo
        Returns:
        currentLBS data or null if currentMbo is not LBS
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • getMXData

        public com.ibm.json.java.JSONObject getMXData(MboRemote currentMbo)
                                               throws java.rmi.RemoteException,
                                                      MXException
        Return the current Mbo Maximo data.
        Parameters:
        currentMbo - the current mbo
        Returns:
        the mX data
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getInternalValue

        protected java.lang.Object getInternalValue(MboRemote mbo,
                                                    java.lang.String attrName)
                                             throws java.rmi.RemoteException,
                                                    MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getParamsAsJsonObject

        public com.ibm.json.java.JSONObject getParamsAsJsonObject(java.lang.String jsonAsString)
        Gets the params as json object.
        Parameters:
        jsonAsString - the json as string
        Returns:
        the params as json object
      • getParamsAsJsonArray

        public com.ibm.json.java.JSONArray getParamsAsJsonArray(java.lang.String jsonAsString)
        Gets the params as json array.
        Parameters:
        jsonAsString - the json as string
        Returns:
        the params as json array
      • getMboSetAsJSONArray

        public com.ibm.json.java.JSONArray getMboSetAsJSONArray(MboSetRemote mboSet)
                                                         throws java.rmi.RemoteException,
                                                                MXException
        Transform a mboSet into a JSONArray with gis,mx and lbs data, and eventually Autolocate data
        Parameters:
        mboSet - the Gisable mboset
        Returns:
        the mboset as json array
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getMboAsJSONObject

        public com.ibm.json.java.JSONObject getMboAsJSONObject(MboRemote mbo)
                                                        throws java.rmi.RemoteException,
                                                               MXException
        Transform an mbo into a JSONobject with gis,mx and lbs data, and eventually Autolocate data
        Parameters:
        mbo - the Gisable mbo
        Returns:
        the mbo as json object
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • setGisableAttributes

        public void setGisableAttributes(MboRemote mbo,
                                         com.ibm.json.java.JSONObject recordData,
                                         com.ibm.json.java.JSONObject gisData)
                                  throws java.rmi.RemoteException,
                                         MXException
        Parameters:
        the - Gisable mbo
        Json - object recordData
        gisData -
        Throws:
        java.rmi.RemoteException
        MXException
      • setJSONAutoLocateAttributes

        public java.lang.Boolean setJSONAutoLocateAttributes(MboRemote mbo,
                                                             com.ibm.json.java.JSONObject recordData)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        Sets the auto locate attributes into the Json Object passed as a parameter.
        Parameters:
        mbo - the Gisable mbo
        recordData - th Json object
        Returns:
        true if exists an autolocation for the mbo passed as parameter.
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • hasIfAnyGISInfo

        public boolean hasIfAnyGISInfo(com.ibm.json.java.JSONObject recordData)
      • getAllSymbologyAttributes

        public static java.util.Map getAllSymbologyAttributes(UserInfo userInfo,
                                                              MboRemote mapManager)
                                                       throws MXException,
                                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getSymbologyConfigObject

        public static com.ibm.json.java.JSONObject getSymbologyConfigObject(UserInfo userInfo,
                                                                            MboRemote mapManager)
      • getObjectNameFromRecordData

        public java.lang.String getObjectNameFromRecordData(com.ibm.json.java.JSONObject recordData)
      • getObjectIdFromRecordData

        public java.lang.Long getObjectIdFromRecordData(com.ibm.json.java.JSONObject recordData)
      • getMapTipData

        public java.lang.String getMapTipData(MboRemote mbo,
                                              java.lang.String mboName,
                                              java.lang.String templateField,
                                              UserInfo userInfo,
                                              com.ibm.json.java.JSONArray mapTipOverrides)
                                       throws java.rmi.RemoteException,
                                              MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getMinimumLastUpdateTimestamp

        public java.util.Date getMinimumLastUpdateTimestamp()
                                                     throws java.rmi.RemoteException
        Get the current date minus the mxe.lbs.lastupdate.maxTime
        Returns:
        the minimum "last update" date
        Throws:
        java.rmi.RemoteException - the remote exception
      • clearMapTipTemplateCache

        public void clearMapTipTemplateCache()
        Clears the maptip template cache
      • getLBSAuditData

        public com.ibm.json.java.JSONArray getLBSAuditData(MboRemote currentMbo,
                                                           java.util.Date startDate,
                                                           java.util.Date endDate)
                                                    throws MXException,
                                                           java.rmi.RemoteException
        Return the current LBS audit data (if any).
        Parameters:
        currentMbo - the current mbo
        Returns:
        currentLBS data or null if currentMbo is not LBS or if currentMbo does not have any LBSLOCATION attribute enabled for auditing
        Throws:
        MXException - the mX exception
        java.rmi.RemoteException - the remote exception
      • convertMeasure

        public double convertMeasure(double measure,
                                     java.lang.String unitSource,
                                     java.lang.String unitDestiny)
      • setPopulateRelatedAttributes

        public void setPopulateRelatedAttributes(boolean isPopulateRelatedAttributes)
      • isLinearInstalled

        public static boolean isLinearInstalled()
                                         throws MXException,
                                                java.rmi.RemoteException
        Method to verify if Linear is installed
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateLinearTargetSegment

        public com.ibm.json.java.JSONObject calculateLinearTargetSegment(MboRemote appMbo,
                                                                         java.lang.String mapMeasureUnit,
                                                                         com.ibm.json.java.JSONObject linearObjTarget)
                                                                  throws java.rmi.RemoteException,
                                                                         MXException
        Throws:
        java.rmi.RemoteException
        MXException