com.ibm.tivoli.maximo.miniapps.scheduler

Class ILogResourcesGanttModelToTreeGridSerializer

  • java.lang.Object
    • com.ibm.tivoli.maximo.miniapps.scheduler.ILogResourcesGanttModelToTreeGridSerializer
    • Field Detail

      • flatModel

        protected boolean flatModel
    • Method Detail

      • serialize

        public void serialize(java.util.concurrent.Future in,
                              javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse resp)
                       throws java.lang.Exception
        Specified by:
        serialize in interface Serializer
        Throws:
        java.lang.Exception
      • writeJsonrResource

        public void writeJsonrResource(TGJsonWriter jsonWriter,
                                       MXGanttModel model,
                                       MXResource mxr,
                                       java.util.List columns)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • inspectResource

        protected void inspectResource(MXGanttModel model,
                                       MXResource mxr)
        Called before a resource is serialized in the model. Gives the process an attempt to inspect it, and maybe provide modifications to it, before being serialized.
        Parameters:
        model -
        mxr -
      • getColorForModAvail

        protected java.lang.String getColorForModAvail(MXActivity a)
      • encodeBackgroundEntry

        public java.lang.String encodeBackgroundEntry(java.util.Date start,
                                                      java.util.Date end,
                                                      java.lang.String color)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • canEncodeActivity

        protected boolean canEncodeActivity(MXActivity activity)
      • getRunHeight

        protected int getRunHeight(MXActivity act)
      • onAfterEncodeReservation

        protected void onAfterEncodeReservation(TGJsonWriter jsonWriter,
                                                MXGanttModel model,
                                                MXResource mxr,
                                                MXActivity act,
                                                boolean isRunBar,
                                                TreeGridUtil.ITGSerializationHelper helper)
                                         throws java.io.IOException
        Called after an Reservation Activity is added to the Model. Can be used to add additional data to the model.
        Parameters:
        jsonWriter -
        model -
        act -
        b -
        helper2 -
        Throws:
        java.io.IOException
      • inspectReservation

        protected void inspectReservation(MXGanttModel model,
                                          MXResource mxr,
                                          MXActivity act)
        Gives the process an attempt to inspect the activity and potentially make changes to it, before the activity is serialized to the model.
        Parameters:
        model -
        mxr -
        act -
      • showOtherAssignements

        protected boolean showOtherAssignements()
        If TRUE then will render the outside/other assignments
        Returns:
      • isIncludedInModel

        protected boolean isIncludedInModel(MXActivity act)
      • refreshActivity

        protected void refreshActivity(MXActivity act)
      • getShiftWorkPeriodInfo

        protected java.lang.String getShiftWorkPeriodInfo(TGJsonWriter jsonWriter,
                                                          MXResource mxr,
                                                          MXGanttModel model)
                                                   throws java.io.IOException
        Add the WorkPeriod information to the TreeGrid UI
        Parameters:
        gantt -
        model -
        Throws:
        java.io.IOException
      • getShiftWorkPeriodInfoForDate

        public AbstractTreeGridMiniAppBean.ShiftInfo getShiftWorkPeriodInfoForDate(MXResource mxr,
                                                                                   MXGanttModel model,
                                                                                   java.util.Date d)
                                                                            throws java.io.IOException
        Add the WorkPeriod information to the TreeGrid UI
        Parameters:
        gantt -
        model -
        Throws:
        java.io.IOException
      • isFlatModel

        public boolean isFlatModel()
      • setFlatModel

        public void setFlatModel(boolean flatModel)
        If a FLAT model is being serialized, then Array Items are not added as children Items, but rather as single rows. ie, the resulting model has no visual hierarchy.
        Parameters:
        flatModel -
      • encondeResource

        public void encondeResource(TGJsonWriter jsonWriter,
                                    MXGanttModel model,
                                    MXResource mxr,
                                    java.util.List columns)
                             throws java.io.IOException
        Encodes the information related specifically to a Resource object, without iterating through it's children activities.
        Parameters:
        jsonWriter -
        model -
        mxr -
        columns -
        Throws:
        java.io.IOException