org.kuali.kfs.module.endow.businessobject.lookup
Class CalculateProcessDateUsingFrequencyCodeService

java.lang.Object
  extended by org.kuali.kfs.module.endow.businessobject.lookup.CalculateProcessDateUsingFrequencyCodeService

public class CalculateProcessDateUsingFrequencyCodeService
extends Object


Field Summary
protected  org.kuali.rice.kns.service.DateTimeService dateTimeService
           
protected  KEMService kemService
           
 
Constructor Summary
CalculateProcessDateUsingFrequencyCodeService()
           
 
Method Summary
protected  Date calculateNextMonthlyDate(String dayOfMonth, Date currentDate)
          Method to calculate the next processing monthly date based on the frequency type Sets the day in the calendar based on day part of the frequency code.
protected  Date calculateNextQuarterlyOrSemiAnnuallyOrAnnuallyProcessDate(String month, String dayOfMonth, String frequencyType, Date currentDate)
          Method to calculate the next processing quarterly or semi-annually or annually date based on the frequency type Sets the day in the calendar based on day part of the frequency code.
protected  Date calculateNextSemiMonthlyDate(String dayOfSemiMonthly, Date currentDate)
          Method to calculate the next processing semi-monthly date based on the frequency type Sets the day of the month and then returns the processing date
protected  Date calculateNextWeeklyDate(String dayOfWeekFromFrequencyCode, Date currentDate)
          Method to calculate the next processing week date based on the frequency type adds the appropriate number of days to the current date
 Date calculateProcessDate(String frequencyCode)
          This method uses frequency code to derive the next processing date
protected  int checkMaximumDaysInFebruary()
          This method will check and return either maximum days in the month as 28 or 29 for leap year.
protected  int checkMaximumDaysInMonth(int monthNumber)
          This method will check and return maximum days in a month.
protected  org.kuali.rice.kns.service.DateTimeService getDateTimeService()
           
protected  KEMService getKemService()
           
protected  Calendar setCaledarWithMonth(String month, Date currentDate)
          This method will check the current month and set the calendar to that month
protected  void setCalendarWithDays(Calendar calendar, String dayOfMonth)
          This method will check the current month and set the calendar to that month
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
           
 void setKemService(KEMService kemService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateTimeService

protected org.kuali.rice.kns.service.DateTimeService dateTimeService

kemService

protected KEMService kemService
Constructor Detail

CalculateProcessDateUsingFrequencyCodeService

public CalculateProcessDateUsingFrequencyCodeService()
Method Detail

calculateProcessDate

public Date calculateProcessDate(String frequencyCode)
This method uses frequency code to derive the next processing date

Parameters:
frquencyCode - frequencyCode
Returns:
returns the processing date

calculateNextWeeklyDate

protected Date calculateNextWeeklyDate(String dayOfWeekFromFrequencyCode,
                                       Date currentDate)
Method to calculate the next processing week date based on the frequency type adds the appropriate number of days to the current date

Parameters:
dayOfWeek -
Returns:
next processing date

calculateNextSemiMonthlyDate

protected Date calculateNextSemiMonthlyDate(String dayOfSemiMonthly,
                                            Date currentDate)
Method to calculate the next processing semi-monthly date based on the frequency type Sets the day of the month and then returns the processing date

Parameters:
dayOfSemiMonthly -
Returns:
next processing date

calculateNextMonthlyDate

protected Date calculateNextMonthlyDate(String dayOfMonth,
                                        Date currentDate)
Method to calculate the next processing monthly date based on the frequency type Sets the day in the calendar based on day part of the frequency code.

Parameters:
dayOfMonth -
Returns:
next processing date

calculateNextQuarterlyOrSemiAnnuallyOrAnnuallyProcessDate

protected Date calculateNextQuarterlyOrSemiAnnuallyOrAnnuallyProcessDate(String month,
                                                                         String dayOfMonth,
                                                                         String frequencyType,
                                                                         Date currentDate)
Method to calculate the next processing quarterly or semi-annually or annually date based on the frequency type Sets the day in the calendar based on day part of the frequency code.

Parameters:
frequencyType - frequency code for quarterly, month, dayOfMonth
Returns:
next processing date

setCaledarWithMonth

protected Calendar setCaledarWithMonth(String month,
                                       Date currentDate)
This method will check the current month and set the calendar to that month

Parameters:
month - month to set the calendar
Returns:
calendar calendar is set to the month selected

setCalendarWithDays

protected void setCalendarWithDays(Calendar calendar,
                                   String dayOfMonth)
This method will check the current month and set the calendar to that month

Parameters:
month, - dayOfMonth month to set the calendar, dayOfMonth day of the month to set to

checkMaximumDaysInFebruary

protected int checkMaximumDaysInFebruary()
This method will check and return either maximum days in the month as 28 or 29 for leap year. It first sets the month to February and then checks the maximum days..

Returns:
maxDays Maximum number of days in the month of February for calendar.

checkMaximumDaysInMonth

protected int checkMaximumDaysInMonth(int monthNumber)
This method will check and return maximum days in a month.

Parameters:
monthNumber - The number of the month to test for maximum days..
Returns:
maxDays Maximum number of days in the month of February for calendar.

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)

getDateTimeService

protected org.kuali.rice.kns.service.DateTimeService getDateTimeService()

getKemService

protected KEMService getKemService()

setKemService

public void setKemService(KEMService kemService)


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