com.ibm.tivoli.maximo.skd.util

Class SKDActivityAdjust

  • java.lang.Object
    • com.ibm.tivoli.maximo.skd.util.SKDActivityAdjust


  • public class SKDActivityAdjust
    extends java.lang.Object
    Class to calculate start date, end date and duration for an activity
    • Constructor Detail

      • SKDActivityAdjust

        public SKDActivityAdjust(java.util.Locale l,
                                 java.util.TimeZone tz)
    • Method Detail

      • adjustActivityForMergedShiftList

        public void adjustActivityForMergedShiftList(MXActivity activity,
                                                     MXGanttModel model)
                                              throws java.lang.Exception
        Adjust activity to merged shift lists
        Parameters:
        activity -
        mergedlist -
        Throws:
        MXException
        java.lang.Exception
      • adjustActivityForMergedShiftList

        public void adjustActivityForMergedShiftList(Activity activity,
                                                     Schedule schedule)
                                              throws java.lang.Exception
        Adjust activity to merged shift lists
        Parameters:
        activity -
        mergedlist -
        Throws:
        MXException
        java.lang.Exception
      • getActivityStartAndEndDates

        public ilog.views.gantt.IlvTimeInterval getActivityStartAndEndDates(java.util.Date startDate,
                                                                            java.util.Date endDate,
                                                                            double duration,
                                                                            java.util.ArrayList mergedNonWorkPeriods)
                                                                     throws java.lang.Exception
        Get the start and end dates for an activity given a duration.This is used when duration is constant like move activity.
        Parameters:
        startDate -
        endDate -
        duration -
        isInterruptable -
        Returns:
        IlvTimeInterval
        Throws:
        java.lang.Exception
      • getShiftWorkPeriod

        public java.util.ArrayList getShiftWorkPeriod(java.lang.String shift,
                                                      MXGanttModel model,
                                                      boolean shiftDate)
                                               throws java.io.IOException
        Add the WorkPeriod information to the TreeGrid UI
        Parameters:
        gantt -
        model -
        shiftDate - if true, the first date is skipped to create an offset pattern
        Throws:
        java.io.IOException
      • getShiftWorkPeriod

        public java.util.ArrayList getShiftWorkPeriod(java.lang.String shift,
                                                      Schedule schedule,
                                                      boolean shiftDate)
                                               throws java.io.IOException
        Add the WorkPeriod information to the TreeGrid UI
        Parameters:
        gantt -
        model -
        shiftDate - if true, the first date is skipped to create an offset pattern
        Throws:
        java.io.IOException
      • getNonWorkingHours

        public double getNonWorkingHours(java.util.ArrayList mergedNonWorkPeriods,
                                         java.util.Date startDate,
                                         java.util.Date endDate)
                                  throws java.lang.Exception
        Get the total non working time between two dates.
        Parameters:
        startDate -
        endDate -
        Returns:
        non work hours
        Throws:
        java.lang.Exception
      • getShiftEnd

        public java.util.Date getShiftEnd(java.util.Date scheduleDate,
                                          Schedule schedule)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addWorkingHours

        public java.util.Date addWorkingHours(Schedule schedule,
                                              java.util.Date date,
                                              double workingHours,
                                              boolean isInterruptible)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • subtractWorkingHours

        public java.util.Date subtractWorkingHours(Schedule schedule,
                                                   java.util.Date date,
                                                   double workingHours,
                                                   boolean isInterruptible)
                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFirstAvailableWorkingDate

        public java.util.Date getFirstAvailableWorkingDate(java.util.Date scheduleDate,
                                                           Schedule schedule)
                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getPreviousAvailableWorkingDate

        public java.util.Date getPreviousAvailableWorkingDate(java.util.Date scheduleDate,
                                                              Schedule schedule)
                                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isWorkingDate

        public boolean isWorkingDate(java.util.Date scheduleDate,
                                     Schedule schedule)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getWorkingHoursBetweenStartAndEndDates

        public double getWorkingHoursBetweenStartAndEndDates(Schedule schedule,
                                                             java.util.Date startDate,
                                                             java.util.Date endDate)
                                                      throws java.lang.Exception
        Find the working hours between two dates
        Parameters:
        startDate -
        endDate -
        Returns:
        working hours
        Throws:
        java.lang.Exception
      • getNonWorkingHoursBetweenStartAndEndDates

        public double getNonWorkingHoursBetweenStartAndEndDates(Schedule schedule,
                                                                java.util.Date startDate,
                                                                java.util.Date endDate)
                                                         throws java.lang.Exception
        Get the total non working time between two dates.
        Parameters:
        startDate -
        endDate -
        Returns:
        non work hours
        Throws:
        java.lang.Exception