org.kuali.kpme.tklm.time.timesheet.service
Class TimesheetServiceImpl

java.lang.Object
  extended by org.kuali.kpme.tklm.time.timesheet.service.TimesheetServiceImpl
All Implemented Interfaces:
TimesheetService

public class TimesheetServiceImpl
extends Object
implements TimesheetService


Constructor Summary
TimesheetServiceImpl()
           
 
Method Summary
 void approveTimesheet(String principalId, TimesheetDocument timesheetDocument)
           
 void approveTimesheet(String principalId, TimesheetDocument timesheetDocument, String action)
           
 void deleteTimesheet(String documentId)
          Delete a timesheet(used for testing only)
 void disapproveTimesheet(String principalId, TimesheetDocument timesheetDocument)
           
 List<EarnCode> getEarnCodesForTime(Assignment a, org.joda.time.LocalDate asOfDate)
          Previously in EarnCodeService
 List<EarnCode> getEarnCodesForTime(Assignment a, org.joda.time.LocalDate asOfDate, boolean includeRegularEarnCode)
          Fetch a list of earn codes for Time usage, for a particular assignment as of a particular date
 HRPermissionService getHRPermissionService()
           
 List<TimeBlock> getPrevDocumentTimeBlocks(String principalId, org.joda.time.DateTime payBeginDate)
          Fetch TimeBlocks for previous pay periods
 TimesheetDocument getTimesheetDocument(String documentId)
          For a given document ID, return a fully populated time sheet document.
protected  TimesheetDocument initiateWorkflowDocument(String principalId, org.joda.time.DateTime payBeginDate, org.joda.time.DateTime payEndDate, CalendarEntry calendarEntry, String documentType, String title)
           
 boolean isReadyToApprove(TimesheetDocument document)
           
 boolean isSynchronousUser()
          Is user a Clock in/out person or do they manually enter TimeBlocks
 void loadHolidaysOnTimesheet(TimesheetDocument timesheetDocument, String principalId, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate)
          Load holidays on given timesheet
protected  void loadTimesheetDocumentData(TimesheetDocument tdoc, String principalId, CalendarEntry payCalEntry)
           
 TimesheetDocument openTimesheetDocument(String principalId, CalendarEntry calendarDates)
          Opens the timesheet document for the user at the given payEndDate provided.
 void resetTimeBlock(List<TimeBlock> timeBlocks, org.joda.time.LocalDate asOfDate)
           
 TimeBlock resetWorkedHours(TimeBlock previousTimeBlock, TimeBlock timeBlock, org.joda.time.LocalDate asOfDate)
           
 void routeTimesheet(String principalId, TimesheetDocument timesheetDocument)
          Route the given timesheet
 void routeTimesheet(String principalId, TimesheetDocument timesheetDocument, String action)
           
protected  void timesheetAction(String action, String principalId, TimesheetDocument timesheetDocument)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimesheetServiceImpl

public TimesheetServiceImpl()
Method Detail

routeTimesheet

public void routeTimesheet(String principalId,
                           TimesheetDocument timesheetDocument)
Description copied from interface: TimesheetService
Route the given timesheet

Specified by:
routeTimesheet in interface TimesheetService

routeTimesheet

public void routeTimesheet(String principalId,
                           TimesheetDocument timesheetDocument,
                           String action)
Specified by:
routeTimesheet in interface TimesheetService

approveTimesheet

public void approveTimesheet(String principalId,
                             TimesheetDocument timesheetDocument)
Specified by:
approveTimesheet in interface TimesheetService

approveTimesheet

public void approveTimesheet(String principalId,
                             TimesheetDocument timesheetDocument,
                             String action)
Specified by:
approveTimesheet in interface TimesheetService

disapproveTimesheet

public void disapproveTimesheet(String principalId,
                                TimesheetDocument timesheetDocument)
Specified by:
disapproveTimesheet in interface TimesheetService

timesheetAction

protected void timesheetAction(String action,
                               String principalId,
                               TimesheetDocument timesheetDocument)

