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">
|
||||
<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>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>patterns</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -22,11 +17,22 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<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>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
|
@ -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;
|
||||
}
|
|
@ -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();
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Loading…
Reference in New Issue