Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
083fea9
Second user story implemented: all products listed on index under def…
boroslizi May 14, 2019
8d51653
Product filtering front-end done
boroslizi May 14, 2019
6fc23da
Order class
May 14, 2019
46728f0
Order class
May 14, 2019
54ae9c6
Front-end small changes
boroslizi May 14, 2019
6328c53
get sum of products
May 14, 2019
590b767
initialize an Order Object
zoltanNemeth May 14, 2019
e55e3f1
corrected reduce method in Order Class
zoltanNemeth May 14, 2019
1909660
getSumOfPrice method in Order Class
zoltanNemeth May 14, 2019
5a4a190
test cases for Order Class
zoltanNemeth May 14, 2019
b64f640
refactoring in Product
zoltanNemeth May 14, 2019
b3d387c
database ready, initialisations are modified accordingly
Blodie May 14, 2019
1d9cc89
minor changes to animal data, index shows all animals
Blodie May 14, 2019
835df95
minor refactor
Blodie May 14, 2019
cf7204f
Merge branch 'data' into develop
Blodie May 14, 2019
be1fc87
pictures can now be moved with scrolling
Blodie May 14, 2019
d4d6f38
Corrected getSumOfPriceBy Product method in Order
zoltanNemeth May 15, 2019
30d96a1
Plus test cases in Class Initializer
zoltanNemeth May 15, 2019
818aac9
minor changes to animals data
Blodie May 15, 2019
29e48de
products now have a supplier assigned to them
Blodie May 15, 2019
88def64
Merge branch 'order' into develop
Blodie May 15, 2019
7b3387d
changed order class to a singleton, added complete method
Blodie May 15, 2019
f781681
order date gets saved to json file on order completion, new dependenc…
Blodie May 15, 2019
27bb023
added confirmed and paid field to order class, added main method for …
Blodie May 15, 2019
d167326
Filters back-end implemented && tested
boroslizi May 15, 2019
646cee6
shopping cart page
May 15, 2019
bb719bc
before merging
May 15, 2019
91a6f0d
working
May 15, 2019
62044da
Filter and index page works well
boroslizi May 15, 2019
4ec0158
Add button working
May 15, 2019
5a108cb
Filter refactored
boroslizi May 15, 2019
e903250
Merge branch 'filter_products' into order
May 15, 2019
9e36cc5
Pom dependency corrected
boroslizi May 15, 2019
2028221
working with filter feature
May 15, 2019
b651267
shopping cart button went on top
May 15, 2019
d3653a0
Merge remote-tracking branch 'origin/develop' into order
zoltanNemeth May 15, 2019
dda4741
Refactored Index.html
zoltanNemeth May 15, 2019
98be8c4
Add to Cart with post request
zoltanNemeth May 15, 2019
6bd3347
Refactored table in shopping cart page
zoltanNemeth May 16, 2019
c7a7599
display cart size
May 16, 2019
d5b2beb
Refactored table in shopping cart page
zoltanNemeth May 16, 2019
690c01a
display cart size
May 16, 2019
441c7b4
Merge remote-tracking branch 'origin/order' into order
May 16, 2019
f552e72
Merge into develop
May 16, 2019
1cf473f
Merge pull request #2 from CodecoolGlobal/order
TheRandomHero May 16, 2019
9d1fb1a
Refactored table in shopping cart Controller and Back to shop button …
zoltanNemeth May 16, 2019
e920022
Refactored cart page
zoltanNemeth May 16, 2019
fa292c5
Edit shopping cart
erikaZToth May 16, 2019
637d85a
Formatted table of shopping cart
erikaZToth May 16, 2019
66b065c
checkout done, payment in progress
May 16, 2019
790bacd
Merge branch 'develop' of https://github.com/CodecoolGlobal/webshop-j…
May 16, 2019
2a81f61
Back button and paymant button working
May 16, 2019
1c710cd
payment fields fixed
May 16, 2019
15772bd
Refactored Initializer
zoltanNemeth May 16, 2019
5034402
Refactored ProductController
zoltanNemeth May 16, 2019
3d093a3
Refactored index page, CheckOutController, corrected call of Order.ge…
zoltanNemeth May 16, 2019
2a1fb73
added sql file
Blodie May 28, 2019
9d9ecf7
Junit5 in pom.xml
zoltanNemeth May 28, 2019
06af66b
template for testing ProductDao
zoltanNemeth May 28, 2019
46d1754
Merge branch 'develop' of github.com:CodecoolGlobal/webshop-java-code…
zoltanNemeth May 28, 2019
43ea7cb
Registration template
erikaZToth May 29, 2019
c71dccf
paypal added, and back buttons also
May 29, 2019
245a05b
tests for getBySupplier and getByProductCategory
zoltanNemeth May 29, 2019
409829a
Merge remote-tracking branch 'origin/develop' into paypal
zoltanNemeth May 29, 2019
d77f546
Empty shopping cart after payment (correcting merge from develop)
zoltanNemeth May 29, 2019
fbd5187
name refactor, database
Blodie May 30, 2019
ecdc38d
Merge pull request #3 from CodecoolGlobal/paypal
Blodie May 30, 2019
91965fc
Merge remote-tracking branch 'origin/develop' into develop
Blodie May 30, 2019
e5c05dc
added id column to animals table
Blodie May 30, 2019
0595316
RegistrationController doGet method
erikaZToth May 30, 2019
ced74e6
Merge remote-tracking branch 'origin/develop' into registration
erikaZToth May 30, 2019
8b1a0c0
Merge branch 'develop' into tests
zoltanNemeth May 30, 2019
c54fbfa
UserDaoMem implemented
erikaZToth May 30, 2019
0d6df21
ProductDaoTest corrected according to the refactored names of other o…
zoltanNemeth May 30, 2019
b2b31c6
Test for find() method in AnimalDao
zoltanNemeth May 30, 2019
50ac9a0
Database
Blodie May 30, 2019
b7364a0
Database fully implemented
Blodie May 30, 2019
a2f5893
Refactoring test name and testing getAll()
zoltanNemeth May 30, 2019
d1ed54d
Merge remote-tracking branch 'origin/develop' into registration
erikaZToth May 30, 2019
a8b55b9
Tests for SpeciesDao and ZooDao
zoltanNemeth May 30, 2019
54f22eb
Merge remote-tracking branch 'origin/develop' into tests
zoltanNemeth May 30, 2019
1465db6
users table
erikaZToth May 30, 2019
979baa8
alter tests after merge to avoid exceptions
zoltanNemeth May 30, 2019
168c241
users sql
erikaZToth May 30, 2019
fa71ca9
uncomment some tests, parameterized junit test added to pom.xml
zoltanNemeth May 30, 2019
94bf89e
RegistrationController add user method
erikaZToth May 30, 2019
bff667c
Merge pull request #4 from CodecoolGlobal/registration
Blodie May 30, 2019
78e96ea
Added config file -> easy to switch between DB and Mem
Blodie May 30, 2019
f3e2dff
Merge branch 'convert_to_database' into develop
Blodie May 30, 2019
c59b3e8
Parameterized tests
zoltanNemeth May 30, 2019
b188269
Merge remote-tracking branch 'origin/develop' into tests
zoltanNemeth May 30, 2019
1c4f000
refactored parameterized tests
zoltanNemeth May 30, 2019
c777dcb
test add() for animalDao
zoltanNemeth May 30, 2019
c88d71d
Merge pull request #5 from CodecoolGlobal/tests
zoltanNemeth May 31, 2019
4dd3314
refactored tests
zoltanNemeth Sep 7, 2019
ac6a0d2
orders added to .gitignore
zoltanNemeth Sep 11, 2019
ad392cf
updated readme
zoltanNemeth Sep 11, 2019
fc20b6c
Merge pull request #6 from CodecoolGlobal/tests
zoltanNemeth Sep 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ target/

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# order infos
orders/
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# Codecool Online Shop

