From b6afef33fac1be469af108fd0b417178025b2730 Mon Sep 17 00:00:00 2001 From: Hiroyuki Adachi Date: Fri, 3 Feb 2023 22:51:18 +0900 Subject: [PATCH] refactor: #35 keeping codes clean. --- README.md | 8 +++--- model/pom.xml | 10 +++---- .../blog/entity/Category.java | 5 ++-- .../blog/entity/Entry.java | 3 +- .../blog/entity/EntryTag.java | 5 ++-- .../blog/entity/Tag.java | 3 +- .../blog/entity/User.java | 5 ++-- .../blog/repository/CategoryRepository.java | 6 ++-- .../blog/repository/EntryRepository.java | 7 ++--- .../blog/repository/EntryTagRepository.java | 9 +++--- .../blog/repository/TagRepository.java | 5 ++-- .../blog/repository/UserRepository.java | 5 ++-- .../test/resources/META-INF/persistence.xml | 2 +- model/src/test/resources/log4j.xml | 2 +- .../blog/data-config.xml | 4 +-- .../blog/test-app-config.xml | 0 mvc/pom.xml | 13 ++++----- .../blog/controller/EntryController.java | 19 ++++++------- .../blog/controller/FeedController.java | 9 +++--- .../blog/controller/PermalinkController.java | 9 +++--- .../blog/controller/SettingController.java | 13 ++++----- .../blog/form/EntryForm.java | 3 +- .../blog/model/EntryModel.java | 3 +- .../blog/model/FeedModel.java | 3 +- .../blog/response/EntryResponse.java | 5 ++-- .../blog/view/SimpleAtomFeedView.java | 11 ++++---- .../blog/view/SimpleRssFeedView.java | 11 ++++---- pom.xml | 10 +++---- service/pom.xml | 14 ++++------ .../blog/dto/EntryDto.java | 3 +- .../blog/functor/AllEntryFactory.java | 13 ++++----- .../blog/functor/CodeToEntryTransformer.java | 13 ++++----- .../blog/functor/DeleteEntryClosure.java | 7 ++--- .../blog/functor/IdToEntryTransformer.java | 11 ++++---- .../blog/functor/SaveEntryClosure.java | 13 ++++----- .../blog/service/EntryService.java | 5 ++-- .../blog/service/FeedService.java | 5 ++-- .../blog/service/SimpleEntryService.java | 5 ++-- .../blog/service/SimpleFeedService.java | 5 ++-- .../blog/util/CategoryUtils.java | 11 ++++---- .../blog/util/EntryUtils.java | 13 ++++----- .../blog/util/GeneralUtils.java | 3 +- .../blog/util/TagUtils.java | 13 ++++----- .../blog/util/UserUtils.java | 9 +++--- .../blog/util/GeneralUtilsTest.java | 2 +- service/src/test/resources/log4j.xml | 2 +- webapp/pom.xml | 13 ++++----- .../META-INF/dozer/dozer-mapping.xml | 2 +- .../main/resources/META-INF/persistence.xml | 12 ++++---- .../functor/dhtml/ProfileUpdateClosure.js | 2 +- webapp/src/main/resources/assets/index.js | 2 +- .../style/{exmp-blog.scss => expt-blog.scss} | 0 webapp/src/main/resources/db.properties | 4 +-- webapp/src/main/resources/log4j.xml | 2 +- .../webapp/WEB-INF/i18n/messages.properties | 4 +-- .../main/webapp/WEB-INF/spring/app-config.xml | 6 ++-- .../webapp/WEB-INF/spring/data-config.xml | 6 ++-- .../webapp/WEB-INF/spring/locale-config.xml | 2 +- .../main/webapp/WEB-INF/spring/mvc-config.xml | 2 +- ...p-blog-config.xml => expt-blog-config.xml} | 28 +++++++++---------- .../main/webapp/WEB-INF/templates/footer.jsp | 2 +- .../main/webapp/WEB-INF/templates/header.jsp | 2 +- .../main/webapp/WEB-INF/templates/main.jsp | 2 +- .../main/webapp/WEB-INF/templates/menu.jsp | 2 +- .../main/webapp/WEB-INF/templates/sidebar.jsp | 2 +- .../WEB-INF/views/content/_entryContent.jsp | 1 - .../WEB-INF/views/content/permalink.jsp | 2 +- .../src/main/webapp/WEB-INF/views/index.jsp | 2 +- .../webapp/WEB-INF/views/sidebar/_profile.jsp | 2 +- webapp/src/main/webapp/WEB-INF/web.xml | 2 +- .../{exmp-blog.min.js => expt-blog.min.js} | 16 +++++------ webapp/webpack.config.js | 4 +-- 72 files changed, 208 insertions(+), 251 deletions(-) rename model/src/main/java/org/{examproject => expt}/blog/entity/Category.java (96%) rename model/src/main/java/org/{examproject => expt}/blog/entity/Entry.java (98%) rename model/src/main/java/org/{examproject => expt}/blog/entity/EntryTag.java (97%) rename model/src/main/java/org/{examproject => expt}/blog/entity/Tag.java (97%) rename model/src/main/java/org/{examproject => expt}/blog/entity/User.java (97%) rename model/src/main/java/org/{examproject => expt}/blog/repository/CategoryRepository.java (90%) rename model/src/main/java/org/{examproject => expt}/blog/repository/EntryRepository.java (86%) rename model/src/main/java/org/{examproject => expt}/blog/repository/EntryTagRepository.java (83%) rename model/src/main/java/org/{examproject => expt}/blog/repository/TagRepository.java (90%) rename model/src/main/java/org/{examproject => expt}/blog/repository/UserRepository.java (90%) rename model/src/test/resources/org/{examproject => expt}/blog/data-config.xml (95%) rename model/src/test/resources/org/{examproject => expt}/blog/test-app-config.xml (100%) rename mvc/src/main/java/org/{examproject => expt}/blog/controller/EntryController.java (95%) rename mvc/src/main/java/org/{examproject => expt}/blog/controller/FeedController.java (95%) rename mvc/src/main/java/org/{examproject => expt}/blog/controller/PermalinkController.java (93%) rename mvc/src/main/java/org/{examproject => expt}/blog/controller/SettingController.java (92%) rename mvc/src/main/java/org/{examproject => expt}/blog/form/EntryForm.java (96%) rename mvc/src/main/java/org/{examproject => expt}/blog/model/EntryModel.java (96%) rename mvc/src/main/java/org/{examproject => expt}/blog/model/FeedModel.java (95%) rename mvc/src/main/java/org/{examproject => expt}/blog/response/EntryResponse.java (89%) rename mvc/src/main/java/org/{examproject => expt}/blog/view/SimpleAtomFeedView.java (93%) rename mvc/src/main/java/org/{examproject => expt}/blog/view/SimpleRssFeedView.java (91%) rename service/src/main/java/org/{examproject => expt}/blog/dto/EntryDto.java (96%) rename service/src/main/java/org/{examproject => expt}/blog/functor/AllEntryFactory.java (90%) rename service/src/main/java/org/{examproject => expt}/blog/functor/CodeToEntryTransformer.java (91%) rename service/src/main/java/org/{examproject => expt}/blog/functor/DeleteEntryClosure.java (93%) rename service/src/main/java/org/{examproject => expt}/blog/functor/IdToEntryTransformer.java (91%) rename service/src/main/java/org/{examproject => expt}/blog/functor/SaveEntryClosure.java (91%) rename service/src/main/java/org/{examproject => expt}/blog/service/EntryService.java (91%) rename service/src/main/java/org/{examproject => expt}/blog/service/FeedService.java (89%) rename service/src/main/java/org/{examproject => expt}/blog/service/SimpleEntryService.java (95%) rename service/src/main/java/org/{examproject => expt}/blog/service/SimpleFeedService.java (92%) rename service/src/main/java/org/{examproject => expt}/blog/util/CategoryUtils.java (91%) rename service/src/main/java/org/{examproject => expt}/blog/util/EntryUtils.java (95%) rename service/src/main/java/org/{examproject => expt}/blog/util/GeneralUtils.java (96%) rename service/src/main/java/org/{examproject => expt}/blog/util/TagUtils.java (93%) rename service/src/main/java/org/{examproject => expt}/blog/util/UserUtils.java (91%) rename service/src/test/java/org/{examproject => expt}/blog/util/GeneralUtilsTest.java (95%) rename webapp/src/main/resources/assets/style/{exmp-blog.scss => expt-blog.scss} (100%) rename webapp/src/main/webapp/WEB-INF/spring/user/{exmp-blog-config.xml => expt-blog-config.xml} (74%) rename webapp/src/main/webapp/docroot/scripts/{exmp-blog.min.js => expt-blog.min.js} (99%) diff --git a/README.md b/README.md index 122bd69..7fa68ef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# blog-examproject +# expt-blog --- ## What's this? @@ -35,11 +35,11 @@ to stop the application hit ctrl + c --- ## Repository on Github. -[hiroxpepe/blog-examproject](https://github.com/hiroxpepe/blog-examproject) +[hiroxpepe/expt-blog](https://github.com/hiroxpepe/expt-blog) --- ## Running on Heroku. -http://blog-examproject.herokuapp.com/ +http://expt-blog.herokuapp.com/ --- ## Author @@ -47,5 +47,5 @@ http://blog-examproject.herokuapp.com/ --- ## License -The examproject is released under version 2.0 of the +The expt is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0). diff --git a/model/pom.xml b/model/pom.xml index 58b5dc3..de096eb 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -2,15 +2,14 @@ 4.0.0 - - org.examproject.blog - exmp-model + org.expt.blog + expt-model jar - 1.0.3 + 1.0.4 model - ${version} + ${version} 2.3.0.RELEASE 5.2.6.RELEASE 5.4.17.Final @@ -178,5 +177,4 @@ - diff --git a/model/src/main/java/org/examproject/blog/entity/Category.java b/model/src/main/java/org/expt/blog/entity/Category.java similarity index 96% rename from model/src/main/java/org/examproject/blog/entity/Category.java rename to model/src/main/java/org/expt/blog/entity/Category.java index 73923db..10913b4 100644 --- a/model/src/main/java/org/examproject/blog/entity/Category.java +++ b/model/src/main/java/org/expt/blog/entity/Category.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.entity; +package org.expt.blog.entity; import java.io.Serializable; import javax.persistence.Column; @@ -43,5 +43,4 @@ public class Category implements Serializable { @Column(name="text", unique=true, length=24) String text; - -} \ No newline at end of file +} diff --git a/model/src/main/java/org/examproject/blog/entity/Entry.java b/model/src/main/java/org/expt/blog/entity/Entry.java similarity index 98% rename from model/src/main/java/org/examproject/blog/entity/Entry.java rename to model/src/main/java/org/expt/blog/entity/Entry.java index 0de2909..dcb7803 100644 --- a/model/src/main/java/org/examproject/blog/entity/Entry.java +++ b/model/src/main/java/org/expt/blog/entity/Entry.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.entity; +package org.expt.blog.entity; import java.io.Serializable; import java.util.Date; @@ -76,5 +76,4 @@ public class Entry implements Serializable { // @OneToMany(mappedBy="entry", fetch=FetchType.EAGER) // Set entryTagSet = new HashSet<>(); - } diff --git a/model/src/main/java/org/examproject/blog/entity/EntryTag.java b/model/src/main/java/org/expt/blog/entity/EntryTag.java similarity index 97% rename from model/src/main/java/org/examproject/blog/entity/EntryTag.java rename to model/src/main/java/org/expt/blog/entity/EntryTag.java index 88e7b6e..a2e6201 100644 --- a/model/src/main/java/org/examproject/blog/entity/EntryTag.java +++ b/model/src/main/java/org/expt/blog/entity/EntryTag.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.entity; +package org.expt.blog.entity; import javax.persistence.Column; import javax.persistence.Entity; @@ -51,5 +51,4 @@ public class EntryTag { @ManyToOne @JoinColumn(name="tag_id") Tag tag; - -} \ No newline at end of file +} diff --git a/model/src/main/java/org/examproject/blog/entity/Tag.java b/model/src/main/java/org/expt/blog/entity/Tag.java similarity index 97% rename from model/src/main/java/org/examproject/blog/entity/Tag.java rename to model/src/main/java/org/expt/blog/entity/Tag.java index 81c2ade..6d16952 100644 --- a/model/src/main/java/org/examproject/blog/entity/Tag.java +++ b/model/src/main/java/org/expt/blog/entity/Tag.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.entity; +package org.expt.blog.entity; import java.io.Serializable; import java.util.HashSet; @@ -50,5 +50,4 @@ public class Tag implements Serializable { // @OneToMany(mappedBy="tag", fetch=FetchType.EAGER) // Set entrySet = new HashSet<>(); - } diff --git a/model/src/main/java/org/examproject/blog/entity/User.java b/model/src/main/java/org/expt/blog/entity/User.java similarity index 97% rename from model/src/main/java/org/examproject/blog/entity/User.java rename to model/src/main/java/org/expt/blog/entity/User.java index 4ae9de2..f4331e2 100644 --- a/model/src/main/java/org/examproject/blog/entity/User.java +++ b/model/src/main/java/org/expt/blog/entity/User.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.entity; +package org.expt.blog.entity; import java.io.Serializable; import javax.persistence.Column; @@ -52,5 +52,4 @@ public class User implements Serializable { @Column(name="enable") Boolean enable = true; - -} \ No newline at end of file +} diff --git a/model/src/main/java/org/examproject/blog/repository/CategoryRepository.java b/model/src/main/java/org/expt/blog/repository/CategoryRepository.java similarity index 90% rename from model/src/main/java/org/examproject/blog/repository/CategoryRepository.java rename to model/src/main/java/org/expt/blog/repository/CategoryRepository.java index 986f66a..3911521 100644 --- a/model/src/main/java/org/examproject/blog/repository/CategoryRepository.java +++ b/model/src/main/java/org/expt/blog/repository/CategoryRepository.java @@ -12,11 +12,11 @@ * limitations under the License. */ -package org.examproject.blog.repository; +package org.expt.blog.repository; import org.springframework.data.jpa.repository.JpaRepository; -import org.examproject.blog.entity.Category; +import org.expt.blog.entity.Category; /** * @author h.adachi @@ -24,5 +24,5 @@ public interface CategoryRepository extends JpaRepository { Category findByText(String text); - } + diff --git a/model/src/main/java/org/examproject/blog/repository/EntryRepository.java b/model/src/main/java/org/expt/blog/repository/EntryRepository.java similarity index 86% rename from model/src/main/java/org/examproject/blog/repository/EntryRepository.java rename to model/src/main/java/org/expt/blog/repository/EntryRepository.java index 68a4fe0..ef86d18 100644 --- a/model/src/main/java/org/examproject/blog/repository/EntryRepository.java +++ b/model/src/main/java/org/expt/blog/repository/EntryRepository.java @@ -12,14 +12,14 @@ * limitations under the License. */ -package org.examproject.blog.repository; +package org.expt.blog.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; -import org.examproject.blog.entity.Entry; -import org.examproject.blog.entity.User; +import org.expt.blog.entity.Entry; +import org.expt.blog.entity.User; /** * @author h.adachi @@ -29,5 +29,4 @@ public interface EntryRepository extends JpaRepository { List findByCode(String code); List findByUser(User user); - } diff --git a/model/src/main/java/org/examproject/blog/repository/EntryTagRepository.java b/model/src/main/java/org/expt/blog/repository/EntryTagRepository.java similarity index 83% rename from model/src/main/java/org/examproject/blog/repository/EntryTagRepository.java rename to model/src/main/java/org/expt/blog/repository/EntryTagRepository.java index 71243f6..cbe5044 100644 --- a/model/src/main/java/org/examproject/blog/repository/EntryTagRepository.java +++ b/model/src/main/java/org/expt/blog/repository/EntryTagRepository.java @@ -12,15 +12,15 @@ * limitations under the License. */ -package org.examproject.blog.repository; +package org.expt.blog.repository; import java.util.List; -import org.examproject.blog.entity.Entry; +import org.expt.blog.entity.Entry; import org.springframework.data.jpa.repository.JpaRepository; -import org.examproject.blog.entity.EntryTag; -import org.examproject.blog.entity.Tag; +import org.expt.blog.entity.EntryTag; +import org.expt.blog.entity.Tag; /** * @author h.adachi @@ -30,5 +30,4 @@ public interface EntryTagRepository extends JpaRepository { List findByEntryAndTag(Entry entry, Tag tag); List findByEntry(Entry entry); - } diff --git a/model/src/main/java/org/examproject/blog/repository/TagRepository.java b/model/src/main/java/org/expt/blog/repository/TagRepository.java similarity index 90% rename from model/src/main/java/org/examproject/blog/repository/TagRepository.java rename to model/src/main/java/org/expt/blog/repository/TagRepository.java index 91c99ff..9580b0f 100644 --- a/model/src/main/java/org/examproject/blog/repository/TagRepository.java +++ b/model/src/main/java/org/expt/blog/repository/TagRepository.java @@ -12,11 +12,11 @@ * limitations under the License. */ -package org.examproject.blog.repository; +package org.expt.blog.repository; import org.springframework.data.jpa.repository.JpaRepository; -import org.examproject.blog.entity.Tag; +import org.expt.blog.entity.Tag; /** * @author h.adachi @@ -24,5 +24,4 @@ public interface TagRepository extends JpaRepository { Tag findByText(String text); - } diff --git a/model/src/main/java/org/examproject/blog/repository/UserRepository.java b/model/src/main/java/org/expt/blog/repository/UserRepository.java similarity index 90% rename from model/src/main/java/org/examproject/blog/repository/UserRepository.java rename to model/src/main/java/org/expt/blog/repository/UserRepository.java index b372116..b83a639 100644 --- a/model/src/main/java/org/examproject/blog/repository/UserRepository.java +++ b/model/src/main/java/org/expt/blog/repository/UserRepository.java @@ -12,13 +12,13 @@ * limitations under the License. */ -package org.examproject.blog.repository; +package org.expt.blog.repository; import java.lang.Long; import org.springframework.data.jpa.repository.JpaRepository; -import org.examproject.blog.entity.User; +import org.expt.blog.entity.User; /** * @author h.adachi @@ -26,5 +26,4 @@ public interface UserRepository extends JpaRepository { User findByUsername(String username); - } diff --git a/model/src/test/resources/META-INF/persistence.xml b/model/src/test/resources/META-INF/persistence.xml index c71b4f2..743e9f8 100644 --- a/model/src/test/resources/META-INF/persistence.xml +++ b/model/src/test/resources/META-INF/persistence.xml @@ -7,7 +7,7 @@ org.hibernate.ejb.HibernatePersistence META-INF/orm.xml - org.examproject.blog.entity.Person + org.expt.blog.entity.Person diff --git a/model/src/test/resources/log4j.xml b/model/src/test/resources/log4j.xml index 9f2dee6..28f84dd 100644 --- a/model/src/test/resources/log4j.xml +++ b/model/src/test/resources/log4j.xml @@ -26,7 +26,7 @@ - + diff --git a/model/src/test/resources/org/examproject/blog/data-config.xml b/model/src/test/resources/org/expt/blog/data-config.xml similarity index 95% rename from model/src/test/resources/org/examproject/blog/data-config.xml rename to model/src/test/resources/org/expt/blog/data-config.xml index 5a1949b..98770a5 100644 --- a/model/src/test/resources/org/examproject/blog/data-config.xml +++ b/model/src/test/resources/org/expt/blog/data-config.xml @@ -14,7 +14,7 @@ http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd"> - + @@ -51,6 +51,6 @@ - + diff --git a/model/src/test/resources/org/examproject/blog/test-app-config.xml b/model/src/test/resources/org/expt/blog/test-app-config.xml similarity index 100% rename from model/src/test/resources/org/examproject/blog/test-app-config.xml rename to model/src/test/resources/org/expt/blog/test-app-config.xml diff --git a/mvc/pom.xml b/mvc/pom.xml index 7bec4eb..6c3580a 100644 --- a/mvc/pom.xml +++ b/mvc/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - - org.examproject.blog - exmp-mvc + org.expt.blog + expt-mvc jar - 1.0.3 + 1.0.4 mvc @@ -23,10 +22,10 @@ - + - org.examproject.blog - exmp-service + org.expt.blog + expt-service ${version} diff --git a/mvc/src/main/java/org/examproject/blog/controller/EntryController.java b/mvc/src/main/java/org/expt/blog/controller/EntryController.java similarity index 95% rename from mvc/src/main/java/org/examproject/blog/controller/EntryController.java rename to mvc/src/main/java/org/expt/blog/controller/EntryController.java index f02016d..517667e 100644 --- a/mvc/src/main/java/org/examproject/blog/controller/EntryController.java +++ b/mvc/src/main/java/org/expt/blog/controller/EntryController.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.controller; +package org.expt.blog.controller; import java.util.ArrayList; import java.util.List; @@ -35,11 +35,11 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.ResponseBody; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.form.EntryForm; -import org.examproject.blog.model.EntryModel; -import org.examproject.blog.service.EntryService; -import org.examproject.blog.response.EntryResponse; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.form.EntryForm; +import org.expt.blog.model.EntryModel; +import org.expt.blog.service.EntryService; +import org.expt.blog.response.EntryResponse; /** * the entry controller class of the application. @@ -75,11 +75,11 @@ public class EntryController { method=RequestMethod.GET ) public void doForm( - @CookieValue(value="__exmp_blog_username", defaultValue="anonymous") + @CookieValue(value="__expt_blog_username", defaultValue="anonymous") String username, - @CookieValue(value="__exmp_blog_password", defaultValue="password") + @CookieValue(value="__expt_blog_password", defaultValue="password") String password, - @CookieValue(value="__exmp_blog_email", defaultValue="example@email.com") + @CookieValue(value="__expt_blog_email", defaultValue="example@email.com") String email, Model model ) { @@ -341,5 +341,4 @@ private void addToResponse( false ); } - } diff --git a/mvc/src/main/java/org/examproject/blog/controller/FeedController.java b/mvc/src/main/java/org/expt/blog/controller/FeedController.java similarity index 95% rename from mvc/src/main/java/org/examproject/blog/controller/FeedController.java rename to mvc/src/main/java/org/expt/blog/controller/FeedController.java index fc441fa..0a7b1d9 100644 --- a/mvc/src/main/java/org/examproject/blog/controller/FeedController.java +++ b/mvc/src/main/java/org/expt/blog/controller/FeedController.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.controller; +package org.expt.blog.controller; import java.util.ArrayList; import java.util.List; @@ -28,9 +28,9 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.model.FeedModel; -import org.examproject.blog.service.FeedService; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.model.FeedModel; +import org.expt.blog.service.FeedService; /** * the feed controller class of the application. @@ -158,5 +158,4 @@ private List getFeedModelList() { return feedModelList; } - } diff --git a/mvc/src/main/java/org/examproject/blog/controller/PermalinkController.java b/mvc/src/main/java/org/expt/blog/controller/PermalinkController.java similarity index 93% rename from mvc/src/main/java/org/examproject/blog/controller/PermalinkController.java rename to mvc/src/main/java/org/expt/blog/controller/PermalinkController.java index 6596ae6..ba62fb8 100644 --- a/mvc/src/main/java/org/examproject/blog/controller/PermalinkController.java +++ b/mvc/src/main/java/org/expt/blog/controller/PermalinkController.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.controller; +package org.expt.blog.controller; import lombok.NonNull; import lombok.RequiredArgsConstructor; @@ -26,9 +26,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.model.EntryModel; -import org.examproject.blog.service.EntryService; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.model.EntryModel; +import org.expt.blog.service.EntryService; /** * the entry permalink controller class of the application. @@ -100,5 +100,4 @@ private EntryModel getEntryModel( return entryModel; } - } diff --git a/mvc/src/main/java/org/examproject/blog/controller/SettingController.java b/mvc/src/main/java/org/expt/blog/controller/SettingController.java similarity index 92% rename from mvc/src/main/java/org/examproject/blog/controller/SettingController.java rename to mvc/src/main/java/org/expt/blog/controller/SettingController.java index 5f25217..6058f55 100644 --- a/mvc/src/main/java/org/examproject/blog/controller/SettingController.java +++ b/mvc/src/main/java/org/expt/blog/controller/SettingController.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.controller; +package org.expt.blog.controller; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; @@ -29,8 +29,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.ResponseBody; -import org.examproject.blog.form.EntryForm; -import org.examproject.blog.response.EntryResponse; +import org.expt.blog.form.EntryForm; +import org.expt.blog.response.EntryResponse; /** * the entry controller class of the application. @@ -114,22 +114,21 @@ private void storeToCookie( log.debug("called"); val username = new Cookie( - "__exmp_blog_username", entryForm.getUsername() + "__expt_blog_username", entryForm.getUsername() ); username.setMaxAge(maxAge); response.addCookie(username); val password = new Cookie( - "__exmp_blog_password", entryForm.getPassword() + "__expt_blog_password", entryForm.getPassword() ); password.setMaxAge(maxAge); response.addCookie(password); val email = new Cookie( - "__exmp_blog_email", entryForm.getEmail() + "__expt_blog_email", entryForm.getEmail() ); email.setMaxAge(maxAge); response.addCookie(email); } - } diff --git a/mvc/src/main/java/org/examproject/blog/form/EntryForm.java b/mvc/src/main/java/org/expt/blog/form/EntryForm.java similarity index 96% rename from mvc/src/main/java/org/examproject/blog/form/EntryForm.java rename to mvc/src/main/java/org/expt/blog/form/EntryForm.java index 36a85a8..0d381c7 100644 --- a/mvc/src/main/java/org/examproject/blog/form/EntryForm.java +++ b/mvc/src/main/java/org/expt/blog/form/EntryForm.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.form; +package org.expt.blog.form; import java.util.Date; @@ -47,5 +47,4 @@ public class EntryForm { String code; Date created; - } diff --git a/mvc/src/main/java/org/examproject/blog/model/EntryModel.java b/mvc/src/main/java/org/expt/blog/model/EntryModel.java similarity index 96% rename from mvc/src/main/java/org/examproject/blog/model/EntryModel.java rename to mvc/src/main/java/org/expt/blog/model/EntryModel.java index 33ca898..7ce963b 100644 --- a/mvc/src/main/java/org/examproject/blog/model/EntryModel.java +++ b/mvc/src/main/java/org/expt/blog/model/EntryModel.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.model; +package org.expt.blog.model; import java.util.Date; @@ -45,5 +45,4 @@ public class EntryModel { Date created; String permalinkUrl; - } diff --git a/mvc/src/main/java/org/examproject/blog/model/FeedModel.java b/mvc/src/main/java/org/expt/blog/model/FeedModel.java similarity index 95% rename from mvc/src/main/java/org/examproject/blog/model/FeedModel.java rename to mvc/src/main/java/org/expt/blog/model/FeedModel.java index f1f930b..af6c0c2 100644 --- a/mvc/src/main/java/org/examproject/blog/model/FeedModel.java +++ b/mvc/src/main/java/org/expt/blog/model/FeedModel.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.model; +package org.expt.blog.model; import java.util.Date; @@ -31,5 +31,4 @@ public class FeedModel { String summary; Date createdDate; - } diff --git a/mvc/src/main/java/org/examproject/blog/response/EntryResponse.java b/mvc/src/main/java/org/expt/blog/response/EntryResponse.java similarity index 89% rename from mvc/src/main/java/org/examproject/blog/response/EntryResponse.java rename to mvc/src/main/java/org/expt/blog/response/EntryResponse.java index 0978840..bd2f6ab 100644 --- a/mvc/src/main/java/org/examproject/blog/response/EntryResponse.java +++ b/mvc/src/main/java/org/expt/blog/response/EntryResponse.java @@ -12,13 +12,13 @@ * limitations under the License. */ -package org.examproject.blog.response; +package org.expt.blog.response; import java.util.List; import lombok.Data; -import org.examproject.blog.model.EntryModel; +import org.expt.blog.model.EntryModel; /** * @author h.adachi @@ -29,5 +29,4 @@ public class EntryResponse { List entryModelList = null; Boolean isError = false; - } diff --git a/mvc/src/main/java/org/examproject/blog/view/SimpleAtomFeedView.java b/mvc/src/main/java/org/expt/blog/view/SimpleAtomFeedView.java similarity index 93% rename from mvc/src/main/java/org/examproject/blog/view/SimpleAtomFeedView.java rename to mvc/src/main/java/org/expt/blog/view/SimpleAtomFeedView.java index 289d710..601b951 100644 --- a/mvc/src/main/java/org/examproject/blog/view/SimpleAtomFeedView.java +++ b/mvc/src/main/java/org/expt/blog/view/SimpleAtomFeedView.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.view; +package org.expt.blog.view; import java.util.ArrayList; import java.util.List; @@ -28,7 +28,7 @@ import lombok.val; import org.springframework.web.servlet.view.feed.AbstractAtomFeedView; -import org.examproject.blog.model.FeedModel; +import org.expt.blog.model.FeedModel; /** * the atom feed view class of the application. @@ -44,13 +44,13 @@ protected void buildFeedMetadata( HttpServletRequest request ) { // set the status. - feed.setTitle("exmp-blog"); + feed.setTitle("expt-blog"); val description = new Content(); - description.setValue("examproject.org - exmp-blog"); + description.setValue("expt.org - expt-blog"); feed.setSubtitle(description); List links = new ArrayList<>(); val link = new Link(); - link.setHref("http://examproject.org"); + link.setHref("http://expt.org"); links.add(link); feed.setAlternateLinks(links); @@ -102,5 +102,4 @@ protected List buildFeedEntries( return entryList; } - } diff --git a/mvc/src/main/java/org/examproject/blog/view/SimpleRssFeedView.java b/mvc/src/main/java/org/expt/blog/view/SimpleRssFeedView.java similarity index 91% rename from mvc/src/main/java/org/examproject/blog/view/SimpleRssFeedView.java rename to mvc/src/main/java/org/expt/blog/view/SimpleRssFeedView.java index 2a4dcb7..0809872 100644 --- a/mvc/src/main/java/org/examproject/blog/view/SimpleRssFeedView.java +++ b/mvc/src/main/java/org/expt/blog/view/SimpleRssFeedView.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.view; +package org.expt.blog.view; import java.util.ArrayList; import java.util.List; @@ -27,7 +27,7 @@ import lombok.val; import org.springframework.web.servlet.view.feed.AbstractRssFeedView; -import org.examproject.blog.model.FeedModel; +import org.expt.blog.model.FeedModel; /** * the rss feed view class of the application. @@ -43,9 +43,9 @@ protected void buildFeedMetadata( HttpServletRequest request ) { // set the status. - feed.setTitle("exmp-blog"); - feed.setDescription("examproject.org - exmp-blog"); - feed.setLink("http://examproject.org"); + feed.setTitle("expt-blog"); + feed.setDescription("expt.org - expt-blog"); + feed.setLink("http://expt.org"); super.buildFeedMetadata( model, @@ -89,5 +89,4 @@ protected List buildFeedItems( return itemList; } - } diff --git a/pom.xml b/pom.xml index 58821e3..a408706 100644 --- a/pom.xml +++ b/pom.xml @@ -2,15 +2,14 @@ 4.0.0 - - org.examproject.blog - exmp-project + org.expt.blog + expt-project pom - 1.0.3 + 1.0.4 project - ${version} + ${version} 1.8 UTF-8 @@ -91,5 +90,4 @@ - diff --git a/service/pom.xml b/service/pom.xml index a93716d..e14aec9 100644 --- a/service/pom.xml +++ b/service/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - - org.examproject.blog - exmp-service + org.expt.blog + expt-service jar - 1.0.3 + 1.0.4 service @@ -22,10 +21,10 @@ - + - org.examproject.blog - exmp-model + org.expt.blog + expt-model ${version} @@ -149,5 +148,4 @@ - diff --git a/service/src/main/java/org/examproject/blog/dto/EntryDto.java b/service/src/main/java/org/expt/blog/dto/EntryDto.java similarity index 96% rename from service/src/main/java/org/examproject/blog/dto/EntryDto.java rename to service/src/main/java/org/expt/blog/dto/EntryDto.java index 116893f..6074728 100644 --- a/service/src/main/java/org/examproject/blog/dto/EntryDto.java +++ b/service/src/main/java/org/expt/blog/dto/EntryDto.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.dto; +package org.expt.blog.dto; import java.util.Date; @@ -47,5 +47,4 @@ public class EntryDto { Date created; String code; - } diff --git a/service/src/main/java/org/examproject/blog/functor/AllEntryFactory.java b/service/src/main/java/org/expt/blog/functor/AllEntryFactory.java similarity index 90% rename from service/src/main/java/org/examproject/blog/functor/AllEntryFactory.java rename to service/src/main/java/org/expt/blog/functor/AllEntryFactory.java index e7bf9d7..b119c2a 100644 --- a/service/src/main/java/org/examproject/blog/functor/AllEntryFactory.java +++ b/service/src/main/java/org/expt/blog/functor/AllEntryFactory.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.functor; +package org.expt.blog.functor; import java.util.ArrayList; import java.util.List; @@ -24,10 +24,10 @@ import org.springframework.context.ApplicationContext; import org.springframework.transaction.annotation.Transactional; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.entity.Entry; -import org.examproject.blog.repository.EntryRepository; -import org.examproject.blog.util.EntryUtils; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.entity.Entry; +import org.expt.blog.repository.EntryRepository; +import org.expt.blog.util.EntryUtils; /** * @author h.adachi @@ -77,5 +77,4 @@ private List searchAllEntry() { } return dtoList; } - -} \ No newline at end of file +} diff --git a/service/src/main/java/org/examproject/blog/functor/CodeToEntryTransformer.java b/service/src/main/java/org/expt/blog/functor/CodeToEntryTransformer.java similarity index 91% rename from service/src/main/java/org/examproject/blog/functor/CodeToEntryTransformer.java rename to service/src/main/java/org/expt/blog/functor/CodeToEntryTransformer.java index c0cfdca..9f1a491 100644 --- a/service/src/main/java/org/examproject/blog/functor/CodeToEntryTransformer.java +++ b/service/src/main/java/org/expt/blog/functor/CodeToEntryTransformer.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.functor; +package org.expt.blog.functor; import java.util.List; @@ -23,10 +23,10 @@ import org.springframework.context.ApplicationContext; import org.springframework.transaction.annotation.Transactional; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.entity.Entry; -import org.examproject.blog.repository.EntryRepository; -import org.examproject.blog.util.EntryUtils; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.entity.Entry; +import org.expt.blog.repository.EntryRepository; +import org.expt.blog.util.EntryUtils; /** * @author h.adachi @@ -85,5 +85,4 @@ private EntryDto getEntryDto( return null; } } - -} \ No newline at end of file +} diff --git a/service/src/main/java/org/examproject/blog/functor/DeleteEntryClosure.java b/service/src/main/java/org/expt/blog/functor/DeleteEntryClosure.java similarity index 93% rename from service/src/main/java/org/examproject/blog/functor/DeleteEntryClosure.java rename to service/src/main/java/org/expt/blog/functor/DeleteEntryClosure.java index 069cd4e..9b494c0 100644 --- a/service/src/main/java/org/examproject/blog/functor/DeleteEntryClosure.java +++ b/service/src/main/java/org/expt/blog/functor/DeleteEntryClosure.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.functor; +package org.expt.blog.functor; import lombok.NonNull; import lombok.RequiredArgsConstructor; @@ -20,8 +20,8 @@ import org.apache.commons.collections.Closure; import org.springframework.transaction.annotation.Transactional; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.util.EntryUtils; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.util.EntryUtils; /** * @author h.adachi @@ -61,5 +61,4 @@ private void delete( throw new RuntimeException("an error occurred.", e); } } - } diff --git a/service/src/main/java/org/examproject/blog/functor/IdToEntryTransformer.java b/service/src/main/java/org/expt/blog/functor/IdToEntryTransformer.java similarity index 91% rename from service/src/main/java/org/examproject/blog/functor/IdToEntryTransformer.java rename to service/src/main/java/org/expt/blog/functor/IdToEntryTransformer.java index 95b83a7..811fa0b 100644 --- a/service/src/main/java/org/examproject/blog/functor/IdToEntryTransformer.java +++ b/service/src/main/java/org/expt/blog/functor/IdToEntryTransformer.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.functor; +package org.expt.blog.functor; import lombok.NonNull; import lombok.RequiredArgsConstructor; @@ -21,10 +21,10 @@ import org.springframework.context.ApplicationContext; import org.springframework.transaction.annotation.Transactional; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.entity.Entry; -import org.examproject.blog.repository.EntryRepository; -import org.examproject.blog.util.EntryUtils; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.entity.Entry; +import org.expt.blog.repository.EntryRepository; +import org.expt.blog.util.EntryUtils; /** * @author h.adachi @@ -79,5 +79,4 @@ private EntryDto getEntryDto( return context.getBean(EntryDto.class); } } - } diff --git a/service/src/main/java/org/examproject/blog/functor/SaveEntryClosure.java b/service/src/main/java/org/expt/blog/functor/SaveEntryClosure.java similarity index 91% rename from service/src/main/java/org/examproject/blog/functor/SaveEntryClosure.java rename to service/src/main/java/org/expt/blog/functor/SaveEntryClosure.java index d0fd3da..f5e4af9 100644 --- a/service/src/main/java/org/examproject/blog/functor/SaveEntryClosure.java +++ b/service/src/main/java/org/expt/blog/functor/SaveEntryClosure.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.functor; +package org.expt.blog.functor; import java.util.Date; @@ -22,10 +22,10 @@ import org.apache.commons.collections.Closure; import org.springframework.transaction.annotation.Transactional; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.entity.Entry; -import org.examproject.blog.util.EntryUtils; -import org.examproject.blog.util.GeneralUtils; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.entity.Entry; +import org.expt.blog.util.EntryUtils; +import org.expt.blog.util.GeneralUtils; /** * @author h.adachi @@ -84,5 +84,4 @@ private void save( throw new RuntimeException("an error occurred.", e); } } - -} \ No newline at end of file +} diff --git a/service/src/main/java/org/examproject/blog/service/EntryService.java b/service/src/main/java/org/expt/blog/service/EntryService.java similarity index 91% rename from service/src/main/java/org/examproject/blog/service/EntryService.java rename to service/src/main/java/org/expt/blog/service/EntryService.java index 5316024..2d0d9cf 100644 --- a/service/src/main/java/org/examproject/blog/service/EntryService.java +++ b/service/src/main/java/org/expt/blog/service/EntryService.java @@ -12,11 +12,11 @@ * limitations under the License. */ -package org.examproject.blog.service; +package org.expt.blog.service; import java.util.List; -import org.examproject.blog.dto.EntryDto; +import org.expt.blog.dto.EntryDto; /** * @author h.adachi @@ -32,5 +32,4 @@ public interface EntryService { void saveEntry(EntryDto entryDto); List findAllEntry(); - } diff --git a/service/src/main/java/org/examproject/blog/service/FeedService.java b/service/src/main/java/org/expt/blog/service/FeedService.java similarity index 89% rename from service/src/main/java/org/examproject/blog/service/FeedService.java rename to service/src/main/java/org/expt/blog/service/FeedService.java index 66d97aa..edbaf32 100644 --- a/service/src/main/java/org/examproject/blog/service/FeedService.java +++ b/service/src/main/java/org/expt/blog/service/FeedService.java @@ -12,11 +12,11 @@ * limitations under the License. */ -package org.examproject.blog.service; +package org.expt.blog.service; import java.util.List; -import org.examproject.blog.dto.EntryDto; +import org.expt.blog.dto.EntryDto; /** * @author h.adachi @@ -24,5 +24,4 @@ public interface FeedService { List findAllEntry(); - } diff --git a/service/src/main/java/org/examproject/blog/service/SimpleEntryService.java b/service/src/main/java/org/expt/blog/service/SimpleEntryService.java similarity index 95% rename from service/src/main/java/org/examproject/blog/service/SimpleEntryService.java rename to service/src/main/java/org/expt/blog/service/SimpleEntryService.java index 5699cc2..27136ce 100644 --- a/service/src/main/java/org/examproject/blog/service/SimpleEntryService.java +++ b/service/src/main/java/org/expt/blog/service/SimpleEntryService.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.service; +package org.expt.blog.service; import java.util.List; @@ -21,7 +21,7 @@ import org.apache.commons.collections.Factory; import org.apache.commons.collections.Transformer; -import org.examproject.blog.dto.EntryDto; +import org.expt.blog.dto.EntryDto; /** * @author h.adachi @@ -65,5 +65,4 @@ public void saveEntry(EntryDto entryDto) { public void deleteEntry(EntryDto entryDto) { deleteEntryClosure.execute(entryDto); } - } diff --git a/service/src/main/java/org/examproject/blog/service/SimpleFeedService.java b/service/src/main/java/org/expt/blog/service/SimpleFeedService.java similarity index 92% rename from service/src/main/java/org/examproject/blog/service/SimpleFeedService.java rename to service/src/main/java/org/expt/blog/service/SimpleFeedService.java index 404ba09..5b3277e 100644 --- a/service/src/main/java/org/examproject/blog/service/SimpleFeedService.java +++ b/service/src/main/java/org/expt/blog/service/SimpleFeedService.java @@ -12,14 +12,14 @@ * limitations under the License. */ -package org.examproject.blog.service; +package org.expt.blog.service; import java.util.List; import lombok.AllArgsConstructor; import org.apache.commons.collections.Factory; -import org.examproject.blog.dto.EntryDto; +import org.expt.blog.dto.EntryDto; /** * @author h.adachi @@ -35,5 +35,4 @@ public class SimpleFeedService implements FeedService { public List findAllEntry() { return (List) allEntryFactory.create(); } - } diff --git a/service/src/main/java/org/examproject/blog/util/CategoryUtils.java b/service/src/main/java/org/expt/blog/util/CategoryUtils.java similarity index 91% rename from service/src/main/java/org/examproject/blog/util/CategoryUtils.java rename to service/src/main/java/org/expt/blog/util/CategoryUtils.java index 9f9fc7d..68b1ea8 100644 --- a/service/src/main/java/org/examproject/blog/util/CategoryUtils.java +++ b/service/src/main/java/org/expt/blog/util/CategoryUtils.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.util; +package org.expt.blog.util; import lombok.NonNull; import lombok.RequiredArgsConstructor; @@ -21,9 +21,9 @@ import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.entity.Category; -import org.examproject.blog.repository.CategoryRepository; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.entity.Category; +import org.expt.blog.repository.CategoryRepository; /** * @author h.adachi @@ -60,5 +60,4 @@ public Category getCategory( throw new RuntimeException("an error occurred.", e); } } - -} \ No newline at end of file +} diff --git a/service/src/main/java/org/examproject/blog/util/EntryUtils.java b/service/src/main/java/org/expt/blog/util/EntryUtils.java similarity index 95% rename from service/src/main/java/org/examproject/blog/util/EntryUtils.java rename to service/src/main/java/org/expt/blog/util/EntryUtils.java index ba297f1..de7c91c 100644 --- a/service/src/main/java/org/examproject/blog/util/EntryUtils.java +++ b/service/src/main/java/org/expt/blog/util/EntryUtils.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.util; +package org.expt.blog.util; import java.util.List; import java.util.Optional; @@ -24,11 +24,11 @@ import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.entity.Entry; -import org.examproject.blog.entity.EntryTag; -import org.examproject.blog.repository.EntryRepository; -import org.examproject.blog.repository.EntryTagRepository; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.entity.Entry; +import org.expt.blog.entity.EntryTag; +import org.expt.blog.repository.EntryRepository; +import org.expt.blog.repository.EntryTagRepository; /** * @author h.adachi @@ -173,5 +173,4 @@ public void deleteEntry( throw new RuntimeException("an error occurred.", e); } } - } diff --git a/service/src/main/java/org/examproject/blog/util/GeneralUtils.java b/service/src/main/java/org/expt/blog/util/GeneralUtils.java similarity index 96% rename from service/src/main/java/org/examproject/blog/util/GeneralUtils.java rename to service/src/main/java/org/expt/blog/util/GeneralUtils.java index 3b309ac..1f6fe1e 100644 --- a/service/src/main/java/org/examproject/blog/util/GeneralUtils.java +++ b/service/src/main/java/org/expt/blog/util/GeneralUtils.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.util; +package org.expt.blog.util; import java.util.Random; import org.apache.commons.lang.StringUtils; @@ -30,5 +30,4 @@ public static String createCode() { String code = StringUtils.leftPad(strCode, 9, "0"); return code; } - } diff --git a/service/src/main/java/org/examproject/blog/util/TagUtils.java b/service/src/main/java/org/expt/blog/util/TagUtils.java similarity index 93% rename from service/src/main/java/org/examproject/blog/util/TagUtils.java rename to service/src/main/java/org/expt/blog/util/TagUtils.java index 13fa717..d223efb 100644 --- a/service/src/main/java/org/examproject/blog/util/TagUtils.java +++ b/service/src/main/java/org/expt/blog/util/TagUtils.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.util; +package org.expt.blog.util; import java.util.Arrays; import java.util.Set; @@ -26,11 +26,11 @@ import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; -import org.examproject.blog.entity.Entry; -import org.examproject.blog.entity.EntryTag; -import org.examproject.blog.entity.Tag; -import org.examproject.blog.repository.EntryTagRepository; -import org.examproject.blog.repository.TagRepository; +import org.expt.blog.entity.Entry; +import org.expt.blog.entity.EntryTag; +import org.expt.blog.entity.Tag; +import org.expt.blog.repository.EntryTagRepository; +import org.expt.blog.repository.TagRepository; /** * @author h.adachi @@ -124,5 +124,4 @@ public Set getEntryTagSet( throw new RuntimeException("an error occurred.", e); } } - } diff --git a/service/src/main/java/org/examproject/blog/util/UserUtils.java b/service/src/main/java/org/expt/blog/util/UserUtils.java similarity index 91% rename from service/src/main/java/org/examproject/blog/util/UserUtils.java rename to service/src/main/java/org/expt/blog/util/UserUtils.java index 9119af2..389102f 100644 --- a/service/src/main/java/org/examproject/blog/util/UserUtils.java +++ b/service/src/main/java/org/expt/blog/util/UserUtils.java @@ -12,7 +12,7 @@ * limitations under the License. */ -package org.examproject.blog.util; +package org.expt.blog.util; import lombok.NonNull; import lombok.RequiredArgsConstructor; @@ -21,9 +21,9 @@ import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; -import org.examproject.blog.dto.EntryDto; -import org.examproject.blog.entity.User; -import org.examproject.blog.repository.UserRepository; +import org.expt.blog.dto.EntryDto; +import org.expt.blog.entity.User; +import org.expt.blog.repository.UserRepository; /** * @author h.adachi @@ -62,5 +62,4 @@ public User getUser( throw new RuntimeException("an error occurred.", e); } } - } diff --git a/service/src/test/java/org/examproject/blog/util/GeneralUtilsTest.java b/service/src/test/java/org/expt/blog/util/GeneralUtilsTest.java similarity index 95% rename from service/src/test/java/org/examproject/blog/util/GeneralUtilsTest.java rename to service/src/test/java/org/expt/blog/util/GeneralUtilsTest.java index 54fdde5..03de3fc 100644 --- a/service/src/test/java/org/examproject/blog/util/GeneralUtilsTest.java +++ b/service/src/test/java/org/expt/blog/util/GeneralUtilsTest.java @@ -1,5 +1,5 @@ -package org.examproject.blog.util; +package org.expt.blog.util; import org.junit.*; import static org.junit.Assert.*; diff --git a/service/src/test/resources/log4j.xml b/service/src/test/resources/log4j.xml index a5c60d9..90b10c4 100644 --- a/service/src/test/resources/log4j.xml +++ b/service/src/test/resources/log4j.xml @@ -26,7 +26,7 @@ - + diff --git a/webapp/pom.xml b/webapp/pom.xml index 38be8c3..e56177e 100644 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - - org.examproject.blog - exmp-webapp + org.expt.blog + expt-webapp war - 1.0.3 + 1.0.4 webapp @@ -20,10 +19,10 @@ - + - org.examproject.blog - exmp-mvc + org.expt.blog + expt-mvc ${version} diff --git a/webapp/src/main/resources/META-INF/dozer/dozer-mapping.xml b/webapp/src/main/resources/META-INF/dozer/dozer-mapping.xml index c69a32d..06ccd27 100644 --- a/webapp/src/main/resources/META-INF/dozer/dozer-mapping.xml +++ b/webapp/src/main/resources/META-INF/dozer/dozer-mapping.xml @@ -5,4 +5,4 @@ - \ No newline at end of file + diff --git a/webapp/src/main/resources/META-INF/persistence.xml b/webapp/src/main/resources/META-INF/persistence.xml index 59e8be4..72ce35d 100644 --- a/webapp/src/main/resources/META-INF/persistence.xml +++ b/webapp/src/main/resources/META-INF/persistence.xml @@ -3,14 +3,14 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> - + org.hibernate.ejb.HibernatePersistence - org.examproject.blog.entity.Category - org.examproject.blog.entity.Entry - org.examproject.blog.entity.Tag - org.examproject.blog.entity.EntryTag - org.examproject.blog.entity.User + org.expt.blog.entity.Category + org.expt.blog.entity.Entry + org.expt.blog.entity.Tag + org.expt.blog.entity.EntryTag + org.expt.blog.entity.User diff --git a/webapp/src/main/resources/assets/functor/dhtml/ProfileUpdateClosure.js b/webapp/src/main/resources/assets/functor/dhtml/ProfileUpdateClosure.js index 05287be..e62b9d7 100644 --- a/webapp/src/main/resources/assets/functor/dhtml/ProfileUpdateClosure.js +++ b/webapp/src/main/resources/assets/functor/dhtml/ProfileUpdateClosure.js @@ -47,4 +47,4 @@ export default class ProfileUpdateClosure { "" ); } -} \ No newline at end of file +} diff --git a/webapp/src/main/resources/assets/index.js b/webapp/src/main/resources/assets/index.js index 9174272..c90b833 100644 --- a/webapp/src/main/resources/assets/index.js +++ b/webapp/src/main/resources/assets/index.js @@ -12,7 +12,7 @@ * limitations under the License. */ -import "./style/exmp-blog.scss"; +import "./style/expt-blog.scss"; import Application from './core/Application'; /////////////////////////////////////////////////////////////////////////////// diff --git a/webapp/src/main/resources/assets/style/exmp-blog.scss b/webapp/src/main/resources/assets/style/expt-blog.scss similarity index 100% rename from webapp/src/main/resources/assets/style/exmp-blog.scss rename to webapp/src/main/resources/assets/style/expt-blog.scss diff --git a/webapp/src/main/resources/db.properties b/webapp/src/main/resources/db.properties index 27589c9..c95751d 100644 --- a/webapp/src/main/resources/db.properties +++ b/webapp/src/main/resources/db.properties @@ -2,14 +2,14 @@ db.username=sa db.password= #db.url=jdbc:hsqldb:mem:app-db -db.url=jdbc:hsqldb:file:app-db/exmp;shutdown=true +db.url=jdbc:hsqldb:file:app-db/expt;shutdown=true db.dialect=org.hibernate.dialect.HSQLDialect db.driver=org.hsqldb.jdbcDriver # PostgreSQL (Local) #db.username=username #db.password=password -#db.url=jdbc:postgresql://localhost:5432/exmp +#db.url=jdbc:postgresql://localhost:5432/expt #db.dialect=org.hibernate.dialect.PostgreSQLDialect #db.driver=org.postgresql.Driver diff --git a/webapp/src/main/resources/log4j.xml b/webapp/src/main/resources/log4j.xml index d5c61e9..f2536c5 100644 --- a/webapp/src/main/resources/log4j.xml +++ b/webapp/src/main/resources/log4j.xml @@ -13,7 +13,7 @@ - + diff --git a/webapp/src/main/webapp/WEB-INF/i18n/messages.properties b/webapp/src/main/webapp/WEB-INF/i18n/messages.properties index 3917289..26aedd3 100644 --- a/webapp/src/main/webapp/WEB-INF/i18n/messages.properties +++ b/webapp/src/main/webapp/WEB-INF/i18n/messages.properties @@ -1,6 +1,6 @@ -site.title=blog-examproject +site.title=expt-blog site.sub.title=1.0.x -site.footer=(c) examproject 2010-2020 +site.footer=(c) expt 2010-2023 index.title=Home index.message=This is a simple Spring MVC blog. Apache Tiles and internationalized messages are also used. diff --git a/webapp/src/main/webapp/WEB-INF/spring/app-config.xml b/webapp/src/main/webapp/WEB-INF/spring/app-config.xml index 663baaf..756e01a 100644 --- a/webapp/src/main/webapp/WEB-INF/spring/app-config.xml +++ b/webapp/src/main/webapp/WEB-INF/spring/app-config.xml @@ -7,12 +7,12 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> - + - + - \ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/spring/data-config.xml b/webapp/src/main/webapp/WEB-INF/spring/data-config.xml index 2329c20..649579d 100644 --- a/webapp/src/main/webapp/WEB-INF/spring/data-config.xml +++ b/webapp/src/main/webapp/WEB-INF/spring/data-config.xml @@ -16,7 +16,7 @@ - + @@ -39,7 +39,7 @@ - + @@ -60,6 +60,6 @@ - + diff --git a/webapp/src/main/webapp/WEB-INF/spring/locale-config.xml b/webapp/src/main/webapp/WEB-INF/spring/locale-config.xml index 7122247..04d6b1f 100644 --- a/webapp/src/main/webapp/WEB-INF/spring/locale-config.xml +++ b/webapp/src/main/webapp/WEB-INF/spring/locale-config.xml @@ -31,4 +31,4 @@ - \ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/spring/mvc-config.xml b/webapp/src/main/webapp/WEB-INF/spring/mvc-config.xml index ff47b08..58288e7 100644 --- a/webapp/src/main/webapp/WEB-INF/spring/mvc-config.xml +++ b/webapp/src/main/webapp/WEB-INF/spring/mvc-config.xml @@ -13,7 +13,7 @@ - + diff --git a/webapp/src/main/webapp/WEB-INF/spring/user/exmp-blog-config.xml b/webapp/src/main/webapp/WEB-INF/spring/user/expt-blog-config.xml similarity index 74% rename from webapp/src/main/webapp/WEB-INF/spring/user/exmp-blog-config.xml rename to webapp/src/main/webapp/WEB-INF/spring/user/expt-blog-config.xml index 1711409..8321b07 100644 --- a/webapp/src/main/webapp/WEB-INF/spring/user/exmp-blog-config.xml +++ b/webapp/src/main/webapp/WEB-INF/spring/user/expt-blog-config.xml @@ -10,7 +10,7 @@ - + @@ -18,7 +18,7 @@ - + @@ -26,30 +26,30 @@ + class="org.expt.blog.functor.SaveEntryClosure"> + class="org.expt.blog.functor.DeleteEntryClosure"> + class="org.expt.blog.functor.AllEntryFactory"> + class="org.expt.blog.functor.IdToEntryTransformer"> + class="org.expt.blog.functor.CodeToEntryTransformer"> @@ -57,7 +57,7 @@ @@ -65,12 +65,12 @@ @@ -81,11 +81,11 @@ + class="org.expt.blog.view.SimpleRssFeedView"> + class="org.expt.blog.view.SimpleAtomFeedView"> - \ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/templates/footer.jsp b/webapp/src/main/webapp/WEB-INF/templates/footer.jsp index 33e4b5d..0d7bd14 100644 --- a/webapp/src/main/webapp/WEB-INF/templates/footer.jsp +++ b/webapp/src/main/webapp/WEB-INF/templates/footer.jsp @@ -18,4 +18,4 @@ - \ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/templates/header.jsp b/webapp/src/main/webapp/WEB-INF/templates/header.jsp index e02c487..003788d 100644 --- a/webapp/src/main/webapp/WEB-INF/templates/header.jsp +++ b/webapp/src/main/webapp/WEB-INF/templates/header.jsp @@ -5,4 +5,4 @@ - \ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/templates/main.jsp b/webapp/src/main/webapp/WEB-INF/templates/main.jsp index db5f350..c28cc20 100644 --- a/webapp/src/main/webapp/WEB-INF/templates/main.jsp +++ b/webapp/src/main/webapp/WEB-INF/templates/main.jsp @@ -14,7 +14,7 @@ - + <fmt:message key="site.title" /> diff --git a/webapp/src/main/webapp/WEB-INF/templates/menu.jsp b/webapp/src/main/webapp/WEB-INF/templates/menu.jsp index eab4162..5f5928c 100644 --- a/webapp/src/main/webapp/WEB-INF/templates/menu.jsp +++ b/webapp/src/main/webapp/WEB-INF/templates/menu.jsp @@ -24,4 +24,4 @@ \ No newline at end of file + --> diff --git a/webapp/src/main/webapp/WEB-INF/templates/sidebar.jsp b/webapp/src/main/webapp/WEB-INF/templates/sidebar.jsp index 9ba01bf..5edf768 100644 --- a/webapp/src/main/webapp/WEB-INF/templates/sidebar.jsp +++ b/webapp/src/main/webapp/WEB-INF/templates/sidebar.jsp @@ -3,4 +3,4 @@ \ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/views/content/_entryContent.jsp b/webapp/src/main/webapp/WEB-INF/views/content/_entryContent.jsp index 61447b6..9f99e4a 100644 --- a/webapp/src/main/webapp/WEB-INF/views/content/_entryContent.jsp +++ b/webapp/src/main/webapp/WEB-INF/views/content/_entryContent.jsp @@ -63,4 +63,3 @@ - diff --git a/webapp/src/main/webapp/WEB-INF/views/content/permalink.jsp b/webapp/src/main/webapp/WEB-INF/views/content/permalink.jsp index 1e43fb8..f23f933 100644 --- a/webapp/src/main/webapp/WEB-INF/views/content/permalink.jsp +++ b/webapp/src/main/webapp/WEB-INF/views/content/permalink.jsp @@ -27,4 +27,4 @@ - \ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/views/index.jsp b/webapp/src/main/webapp/WEB-INF/views/index.jsp index fcfd4d4..72ff672 100644 --- a/webapp/src/main/webapp/WEB-INF/views/index.jsp +++ b/webapp/src/main/webapp/WEB-INF/views/index.jsp @@ -3,4 +3,4 @@

