Class AddressTypeService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.locations.rs1.addresstype.AddressTypeService
@RestController
@RequestMapping("territory/locations/r1/address-types")
@Resource(logging=true)
public class AddressTypeService
extends PrivateService
Services to manage address types.
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOAddressType> get(Long id, Collection<String> fields) Retrieves the required address type.org.springframework.http.ResponseEntity<PageResponse<DTOAddressType>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOAddressTypeSearchFilter filter) Retrieve all the stored address types.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOAddressTypeUpdate input) Modifies the required address type.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOAddressTypeInsert input) Create a new address type.
-
Constructor Details
-
AddressTypeService
public AddressTypeService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOAddressType>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOAddressTypeSearchFilter filter) throws DAValidateException, DAException Retrieve all the stored address types.AddressTypeSearchEvent- Parameters:
page- the required result pagefields- the collection of fields the response will containorder- the ordering fieldfilter- the specifiedDTOAddressTypeSearchFilter- Returns:
- the response containing the current result page
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{addressTypeId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOAddressType> get(@PathVariable("addressTypeId") Long id, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required address type.AddressTypeLoadEvent- Parameters:
id- address type idfields- the collection of fields the response will contain- Returns:
- the response containing the required address type
- 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 DTOAddressTypeInsert input) throws DAValidateException, DAException Create a new address type.AddressTypeInsertEvent- Parameters:
input- theDTOAddressTypeInsert- Returns:
- the standard response containing the new address type id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{addressTypeId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("addressTypeId") Long id, @Valid @RequestBody @Valid DTOAddressTypeUpdate input) throws DAValidateException, DAException Modifies the required address type.AddressTypeUpdateEvent- Parameters:
id- the address type idinput- the address type updateDTOAddressTypeUpdate- Returns:
- a standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-