m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMagdalena Grodzińska <mag.grodzinska@gmail.com>2019-11-20 17:36:56 +0100
committerMagdalena Grodzińska <mag.grodzinska@gmail.com>2019-11-20 17:36:56 +0100
commit8fb9f91d90ecaddc8a7f06dddff44018ccc4de9f (patch)
tree61eb5199d569d7db5a15f2f8f537bebd448be458 /src/main
parent79c8f56efcf76e7916597c0ef0e554d9fb91f8f4 (diff)
Add attribute form controllers
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/client/Attribute.java51
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java11
2 files changed, 62 insertions, 0 deletions
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";
}
}