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 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.