org.kuali.kfs.module.endow.document.service.impl
Class FrequencyDatesServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.endow.document.service.impl.FrequencyDatesServiceImpl
All Implemented Interfaces:
FrequencyDatesService

public class FrequencyDatesServiceImpl
extends Object
implements FrequencyDatesService


Field Summary
protected  org.kuali.rice.kns.service.BusinessObjectService businessObjectService
           
protected  org.kuali.rice.kns.service.DateTimeService dateTimeService
           
protected  KEMService kemService
           
 
Constructor Summary
FrequencyDatesServiceImpl()
           
 
Method Summary
protected  Calendar calculateNextDate(Date currentDate)
          Calculates the next date
 Date calculateNextDueDate(String frequencyCode, Date currentDate)
          Gets the next due date according to the frequency code
protected  Calendar 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  Calendar 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  Calendar 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  Calendar 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
protected  org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          This method gets the businessObjectService.
 FrequencyCode getByPrimaryKey(String code)
           
protected  org.kuali.rice.kns.service.DateTimeService getDateTimeService()
           
protected  KEMService getKemService()
           
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          This method sets the businessObjectService
protected  void setCalendarWithDays(Calendar calendar, String dayOfMonth)
          This method will check the current month and set the calendar to that month
protected  Calendar setCalendarWithMonth(String month, Date currentDate)
          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

businessObjectService

protected org.kuali.rice.kns.service.BusinessObjectService businessObjectService

dateTimeService

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

kemService

protected KEMService kemService
Constructor Detail

FrequencyDatesServiceImpl

public FrequencyDatesServiceImpl()
Method Detail

getByPrimaryKey

public FrequencyCode getByPrimaryKey(String code)
See Also:
FrequencyCodeService.getByPrimaryKey(java.lang.String)

calculateNextDueDate

public Date calculateNextDueDate(String frequencyCode,
                                 Date currentDate)
Description copied from interface: FrequencyDatesService
Gets the next due date according to the frequency code

Specified by:
calculateNextDueDate in interface FrequencyDatesService
Returns:
next due date
See Also:
org.kuali.kfs.module.endow.document.service.FrequencyCodeService#calculateNextDueDate(java.lang.String, java.sql.Date)

calculateNextDate

protected Calendar calculateNextDate(Date currentDate)
Calculates the next date

Parameters:
currentDate -
Returns:

calculateNextWeeklyDate

protected Calendar 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 Calendar 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 Calendar 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 Calendar 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

setCalendarWithMonth

protected Calendar setCalendarWithMonth(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

getBusinessObjectService

protected org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
This method gets the businessObjectService.

Returns:
businessObjectService

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
This method sets the businessObjectService

Parameters:
businessObjectService -

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.