Java SE: Web Project skeleton
Java SE: Web Project in Codecool

A simple demo webshop made with Java, Jetty, Thymeleaf, PostgreSQL and JUnit.

# Install

Import this project to IntelliJ as a Maven project.
IntelliJ can auto-install the dependencies based on the pom.xml
Import this project as a Maven project.

Create a PostgreSQL database naming codecoolshop listening on port: localhost:5432

Set environmental variables according to lines 12-13 of CodecoolShopDB.java

Run server with command mvn jetty:run

Run tests as JUnit5 tests (also add JUnit5 to classpath)
1 change: 1 addition & 0 deletions config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
datasource=DB
38 changes: 33 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<packaging>war</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty.version>9.4.12.v20180830</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty.version>9.4.12.v20180830</jetty.version>
</properties>

<build>
Expand All @@ -24,8 +24,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -65,5 +65,33 @@
<artifactId>thymeleaf</artifactId>
<version>3.0.9.RELEASE</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.1.4.jre7</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
</project>
48 changes: 48 additions & 0 deletions src/data/csv/animals.csv

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/data/csv/species.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bird|Vertebrate|Birds (Aves) are a group of endothermic vertebrates, characterised by feathers, toothless beaked jaws, the laying of hard-shelled eggs, a high metabolic rate, a four-chambered heart, and a lightweight but strong skeleton.
Mammal|Vertebrate|Mammals (class Mammalia /məˈmeɪli.ə/ from Latin mamma "breast") are a clade of endothermic amniotes distinguished from reptiles and birds by the possession of a neocortex (a region of the brain), hair, three middle ear bones and mammary glands.
Reptile|Vertebrate|Reptiles are a group (Reptilia) of tetrapod animals comprising today's turtles, crocodilians, snakes, amphisbaenians, lizards, tuatara, and their extinct relatives.
Amphibian|Vertebrate|The amphibians are tetrapods, a class of vertebrate animals with four limbs. They are non-amniotes, which means that their eggs are not surrounded by the several membranes, some impervious, which enable mammals, reptiles and birds to reproduce on land.
12 changes: 12 additions & 0 deletions src/data/csv/zoos.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Montgomery Zoo|Alabama|Montgomery|Montgomery Zoo is a 40-acre (16 ha) zoo located on the north side of Montgomery, Alabama. The zoo is an independent city family, and is aided by The Montgomery Area Zoolocal Society. It is home to approximately 750 animals representing 140 species.
Alaska Zoo|Alaska|Anchorage|The Alaska Zoo is a zoo in Anchorage, Alaska, located on 25 acres (10 ha) of the Anchorage Hillside. It is a popular attraction in Alaska, with nearly 200,000 visitors per year. The zoo is currently home to more than 100 birds and mammals representing some 50 species.
Phoenix Zoo|Arizona|Phoenix|The Phoenix Zoo opened in 1962 and is the largest privately owned, non-profit zoo in the United States. Located in Phoenix, Arizona, the zoo was founded by Robert Maytag, a member of the Maytag family, and operates on 125 acres (51 ha) of land in the Papago Park area of Phoenix. It has been designated as a Phoenix Point of Pride.
Los Angeles Zoo|California|Los Angeles|The Los Angeles Zoo and Botanical Gardens is a 133-acre (54 ha) zoo founded in 1966 and located in Los Angeles, California. The city of Los Angeles owns the entire zoo, its land and facilities, and the animals. Animal care, grounds maintenance, construction, education, public information, and administrative staff are city employees.
San Diego Zoo|California|San Diego|The San Diego Zoo is a zoo in Balboa Park, San Diego, California, housing more than 3,500 animals of more than 650 species and subspecies. Its parent organization, San Diego Zoo Global, is one of the largest[better source need zoological membership associations in the world, with more than 250,000 member households and 130,000 child memberships, representing more than a half million people.
San Francisco Zoo|California|San Francisco|The San Francisco Zoo is a 100-acre (40 ha) zoo located in the southwestern corner of San Francisco, California, between Lake Merced and the Pacific Ocean along the Great Highway. As of 2016, the zoo housed more than one thousand individual animals, representing more than 250 species. It is noted as the birthplace of Koko the gorilla, and, since 1974, the home of Elly, the oldest black rhinoceros in North America.
Disney's Animal Kingdom|Florida|Bay Lake|Disney's Animal Kingdom is a zoological theme park at the Walt Disney World Resort in Bay Lake, Florida, near Orlando. Owned and operated by The Walt Disney Company through its Parks, Experiences and Consumer Products division, it is the largest theme park in the world, covering 580 acres (230 ha). The park opened on Earth Day, April 22, 1998, and was the fourth theme park built at the resort.
Lion Country Safari|Florida|Loxahatchee|Lion Country Safari is a drive-through safari park and walk-through amusement park located on over 600 acres in Loxahatchee (near West Palm Beach), in Palm Beach County, Florida. Founded in 1967, it claims to be the first 'cageless zoo' in the United States.
Monkey Jungle|Florida|Miami|Monkey Jungle is a 30-acre (12 ha) wildlife park established in 1933 for the exhibition and study of endangered monkeys in semi-natural habitats. Many projects have been conducted at the park, which is a tourist attraction in the Miami, Florida area. The park is in Redland, Florida at Southwest 216th Street/Hainlin Mill Road near Southwest 147th Avenue.
Reptile World Serpentarium|Florida|St. Cloud|Reptile World Serpentarium is a reptile zoo in St. Cloud, Osceola County, Florida. It features more than 75 species of snakes, as well as lizards, crocodiles, alligators, and turtles. It is operated by the herpetologist George Van Horn. In addition to having animals on display, it has venom milking shows.
World Center for Birds of Prey|Idaho|Boise|Built 35 years ago in 1984, the World Center for Birds of Prey is located on 580 acres (2.3 km2) on a hilltop overlooking Boise, south of the airport and east of Kuna. The campus consists of the business offices of The Peregrine Fund, breeding facilities for endangered raptors, the Velma Morrison Interpretive Center, and the Herrick Collections Building, which houses a large research library and the Archives of Falconry.
Yellowstone Bear World|Idaho|Rexburg|Yellowstone Bear World is a privately owned drive-thru wildlife park. It is located in Rexburg, Idaho, near Yellowstone National Park. It was established in 1998. The park holds over 8 species of wildlife indigenous to the Greater Yellowstone Ecosystem. Other attractions in the park include a small amusement park and a petting zoo. Yellowstone Bear World is the only wildlife park in the United States where guests can bottle feed bear cubs.
Loading
Loading