Class MeasurementUnitService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.systemsettings.rs1.measurementunit.MeasurementUnitService
@RestController
@RequestMapping("configurations/system-settings/r1/measurement-units")
@Resource(logging=true)
public class MeasurementUnitService
extends PrivateService
Services to manage measurement units.
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOMeasurementUnit> get(Long id, String language, Collection<String> fields) Retrieves the required measurement unit.org.springframework.http.ResponseEntity<PageResponse<DTOMeasurementUnit>> getCollection(@Valid Page page, String language, Collection<String> fields, String order, @Valid DTOMeasurementUnitFilter filter) Retrieve all the stored measurement units.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOMeasurementUnitUpdate dtoMeasureUnit) Modifies the required measurement unit.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid DTOMeasurementUnitInsert dtoMeasureUnit) Create a new measurement unit.
-
Constructor Details
-
MeasurementUnitService
public MeasurementUnitService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOMeasurementUnit>> 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 DTOMeasurementUnitFilter filter) throws DAValidateException, DAException Retrieve all the stored measurement units.MeasureUnitSearchEvent- Parameters:
page- the required result pagefields- the collection of fields the response will containorder- the ordering fieldfilter- the specified filter parameters- Returns:
- the response containing the current result page
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{measurementUnitId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOMeasurementUnit> get(@PathVariable("measurementUnitId") Long id, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required measurement unit.MeasureUnitLoadEvent- Parameters:
id- measurement unit idfields- the collection of fields the response will contain- Returns:
- the response containing the required measurement unit
- 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 DTOMeasurementUnitInsert dtoMeasureUnit) throws DAValidateException, DAException Create a new measurement unit.MeasureUnitInsertEvent- Parameters:
dtoMeasureUnit- theDTOMeasurementUnit- Returns:
- the standard response containing the new measurement unit id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{measurementUnitId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("measurementUnitId") Long id, @Valid @RequestBody @Valid DTOMeasurementUnitUpdate dtoMeasureUnit) throws DAValidateException, DAException Modifies the required measurement unit.MeasureUnitUpdateEvent- Parameters:
id- the measurement unit iddtoMeasureUnit- the measurement unit updateDTOMeasurementUnit- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-