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