From 8fb9f91d90ecaddc8a7f06dddff44018ccc4de9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Wed, 20 Nov 2019 17:36:56 +0100 Subject: Add attribute form controllers --- .../pl/edu/mimuw/cloudatlas/client/Attribute.java | 51 ++++++++++++++++++++++ .../mimuw/cloudatlas/client/ClientController.java | 11 +++++ 2 files changed, 62 insertions(+) create mode 100644 src/main/java/pl/edu/mimuw/cloudatlas/client/Attribute.java (limited to 'src/main/java/pl/edu/mimuw/cloudatlas') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/client/Attribute.java b/src/main/java/pl/edu/mimuw/cloudatlas/client/Attribute.java new file mode 100644 index 0000000..abaa02a --- /dev/null +++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/Attribute.java @@ -0,0 +1,51 @@ +package pl.edu.mimuw.cloudatlas.client; + +import pl.edu.mimuw.cloudatlas.model.Value; + +public class Attribute { + private String zoneName; + private String attributeName; + private String valueString; + private String attributeType; + private Value value; + + public String getZoneName() { + return zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + public String getValueString() { + return valueString; + } + + public void setValueString(String valueString) { + this.valueString = valueString; + } + + public Value getValue() { + return value; + } + + public void setValue(Value value) { + this.value = value; + } + + public String getAttributeType() { + return attributeType; + } + + public void setAttributeType(String attributeType) { + this.attributeType = attributeType; + } +} diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java index 31d1c06..27c7ad4 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java @@ -123,6 +123,17 @@ public class ClientController { @GetMapping("/attribs") public String attribPage(Model model) { + model.addAttribute("attributeObject", new Attribute()); + return "attribForm"; + } + + @PostMapping("/attribs") + public String attribPage(@ModelAttribute Attribute attributeObject, Model model) { + return "attribForm"; + } + + @GetMapping("/values") + public String valuesPage(Model model) { return "attribChart"; } } -- cgit v1.2.3