diff --git a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Book.java b/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Book.java deleted file mode 100644 index abadcc0d76..0000000000 --- a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Book.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.baeldung.enterprise.patterns.front.controller.data; - -public interface Book { - String getAuthor(); - - void setAuthor(String author); - - String getTitle(); - - void setTitle(String title); - - Double getPrice(); - - void setPrice(Double price); -} diff --git a/enterprise-patterns/pom.xml b/enterprise-patterns/pom.xml deleted file mode 100644 index 2fba12547f..0000000000 --- a/enterprise-patterns/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - com.baeldung.enterprise.patterns - enterprise-patterns-parent - pom - - front-controller-pattern - - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - 1.8 - 1.8 - - - - - - diff --git a/enterprise-patterns/front-controller-pattern/pom.xml b/patterns/pom.xml similarity index 77% rename from enterprise-patterns/front-controller-pattern/pom.xml rename to patterns/pom.xml index dbcd4f1b1d..7c23b6f55d 100644 --- a/enterprise-patterns/front-controller-pattern/pom.xml +++ b/patterns/pom.xml @@ -4,15 +4,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - front-controller-pattern + com.baeldung.enterprise.patterns + patterns war - - enterprise-patterns-parent - com.baeldung.enterprise.patterns - 1.0.0-SNAPSHOT - - javax.servlet @@ -22,11 +17,22 @@ + + com.baeldung + parent-modules + 1.0.0-SNAPSHOT + + org.apache.maven.plugins maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + org.eclipse.jetty diff --git a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/FrontControllerServlet.java b/patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/FrontControllerServlet.java similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/FrontControllerServlet.java rename to patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/FrontControllerServlet.java diff --git a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/FrontCommand.java b/patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/FrontCommand.java similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/FrontCommand.java rename to patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/FrontCommand.java diff --git a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/SearchCommand.java b/patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/SearchCommand.java similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/SearchCommand.java rename to patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/SearchCommand.java diff --git a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/UnknownCommand.java b/patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/UnknownCommand.java similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/UnknownCommand.java rename to patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/commands/UnknownCommand.java diff --git a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/BookImpl.java b/patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Book.java similarity index 75% rename from enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/BookImpl.java rename to patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Book.java index b270bc7985..634e05c3a0 100644 --- a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/BookImpl.java +++ b/patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Book.java @@ -1,45 +1,39 @@ package com.baeldung.enterprise.patterns.front.controller.data; -public class BookImpl implements Book { +public class Book { private String author; private String title; private Double price; - public BookImpl() { + public Book() { } - public BookImpl(String author, String title, Double price) { + public Book(String author, String title, Double price) { this.author = author; this.title = title; this.price = price; } - @Override public String getAuthor() { return author; } - @Override public void setAuthor(String author) { this.author = author; } - @Override public String getTitle() { return title; } - @Override public void setTitle(String title) { this.title = title; } - @Override public Double getPrice() { return price; } - @Override public void setPrice(Double price) { this.price = price; } diff --git a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Bookshelf.java b/patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Bookshelf.java similarity index 55% rename from enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Bookshelf.java rename to patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Bookshelf.java index 1e30452d95..524e000bd9 100644 --- a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Bookshelf.java +++ b/patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/Bookshelf.java @@ -3,8 +3,8 @@ package com.baeldung.enterprise.patterns.front.controller.data; public interface Bookshelf { default void init() { - add(new BookImpl("Wilson, Robert Anton & Shea, Robert", "Illuminati", 9.99)); - add(new BookImpl("Fowler, Martin", "Patterns of Enterprise Application Architecture", 27.88)); + add(new Book("Wilson, Robert Anton & Shea, Robert", "Illuminati", 9.99)); + add(new Book("Fowler, Martin", "Patterns of Enterprise Application Architecture", 27.88)); } Bookshelf getInstance(); diff --git a/enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/BookshelfImpl.java b/patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/BookshelfImpl.java similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/BookshelfImpl.java rename to patterns/src/main/java/com/baeldung/enterprise/patterns/front/controller/data/BookshelfImpl.java diff --git a/enterprise-patterns/front-controller-pattern/src/main/resources/front controller.png b/patterns/src/main/resources/front controller.png similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/resources/front controller.png rename to patterns/src/main/resources/front controller.png diff --git a/enterprise-patterns/front-controller-pattern/src/main/resources/front controller.puml b/patterns/src/main/resources/front controller.puml similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/resources/front controller.puml rename to patterns/src/main/resources/front controller.puml diff --git a/enterprise-patterns/front-controller-pattern/src/main/webapp/WEB-INF/jsp/book-found.jsp b/patterns/src/main/webapp/WEB-INF/jsp/book-found.jsp similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/webapp/WEB-INF/jsp/book-found.jsp rename to patterns/src/main/webapp/WEB-INF/jsp/book-found.jsp diff --git a/enterprise-patterns/front-controller-pattern/src/main/webapp/WEB-INF/jsp/book-notfound.jsp b/patterns/src/main/webapp/WEB-INF/jsp/book-notfound.jsp similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/webapp/WEB-INF/jsp/book-notfound.jsp rename to patterns/src/main/webapp/WEB-INF/jsp/book-notfound.jsp diff --git a/enterprise-patterns/front-controller-pattern/src/main/webapp/WEB-INF/jsp/unknown.jsp b/patterns/src/main/webapp/WEB-INF/jsp/unknown.jsp similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/webapp/WEB-INF/jsp/unknown.jsp rename to patterns/src/main/webapp/WEB-INF/jsp/unknown.jsp diff --git a/enterprise-patterns/front-controller-pattern/src/main/webapp/WEB-INF/web.xml b/patterns/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from enterprise-patterns/front-controller-pattern/src/main/webapp/WEB-INF/web.xml rename to patterns/src/main/webapp/WEB-INF/web.xml