Class MunicipalityService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.locations.rs1.municipality.MunicipalityService
@RestController
@RequestMapping("territory/locations/r1/municipalities")
@Resource(logging=true)
public class MunicipalityService
extends PrivateService
Services to manage municipalities.
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOMunicipality> get(Long id, Collection<String> fields) Retrieves the required municipality.org.springframework.http.ResponseEntity<PageResponse<DTOMunicipality>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid DTOMunicipalitySearchFilter filter) Retrieve the all stored municipalities.
-
Constructor Details
-
MunicipalityService
public MunicipalityService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOMunicipality>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOMunicipalitySearchFilter filter) throws DAValidateException, DAException Retrieve the all stored municipalities.MunicipalitySearchEvent- Parameters:
page- the required result pagefields- the collection of fields the response will containorder- the ordering fieldfilter- the specifiedDTOMunicipalitySearchFilter- Returns:
- the response containing the current result page
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{municipalityId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOMunicipality> get(@PathVariable("municipalityId") Long id, @RequestParam(required=false,name="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required municipality.MunicipalityLoadEvent- Parameters:
id- municipality idfields- the collection of fields the response will contain- Returns:
- the response containing the required municipality
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-