Class WorkShiftService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.calendars.rs1.workshift.WorkShiftService
@RestController
@RequestMapping("workforce/calendars/r1/work-shifts")
@Resource(logging=true)
public class WorkShiftService
extends PrivateService
Service to manage work shifts.
- Since:
- 17.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOWorkShift> get(Long workShiftId, Collection<String> fields) Retrieves the required work shift by calling theWorkShiftLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOWorkShift>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOWorkShiftFilter filter) Returns the collection of all the stored work shifts by calling theWorkShiftSearchEvent.
-
Constructor Details
-
WorkShiftService
public WorkShiftService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWorkShift>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOWorkShiftFilter filter) throws DAValidateException, DAException Returns the collection of all the stored work shifts by calling theWorkShiftSearchEvent.- Parameters:
page- the page that will contain the paginated resultfields- the collection of fields that will be contained in the responseorder- the ordering fieldfilter- theDTOWorkShiftFilter- Returns:
- the collection of
DTOWorkShifts - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
get
@GetMapping(value="{workShiftId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOWorkShift> get(@PathVariable("workShiftId") Long workShiftId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required work shift by calling theWorkShiftLoadEvent.- Parameters:
workShiftId- the ID of the work shift to be loadedfields- the collection of fields that will be contained in the response- Returns:
- the response containing the loaded work shift
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-