diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_11.xml b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_11.xml
new file mode 100644
index 0000000..c6ea67e
--- /dev/null
+++ b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_11.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_11.xml b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_11.xml
new file mode 100644
index 0000000..f538e36
--- /dev/null
+++ b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_11.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml b/.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml
new file mode 100644
index 0000000..33c30b4
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_8_0.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_8_0.xml
new file mode 100644
index 0000000..49b4ec7
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_8_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_2.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_2.xml
new file mode 100644
index 0000000..f0f5ccb
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_2.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_2.xml
new file mode 100644
index 0000000..25753a3
--- /dev/null
+++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_2_0.xml b/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_2_0.xml
new file mode 100644
index 0000000..578b079
--- /dev/null
+++ b/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_2_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml
new file mode 100644
index 0000000..b8581a6
--- /dev/null
+++ b/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__javax_validation_validation_api_1_1_0_Final.xml b/.idea/libraries/Maven__javax_validation_validation_api_1_1_0_Final.xml
new file mode 100644
index 0000000..940ce73
--- /dev/null
+++ b/.idea/libraries/Maven__javax_validation_validation_api_1_1_0_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__junit_junit_4_12.xml b/.idea/libraries/Maven__junit_junit_4_12.xml
new file mode 100644
index 0000000..d411041
--- /dev/null
+++ b/.idea/libraries/Maven__junit_junit_4_12.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_minidev_accessors_smart_1_1.xml b/.idea/libraries/Maven__net_minidev_accessors_smart_1_1.xml
new file mode 100644
index 0000000..88d626e
--- /dev/null
+++ b/.idea/libraries/Maven__net_minidev_accessors_smart_1_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_minidev_json_smart_2_2_1.xml b/.idea/libraries/Maven__net_minidev_json_smart_2_2_1.xml
new file mode 100644
index 0000000..6c692c8
--- /dev/null
+++ b/.idea/libraries/Maven__net_minidev_json_smart_2_2_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_8_5_23.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_8_5_23.xml
new file mode 100644
index 0000000..99e8c9e
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_8_5_23.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_8_5_23.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_8_5_23.xml
new file mode 100644
index 0000000..9837b75
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_8_5_23.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_5_23.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_5_23.xml
new file mode 100644
index 0000000..6a989bb
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_5_23.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_tomcat_tomcat_annotations_api_8_5_23.xml b/.idea/libraries/Maven__org_apache_tomcat_tomcat_annotations_api_8_5_23.xml
new file mode 100644
index 0000000..4aba27a
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_tomcat_tomcat_annotations_api_8_5_23.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_assertj_assertj_core_2_6_0.xml b/.idea/libraries/Maven__org_assertj_assertj_core_2_6_0.xml
new file mode 100644
index 0000000..58bdc9a
--- /dev/null
+++ b/.idea/libraries/Maven__org_assertj_assertj_core_2_6_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
new file mode 100644
index 0000000..f58bbc1
--- /dev/null
+++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml
new file mode 100644
index 0000000..78dbe45
--- /dev/null
+++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hibernate_hibernate_validator_5_3_6_Final.xml b/.idea/libraries/Maven__org_hibernate_hibernate_validator_5_3_6_Final.xml
new file mode 100644
index 0000000..3c0ddd4
--- /dev/null
+++ b/.idea/libraries/Maven__org_hibernate_hibernate_validator_5_3_6_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_1_Final.xml b/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_1_Final.xml
new file mode 100644
index 0000000..6dc7a37
--- /dev/null
+++ b/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_1_Final.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_mockito_mockito_core_1_10_19.xml b/.idea/libraries/Maven__org_mockito_mockito_core_1_10_19.xml
new file mode 100644
index 0000000..a523703
--- /dev/null
+++ b/.idea/libraries/Maven__org_mockito_mockito_core_1_10_19.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml b/.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml
new file mode 100644
index 0000000..7ab319b
--- /dev/null
+++ b/.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_ow2_asm_asm_5_0_3.xml b/.idea/libraries/Maven__org_ow2_asm_asm_5_0_3.xml
new file mode 100644
index 0000000..da69f6c
--- /dev/null
+++ b/.idea/libraries/Maven__org_ow2_asm_asm_5_0_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_4_0.xml b/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_4_0.xml
new file mode 100644
index 0000000..f86d2c8
--- /dev/null
+++ b/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_4_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml
new file mode 100644
index 0000000..bae9949
--- /dev/null
+++ b/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml
new file mode 100644
index 0000000..6073e53
--- /dev/null
+++ b/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_log4j_over_slf4j_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_log4j_over_slf4j_1_7_25.xml
new file mode 100644
index 0000000..a14ac63
--- /dev/null
+++ b/.idea/libraries/Maven__org_slf4j_log4j_over_slf4j_1_7_25.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml
new file mode 100644
index 0000000..20e8163
--- /dev/null
+++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_1_5_9_RELEASE.xml
new file mode 100644
index 0000000..44dc419
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_1_5_9_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_1_5_9_RELEASE.xml
new file mode 100644
index 0000000..4c3a2b7
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_1_5_9_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_1_5_9_RELEASE.xml
new file mode 100644
index 0000000..c6ba5e1
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_1_5_9_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_1_5_9_RELEASE.xml
new file mode 100644
index 0000000..33c0b1c
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_1_5_9_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_1_5_9_RELEASE.xml
new file mode 100644
index 0000000..d7db397
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_1_5_9_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_1_5_9_RELEASE.xml
new file mode 100644
index 0000000..ed7b340
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_1_5_9_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_1_5_9_RELEASE.xml
new file mode 100644
index 0000000..f0bd94f
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_1_5_9_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_1_5_9_RELEASE.xml
new file mode 100644
index 0000000..9312efe
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_1_5_9_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_1_5_9_RELEASE.xml
new file mode 100644
index 0000000..07d7bca
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_1_5_9_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_aop_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_aop_4_3_13_RELEASE.xml
new file mode 100644
index 0000000..e06e71e
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_aop_4_3_13_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_beans_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_beans_4_3_13_RELEASE.xml
new file mode 100644
index 0000000..0a8cafe
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_beans_4_3_13_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_context_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_context_4_3_13_RELEASE.xml
new file mode 100644
index 0000000..8050852
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_context_4_3_13_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_core_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_core_4_3_13_RELEASE.xml
new file mode 100644
index 0000000..b95dd78
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_core_4_3_13_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_expression_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_expression_4_3_13_RELEASE.xml
new file mode 100644
index 0000000..7a825ff
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_expression_4_3_13_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_test_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_test_4_3_13_RELEASE.xml
new file mode 100644
index 0000000..0c0fcbf
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_test_4_3_13_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_web_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_web_4_3_13_RELEASE.xml
new file mode 100644
index 0000000..31aebfb
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_web_4_3_13_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_webmvc_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_webmvc_4_3_13_RELEASE.xml
new file mode 100644
index 0000000..01a3291
--- /dev/null
+++ b/.idea/libraries/Maven__org_springframework_spring_webmvc_4_3_13_RELEASE.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml
new file mode 100644
index 0000000..20e2920
--- /dev/null
+++ b/.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 4545c7a..3762c51 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,6 +10,12 @@
jar
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 1.5.9.RELEASE
+
+
@@ -18,6 +24,10 @@
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
com.zenjava
javafx-maven-plugin
@@ -88,5 +98,26 @@
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ 2.9.2
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ 2.9.2
+
+
\ No newline at end of file
diff --git a/restClient.iml b/restClient.iml
index c035f0b..67ea48e 100644
--- a/restClient.iml
+++ b/restClient.iml
@@ -11,5 +11,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/ru/cft/task/restClient/ConfigController.java b/src/main/java/ru/cft/task/restClient/ConfigController.java
new file mode 100644
index 0000000..16583ca
--- /dev/null
+++ b/src/main/java/ru/cft/task/restClient/ConfigController.java
@@ -0,0 +1,82 @@
+package ru.cft.task.restClient;
+
+import javafx.fxml.FXML;
+import javafx.scene.control.Button;
+import javafx.scene.control.TextField;
+import javafx.stage.Stage;
+
+import java.io.*;
+import java.util.Properties;
+
+public class ConfigController {
+ private Properties props;
+ private InputStream conf_file = null;
+ private OutputStream save_file = null;
+ private static final String CONF_FILE = "config.properties";
+
+ @FXML
+ private TextField url;
+
+ @FXML
+ private TextField port;
+
+ @FXML
+ private Button cancel;
+
+ @FXML
+ private Button save;
+
+ @FXML
+ public void initialize() {
+ props = new Properties();
+ try {
+ File cf = new File(CONF_FILE);
+ if (!cf.exists()) {
+ cf.createNewFile();
+ Utils.showAlert("warn", "Нет сохраненного файла настроек.\n" +
+ "Будут установлены умолчательные параметры.\n" +
+ "Необходимо изменить и сохранить.");
+ }
+ conf_file = new FileInputStream(CONF_FILE);
+ props.load(conf_file);
+ url.setText(props.getProperty("url", "http://localhost"));
+ port.setText(props.getProperty("port", "8080"));
+ } catch (IOException ex) {
+ Utils.showAlert("error", ex.getMessage());
+ } finally {
+ if (conf_file != null) {
+ try {
+ conf_file.close();
+ } catch (IOException ex) {
+ Utils.showAlert("error", ex.getMessage());
+ }
+ }
+ }
+ }
+
+ public void saveAction() {
+ try {
+ save_file = new FileOutputStream(CONF_FILE);
+ props.setProperty("url", url.getText());
+ props.setProperty("port", port.getText());
+ props.store(save_file, "Rest server config");
+ Stage stage = (Stage) save.getScene().getWindow();
+ stage.close();
+ } catch (IOException ex) {
+ Utils.showAlert("error", ex.getMessage());
+ } finally {
+ if (save_file != null) {
+ try {
+ save_file.close();
+ } catch (IOException ex) {
+ System.err.println(ex.getMessage());
+ }
+ }
+ }
+ }
+
+ public void cancelAction() {
+ Stage stage = (Stage) cancel.getScene().getWindow();
+ stage.close();
+ }
+}
diff --git a/src/main/java/ru/cft/task/restClient/Main.java b/src/main/java/ru/cft/task/restClient/Main.java
index 6da35c0..2eb346e 100644
--- a/src/main/java/ru/cft/task/restClient/Main.java
+++ b/src/main/java/ru/cft/task/restClient/Main.java
@@ -16,6 +16,9 @@ public class Main extends Application {
Scene scene = new Scene(root);
stage.setTitle("Rest Client");
stage.setScene(scene);
+ stage.centerOnScreen();
+ MainController controller = new MainController();
+ controller.setMainApp(stage);
stage.show();
}
}
diff --git a/src/main/java/ru/cft/task/restClient/MainController.java b/src/main/java/ru/cft/task/restClient/MainController.java
new file mode 100644
index 0000000..b6db02a
--- /dev/null
+++ b/src/main/java/ru/cft/task/restClient/MainController.java
@@ -0,0 +1,82 @@
+package ru.cft.task.restClient;
+
+import javafx.fxml.FXML;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Scene;
+import javafx.scene.control.MenuItem;
+import javafx.stage.Modality;
+import javafx.stage.Stage;
+
+import java.io.IOException;
+
+public class MainController {
+
+ private Stage mainStage;
+
+ public void setMainApp(Stage mainStage) {
+ this.mainStage = mainStage;
+ }
+
+ public Stage getMainApp() {
+ return this.mainStage;
+ }
+
+ @FXML
+ private MenuItem srv_config;
+ @FXML
+ private MenuItem create;
+ @FXML
+ private MenuItem read;
+ @FXML
+ private MenuItem update;
+ @FXML
+ private MenuItem delete;
+
+ public void quitApp() {
+ System.exit(0);
+ }
+
+ private Stage showModal(String fxml, String title) {
+ Stage stage = null;
+ try {
+ Scene scene = new Scene(FXMLLoader.load(getClass().getResource(fxml)));
+ stage = new Stage();
+ stage.setScene(scene);
+ stage.setResizable(false);
+ stage.centerOnScreen();
+ stage.setTitle(title);
+ stage.initOwner(mainStage);
+ stage.initModality(Modality.APPLICATION_MODAL);
+ return stage;
+ } catch (IOException e) {
+ Utils.showAlert("error", e.getMessage());
+ } finally {
+ return stage;
+ }
+ }
+
+ public void showServerConfig() {
+ Stage config = showModal("/config.fxml", srv_config.getText());
+ config.showAndWait();
+ }
+
+ public void createAction() {
+ Stage cr = showModal("/form.fxml", create.getText());
+ cr.showAndWait();
+ }
+
+ public void readAction() {
+ Stage rd = showModal("/form.fxml", read.getText());
+ rd.showAndWait();
+ }
+
+ public void updateAction() {
+ Stage upd = showModal("/form.fxml", update.getText());
+ upd.showAndWait();
+ }
+
+ public void deleteAction() {
+ Stage dlt = showModal("/form.fxml", delete.getText());
+ dlt.showAndWait();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/ru/cft/task/restClient/RestActionsController.java b/src/main/java/ru/cft/task/restClient/RestActionsController.java
new file mode 100644
index 0000000..ca5e41e
--- /dev/null
+++ b/src/main/java/ru/cft/task/restClient/RestActionsController.java
@@ -0,0 +1,28 @@
+package ru.cft.task.restClient;
+
+import javafx.fxml.FXML;
+import javafx.scene.control.Button;
+import javafx.scene.control.TextField;
+import javafx.stage.Stage;
+
+public class RestActionsController {
+ @FXML
+ private TextField id;
+
+ @FXML
+ private TextField name;
+
+ @FXML
+ private TextField email;
+
+ @FXML
+ private Button cancel;
+
+ @FXML
+ private Button doAction;
+
+ public void cancelAction() {
+ Stage stage = (Stage) cancel.getScene().getWindow();
+ stage.close();
+ }
+}
diff --git a/src/main/java/ru/cft/task/restClient/Utils.java b/src/main/java/ru/cft/task/restClient/Utils.java
new file mode 100644
index 0000000..524055c
--- /dev/null
+++ b/src/main/java/ru/cft/task/restClient/Utils.java
@@ -0,0 +1,38 @@
+package ru.cft.task.restClient;
+
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Scene;
+import javafx.scene.control.Alert;
+import javafx.stage.Modality;
+import javafx.stage.Stage;
+
+import java.io.IOException;
+
+public class Utils {
+ public static void showAlert(String type, String message) {
+ Alert.AlertType alertType;
+
+ switch (type) {
+ case "info":
+ alertType = Alert.AlertType.INFORMATION;
+ break;
+ case "error":
+ alertType = Alert.AlertType.ERROR;
+ break;
+ case "warn":
+ alertType = Alert.AlertType.INFORMATION;
+ break;
+ case "confirm":
+ alertType = Alert.AlertType.CONFIRMATION;
+ break;
+ default:
+ alertType = Alert.AlertType.NONE;
+ break;
+ }
+ Alert alert = new Alert(alertType);
+ alert.setHeaderText(null);
+ alert.setTitle(type.toUpperCase());
+ alert.setContentText(message);
+ alert.showAndWait();
+ }
+}
diff --git a/src/main/resources/config.fxml b/src/main/resources/config.fxml
new file mode 100644
index 0000000..46a8b04
--- /dev/null
+++ b/src/main/resources/config.fxml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/form.fxml b/src/main/resources/form.fxml
new file mode 100644
index 0000000..42227b1
--- /dev/null
+++ b/src/main/resources/form.fxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/main_app.fxml b/src/main/resources/main_app.fxml
index 1abe341..5a94d84 100644
--- a/src/main/resources/main_app.fxml
+++ b/src/main/resources/main_app.fxml
@@ -1,12 +1,35 @@
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+