Class TeamShiftService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.teams.rs1.teamshifts.TeamShiftService
Service to manage team shifts.
- Since:
- 17.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOTeamShift> get(Long teamShiftId, Collection<String> fields) Retrieves the required team shift by calling theTeamShiftLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOTeamShift>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOTeamShiftFilter filter) Returns the collection of all the stored team shifts by calling theTeamShiftSearchEvent.org.springframework.http.ResponseEntity<PageResponse<DTOTeamShiftResource>> getTeamShiftResource(Long teamShiftId, @Valid Page page, Collection<String> fields, String order, @Valid DTOTeamShiftResourceFilter filter) Returns the collection of all the stored resources associated to the specified team shift by calling theTeamShiftResourceSearchEvent.
-
Constructor Details
-
TeamShiftService
public TeamShiftService()
-
-
Method Details
-
getCollection
@GetMapping(value="workforce/teams/r1/team-shifts", produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOTeamShift>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOTeamShiftFilter filter) throws DAValidateException, DAException Returns the collection of all the stored team shifts by calling theTeamShiftSearchEvent.- Parameters:
page- the page that will contain the paginated resultfields- the collection of fields that will be contained in the responseorder- the ordering fieldfilter- theDTOTeamShiftFilter- Returns:
- the collection of
DTOTeamShifts - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
get
@GetMapping(value="workforce/teams/r1/team-shifts/{teamShiftId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOTeamShift> get(@PathVariable("teamShiftId") Long teamShiftId, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required team shift by calling theTeamShiftLoadEvent.- Parameters:
teamShiftId- the ID of the team shift to be loadedfields- the collection of fields that will be contained in the response- Returns:
- the response containing the loaded team shift
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
getTeamShiftResource
@GetMapping(value="workforce/teams/r1/team-shifts/{teamShiftId:[0-9]+}/resources", produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOTeamShiftResource>> getTeamShiftResource(@PathVariable("teamShiftId") Long teamShiftId, @RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOTeamShiftResourceFilter filter) throws DAValidateException, DAException Returns the collection of all the stored resources associated to the specified team shift by calling theTeamShiftResourceSearchEvent.- Parameters:
teamShiftId- the team shift idpage- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOTeamShiftResourceFilter- Returns:
- the collection of
DTOTeamShiftResource - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-