com.ibm.tivoli.maximo.map

Class MapControl

    • Constructor Detail

      • MapControl

        public MapControl()
    • Method Detail

      • getWidth

        public java.lang.String getWidth()
      • isContextPersistent

        public java.lang.Boolean isContextPersistent()
      • isZoomToDataInput

        public java.lang.Boolean isZoomToDataInput()
      • isDataSourceDynamic

        public java.lang.Boolean isDataSourceDynamic()
      • getZoomLevel

        public java.lang.String getZoomLevel()
      • getFullExtZoomLevel

        public java.lang.String getFullExtZoomLevel()
      • isMapViewOnly

        public java.lang.Boolean isMapViewOnly()
      • getInitialX

        public java.lang.Double getInitialX()
      • getInitialY

        public java.lang.Double getInitialY()
      • getFullX

        public java.lang.Double getFullX()
      • getFullY

        public java.lang.Double getFullY()
      • isMobile

        public boolean isMobile()
      • getHeight

        public java.lang.String getHeight()
      • getRefreshMapInterval

        public java.lang.String getRefreshMapInterval()
      • getRouteConfiguration

        public com.ibm.json.java.JSONObject getRouteConfiguration()
                                                           throws MXException,
                                                                  java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getMapConfiguration

        public com.ibm.json.java.JSONObject getMapConfiguration()
                                                         throws MXException,
                                                                java.rmi.RemoteException
        Creates the JSON object configuration based on data from FSM Map Manager app
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getPrintTimeout

        public int getPrintTimeout()
                            throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • loadToolsConfiguration

        public com.ibm.json.java.JSONObject loadToolsConfiguration()
                                                            throws MXException,
                                                                   java.lang.NullPointerException,
                                                                   java.io.IOException
        Throws:
        MXException
        java.lang.NullPointerException
        java.io.IOException
      • getMobileOfflineArea

        protected MboRemote getMobileOfflineArea(MboRemote mapSite)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Function to return the current Mobile Offline Area selected.
        Parameters:
        mapSite -
        Returns:
        MboRemote OSLCOFFLINEAREA
        Throws:
        MXException
        java.rmi.RemoteException
      • isInMapManager

        protected boolean isInMapManager()
                                  throws java.rmi.RemoteException,
                                         MXException
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • loadGISMapConfiguration

        public void loadGISMapConfiguration()
                                     throws MXException,
                                            java.rmi.RemoteException
        Sets the GIS configuration Note: The method has some side effects such as call reset on the mboset before iterate on it. If there is a current record set, it MUST be restored by the application.
        Throws:
        MXException
        java.rmi.RemoteException
      • getCustomMapConfiguration

        protected com.ibm.json.java.JSONObject getCustomMapConfiguration(MboRemote mapManager)
                                                                  throws MXException,
                                                                         java.rmi.RemoteException
        Used to allow customizations
        Parameters:
        mapManager -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getGoogleMapConfiguration

        public com.ibm.json.java.JSONObject getGoogleMapConfiguration(MboRemote mbo)
                                                               throws MXException,
                                                                      java.rmi.RemoteException
        Creates a specific configuration object for Google Maps
        Parameters:
        mbo - - Map Manager Mbo
        Returns:
        Configured JSONObject
        Throws:
        MXException
        java.rmi.RemoteException
      • getBingMapConfiguration

        public com.ibm.json.java.JSONObject getBingMapConfiguration(MboRemote mbo)
                                                             throws MXException,
                                                                    java.rmi.RemoteException
        Creates a specific configuration object for Bing Maps
        Parameters:
        mbo - - Map Manager Mbo
        Returns:
        Configured JSONObject
        Throws:
        MXException
        java.rmi.RemoteException
      • getSpatialMapConfiguration

        public com.ibm.json.java.JSONObject getSpatialMapConfiguration(MboRemote mbo)
                                                                throws MXException,
                                                                       java.rmi.RemoteException
        Creates a specific configuration object for Spatial Maps
        Parameters:
        mbo - - Map Manager Mbo
        Returns:
        Configured JSONObject
        Throws:
        MXException
        java.rmi.RemoteException
      • loadSpatialMapDefinitions

        public com.ibm.json.java.JSONObject loadSpatialMapDefinitions()
                                                               throws MXException,
                                                                      java.rmi.RemoteException
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • addSpatialSecureTokenInfo

        public void addSpatialSecureTokenInfo(com.ibm.json.java.JSONObject mapConf)
                                       throws MXException,
                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • storeUserLocation

        public int storeUserLocation()
                              throws java.rmi.RemoteException,
                                     MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • loadMenuItems

        public int loadMenuItems()
                          throws java.rmi.RemoteException,
                                 MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • setCurrentSALocation

        public int setCurrentSALocation()
                                 throws java.rmi.RemoteException,
                                        MXException
        Sets the current record location. If a new SA is created it will save the current record.
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • render

        public int render()
                   throws java.lang.NoSuchMethodException,
                          java.lang.IllegalAccessException,
                          java.lang.reflect.InvocationTargetException
        Note: The method has some side effects such as call reset on the mboset before iterate on it. If there is a current record set, it MUST be restored by the application.
        Overrides:
        render in class DatasrcInstance
        Throws:
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • getCurrentState

        public com.ibm.json.java.JSONArray getCurrentState()
                                                    throws java.rmi.RemoteException,
                                                           MXException
        Return the next current state with all JSON data that must be handle by the map component.
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • getCurrentRecordData

        public com.ibm.json.java.JSONObject getCurrentRecordData()
                                                          throws java.rmi.RemoteException,
                                                                 MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • showMaxMessage

        public int showMaxMessage()
                           throws java.rmi.RemoteException,
                                  MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • showErrorsParamObject

        public int showErrorsParamObject()
                                  throws MXException,
                                         java.lang.NullPointerException,
                                         java.io.IOException
        Throws:
        MXException
        java.lang.NullPointerException
        java.io.IOException
      • showErrors

        public int showErrors()
                       throws java.rmi.RemoteException,
                              MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • showDialog

        public int showDialog()
                       throws MXException,
                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • showSelectDialog

        public int showSelectDialog(WebClientSession webClientSession,
                                    com.ibm.json.java.JSONObject jsonObject)
                             throws MXException,
                                    java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • showSelectDialog

        public int showSelectDialog(com.ibm.json.java.JSONObject jsonObject)
                             throws MXException,
                                    java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • refreshQueryUnassignedWork

        public int refreshQueryUnassignedWork()
                                       throws java.rmi.RemoteException,
                                              MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • queryUnassignedWorkDispatcher

        public int queryUnassignedWorkDispatcher()
                                          throws java.rmi.RemoteException,
                                                 MXException
        Queries unassigned work using the Graphical Assignment query. This is supposed to be called only from the Graphical Assignment application.
        Throws:
        java.rmi.RemoteException
        MXException
      • loadMapTipTemplate

        public int loadMapTipTemplate()
                               throws java.rmi.RemoteException,
                                      MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • loadAttributesFromLinearAttributeTemplate

        public int loadAttributesFromLinearAttributeTemplate()
        method to load the Linear Graphic attributes (used in Identify Tool)
        Returns:
      • getLinearGraphicsbyWhereClause

        public int getLinearGraphicsbyWhereClause()
        Method to return a list of Graphics IDs for a particular object that matches the where clause
        Returns:
      • loadLinearLayerObjectAttributes

        public int loadLinearLayerObjectAttributes()
        method to load the Linear Graphic attributes (used in Identify Tool)
        Returns:
      • deleteLinearLayerSegmentObjects

        public int deleteLinearLayerSegmentObjects()
      • tokenizerAttributes

        public static java.util.Map tokenizerAttributes(java.lang.String attributes)
        Method to transform the JSON attributes into a Map.
        Parameters:
        attributes -
        Returns:
        Map
      • loadMapTipSummaryTemplate

        public int loadMapTipSummaryTemplate()
                                      throws java.rmi.RemoteException,
                                             MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • refreshMarkersPositions

        public int refreshMarkersPositions()
                                    throws java.rmi.RemoteException,
                                           MXException
        Refreshes the position of markers in the current map. If the current mbo is not to be saved, loads the information from the database. Note: The method has some side effects such as call reset on the mboset before iterate on it. If there is a current record set, it MUST be restored by the application.
        Throws:
        java.rmi.RemoteException
        MXException
      • getFreshCurrentRecordData

        protected com.ibm.json.java.JSONObject getFreshCurrentRecordData()
                                                                  throws java.rmi.RemoteException,
                                                                         MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getFreshMbo

        protected MboRemote getFreshMbo(MboRemote mbo)
                                 throws java.rmi.RemoteException,
                                        MXException
        Get's current datasource mbo directly from database (ignores session values)
        Parameters:
        mbo -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • isNestedInListTab

        protected boolean isNestedInListTab()
      • isDialogOpened

        protected boolean isDialogOpened()
      • setDialogOpened

        protected void setDialogOpened(boolean openedDialog)
      • resetDialogOpenState

        protected void resetDialogOpenState()
      • isMainRecordChanged

        protected boolean isMainRecordChanged()
                                       throws java.rmi.RemoteException,
                                              MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • addRecordsToLayer

        public void addRecordsToLayer(java.lang.String layerName,
                                      MboSetRemote mboSet,
                                      boolean cleanOld)
                               throws java.rmi.RemoteException,
                                      MXException
        Description copied from interface: MapControlCallbacks
        For the sake of flexibility, the interface receives a mboset, but the elements of the mboset will only be shown on the map if the mbos of the mboset implements the interface Gisable
        Specified by:
        addRecordsToLayer in interface MapControlCallbacks
        cleanOld - data before add new data?
        Throws:
        java.rmi.RemoteException
        MXException
      • addEventToMap

        public void addEventToMap(java.lang.String eventName,
                                  com.ibm.json.java.JSONObject action)
      • updateMapControlAccessorBounds

        protected void updateMapControlAccessorBounds(LatLngBounds mapBounds)
      • removeRecordsFromLayer

        public void removeRecordsFromLayer(java.lang.String layerName,
                                           MboSetRemote mboSet)
                                    throws java.rmi.RemoteException,
                                           MXException
        Description copied from interface: MapControlCallbacks
        For the sake of flexibility, the interface receives a mboset, but the elements of the mboset will only be removed from the map if the mbos of the mboset implements the interface Gisable
        Specified by:
        removeRecordsFromLayer in interface MapControlCallbacks
        Throws:
        java.rmi.RemoteException
        MXException
      • getWeatherAlertsByQueryParams

        public int getWeatherAlertsByQueryParams()
                                          throws java.rmi.RemoteException,
                                                 MXException
        Gets the crew labor by coords.
        Returns:
        the crews and labors by coords
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getCrewLaborByQueryParams

        public int getCrewLaborByQueryParams()
                                      throws java.rmi.RemoteException,
                                             MXException
        Gets the crew labor by coords.
        Returns:
        the crews and labors by coords
        Throws:
        java.rmi.RemoteException - the remote exception
        MXException - the mX exception
      • getShowMarkersOnRouteError

        public int getShowMarkersOnRouteError()
                                       throws java.rmi.RemoteException
        Gets the action to be executed when the map provider fails to return a valid route: 0 -> show provider error and don't try to draw anything (default) 1 -> try to at least draw the markers
        Returns:
        int
        Throws:
        java.rmi.RemoteException - the remote exception
      • removeCommentsFromJson

        public static java.lang.String removeCommentsFromJson(java.lang.String isStr)
      • NOOP

        public int NOOP()
                 throws MXException,
                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • clearNextEventData

        public void clearNextEventData()
        Clear the event buffer
      • refreshLinearLayers

        public int refreshLinearLayers()
      • getRelationshipLinearObject

        public MboRemote getRelationshipLinearObject(MboRemote appMbo,
                                                     java.lang.String objectName,
                                                     java.lang.String relationshipName)
                                              throws java.rmi.RemoteException,
                                                     MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • loadLinearSegments

        public com.ibm.json.java.JSONArray loadLinearSegments(MboRemote linearLayerMbo,
                                                              MboRemote appMbo,
                                                              MboRemote relatedAsset,
                                                              java.lang.String mapMeasureUnit)
                                                       throws java.rmi.RemoteException,
                                                              MXException
        Method to load the linear segments based on the app and the linear layers.
        Parameters:
        linearLayerMbo -
        appMbo -
        Returns:
        JSONArray to JS side.
        Throws:
        java.rmi.RemoteException
        MXException
      • userHasMapServiceLayerPermission

        public boolean userHasMapServiceLayerPermission(MboRemote mapServiceLayerMbo,
                                                        java.lang.String parent)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getOpenMapReturnAttribute

        public java.lang.String getOpenMapReturnAttribute()
        Returns the attribute which called the Open Map component.
        Returns:
        String containing the attribute name.
      • getOriginalApp

        public java.lang.String getOriginalApp(java.lang.String app)
                                        throws java.rmi.RemoteException,
                                               MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getPropagateCloneStatus

        public boolean getPropagateCloneStatus(java.lang.String mapName,
                                               java.lang.String app)
                                        throws java.rmi.RemoteException,
                                               MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • isCurrentMboAddressable

        public int isCurrentMboAddressable()
                                    throws java.rmi.RemoteException
        Check if the current Mbo has a Service Address relationship, and if the Formatted Address Field is editable
        Returns:
        Throws:
        java.rmi.RemoteException
      • isMboFormattedAddressEditable

        public boolean isMboFormattedAddressEditable()
                                              throws java.rmi.RemoteException,
                                                     MXException
        Check if the Mbo has Formatted Address Editable. The WO, SR and Service Address mbos have Formatted Address field editable
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • getPrintServiceTaskNameUrl

        public java.lang.String getPrintServiceTaskNameUrl(MboRemote mapManager)
                                                    throws java.rmi.RemoteException,
                                                           MXException
        Get value of Print Service Task Name. If doesn't exists, return the default value;
        Parameters:
        mapManager -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException