Class WorkShiftExceptionService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.calendars.rs1.workshiftexception.WorkShiftExceptionService
@RestController
@RequestMapping("workforce/calendars/r1/work-shift-exceptions")
@Resource(logging=true)
public class WorkShiftExceptionService
extends PrivateService
Service to manage work shift exceptions.
- Since:
- 17.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> batchDelete(@Size(min=1,max=50) Collection<Long> ids) Delete a batch of work shift exceptions, by calling theWorkShiftExceptionDeleteBatchEvent.org.springframework.http.ResponseEntity<Void> batchPatch(@Size(min=1,max=50) @Valid List<DTOWorkShiftExceptionBatchUpdate> batchInput) Update a batch of work shift exceptions by calling theWorkShiftExceptionUpdateBatchEventorg.springframework.http.ResponseEntity<List<DTOIdentifier<Long>>> Creates a set of new work shift exceptions by calling theWorkShiftExceptionInsertBatchEventorg.springframework.http.ResponseEntity<Void> org.springframework.http.ResponseEntity<DTOWorkShiftException> get(Long workShiftExceptionId, Collection<String> fields) Retrieves the required work shift exception by calling theWorkShiftExceptionLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOWorkShiftException>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOWorkShiftExceptionFilter filter) Returns the collection of all the stored work shift exceptions by calling theWorkShiftExceptionSearchEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new work shift exception by calling theWorkShiftExceptionInsertEvent.
-
Constructor Details
-
WorkShiftExceptionService
public WorkShiftExceptionService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWorkShiftException>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOWorkShiftExceptionFilter filter) throws DAValidateException, DAException Returns the collection of all the stored work shift exceptions by calling theWorkShiftExceptionSearchEvent.- Parameters:
page- the page that will contain the paginated resultfields- the collection of fields that will be contained in the responseorder- the ordering fieldfilter- theDTOWorkShiftExceptionFilter- Returns:
- the collection of
DTOWorkShiftExceptions - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
get
@GetMapping(value="{workShiftExceptionId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOWorkShiftException> get(@PathVariable("workShiftExceptionId") Long workShiftExceptionId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required work shift exception by calling theWorkShiftExceptionLoadEvent.- Parameters:
workShiftExceptionId- the ID of the work shift exception to be loadedfields- the collection of fields that will be contained in the response- Returns:
- the response containing the loaded work shift exception
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTOWorkShiftExceptionInsert dto) throws DAValidateException, DAException Creates a new work shift exception by calling theWorkShiftExceptionInsertEvent.- Parameters:
dto- theDTOWorkShiftExceptionInsert- Returns:
- the response containing the ID of the newly created work shift exception
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
delete
@DeleteMapping(value="{workShiftExceptionId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<Void> delete(@PathVariable("workShiftExceptionId") Long workShiftExceptionId) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
batchPost
@PostMapping(value="/batch", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<List<DTOIdentifier<Long>>> batchPost(@Size(min=1,max=50) @Valid @RequestBody @Size(min=1,max=50) @Valid List<DTOWorkShiftExceptionInsert> dtos) throws DAValidateException, DAException Creates a set of new work shift exceptions by calling theWorkShiftExceptionInsertBatchEvent- Parameters:
dtos- list ofDTOWorkShiftExceptionInsert- Returns:
- the response containing the IDs of the newly created work shift exceptions
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
batchPatch
@PatchMapping(value="/batch", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> batchPatch(@Size(min=1,max=50) @RequestBody @Valid @Size(min=1,max=50) @Valid List<DTOWorkShiftExceptionBatchUpdate> batchInput) throws DAValidateException, DAException Update a batch of work shift exceptions by calling theWorkShiftExceptionUpdateBatchEvent- Parameters:
batchInput- a list ofDTOWorkShiftExceptionBatchUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
batchDelete
@DeleteMapping(value="/batch", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> batchDelete(@Size(min=1,max=50) @RequestParam(name="id") @Size(min=1,max=50) Collection<Long> ids) throws DAValidateException, DAException Delete a batch of work shift exceptions, by calling theWorkShiftExceptionDeleteBatchEvent.- Parameters:
ids- the collection of work shift exception ids to be deleted- Returns:
- the empty response entity
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-