openTimesheetDocument

public TimesheetDocument openTimesheetDocument(String principalId,
                                               CalendarEntry calendarDates)
                                        throws org.kuali.rice.kew.api.exception.WorkflowException
Description copied from interface: TimesheetService
Opens the timesheet document for the user at the given payEndDate provided. If the timesheet does not exist, it is created.

Specified by:
openTimesheetDocument in interface TimesheetService
Returns:
Throws:
org.kuali.rice.kew.api.exception.WorkflowException

loadHolidaysOnTimesheet

public void loadHolidaysOnTimesheet(TimesheetDocument timesheetDocument,
                                    String principalId,
                                    org.joda.time.LocalDate beginDate,
                                    org.joda.time.LocalDate endDate)
Description copied from interface: TimesheetService
Load holidays on given timesheet

Specified by:
loadHolidaysOnTimesheet in interface TimesheetService

initiateWorkflowDocument

protected TimesheetDocument initiateWorkflowDocument(String principalId,
                                                     org.joda.time.DateTime payBeginDate,
                                                     org.joda.time.DateTime payEndDate,
                                                     CalendarEntry calendarEntry,
                                                     String documentType,
                                                     String title)
                                              throws org.kuali.rice.kew.api.exception.WorkflowException
Throws:
org.kuali.rice.kew.api.exception.WorkflowException

getPrevDocumentTimeBlocks

public List<TimeBlock> getPrevDocumentTimeBlocks(String principalId,
                                                 org.joda.time.DateTime payBeginDate)
Description copied from interface: TimesheetService
Fetch TimeBlocks for previous pay periods

Specified by:
getPrevDocumentTimeBlocks in interface TimesheetService
Returns:

getTimesheetDocument

public TimesheetDocument getTimesheetDocument(String documentId)
Description copied from interface: TimesheetService
For a given document ID, return a fully populated time sheet document. Fully populated means: TimeBlocks, Jobs, Assignments

Specified by:
getTimesheetDocument in interface TimesheetService
Returns:

loadTimesheetDocumentData

protected void loadTimesheetDocumentData(TimesheetDocument tdoc,
                                         String principalId,
                                         CalendarEntry payCalEntry)

isSynchronousUser

public boolean isSynchronousUser()
Description copied from interface: TimesheetService
Is user a Clock in/out person or do they manually enter TimeBlocks

Specified by:
isSynchronousUser in interface TimesheetService
Returns:

deleteTimesheet

public void deleteTimesheet(String documentId)
Description copied from interface: TimesheetService
Delete a timesheet(used for testing only)

Specified by:
deleteTimesheet in interface TimesheetService

resetWorkedHours

public TimeBlock resetWorkedHours(TimeBlock previousTimeBlock,
                                  TimeBlock timeBlock,
                                  org.joda.time.LocalDate asOfDate)

resetTimeBlock

public void resetTimeBlock(List<TimeBlock> timeBlocks,
                           org.joda.time.LocalDate asOfDate)
Specified by:
resetTimeBlock in interface TimesheetService

isReadyToApprove

public boolean isReadyToApprove(TimesheetDocument document)
Specified by:
isReadyToApprove in interface TimesheetService

getEarnCodesForTime

public List<EarnCode> getEarnCodesForTime(Assignment a,
                                          org.joda.time.LocalDate asOfDate,
                                          boolean includeRegularEarnCode)
Description copied from interface: TimesheetService
Fetch a list of earn codes for Time usage, for a particular assignment as of a particular date

Specified by:
getEarnCodesForTime in interface TimesheetService
Returns:

getEarnCodesForTime

public List<EarnCode> getEarnCodesForTime(Assignment a,
                                          org.joda.time.LocalDate asOfDate)
Description copied from interface: TimesheetService
Previously in EarnCodeService

Specified by:
getEarnCodesForTime in interface TimesheetService
Returns:

getHRPermissionService

public HRPermissionService getHRPermissionService()


Copyright © 2004-2014 The Kuali Foundation. All Rights Reserved.