Package gov.niem.tools.api.db.version
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetVersion
(String stewardKey, String modelKey, String versionKey) Gets the version with the given fields.getVersionCmf
(String stewardKey, String modelKey, String versionKey, Config.AppMediaType mediaType) Gets the version with the given fields in CMF.getVersions
(String stewardKey, String modelKey) Gets all versions from the model with the given fields.
-
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
-