-
\ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/views/sidebar/_profile.jsp b/webapp/src/main/webapp/WEB-INF/views/sidebar/_profile.jsp index 6fe1d40..cba3a2e 100644 --- a/webapp/src/main/webapp/WEB-INF/views/sidebar/_profile.jsp +++ b/webapp/src/main/webapp/WEB-INF/views/sidebar/_profile.jsp @@ -2,4 +2,4 @@
-
\ No newline at end of file + diff --git a/webapp/src/main/webapp/WEB-INF/web.xml b/webapp/src/main/webapp/WEB-INF/web.xml index 32281d7..52602c4 100644 --- a/webapp/src/main/webapp/WEB-INF/web.xml +++ b/webapp/src/main/webapp/WEB-INF/web.xml @@ -2,7 +2,7 @@ - exmp-blog + expt-blog contextConfigLocation diff --git a/webapp/src/main/webapp/docroot/scripts/exmp-blog.min.js b/webapp/src/main/webapp/docroot/scripts/expt-blog.min.js similarity index 99% rename from webapp/src/main/webapp/docroot/scripts/exmp-blog.min.js rename to webapp/src/main/webapp/docroot/scripts/expt-blog.min.js index 5a87e52..16495dc 100644 --- a/webapp/src/main/webapp/docroot/scripts/exmp-blog.min.js +++ b/webapp/src/main/webapp/docroot/scripts/expt-blog.min.js @@ -104,9 +104,9 @@ module.exports = exports; /***/ }), -/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/main/resources/assets/style/exmp-blog.scss": +/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/main/resources/assets/style/expt-blog.scss": /*!*************************************************************************************************************************************!*\ - !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/main/resources/assets/style/exmp-blog.scss ***! + !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/main/resources/assets/style/expt-blog.scss ***! \*************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14332,8 +14332,8 @@ class EntryFactory { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _style_exmp_blog_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style/exmp-blog.scss */ "./src/main/resources/assets/style/exmp-blog.scss"); -/* harmony import */ var _style_exmp_blog_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_exmp_blog_scss__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _style_expt_blog_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style/expt-blog.scss */ "./src/main/resources/assets/style/expt-blog.scss"); +/* harmony import */ var _style_expt_blog_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_expt_blog_scss__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _core_Application__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core/Application */ "./src/main/resources/assets/core/Application.js"); /* * Licensed under the Apache License, Version 2.0 (the "License"); @@ -14363,15 +14363,15 @@ app.run(); /***/ }), -/***/ "./src/main/resources/assets/style/exmp-blog.scss": +/***/ "./src/main/resources/assets/style/expt-blog.scss": /*!********************************************************!*\ - !*** ./src/main/resources/assets/style/exmp-blog.scss ***! + !*** ./src/main/resources/assets/style/expt-blog.scss ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var api = __webpack_require__(/*! ../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); - var content = __webpack_require__(/*! !../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./exmp-blog.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/main/resources/assets/style/exmp-blog.scss"); + var content = __webpack_require__(/*! !../../../../../node_modules/css-loader/dist/cjs.js!../../../../../node_modules/sass-loader/dist/cjs.js!./expt-blog.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/main/resources/assets/style/expt-blog.scss"); content = content.__esModule ? content.default : content; @@ -14434,4 +14434,4 @@ module.exports = __webpack_require__(/*! ./src/main/resources/assets/index.js */ /***/ }) /******/ }); -//# sourceMappingURL=exmp-blog.min.js.map \ No newline at end of file +//# sourceMappingURL=expt-blog.min.js.map \ No newline at end of file diff --git a/webapp/webpack.config.js b/webapp/webpack.config.js index 755fcf6..33197c4 100644 --- a/webapp/webpack.config.js +++ b/webapp/webpack.config.js @@ -6,7 +6,7 @@ module.exports = { ], output: { path: path.join(__dirname, 'src/main/webapp/docroot/scripts'), - filename: 'exmp-blog.min.js' + filename: 'expt-blog.min.js' }, devtool: 'source-map', // to delete in start the service. module: { @@ -29,4 +29,4 @@ module.exports = { } ] } -}; \ No newline at end of file +};