Info |
---|
This site will be updated by WebApp team |
Use case description: "transferring XML Event Tree representation with the Internet"
This page is also available in Polish - go to 7.
Aim
Transfer the tree with a web application and then store tree values in a database.
Initial conditions
Have an Event Tree in XML format to use with the application.
Final conditions
Successful tree transfer to a database.
Process
- Client application communicates with a REST server using POST method.
- Correct function is called which enables to switch to business logic layer. In this layer XML validation is conducted.
- New Data Model class object is being created.
- Proper Java Bean object is being used from business objects repository.
- Data Model object is being saved.
- In the next step, object saving status is being returned to REST server.
- Server returns appropriate status code to inform about operation success (200).
Alternative course
- XML validation failed, business logic layer generates exception.
- REST service returns appropriate status code to inform about operation failure (400).
Diagrams
Additional resources
...
Excerpt |
---|
Web AppThe web application is written using Spring Boot. The web app module consists of:
Database connectionTo connect to database you need to run the application and go to this link: localhost:8080/h2-console. There you have to put properties from application.properties there: It has to look like that: Full JDBC URL: jdbc:h2:./test;DB_CLOSE_DELAY=- 1;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE User name: user Password: pass Swagger DocumentationThe REST API documentation is available here: localhost:8080/swagger-ui.html If you want to see, what request parameters you have to send or what is response for some request, just click on the path that is point of your interest and read everything. Here is an example: DependenciesThe web app module uses following dependencies:
For versions of this dependencies, go to pom.xml in safety-web module. |