Class WorkCenterService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.organizationalstructures.rs1.workcenter.WorkCenterService
@RestController
@RequestMapping("territory/organizational-structures/r1/work-centers")
@Resource(logging=true)
public class WorkCenterService
extends PrivateService
Service to manage work center
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOWorkCenter> get(Long workCenterId, String language, Collection<String> fields) Retrieves the requiredDTOWorkCenterby calling theWorkCenterLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOWorkCenter>> getCollection(@Valid Page page, String language, Collection<String> fields, String order, @Valid DTOWorkCenterFilter filter) Returns the collection of all the stored work centers by calling theWorkCenterSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOWorkCenterUpdate dto) Update a work center by calling theWorkCenterUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> Create a new work center by calling theWorkCenterInsertEvent
-
Constructor Details
-
WorkCenterService
public WorkCenterService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWorkCenter>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields, @RequestParam(required=false,value="_order") String order, @Valid @Valid DTOWorkCenterFilter filter) throws DAValidateException, DAException Returns the collection of all the stored work centers by calling theWorkCenterSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultlanguage- the user languagefields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOWorkCenterFilter- Returns:
- the collection of
DTOWorkCenter - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{workCenterId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOWorkCenter> get(@PathVariable("workCenterId") Long workCenterId, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOWorkCenterby calling theWorkCenterLoadEvent.- Parameters:
workCenterId- the work center idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the response containing the loaded work center
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTOWorkCenterInsert dto) throws DAValidateException, DAException Create a new work center by calling theWorkCenterInsertEvent- Parameters:
dto- theDTOWorkCenterInsert- Returns:
- the standard response containing the new work center id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{workCenterId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("workCenterId") Long id, @Valid @RequestBody @Valid DTOWorkCenterUpdate dto) throws DAValidateException, DAException Update a work center by calling theWorkCenterUpdateEvent- Parameters:
id- the work center iddto- theDTOWorkCenterUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-