Package gov.niem.tools.api.db.property
Class PropertyController
java.lang.Object
gov.niem.tools.api.db.property.PropertyController
@RestController
@RequestMapping("stewards/{stewardKey}/models/{modelKey}/versions/{versionNumber}")
public class PropertyController
extends Object
REST controller for properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllProperties
(String stewardKey, String modelKey, String versionNumber) Gets all properties from the version with the given fields.getProperty
(String stewardKey, String modelKey, String versionNumber, String qname) Gets a property with the given fields.getPropertyCmf
(String stewardKey, String modelKey, String versionNumber, String qname, Config.AppMediaType mediaType) Gets a property in CMF with the given fields.
-
Constructor Details
-
PropertyController
public PropertyController()
-
-
Method Details
-
getProperty
@GetMapping("/properties/{qname}") @ResponseStatus(code=OK) public Property getProperty(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String qname) throws Exception Gets a property with the given fields.- Throws:
Exception
-
getPropertyCmf
@GetMapping("/properties.cmf/{qname}") @ResponseStatus(code=OK) public Object getPropertyCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber, @PathVariable String qname, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception Gets a property in CMF with the given fields.- Throws:
Exception
-
getAllProperties
@GetMapping("/properties") @ResponseStatus(code=OK) public List<Property> getAllProperties(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionNumber) throws Exception Gets all properties from the version with the given fields. Note: Currently returns null until pagination support is added.- Throws:
Exception
- Todo:
- Add pagination support for version properties and return results.
-