com.ibm.tivoli.maximo.miniapps.scheduler.dispatch

Class DispatchViewBean

    • Constructor Detail

      • DispatchViewBean

        public DispatchViewBean()
    • Method Detail

      • getRouteDetailsForResources

        public com.ibm.json.java.JSONObject getRouteDetailsForResources(com.ibm.json.java.JSONArray resources,
                                                                        long startTime,
                                                                        long endTime,
                                                                        com.ibm.json.java.JSONObject refreshOptions)
      • addRUNEMRGAction

        protected void addRUNEMRGAction(UIOptions opts)
      • loadData

        public void loadData(WebClientSession sess,
                             java.lang.String projectId,
                             boolean addShiftInfo,
                             java.lang.String resObj1,
                             java.lang.String resKey1)
                      throws java.lang.Exception
        Load the compare project data
        Parameters:
        sess -
        Throws:
        java.lang.Exception
      • loadUI

        public com.ibm.json.java.JSONObject loadUI(WebClientSession sess,
                                                   java.lang.String projectId,
                                                   boolean addShiftInfo,
                                                   java.lang.String resObj1,
                                                   java.lang.String resKey1)
                                            throws java.lang.Exception
        Load the compare project data
        Parameters:
        sess -
        Returns:
        Throws:
        java.lang.Exception
      • getProjectModel

        public java.util.concurrent.Future getProjectModel(UserInfo userInfo,
                                                           java.lang.String id,
                                                           boolean addShiftInfo,
                                                           java.lang.String resObj1,
                                                           java.lang.String resKey1)
                                                    throws java.rmi.RemoteException,
                                                           MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • loadProject

        public java.util.concurrent.Future loadProject(com.ibm.json.java.JSONObject options)
                                                throws java.rmi.RemoteException,
                                                       MXException
        Description copied from class: BaseTreeGridMiniAppBean
        Returns a Future for the given Gantt Model. The model will be loading, and a call to .get() will block until the model is fully loaded. Multiple threads can call .get() and each will block until the model is loaded. Using a future enables us to not have to worry about the order of Model requests from the Browser, since they all block, until the Model is fully loaded.
        Overrides:
        loadProject in class BaseTreeGridMiniAppBean
        Parameters:
        options - JSONObject of parameters to pass the model. Can be null.
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • getProjectModelForResource

        public java.util.concurrent.Future getProjectModelForResource(MXResource res)
                                                               throws java.rmi.RemoteException,
                                                                      MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getProjectModel

        public java.util.concurrent.Future getProjectModel(com.ibm.json.java.JSONObject options,
                                                           boolean cache)
                                                    throws java.rmi.RemoteException,
                                                           MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • getTooltipForDate

        public DynamicTooltip getTooltipForDate(WebClientSession sess,
                                                java.lang.String projectid,
                                                java.lang.String col,
                                                java.lang.String id,
                                                long date)
                                         throws MXException,
                                                java.rmi.RemoteException,
                                                java.lang.InterruptedException,
                                                java.util.concurrent.ExecutionException
        Overrides:
        getTooltipForDate in class BaseTreeGridMiniAppBean
        Throws:
        MXException
        java.rmi.RemoteException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getTooltipForPoint

        public DynamicTooltip getTooltipForPoint(java.lang.String id,
                                                 int pointIndex)
                                          throws MXException,
                                                 java.rmi.RemoteException,
                                                 java.lang.InterruptedException,
                                                 java.util.concurrent.ExecutionException
        Overrides:
        getTooltipForPoint in class BaseTreeGridMiniAppBean
        pointIndex - Point Index in the GanttPoints for row id. Points start at index 0.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • updateDuration

        public void updateDuration(MXGanttModel model,
                                   java.util.Date oldStartTime,
                                   java.util.Date oldEndTime,
                                   java.util.Date newStartTime,
                                   java.util.Date newEndTime,
                                   MXActivity mxa)
                            throws java.lang.Exception
        Description copied from class: BaseTreeGridMiniAppBean
        Start and End times need to be updated at the same time, or else ILOG will grow or shrink the activity bar when setting the start/end times separately.
        Overrides:
        updateDuration in class BaseTreeGridMiniAppBean
        Throws:
        java.lang.Exception
      • onReset

        public void onReset()
        Description copied from class: BaseTreeGridMiniAppBean
        OnReset is called whenever we need to clear the state of our beean. And reinitialize it for a new state. ie, when Maximo changes a record, etc, we need to clear the bean data, the load the state for that record
        Specified by:
        onReset in interface ResetListener
        Overrides:
        onReset in class BaseTreeGridMiniAppBean
      • clearCachedModel

        protected void clearCachedModel()
      • async_get_table_context_menu

        public TMenu async_get_table_context_menu(WebClientSession sess,
                                                  java.lang.String projectId,
                                                  com.ibm.json.java.JSONObject selection)
                                           throws java.lang.Exception
        Called for an ITEM to fetch the Menu for a given item. The menu items should contain a Menu Name (display) and an action value. The Action Value will later be passed to the on_handle_conent_menu_item callback.
        Parameters:
        id - Activity ID
        col - Table Column
        Returns:
        Throws:
        java.lang.Exception
      • getContextMenuFor

        protected TMenu getContextMenuFor(TMenu menu,
                                          UserInfo userInfo,
                                          java.lang.String projectId,
                                          Selection selection)
                                   throws java.lang.Exception
        Given the paramters, return a TMenu (TreeGrid Menu) context menu.
        Parameters:
        menu -
        userInfo -
        projectId -
        propName -
        propValue -
        ids -
        Returns:
        Throws:
        java.lang.Exception
      • addActionMenuItems

        protected void addActionMenuItems(TMenu popupmenu,
                                          java.util.concurrent.Future modelFuture,
                                          java.lang.String projectId,
                                          Selection selection,
                                          java.lang.String frame)
                                   throws java.lang.Exception
        Adds SKDAction items to the TMenu.
        Throws:
        java.lang.Exception
        java.lang.InterruptedException
      • refreshResource

        public com.ibm.json.java.JSONObject refreshResource(WebClientSession sess,
                                                            java.lang.String actionid,
                                                            java.lang.String params)
                                                     throws java.lang.Exception
        handler for the right-click Refresh Resource action on the table. It simple returns the refresh information for a single row.
        Returns:
        Throws:
        java.lang.Exception
      • createAssignment

        public com.ibm.json.java.JSONObject createAssignment(WebClientSession sess,
                                                             java.lang.String actionid,
                                                             java.lang.String params)
                                                      throws java.lang.Exception
        handler for the right-click createAssignment action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • deleteAssignment

        public com.ibm.json.java.JSONObject deleteAssignment(WebClientSession sess,
                                                             java.lang.String actionid,
                                                             java.lang.String params)
                                                      throws java.lang.Exception
        handler for the right-click deleteAssignment action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • splitAssignment

        public com.ibm.json.java.JSONObject splitAssignment(WebClientSession sess,
                                                            java.lang.String actionid,
                                                            java.lang.String params)
                                                     throws java.lang.Exception
        handler for the right-click splitAssignment actionon the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • splitAssignment3

        public com.ibm.json.java.JSONObject splitAssignment3(WebClientSession sess,
                                                             java.lang.String actionid,
                                                             java.lang.String params)
                                                      throws java.lang.Exception
        handler for the right-click splitAssignment3 action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • splitAssignment

        public com.ibm.json.java.JSONObject splitAssignment(WebClientSession sess,
                                                            java.lang.String actionid,
                                                            java.lang.String params,
                                                            int numberOfSplits)
                                                     throws java.lang.Exception
        handler for the right-click deleteAssignment action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • splitAssignmentToShift

        public com.ibm.json.java.JSONObject splitAssignmentToShift(WebClientSession sess,
                                                                   java.lang.String actionid,
                                                                   java.lang.String params)
                                                            throws java.lang.Exception
        handler for the right-click splitAssignmentToShift action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • lock

        public com.ibm.json.java.JSONObject lock(WebClientSession sess,
                                                 java.lang.String actionid,
                                                 java.lang.String params)
                                          throws java.lang.Exception
        handler for the right-click lock/unlock action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • unlock

        public com.ibm.json.java.JSONObject unlock(WebClientSession sess,
                                                   java.lang.String actionid,
                                                   java.lang.String params)
                                            throws java.lang.Exception
        handler for the right-click lock/unlock action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • reslock

        public com.ibm.json.java.JSONObject reslock(WebClientSession sess,
                                                    java.lang.String actionid,
                                                    java.lang.String params)
                                             throws java.lang.Exception
        handler for the right-click reslock/resunlock action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • resunlock

        public com.ibm.json.java.JSONObject resunlock(WebClientSession sess,
                                                      java.lang.String actionid,
                                                      java.lang.String params)
                                               throws java.lang.Exception
        handler for the right-click reslock/resunlock action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • toggleLock

        public com.ibm.json.java.JSONObject toggleLock(WebClientSession sess,
                                                       java.lang.String actionid,
                                                       java.lang.String params,
                                                       boolean lock)
                                                throws java.lang.Exception
        handler for the right-click lock/unlock action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • toggleResLock

        public com.ibm.json.java.JSONObject toggleResLock(WebClientSession sess,
                                                          java.lang.String actionid,
                                                          java.lang.String params,
                                                          boolean lock)
                                                   throws java.lang.Exception
        handler for the right-click lock/unlock action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • resourceLock

        public com.ibm.json.java.JSONObject resourceLock(WebClientSession sess,
                                                         java.lang.String actionid,
                                                         java.lang.String params)
                                                  throws java.lang.Exception
        handler for the right-click resource lock/unlock action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • resourceUnlock

        public com.ibm.json.java.JSONObject resourceUnlock(WebClientSession sess,
                                                           java.lang.String actionid,
                                                           java.lang.String params)
                                                    throws java.lang.Exception
        handler for the right-click resource lock/unlock action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • toggleResourceLock

        public com.ibm.json.java.JSONObject toggleResourceLock(WebClientSession sess,
                                                               java.lang.String actionid,
                                                               java.lang.String params,
                                                               boolean lock)
                                                        throws java.lang.Exception
        handler for the right-click lock/unlock action on the assignment bar.
        Returns:
        Throws:
        java.lang.Exception
      • getExtraResources

        public java.util.List getExtraResources(java.lang.String servletBaseUrl,
                                                java.lang.String miniappBaseUrl)
        Description copied from interface: HasExtraResources
        Gets a list of WebResource objects to load for this miniapp
        Specified by:
        getExtraResources in interface HasExtraResources
        Parameters:
        servletBaseUrl - full base servlet URL path
        miniappBaseUrl - full base miniapp URL path to THIS miniapp instance
        Returns:
      • SAVEBULKTRAVELTIME

        public com.ibm.json.java.JSONObject SAVEBULKTRAVELTIME(com.ibm.json.java.JSONArray params)
                                                        throws MXException,
                                                               java.rmi.RemoteException,
                                                               java.lang.InterruptedException,
                                                               java.util.concurrent.ExecutionException
        Save several assignments travel times at once;
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • SHOWMULTIPLEROUTEERRORS

        public com.google.gson.JsonObject SHOWMULTIPLEROUTEERRORS(com.ibm.json.java.JSONArray param)
                                                           throws MXException,
                                                                  java.io.IOException
        Throws:
        MXException
        java.io.IOException
      • secondsToDuration

        public static java.lang.Double secondsToDuration(long seconds)
      • on_reload_model_for_traveltime

        public void on_reload_model_for_traveltime()
      • autoRefreshModel

        public ReplyBuilder autoRefreshModel(java.lang.String projectId)
                                      throws java.rmi.RemoteException,
                                             MXException
        Throws:
        java.rmi.RemoteException
        MXException