ModelController

@RestController
class ModelController(val modelService: ModelService, val metadataService: MetadataService)

Constructors

Link copied to clipboard
constructor(modelService: ModelService, metadataService: MetadataService)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
@GetMapping(value = ["model/reference"], produces = ["application/xml"])
fun getReferenceModel(): Fragment?

Get the active reference model (fragment) as closed model.

Link copied to clipboard
@PostMapping(value = ["model/variant"], produces = ["application/xml"])
fun postNewVariant(@RequestParam(required = false, name = "variant_id") variantID: String?, @RequestParam(required = false, name = "variant_name") name: String?): String

Create a new variant. If an existing variant is specified, the new variant will be initialized with a copy of the model. If no existing variant is specified, a new empty variant with the given name is constructed.

Link copied to clipboard
@PostMapping(value = ["model/variant/reference"], produces = ["application/xml"])
fun postReference(@RequestParam(required = false, name = "running_UUID") runningUID: String, @RequestParam(required = false, name = "variant_UUID") variantUID: String): String

Activate the specified variant as reference model.

Link copied to clipboard
@PutMapping(value = ["model"], produces = ["application/xml"], consumes = ["application/xml"])
fun putModelOfVariant(@RequestParam(required = false, name = "variant_UUID") variantUID: String?, @RequestParam(required = false, name = "variant_name") name: String?, @RequestParam(required = false, name = "as_version") asVersion: Boolean = false, @RequestBody fragment: Fragment): String

Set a complete model (Fragment). If the specified variant is existent, a new running version will be created. if the variant is not present, a new variant with the given name is initialized with the specified model as an initial version