psdi.app.workorder

Class FldAssignScheduleDate

    • Constructor Detail

      • FldAssignScheduleDate

        public FldAssignScheduleDate(MboValue mbv)
        Construct and attach to the specified mbovalue.
        Parameters:
        mbv - the MboValue Assignment.ScheduleDate field attach to.
    • Method Detail

      • action

        public void action()
                    throws MXException,
                           java.rmi.RemoteException
        The ScheduleDate field is updated (if necessary) in fldAssignLaborCode. 1) Updates the parent WO's Scheduled Start date to be the earliest ScheduleDate of the assigned Assignments; 2) Sets the WorkDate field for the given Assignment.
        Specified by:
        action in interface MboValueListener
        Overrides:
        action in class MboValueAdapter
        Throws:
        MXException
        java.rmi.RemoteException
      • setAssignWorkDate

        public void setAssignWorkDate(Assignment assignMbo)
                               throws MXException,
                                      java.rmi.RemoteException
        Sets the workdate field based on whether the assignment overlaps either a workperiod on the calendar of the assigned labor or a modavail record of the assigned labor. The value of the WorkDate field is the value in WorkDate field of the workperiod or modavail record.
        Parameters:
        assignMbo - The Assignment that this field class is associated with.
        Throws:
        MXException
        java.rmi.RemoteException
      • isWPMidnightSpanning

        public boolean isWPMidnightSpanning(MboRemote workTimeMbo)
                                     throws MXException,
                                            java.rmi.RemoteException
        Examines a WorkPeriod or ModAvail object and asks if the workperiod defined spans midnight.
        Parameters:
        workTimeMbo - A mbo that defines working time: either a WorkPeriod or a ModAvail.
        Returns:
        A boolean stating whether or not the time range defined spans midnight.
        Throws:
        MXException
        java.rmi.RemoteException
      • isAssignMidnightSpanning

        public boolean isAssignMidnightSpanning(Assignment assignMbo)
                                         throws MXException,
                                                java.rmi.RemoteException
        Examines an Assignment and asks if the time range defined spans midnight.
        Parameters:
        assignMbo - An Assignment.
        Returns:
        A boolean stating whether or not the assignment's time range spans midnight.
        Throws:
        MXException
        java.rmi.RemoteException
      • assignAndWPOverlap

        public boolean assignAndWPOverlap(Assignment assignMbo,
                                          MboRemote workTimeMbo,
                                          java.util.GregorianCalendar scratchCal,
                                          AvailCalc availCalc)
                                   throws MXException,
                                          java.rmi.RemoteException
        Checks if an Assignment overlaps the workperiod defined by the WorkPeriod or ModAvail object.
        Parameters:
        assignMbo - An Assignment.
        workTimeMbo - A mbo that defines working time: either a WorkPeriod or a ModAvail.
        scratchCal - A Gregorian calendar object.
        availCalc - An AvailCalc object.
        Returns:
        A boolean stating whether or not the assignment's time range overlaps the one defined by workTimeMbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • getWorkDatePlusDifference

        public java.util.Date getWorkDatePlusDifference(java.util.Date wpWorkDate,
                                                        java.util.GregorianCalendar scratchCal,
                                                        int offset)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        The method is passed a date and returns a different date that differs by the amount of offset.
        Parameters:
        wpWorkDate - A java.util.Date with no time (i.e. set to midnight).
        scratchCal - A Gregorian calendar object.
        offset - A integer telling how many days should be added to wpWorkDate. (It may be a negative number, so as to subtract some number of days.)
        Returns:
        A Date equal to wpWorkDate + offset days
        Throws:
        MXException
        java.rmi.RemoteException