org.kuali.kfs.gl.batch.service.impl
Class RunDateServiceImpl

java.lang.Object
  extended by org.kuali.kfs.gl.batch.service.impl.RunDateServiceImpl
All Implemented Interfaces:
RunDateService

public class RunDateServiceImpl
extends Object
implements RunDateService

The default implementation of RunDateService


Nested Class Summary
protected  class RunDateServiceImpl.CutoffTime
          Holds the hour, minute, and second of a given cut off time
 
Constructor Summary
RunDateServiceImpl()
           
 
Method Summary
 Date calculateRunDate(Date executionDate)
          Returns the assumed runtime given the actual execution time.
protected  boolean isCurrentDateBeforeCutoff(Calendar currentCal, RunDateServiceImpl.CutoffTime cutoffTime)
          Determines if the given calendar time is before the given cutoff time
protected  RunDateServiceImpl.CutoffTime parseCutoffTime(String cutoffTime)
          Parses a String representation of the cutoff time
protected  String retrieveCutoffTimeValue()
          Retrieves the cutoff time from a repository.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunDateServiceImpl

public RunDateServiceImpl()
Method Detail

calculateRunDate

public Date calculateRunDate(Date executionDate)
Description copied from interface: RunDateService
Returns the assumed runtime given the actual execution time.

Specified by:
calculateRunDate in interface RunDateService
Parameters:
executionDate - the actual date that this method is called
Returns:
the run date/time to assume when running the GL processes
See Also:
RunDateService.calculateRunDate(java.util.Date)

isCurrentDateBeforeCutoff

protected boolean isCurrentDateBeforeCutoff(Calendar currentCal,
                                            RunDateServiceImpl.CutoffTime cutoffTime)
Determines if the given calendar time is before the given cutoff time

Parameters:
currentCal - the current time
cutoffTime - the "start of the day" cut off time
Returns:
true if the current time is before the cutoff, false otherwise

parseCutoffTime

protected RunDateServiceImpl.CutoffTime parseCutoffTime(String cutoffTime)
Parses a String representation of the cutoff time

Parameters:
cutoffTime - the cutoff time String to parse
Returns:
a record holding the cutoff time

retrieveCutoffTimeValue

protected String retrieveCutoffTimeValue()
Retrieves the cutoff time from a repository.

Returns:
a time of day in the format "HH:mm:ss", where HH, mm, ss are defined in the java.text.SimpleDateFormat class. In particular, 0 <= hour <= 23, 0 <= minute <= 59, and 0 <= second <= 59

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.