public class TimesheetServiceImpl extends Object implements TimesheetService
| Constructor and Description |
|---|
TimesheetServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
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() |
protected BigDecimal |
getMinutesBetween(org.joda.time.DateTime begin,
org.joda.time.DateTime end) |
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
|
boolean |
isTimesheetValid(TimesheetDocument td) |
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.
|
List<TimeBlock> |
resetTimeBlock(List<TimeBlock> timeBlocks,
org.joda.time.LocalDate asOfDate) |
protected void |
resetWorkedHours(TimeBlock.Builder previousTimeBlock,
TimeBlock.Builder 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) |
List<String> |
validateHours(TimesheetDocument timesheetDocument) |
List<String> |
validateTimeBlock(TimesheetDocument td) |
public TimesheetServiceImpl()
public void routeTimesheet(String principalId, TimesheetDocument timesheetDocument)
TimesheetServicerouteTimesheet in interface TimesheetServicepublic void routeTimesheet(String principalId, TimesheetDocument timesheetDocument, String action)
routeTimesheet in interface TimesheetServicepublic void approveTimesheet(String principalId, TimesheetDocument timesheetDocument)
approveTimesheet in interface TimesheetServicepublic void approveTimesheet(String principalId, TimesheetDocument timesheetDocument, String action)
approveTimesheet in interface TimesheetServicepublic void disapproveTimesheet(String principalId, TimesheetDocument timesheetDocument)
disapproveTimesheet in interface TimesheetServiceprotected void timesheetAction(String action, String principalId, TimesheetDocument timesheetDocument)
public TimesheetDocument openTimesheetDocument(String principalId, CalendarEntry calendarDates) throws org.kuali.rice.kew.api.exception.WorkflowException
TimesheetServiceopenTimesheetDocument in interface TimesheetServiceorg.kuali.rice.kew.api.exception.WorkflowExceptionpublic void loadHolidaysOnTimesheet(TimesheetDocument timesheetDocument, String principalId, org.joda.time.LocalDate beginDate, org.joda.time.LocalDate endDate)
TimesheetServiceloadHolidaysOnTimesheet in interface TimesheetServiceprotected 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
org.kuali.rice.kew.api.exception.WorkflowExceptionpublic List<TimeBlock> getPrevDocumentTimeBlocks(String principalId, org.joda.time.DateTime payBeginDate)
TimesheetServicegetPrevDocumentTimeBlocks in interface TimesheetServicepublic TimesheetDocument getTimesheetDocument(String documentId)
TimesheetServicegetTimesheetDocument in interface TimesheetServiceprotected void loadTimesheetDocumentData(TimesheetDocument tdoc, String principalId, CalendarEntry payCalEntry)
public boolean isSynchronousUser()
TimesheetServiceisSynchronousUser in interface TimesheetServicepublic void deleteTimesheet(String documentId)
TimesheetServicedeleteTimesheet in interface TimesheetServiceprotected void resetWorkedHours(TimeBlock.Builder previousTimeBlock, TimeBlock.Builder timeBlock, org.joda.time.LocalDate asOfDate)
protected BigDecimal getMinutesBetween(org.joda.time.DateTime begin, org.joda.time.DateTime end)
public List<TimeBlock> resetTimeBlock(List<TimeBlock> timeBlocks, org.joda.time.LocalDate asOfDate)
resetTimeBlock in interface TimesheetServicepublic boolean isReadyToApprove(TimesheetDocument document)
isReadyToApprove in interface TimesheetServicepublic List<EarnCode> getEarnCodesForTime(Assignment a, org.joda.time.LocalDate asOfDate, boolean includeRegularEarnCode)
TimesheetServicegetEarnCodesForTime in interface TimesheetServicepublic List<EarnCode> getEarnCodesForTime(Assignment a, org.joda.time.LocalDate asOfDate)
TimesheetServicegetEarnCodesForTime in interface TimesheetServicepublic HRPermissionService getHRPermissionService()
public boolean isTimesheetValid(TimesheetDocument td)
isTimesheetValid in interface TimesheetServicepublic List<String> validateTimeBlock(TimesheetDocument td)
validateTimeBlock in interface TimesheetServicepublic List<String> validateHours(TimesheetDocument timesheetDocument)
validateHours in interface TimesheetServiceCopyright © 2004–2014 The Kuali Foundation. All rights reserved.