com.ibm.tivoli.maximo.miniapps.scheduler

Class ILogModelToTreeGridBuilder

  • java.lang.Object
    • com.ibm.tivoli.maximo.miniapps.scheduler.ILogModelToTreeGridBuilder
  • Direct Known Subclasses:
    CrewWorkModelSerializer


    public class ILogModelToTreeGridBuilder
    extends java.lang.Object
    • Method Detail

      • setFlatRows

        public void setFlatRows(boolean flat)
        If true, then Row Hierarchy will not be created, instead, all rows, will be flattened to the same level.
        Parameters:
        flat -
      • modelToJson

        public void modelToJson(MXGanttModel model,
                                TGJsonWriter jsonWriter)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • preprocessModel

        protected void preprocessModel(MXGanttModel model)
        pre-process is called before anything in the model is actually processed. It can be used as global means to inspect and alter the model before it gets serialized. It is called as the first step in modelToJson.
        Parameters:
        model -
      • inspectActivity

        protected ILogModelToTreeGridBuilder.ActivityInpectionResult inspectActivity(MXGanttModel model,
                                                                                     MXActivity mxa)
        Is called as the first step in the writeJsonActivity process. Sub-Classes can use this to inspect and alter the actiity before it gets serialized. ie, you can add TreeGrid specific fields to the model or change the state of an activity before it gets serializes, including, hiding a row, etc.
        Parameters:
        model -
        mxa -
      • writeJsonActivity

        public void writeJsonActivity(TGJsonWriter jsonWriter,
                                      MXGanttModel model,
                                      MXActivity mxa)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • isRenderDummyWorkNodesEnabled

        protected boolean isRenderDummyWorkNodesEnabled()
        When True, then dummy assignment nodes will be rendered as well
        Returns:
      • addJsonActivityContraintsForAssignmentAsChanges

        public static void addJsonActivityContraintsForAssignmentAsChanges(MXGanttModel model,
                                                                           MXResource resource,
                                                                           MXActivity mxa,
                                                                           ReplyBuilder reply,
                                                                           TreeGridUtil.ITGSerializationHelper helper)
                                                                    throws java.io.IOException
        Will populate the Changes section of the Reply with To/From constaints for the given activity
        Parameters:
        model -
        resource -
        mxa -
        reply -
        Throws:
        java.io.IOException
      • writeResources

        public void writeResources(TGJsonWriter jsonWriter,
                                   MXGanttModel model)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • writeJsonActivityResources

        public static void writeJsonActivityResources(TGJsonWriter jsonWriter,
                                                      MXGanttModel model,
                                                      MXActivity mxa)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • 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
      • renderCalendarShifts

        public void renderCalendarShifts(TGJsonWriter jsonWriter,
                                         MXGanttModel model,
                                         MXActivity mxa)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getShiftWorkPeriodInfo

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