Class OperationCenterAddressService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.organizationalstructures.rs1.operationcenteraddress.OperationCenterAddressService
@RestController
@RequestMapping("territory/organizational-structures/r1/operation-centers/{operationCenterId:[0-9]+}/addresses")
@Resource(logging=true)
public class OperationCenterAddressService
extends PrivateService
Services to manage operation center addresses.
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOOperationCenterAddress> get(Long operationCenterId, Long addressId, Collection<String> fields) Retrieves the required operation center address.org.springframework.http.ResponseEntity<PageResponse<DTOOperationCenterAddress>> getAddresses(Long operationCenterId, @Valid Page page, Collection<String> fields, String order, @Valid DTOOperationCenterAddressFilter filter) Returns the collection of all the stored operation center addresses by calling theOperationCenterAddressSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long operationCenterId, Long addressId, @Valid DTOOperationCenterAddressUpdate dto) org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long operationCenterId, @Valid DTOOperationCenterAddressInsert dto) Create a new operation center address.org.springframework.http.ResponseEntity<Void> setMainAddress(Long operationCenterId, @Valid DTOOperationCenterMainAddress dto)
-
Constructor Details
-
OperationCenterAddressService
public OperationCenterAddressService()
-
-
Method Details
-
getAddresses
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOOperationCenterAddress>> getAddresses(@PathVariable("operationCenterId") Long operationCenterId, @RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,value="_fields") Collection<String> fields, @RequestParam(required=false,value="_order") String order, @Valid @Valid DTOOperationCenterAddressFilter filter) throws DAValidateException, DAException Returns the collection of all the stored operation center addresses by calling theOperationCenterAddressSearchEvent.- Parameters:
operationCenterId- the operation center idpage- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOOperationCenterAddressFilter- Returns:
- the collection of
DTOOperationCenterAddress - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{addressId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOOperationCenterAddress> get(@PathVariable("operationCenterId") Long operationCenterId, @PathVariable("addressId") Long addressId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required operation center address.OperationCenterAddressLoadEvent- Parameters:
operationCenterId- operation center idaddressId- address idfields- the collection of fields the response will contain- Returns:
- the response containing the required operation 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(@PathVariable("operationCenterId") Long operationCenterId, @Valid @RequestBody @Valid DTOOperationCenterAddressInsert dto) throws DAValidateException, DAException Create a new operation center address.OperationCenterAddressInsertEvent- Parameters:
dto- theDTOOperationCenter- Returns:
- the standard response containing the new operation center id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{addressId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("operationCenterId") Long operationCenterId, @PathVariable("addressId") Long addressId, @Valid @RequestBody @Valid DTOOperationCenterAddressUpdate dto) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
setMainAddress
@PostMapping(value="/main-addresses", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> setMainAddress(@PathVariable("operationCenterId") Long operationCenterId, @Valid @RequestBody @Valid DTOOperationCenterMainAddress dto) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-