BAEL-305 - flatten the module structure for patterns section
This commit is contained in:
parent
c250fa59f1
commit
1b57da559b
|
@ -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);
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<groupId>com.baeldung.enterprise.patterns</groupId>
|
|
||||||
<artifactId>enterprise-patterns-parent</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<modules>
|
|
||||||
<module>front-controller-pattern</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>com.baeldung</groupId>
|
|
||||||
<artifactId>parent-modules</artifactId>
|
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.5.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
|
@ -4,14 +4,9 @@
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>front-controller-pattern</artifactId>
|
|
||||||
<packaging>war</packaging>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<artifactId>enterprise-patterns-parent</artifactId>
|
|
||||||
<groupId>com.baeldung.enterprise.patterns</groupId>
|
<groupId>com.baeldung.enterprise.patterns</groupId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<artifactId>patterns</artifactId>
|
||||||
</parent>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -22,11 +17,22 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.baeldung</groupId>
|
||||||
|
<artifactId>parent-modules</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.5.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
|
@ -1,45 +1,39 @@
|
||||||
package com.baeldung.enterprise.patterns.front.controller.data;
|
package com.baeldung.enterprise.patterns.front.controller.data;
|
||||||
|
|
||||||
public class BookImpl implements Book {
|
public class Book {
|
||||||
private String author;
|
private String author;
|
||||||
private String title;
|
private String title;
|
||||||
private Double price;
|
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.author = author;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.price = price;
|
this.price = price;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAuthor() {
|
public String getAuthor() {
|
||||||
return author;
|
return author;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setAuthor(String author) {
|
public void setAuthor(String author) {
|
||||||
this.author = author;
|
this.author = author;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setTitle(String title) {
|
public void setTitle(String title) {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Double getPrice() {
|
public Double getPrice() {
|
||||||
return price;
|
return price;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setPrice(Double price) {
|
public void setPrice(Double price) {
|
||||||
this.price = price;
|
this.price = price;
|
||||||
}
|
}
|
|
@ -3,8 +3,8 @@ package com.baeldung.enterprise.patterns.front.controller.data;
|
||||||
public interface Bookshelf {
|
public interface Bookshelf {
|
||||||
|
|
||||||
default void init() {
|
default void init() {
|
||||||
add(new BookImpl("Wilson, Robert Anton & Shea, Robert", "Illuminati", 9.99));
|
add(new Book("Wilson, Robert Anton & Shea, Robert", "Illuminati", 9.99));
|
||||||
add(new BookImpl("Fowler, Martin", "Patterns of Enterprise Application Architecture", 27.88));
|
add(new Book("Fowler, Martin", "Patterns of Enterprise Application Architecture", 27.88));
|
||||||
}
|
}
|
||||||
|
|
||||||
Bookshelf getInstance();
|
Bookshelf getInstance();
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Loading…
Reference in New Issue