This repository contains the server component of the Board. It is a Spring Boot application that serves JSON data to power the frontend website and API.
For building and running the application you need:
There are several ways to run a Spring Boot application on your local machine. One way is to execute the main
method in the ru.lok.board.boardApplication
class from your IDE.
Alternatively you can use the Spring Boot Maven plugin like so:
mvn spring-boot:run
There are four main entities in the system that a user may interact with: User, Task, Comment, and Department. These entities form a hierarchy that is reflected in the API endpoints. A Department has one or more Task, each of which may have one or more Comments. User has one or more Task.
For most users, the primary entry point for the CIViC API will be the Task endpoint. This endpoint allows a user to retrieve information about what Task are in Board.
This endpoint returns a listing of Task in Board. You can use the {page} and {pageSize} parameters to iterate through all the variants.
HTTP Request
GET http://localhost:8080/task/{page}/{pageSize}
This endpoint adds a task to the Board.
HTTP Request
POST http://localhost:8080/task
RequestBody: {"userId":" ", "departmentId":"", "title": "", "message":""}
This endpoint renews a task to the Board.
HTTP Request
PUT http://localhost:8080/task
RequestBody: {"id":"", "userId":"", "departmentId":"", "title":"", "message":""}
This endpoint sets the completion flag for the task with the {id}.
HTTP Request
GET http://localhost:8080/task/{id}/setcomplit
This endpoint adds a department to the Board.
HTTP Request
POST http://localhost:8080/department
RequestBody: {"id":"", "nameDepartment":"", "title":""}
Returns a list of department tasks. IdDepatment - {idDep}.
HTTP Request
GET http://localhost:8080/department/{idDep}/task/{page}/{pageSize}
This endpoint delete a department on the Board. IdDepatment - {idDep}.
HTTP Request
DELETE http://localhost:8080/department/delete/{idDep}
##User
This endpoint returns a listing of User in Board. You can use the {page} and {pageSize} parameters to iterate through all the variants.
HTTP Request
GET http://localhost:8080/user/{page}/{pageSize}
This endpoint adds a user.
HTTP Request
POST http://localhost:8080/user
RequestBody: {"username":"", "password":""}
This endpoint udates a user.
HTTP Request
PUT http://localhost:8080/user
RequestBody: {"id":"", "username":"", "password":""}
This endpoint searches for a user by username.
HTTP Request
GET http://localhost:8080/user/serch/{username}
##Comment
This endpoint searches for a comment by id.
HTTP Request
GET http://localhost:8080/comment/{{id}}
This endpoint adds a comment.
HTTP Request
POST http://localhost:8080/comment
RequestBody: {"taskId":"", "username":"", "message":""}
This endpoint deletes a comment.
HTTP Request
DELETE http://localhost:8080/comment/{id}
This endpoint gives a list of comments for a task. HTTP Request
GET http://localhost:8080/comment/task/{taskId}/{page}/{pageSize}
Released under the MIT License
Copyright 2021 Barannikov Mikhail
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.