https://github.com/novatecconsulting/technologyconsulting-showcase-orderdomain
https://github.com/novatecconsulting/technologyconsulting-showcase-orderdomain
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/novatecconsulting/technologyconsulting-showcase-orderdomain
- Owner: NovatecConsulting
- Created: 2019-11-06T09:54:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-05T22:24:09.000Z (over 1 year ago)
- Last Synced: 2025-01-20T07:08:15.307Z (5 months ago)
- Language: Java
- Size: 410 KB
- Stars: 1
- Watchers: 17
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# technologyconsulting-showcase-orderdomain
orderdomain is a part of a showcase implementation which is running on a open liberty instance. It is structured right now like this- **orderdomainParent** Parent maven module
- **orderdomainDTO** - contains all classes used in the rest controllers
- **orderdomainWAR** - contains the rest controllers and all EJB classes and entities
- **orderdomainEAR** - contains the war moduleand could be found under the src folder
## The projects consists of the following packages
- **de.novatec.showcase.order.dto** - with all related order domain dto's
- **de.novatec.showcase.order.ejb.entity** - with all related order domain entities
- **de.novatec.showcase.order.ejb.session** - with the order domain EJB session beans
- **de.novatec.showcase.order.controller** - with corresponding REST controllers for Item, Customer and Order
- **de.novatec.showcase.order.mapper** - with orika mapper fro dto/entity mapping## build, run and stop orderdomain on an open liberty server
- **build:** mvn clean install
- **run:** mvn liberty:run
- **stop:** mvn liberty:stop
- **run open liberty in development mode:** mvn liberty:devAll commands have to be executed from the orderdomainEAR folder. In development mode you can run the the integration tests (*IT.java classes) by pressing RETURN/ENTER when the server is up. Code changes in the IT tests are hot replaced.
## Smoketest
There is a little script smoketest.sh in the ./resources/smoketest folder which could be used to test if the very basic functionality works after staring the open liberty server with the orderdomain as EAR.- create 24 items
- create a customer
- create an order
- call addInventory for created customer
- call sellInventory for created customerThe smoketest.sh script consist of two sub scripts - the setup-db.sh and business-calls.sh script. The first one setup the database of the orderdomain via some REST calls. The data for the calls could be found in the folder ./resources/smoketest/data. The smoketest script additionally starts/stops a mockserver which is used for emulating the manufature domain in the business calls. The exceptations for the calls could also be found in data folder. All three scripts have the optional parameters -h for setting the host and -p for setting the port of the domain which is called. The host defaults to localhost and port to 9080.
## openAPI
check [openAPI](http://localhost:9080/api/explorer/) if the server is running for the API of the domain## TODOs:
- check functionality of ItemSession.getSubList -> refactor this "PARTS"-thing...
- OrderStatus model is not clean, i.e. DELETED order are also counted with order/count_by_customer/{id}