From dd87a58873c9e9dfba23eb2d5af21cfc0c4f3aa8 Mon Sep 17 00:00:00 2001 From: Danila_Mochalov Date: Sat, 15 Apr 2023 23:50:16 +0400 Subject: [PATCH] Half Lab5 --- build.gradle | 14 ++- data.mv.db | Bin 53248 -> 118784 bytes front/lab4_vue_front | 2 +- .../webproglabs/lab1/WebConfiguration.java | 7 ++ .../lab34/controller/CommentController.java | 3 +- .../lab1/lab34/controller/CommentDto.java | 6 +- .../lab1/lab34/controller/PostController.java | 3 +- .../lab1/lab34/controller/PostDto.java | 10 ++- .../lab34/controller/ProfileController.java | 3 +- .../lab1/lab34/controller/ProfileDto.java | 6 +- .../mvc_controllers/FeedMvcController.java | 75 ++++++++++++++++ .../mvc_controllers/ProfileMvcController.java | 15 ++++ .../lab1/lab34/services/PostService.java | 2 +- src/main/resources/public/css/style.css | 15 ++++ src/main/resources/public/favicon.svg | 4 + src/main/resources/templates/default.html | 38 ++++++++ .../resources/templates/editPostModal.html | 37 ++++++++ src/main/resources/templates/feed.html | 36 ++++++++ src/main/resources/templates/feedPosts.html | 81 ++++++++++++++++++ 19 files changed, 348 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/webproglabs/lab1/lab34/controller/mvc_controllers/FeedMvcController.java create mode 100644 src/main/java/com/webproglabs/lab1/lab34/controller/mvc_controllers/ProfileMvcController.java create mode 100644 src/main/resources/public/css/style.css create mode 100644 src/main/resources/public/favicon.svg create mode 100644 src/main/resources/templates/default.html create mode 100644 src/main/resources/templates/editPostModal.html create mode 100644 src/main/resources/templates/feed.html create mode 100644 src/main/resources/templates/feedPosts.html diff --git a/build.gradle b/build.gradle index f2e7794..53e4666 100644 --- a/build.gradle +++ b/build.gradle @@ -14,11 +14,23 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' - testImplementation 'org.springframework.boot:spring-boot-starter-test' + implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' + implementation 'org.springframework.boot:spring-boot-devtools' + implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect' + + implementation 'org.webjars:bootstrap:5.1.3' + implementation 'org.webjars:jquery:3.6.0' + implementation 'org.webjars:font-awesome:6.1.0' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'com.h2database:h2:2.1.210' + implementation 'org.hibernate.validator:hibernate-validator' + implementation 'org.springdoc:springdoc-openapi-ui:1.6.5' + + testImplementation 'org.springframework.boot:spring-boot-starter-test' + } tasks.named('test') { diff --git a/data.mv.db b/data.mv.db index 2f670b1664fa9bbc905dbf87fedc939a8b531658..e689d5469bceecb261a673ce02f18be79c7451e0 100644 GIT binary patch literal 118784 zcmeHwU2q-Oec#>-fLMOXl4Z%REGMfgQ6ysu-g9>M>@FP31c3|S62Jv{?*$2JQe*a0 z;+P~@5|pJhosm-4@w78}$fTK!n(2&N*NL69W5;egog`Dcj+Ca8W`I0+n!Lr2oz8Uf zkcYnYw;yNs+%MpQ1T9cJ(1`c!?%A{d{hyCL|F7SFahjgK&1DTDVy15eoJ$EC5CI8$_@Afne@$(j30UZ6@ zZSVEy?zD04&gSOUv}eLQK&OuFn&-Bz-;AbB+llQsW`!#N+Pi)I*6ilJTU%&sYcrS* z?La$_KR6T|J$m#vl!>R5N_A{};>e_W^w{weC!hG(lTTHY7qpkx+x3n%+p5oW>Khl< z8q0GUCAw16YA3&1$xdr)?RraV%xlfnj#gi9v^#CB)}Emx+8=-CYsy*h z_ulS9l@qZs-)hvGb8XJ%ORd%U#&TU4c)epczhO`faPb$wMLtW`nvKhA^}fNdwzM%< zXZEbF8%BNovc9@_vAMR;AZ>ejX(Jsu8|D!1mekfnGLo6q*5(_ncIT|}S#bW_mEBoi zv@^U5cB8VUWv_Ndq~h%Tz34m1-}$j~+KVTb@-A!F!M5hCxUwuZF4SAiWNqXZvFvqb zS{?0bqqC?HtyLEfv5=#^iwD)7Yb&pyU$5uw_0I13C3|6|v$RlOxkSx{&fMxXdU^HY z+7-62koV{CwWwU?x;k+Ro%okSI*~7A!~1R*f@<3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public PostDto(Post post){ this.id = post.getId(); this.text = post.getText(); for(Comment comment: post.getComments()){ comments.add(new CommentDto(comment)); } + this.authorLogin = post.getAuthor().getLogin(); } - public Long getId() {return id;} + @JsonProperty(access = JsonProperty.Access.READ_ONLY) + public long getId() { + return id; + } public String getText() {return text;} public List getComments() {return comments;} + public String getAuthor() {return authorLogin;} } diff --git a/src/main/java/com/webproglabs/lab1/lab34/controller/ProfileController.java b/src/main/java/com/webproglabs/lab1/lab34/controller/ProfileController.java index 46cb114..a0f80cc 100644 --- a/src/main/java/com/webproglabs/lab1/lab34/controller/ProfileController.java +++ b/src/main/java/com/webproglabs/lab1/lab34/controller/ProfileController.java @@ -1,5 +1,6 @@ package com.webproglabs.lab1.lab34.controller; +import com.webproglabs.lab1.WebConfiguration; import com.webproglabs.lab1.lab34.services.ProfileService; import org.springframework.web.bind.annotation.*; @@ -7,7 +8,7 @@ import java.util.ArrayList; import java.util.List; @RestController -@RequestMapping("/profile") +@RequestMapping(WebConfiguration.REST_API + "/profile") public class ProfileController { private final ProfileService profileService; diff --git a/src/main/java/com/webproglabs/lab1/lab34/controller/ProfileDto.java b/src/main/java/com/webproglabs/lab1/lab34/controller/ProfileDto.java index 29f948b..398331f 100644 --- a/src/main/java/com/webproglabs/lab1/lab34/controller/ProfileDto.java +++ b/src/main/java/com/webproglabs/lab1/lab34/controller/ProfileDto.java @@ -1,5 +1,6 @@ package com.webproglabs.lab1.lab34.controller; +import com.fasterxml.jackson.annotation.JsonProperty; import com.webproglabs.lab1.lab34.model.Comment; import com.webproglabs.lab1.lab34.model.Post; import com.webproglabs.lab1.lab34.model.Profile; @@ -26,7 +27,10 @@ public class ProfileDto { } } - public Long getId() {return id;} + @JsonProperty(access = JsonProperty.Access.READ_ONLY) + public long getId() { + return id; + } public String getLogin() {return login;} public String getPassword() {return password;} public List getComments() {return comments;} diff --git a/src/main/java/com/webproglabs/lab1/lab34/controller/mvc_controllers/FeedMvcController.java b/src/main/java/com/webproglabs/lab1/lab34/controller/mvc_controllers/FeedMvcController.java new file mode 100644 index 0000000..3acb327 --- /dev/null +++ b/src/main/java/com/webproglabs/lab1/lab34/controller/mvc_controllers/FeedMvcController.java @@ -0,0 +1,75 @@ +package com.webproglabs.lab1.lab34.controller.mvc_controllers; + +import com.webproglabs.lab1.lab34.controller.PostDto; +import com.webproglabs.lab1.lab34.controller.ProfileDto; +import com.webproglabs.lab1.lab34.model.Post; +import com.webproglabs.lab1.lab34.services.PostService; +import com.webproglabs.lab1.lab34.services.ProfileService; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; + +@Controller +@RequestMapping("/feed") +public class FeedMvcController { + + private final ProfileService profileService; + private final PostService postService; + + public FeedMvcController(ProfileService profileService, PostService postService) { + this.profileService = profileService; + this.postService = postService; + } + + @GetMapping + public String getFeedPage(Model model) { + model.addAttribute("profiles", profileService.findAllUsers().stream().map(ProfileDto::new).toList()); + return "feed"; + } + + @GetMapping(value = {"/{id}"}) + public String getFeedPageAuthorized(@PathVariable(required = false) Long id, Model model) { + model.addAttribute("profiles", profileService.findAllUsers().stream().map(ProfileDto::new).toList()); + model.addAttribute("posts", postService.findAllPosts().stream().map(PostDto::new).toList()); + model.addAttribute("selectedProfile", new ProfileDto(profileService.findUser(id))); + + return "feedPosts"; + } + + @GetMapping(value= {"/filter/{id}/"}) + public String getFeedPageFiltered(@PathVariable(required = false) Long id, @RequestParam(value="searchField") String searchField, Model model) { + model.addAttribute("profiles", profileService.findAllUsers().stream().map(ProfileDto::new).toList()); + model.addAttribute("posts", postService.findFilteredPosts(searchField).stream().map(PostDto::new).toList()); + model.addAttribute("selectedProfile", new ProfileDto(profileService.findUser(id))); + return "feedPosts"; + } + + @PostMapping(value={"/post/{id}/"}) + public String createPost(@PathVariable(required = false) Long id, @RequestParam(value="postInputField") String postInputField) { + postService.addPost(postInputField, new ArrayList<>(), id); + return "redirect:/feed/" + id.toString(); + } + + @PostMapping(value = {"/deletePost/{id}/{authorId}"}) + public String deletePost(@PathVariable(required = false) Long id, @PathVariable(required = false) Long authorId) { + postService.deletePost(id); + return "redirect:/feed/" + authorId.toString(); + } + + @GetMapping(value = {"postModal/{id}/{authorId}"}) + public String getPostEditModal(@PathVariable(required = false) Long id,@PathVariable(required = false) Long authorId, Model model) { + model.addAttribute("selectedPost", new PostDto(postService.findPost(id))); + model.addAttribute("profiles", profileService.findAllUsers().stream().map(ProfileDto::new).toList()); + model.addAttribute("posts", postService.findAllPosts().stream().map(PostDto::new).toList()); + model.addAttribute("selectedProfile", new ProfileDto(profileService.findUser(authorId))); + return "editPostModal"; + } + + @PostMapping(value = {"editPost/{id}/{authorId}/"}) + public String editPost(@PathVariable(required = false) Long id, @PathVariable(required = false) Long authorId, @RequestParam(value="postEditField") String postEditField) { + postService.updatePost(id, postEditField); + return "redirect:/feed/" + authorId.toString(); + } +} diff --git a/src/main/java/com/webproglabs/lab1/lab34/controller/mvc_controllers/ProfileMvcController.java b/src/main/java/com/webproglabs/lab1/lab34/controller/mvc_controllers/ProfileMvcController.java new file mode 100644 index 0000000..032ba34 --- /dev/null +++ b/src/main/java/com/webproglabs/lab1/lab34/controller/mvc_controllers/ProfileMvcController.java @@ -0,0 +1,15 @@ +package com.webproglabs.lab1.lab34.controller.mvc_controllers; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("/") +public class ProfileMvcController { + + @GetMapping + public String index() { + return "default"; + } +} diff --git a/src/main/java/com/webproglabs/lab1/lab34/services/PostService.java b/src/main/java/com/webproglabs/lab1/lab34/services/PostService.java index 43a7584..5b4abf7 100644 --- a/src/main/java/com/webproglabs/lab1/lab34/services/PostService.java +++ b/src/main/java/com/webproglabs/lab1/lab34/services/PostService.java @@ -53,7 +53,7 @@ public class PostService { } @Transactional - public Post addPost(String text, List comments, Long authorId) { + public Post addPost (String text, List comments, Long authorId) { if (!StringUtils.hasText(text)) { throw new IllegalArgumentException("Post data is null or empty"); } diff --git a/src/main/resources/public/css/style.css b/src/main/resources/public/css/style.css new file mode 100644 index 0000000..a68a220 --- /dev/null +++ b/src/main/resources/public/css/style.css @@ -0,0 +1,15 @@ +.container-padding { + padding: 10px; +} + +.margin-bottom { + margin-bottom: 10px; +} + +.button-fixed { + min-width: 120px; +} + +.button-sm { + padding: 1px; +} \ No newline at end of file diff --git a/src/main/resources/public/favicon.svg b/src/main/resources/public/favicon.svg new file mode 100644 index 0000000..c2e8ab2 --- /dev/null +++ b/src/main/resources/public/favicon.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html new file mode 100644 index 0000000..098c64a --- /dev/null +++ b/src/main/resources/templates/default.html @@ -0,0 +1,38 @@ + + + + + Лабораторная работа 5 + + + + + + + + + + + +
+

Лабораторная работа 5

+
+ + +
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/editPostModal.html b/src/main/resources/templates/editPostModal.html new file mode 100644 index 0000000..fcb157d --- /dev/null +++ b/src/main/resources/templates/editPostModal.html @@ -0,0 +1,37 @@ + + + + + + +
+ + + +
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/feed.html b/src/main/resources/templates/feed.html new file mode 100644 index 0000000..2b02dd5 --- /dev/null +++ b/src/main/resources/templates/feed.html @@ -0,0 +1,36 @@ + + + + + +
+
+ + +
+ + +
+
+ + + + \ No newline at end of file diff --git a/src/main/resources/templates/feedPosts.html b/src/main/resources/templates/feedPosts.html new file mode 100644 index 0000000..e6064e4 --- /dev/null +++ b/src/main/resources/templates/feedPosts.html @@ -0,0 +1,81 @@ + + + + + +
+ +
+

+
+
+ + Лента + +
+ +
+ + +
+ + +
+
+

+
+
+ Автор: + +
+
+
+ +
+
+ +
+
+
+
+
+ + + +
+ + +
+ + + + \ No newline at end of file