Class TimesheetService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.core.timesheet.rs2.TimesheetService
@RestController
@RequestMapping("timesheet/r2")
@Resource(logging=true)
public class TimesheetService
extends PrivateService
Services to manage timesheet
- Since:
- 19.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> Action to close a timesheetTimesheetCloseEvent.org.springframework.http.ResponseEntity<Void> gapfiller(Long id, @Valid Collection<Long> shiftIds) Action to call the timesheet gap fillerTimesheetGapFillEvent.org.springframework.http.ResponseEntity<DTOTimesheetHeader> Retrieves the required timesheet header.org.springframework.http.ResponseEntity<PageResponse<DTOTimesheetHeader>> getCollection(@Valid Page page, @Valid @NotNull DTOTimesheetSearchFilter filter) Retrieve all the stored timesheet headers.org.springframework.http.ResponseEntity<Collection<Long>> insertTask(Long id, @NotNull @Valid DTOInsertTask input) Action that inserts a task into a specific timesheetTimesheetTaskInsertEvent.org.springframework.http.ResponseEntity<Collection<Long>> Action that inserts a task into the correct timesheet via the user idTimesheetTaskInsertEvent.org.springframework.http.ResponseEntity<Void> Action to reopen a timesheetTimesheetReopenEvent.
-
Constructor Details
-
TimesheetService
public TimesheetService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOTimesheetHeader>> getCollection(@RequestParam("page") @Valid @Valid Page page, @RequestParam("filter") @Valid @NotNull @Valid @NotNull DTOTimesheetSearchFilter filter) throws DAValidateException, DAException Retrieve all the stored timesheet headers.TimesheetSearchEvent- Parameters:
page- the required result pagefilter- the specifiedDTOTimesheetSearchFilter- Returns:
- the response containing the current result page
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="/{id:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOTimesheetHeader> get(@PathVariable("id") Long id) throws DAValidateException, DAException Retrieves the required timesheet header.TimesheetHeaderLoadEvent- Parameters:
id- the timesheet header id- Returns:
- the response containing the required timesheet header
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
gapfiller
@PostMapping(value="/{id:[0-9]+}/actions/gapfill", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> gapfiller(@PathVariable("id") Long id, @Valid @RequestBody @Valid Collection<Long> shiftIds) throws DAException, DAValidateException Action to call the timesheet gap fillerTimesheetGapFillEvent.- Parameters:
id- the id of the timesheetshiftIds- the timesheet shift ids- Returns:
- the DTO response
- Throws:
DAException- if something went wrongDAValidateException- the DA validate exception- See Also:
-
close
@PostMapping(value="/{id:[0-9]+}/actions/close", produces="application/json") public org.springframework.http.ResponseEntity<Void> close(@PathVariable("id") Long id) throws DAException, DAValidateException Action to close a timesheetTimesheetCloseEvent.- Parameters:
id- the id of the timesheet to close- Returns:
- the DTO response
- Throws:
DAException- if something went wrongDAValidateException- the DA validate exception- See Also:
-
reopen
@PostMapping(value="/{id:[0-9]+}/actions/reopen", produces="application/json") public org.springframework.http.ResponseEntity<Void> reopen(@PathVariable("id") Long id) throws DAException, DAValidateException Action to reopen a timesheetTimesheetReopenEvent.- Parameters:
id- the id of the timesheet to reopen- Returns:
- the DTO response
- Throws:
DAException- if something went wrongDAValidateException- the DA validate exception- See Also:
-
insertTask
@PostMapping(value="/{id:[0-9]+}/actions/inserttask", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Collection<Long>> insertTask(@PathVariable("id") Long id, @NotNull @Valid @RequestBody @NotNull @Valid DTOInsertTask input) throws DAException, DAValidateException Action that inserts a task into a specific timesheetTimesheetTaskInsertEvent.- Parameters:
id- the timesheet idinput- the input dtoDTOInsertTask- Returns:
- the response containing the new timesheet task ids
- Throws:
DAException- if something went wrongDAValidateException- the DA validate exception- See Also:
-
insertTaskByUser
@PostMapping(value="/actions/inserttask", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Collection<Long>> insertTaskByUser(@NotNull @Valid @RequestBody @NotNull @Valid DTOInsertTaskByUser input) throws DAException, DAValidateException Action that inserts a task into the correct timesheet via the user idTimesheetTaskInsertEvent.- Parameters:
input- the input dtoDTOInsertTaskByUser- Returns:
- the response containing the new timesheet task ids inserted by user
- Throws:
DAException- if something went wrongDAValidateException- the DA validate exception- See Also:
-