Class VersionController

java.lang.Object
gov.niem.tools.api.db.version.VersionController

@Validated @RestController @RequestMapping("/stewards/{stewardKey}/models/{modelKey}") public class VersionController extends Object
REST controller for versions.
  • Constructor Details

    • VersionController

      public VersionController()
  • Method Details

    • getVersion

      @GetMapping("/versions/{versionKey}") @ResponseStatus(code=OK) public Version getVersion(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionKey) throws Exception
      Gets the version with the given fields.
      Throws:
      Exception
    • getVersionCmf

      @GetMapping("/versions.cmf/{versionKey}") @ResponseStatus(code=OK) public Object getVersionCmf(@PathVariable String stewardKey, @PathVariable String modelKey, @PathVariable String versionKey, @RequestParam(required=false,defaultValue="json") Config.AppMediaType mediaType) throws Exception
      Gets the version with the given fields in CMF.
      Throws:
      Exception
    • getVersions

      @GetMapping("/versions") @ResponseStatus(code=OK) public List<Version> getVersions(@PathVariable String stewardKey, @PathVariable String modelKey) throws Exception
      Gets all versions from the model with the given fields.
      Throws:
      Exception