mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/mp/MissionSetUpMgrImpl.java
private String handleScheduleFlowEvent(final FlowEvent event)
    {
        //Used to allow returning to the previous tab without validating date.
        if (event.getNewStep().equals(VARIABLES_TAB_ID))
        {
            return event.getNewStep();
        }
    
        final Date startTime = getStartInterval();
        final Date stopTime = getStopInterval(); 
    
        if (!isImmediate() && !isIndefinate() && startTime.compareTo(stopTime) >= 0)
        {
            //Checks to make sure start and stop time are not equal.
            m_GrowlMessageUtil.createLocalFacesMessage(FacesMessage.SEVERITY_WARN, 
                    "Warning! Stop time must be after the start time.", 
                    "Please select a new start or stop time!");
            return event.getOldStep();
        }
        
        //Checks to make sure start time is not before the current date/time.
        if (!isImmediate() && startTime.before(new Date()))
        {
            m_GrowlMessageUtil.createLocalFacesMessage(FacesMessage.SEVERITY_WARN, 
                    "Warning! Start time cannot be before the current date/time.", 
                    "Please select a new start time!");
            return event.getOldStep();
        }

        //Checks to make sure stop time is not before current date/time.
        if (!isIndefinate() && stopTime.before(new Date()))
        {
            m_GrowlMessageUtil.createLocalFacesMessage(FacesMessage.SEVERITY_WARN, 
                    "Warning! Stop time cannot be before the current date/time.", 
                    "Please select a new stop time!");
            return event.getOldStep();
        }
        
        return event.getNewStep();
    }
/**
     * Method that handles checking the start time and stop time to make sure they are valid before the wizard can
     * advance to the next tab in the process.
     *  
     * @param event
     *          {@link FlowEvent} that represents the call to change from the schedule tab to the next or previous tab
     *          in the wizard within the mission setup page.
     * @return
     *          The string that represents the id of the wizard tab in which to switch to.
     */
Method that handles checking the start time and stop time to make sure they are valid before the wizard can
advance to the next tab in the process.

@param event
FlowEvent that represents the call to change from the schedule tab to the next or previous tab
in the wizard within the mission setup page.
@return
The string that represents the id of the wizard tab in which to switch to.
Method that handles checking the start time and stop time to make sure they are valid before the wizard can advance to the next tab in the process . @param event FlowEvent that represents the call to change from the schedule tab to the next or previous tab in the wizard within the mission setup page . @return The string that represents the id of the wizard tab in which to switch to .
private String handleScheduleFlowEvent(final FlowEvent event)
    {
        if (event.getNewStep().equals(VARIABLES_TAB_ID))
        {
            return event.getNewStep();
        }
        final Date startTime = getStartInterval();
        final Date stopTime = getStopInterval(); 
        if (!isImmediate() && !isIndefinate() && startTime.compareTo(stopTime) >= 0)
        {
            m_GrowlMessageUtil.createLocalFacesMessage(FacesMessage.SEVERITY_WARN, 
                    "Warning! Stop time must be after the start time.", 
                    "Please select a new start or stop time!");
            return event.getOldStep();
        }
        if (!isImmediate() && startTime.before(new Date()))
        {
            m_GrowlMessageUtil.createLocalFacesMessage(FacesMessage.SEVERITY_WARN, 
                    "Warning! Start time cannot be before the current date/time.", 
                    "Please select a new start time!");
            return event.getOldStep();
        }
        if (!isIndefinate() && stopTime.before(new Date()))
        {
            m_GrowlMessageUtil.createLocalFacesMessage(FacesMessage.SEVERITY_WARN, 
                    "Warning! Stop time cannot be before the current date/time.", 
                    "Please select a new stop time!");
            return event.getOldStep();
        }
        return event.getNewStep();
    }
private String handleScheduleFlowEvent ( final FlowEvent event ) { if ( event . getNewStep ( ) . equals ( VARIABLES_TAB_ID ) ) { return event . getNewStep ( ) ; } final Date startTime = getStartInterval ( ) ; final Date stopTime = getStopInterval ( ) ; if ( ! isImmediate ( ) && ! isIndefinate ( ) && startTime . compareTo ( stopTime ) >= 0 ) { m_GrowlMessageUtil . createLocalFacesMessage ( FacesMessage . SEVERITY_WARN , "Warning! Stop time must be after the start time." , "Please select a new start or stop time!" ) ; return event . getOldStep ( ) ; } if ( ! isImmediate ( ) && startTime . before ( new Date ( ) ) ) { m_GrowlMessageUtil . createLocalFacesMessage ( FacesMessage . SEVERITY_WARN , "Warning! Start time cannot be before the current date/time." , "Please select a new start time!" ) ; return event . getOldStep ( ) ; } if ( ! isIndefinate ( ) && stopTime . before ( new Date ( ) ) ) { m_GrowlMessageUtil . createLocalFacesMessage ( FacesMessage . SEVERITY_WARN , "Warning! Stop time cannot be before the current date/time." , "Please select a new stop time!" ) ; return event . getOldStep ( ) ; } return event . getNewStep ( ) ; }
Method that handles checking the start time and stop time to make sure they are valid before the wizard can
 advance to the next tab in the process.
Method that handles checking the start time and stop time to make sure they are valid before the wizard can advance to the next tab in the process .
//Used to allow returning to the previous tab without validating date. //Checks to make sure start and stop time are not equal. //Checks to make sure start time is not before the current date/time. //Checks to make sure stop time is not before current date/time.