├── .demo.yaml ├── .dockerignore ├── .gitignore ├── README.md ├── docs ├── Demo Overview.odp ├── Demo Overview.pdf ├── Quick Start Guide.odt ├── Quick Start Guide.pdf └── demo-images │ ├── announce-sign.jpg │ ├── coolstore-decision-table.png │ ├── coolstore-model.png │ ├── coolstore-shoppingcart-0.png │ ├── coolstore-shoppingcart-1.png │ ├── coolstore-shoppingcart-2.png │ ├── coolstore-shoppingcart-3.png │ ├── coolstore-shoppingcart-4.png │ ├── coolstore-shoppingcart-5.png │ ├── ruleflow.png │ ├── video-bpmpaas-coolstore.png │ └── video-brms-coolstore-demo.png ├── init-docker.ps1 ├── init-docker.sh ├── init.ps1 ├── init.sh ├── installs ├── .gitignore └── README ├── projects ├── .gitignore ├── README └── brms-coolstore-demo │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── redhat │ │ │ └── coolstore │ │ │ ├── model │ │ │ ├── Product.java │ │ │ ├── Promotion.java │ │ │ ├── ShoppingCart.java │ │ │ └── ShoppingCartItem.java │ │ │ ├── service │ │ │ ├── ProductService.java │ │ │ ├── PromoService.java │ │ │ ├── ShippingService.java │ │ │ ├── ShoppingCartService.java │ │ │ ├── ShoppingCartServiceImpl.java │ │ │ └── ShoppingCartServiceImplBRMS.java │ │ │ ├── util │ │ │ └── BRMSUtil.java │ │ │ └── web │ │ │ ├── CoolStoreApplication.java │ │ │ └── ui │ │ │ ├── AbstractView.java │ │ │ ├── ProductsView.java │ │ │ ├── ShoppingCartView.java │ │ │ ├── components │ │ │ ├── CheckoutWindow.java │ │ │ └── ShoppingCartLine.java │ │ │ ├── events │ │ │ └── UpdateShopppingCartEvent.java │ │ │ └── util │ │ │ └── Formatter.java │ └── webapp │ │ ├── VAADIN │ │ └── themes │ │ │ └── coolstoretheme │ │ │ ├── addons.scss │ │ │ ├── coolstoretheme.scss │ │ │ ├── favicon.ico │ │ │ ├── fonts │ │ │ ├── Vaadin-Icons.eot │ │ │ ├── Vaadin-Icons.svg │ │ │ ├── Vaadin-Icons.ttf │ │ │ └── Vaadin-Icons.woff │ │ │ ├── images │ │ │ └── logo.png │ │ │ └── styles.scss │ │ └── WEB-INF │ │ └── beans.xml │ └── test │ ├── java │ └── com │ │ └── redhat │ │ └── coolstore │ │ ├── DefaultDeployment.java │ │ └── service │ │ ├── PromoServiceTest.java │ │ ├── ShippingServiceTest.java │ │ └── ShoppingCartServiceTest.java │ └── resources │ └── arquillian.xml └── support ├── README ├── brms-demo-niogit ├── coolstore-demo.git │ ├── FETCH_HEAD │ ├── HEAD │ ├── config │ ├── objects │ │ └── pack │ │ │ ├── pack-7a4ce6bee80c6d0d9506d7ea8045f1fe245d856f.bitmap │ │ │ ├── pack-7a4ce6bee80c6d0d9506d7ea8045f1fe245d856f.idx │ │ │ └── pack-7a4ce6bee80c6d0d9506d7ea8045f1fe245d856f.pack │ └── packed-refs ├── datasets.git │ ├── HEAD │ ├── config │ ├── objects │ │ └── pack │ │ │ ├── pack-01196499aa7b7a7bddea9eb6a6c7ef6d4608afc6.bitmap │ │ │ ├── pack-01196499aa7b7a7bddea9eb6a6c7ef6d4608afc6.idx │ │ │ └── pack-01196499aa7b7a7bddea9eb6a6c7ef6d4608afc6.pack │ └── packed-refs ├── plugins.git │ ├── HEAD │ ├── config │ ├── objects │ │ └── pack │ │ │ ├── pack-19a1c22be99237dab51cac280dacc819f07b8f30.bitmap │ │ │ ├── pack-19a1c22be99237dab51cac280dacc819f07b8f30.idx │ │ │ └── pack-19a1c22be99237dab51cac280dacc819f07b8f30.pack │ └── packed-refs └── system.git │ ├── HEAD │ ├── config │ ├── objects │ ├── 11 │ │ └── bfb700db69cd1233e596d3bb072e91ea766f52 │ ├── 13 │ │ └── d39e410467ab46eab6bf4cce6df7015ef557b8 │ ├── 16 │ │ └── f842f2248407b6360c97f281432d65d9f49e19 │ ├── 19 │ │ └── d6e41a0c4bf81a91c25cd71aece91903349c60 │ ├── 22 │ │ └── 07c054e1402cc62918ec14c3afb619e51a7f97 │ ├── 26 │ │ └── 18861519a724a345c34df6022be441bc738e7c │ ├── 36 │ │ └── 8ab4471e657decb89defd8d8d9b3519512b4a9 │ ├── 37 │ │ └── 5ce337896d120338de0c2221d9f9c5ee42d515 │ ├── 38 │ │ └── 4afb53fbf0faf51bc8b34d64d6c8dfc07705d7 │ ├── 40 │ │ └── ca10baed0048ffe47c220d813284f503087a00 │ ├── 45 │ │ └── 67e8d15a3af09f10612381eed9fd2cc3edbae1 │ ├── 47 │ │ └── f0cf4531e44aa5244ff803e0ab7c3db5312e87 │ ├── 49 │ │ └── 58c5b7e82654cf1165b0f1ef9dc93a6dd9ba7b │ ├── 63 │ │ └── af35397d5d9e663a9fdafeb093e393beabc873 │ ├── 70 │ │ └── 1d2154e6bc07eaddfcc8e0e30d95a90e22c97d │ ├── 71 │ │ └── 9fc5544455bc27d7a807bab335b7b2b9f86bda │ ├── 78 │ │ └── bd34ebcd86c1b285f11756c6417f23a19717f5 │ ├── 79 │ │ └── fd5550a68f9f22cd21b5d5c2127015a619f560 │ ├── 84 │ │ ├── 1f5768057e997cf221cdfd8f5e8200e154ddd3 │ │ └── 43f4ca74bb2836bb3327ae0dc8b971c0883cfc │ ├── 87 │ │ └── d0c1eccbe5f2263d9142e4038e4f0ea8787d9d │ ├── 92 │ │ └── 0019cbdbc4769573c868f432773c893079b049 │ ├── 94 │ │ └── ba1ca5ac0ef23c34671f8ee6821f7fd3288551 │ ├── 95 │ │ └── a6ce36b2ee6952be775cccffc67c7433b39608 │ ├── 04 │ │ └── d4ceb8528cbd07094119840c69ddf21f5c36b9 │ ├── 07 │ │ ├── 7ef1f2a9175ec2c9141d73edd8401be4fddaa6 │ │ └── d4d7da564840fd73c6763cc80d6bb17cb33f91 │ ├── 09 │ │ └── b85cc7cc1e96806ec90df8362e1c8166fab8e8 │ ├── 1a │ │ └── 9be5ba7f9a104ee3b188c39ef52af71de96c0f │ ├── 1d │ │ └── deae9d4e29c3d053b0614558d0f49a2304dc95 │ ├── 3c │ │ └── 31f6c686ea9ddccb0af84edd70e7ed63adb1f2 │ ├── 4b │ │ └── 0749ad01611be0cc331e3e9c8350edda67ba2d │ ├── 4d │ │ └── 8d2c61f117e5aff4f7e17b8e409baa283c47ac │ ├── 4e │ │ └── 6de0decebfb3316447cf7db712f988654e815d │ ├── 5b │ │ └── c804f0541d48deb069850c5d804ebf260b73f1 │ ├── 5d │ │ ├── 442486fc274a7ee03221efe988c8ac4123a5d7 │ │ ├── cba9ae10bd32e79b5a8e8e2c59dfcc35dc2725 │ │ └── e60f7de7b0813ac26589129826099cf95f2883 │ ├── 6a │ │ └── 1a0fb5de924957a42e60cffd091fb8f79fed57 │ ├── 6b │ │ └── a27a433bd9af3a29e7d4659105ea88250f594c │ ├── 6c │ │ └── fadcee5f7e839b5b62880229785d8cbce4de84 │ ├── 8d │ │ ├── 801e1ef1207fd0453e47888cf630ac802814ee │ │ ├── 8378eddff6ebfb70dd438d9e58517809f854ef │ │ └── b7060ef6127373be243f614b824fc8be47c527 │ ├── 8e │ │ └── 506ee8bee5311f08553d6929f319f98e7f15b5 │ ├── 9a │ │ └── 07d303f1b3c2043f6c2d679b376d21e90be1ca │ ├── a6 │ │ └── 1ed1234206137e32430f8c709ee05bb13a07e7 │ ├── a7 │ │ └── ed672aae4cdec13910ed5bc34d07d41b354415 │ ├── a8 │ │ └── 1bc501dce5f65bdf051bfe31223e47c9252917 │ ├── ab │ │ └── 208545034a3b8140c4d43c6df2857c00724248 │ ├── b1 │ │ └── 68da72abfb92d2f9de2e44f56fca580471fc6c │ ├── b2 │ │ └── f615badb4b518bd7a4c8072ce9dc53766875c4 │ ├── b3 │ │ ├── 2f5760532d0e4f76e10faa013c54948c6c894a │ │ ├── 4d5df8dec6da642cae7cfa062b34e18b9c0141 │ │ └── 56fb9d0f221e76910f60aef8c4810b0b77ee92 │ ├── b7 │ │ └── 13d89aed190df1cba854e8baa7bace16b14cb1 │ ├── ba │ │ └── cdad69cf3bf7d078e0e5b2771adc0fffa1346d │ ├── bf │ │ └── 6ffa7b3ecbfcb5edd2011565fb30d8c174cd08 │ ├── c1 │ │ └── 0178885e8801a681779c4d362648aa35582e6e │ ├── c4 │ │ └── 9609270bf1146e53c026c81cc02ca40142ce82 │ ├── cb │ │ └── 7017d3dcbd4e3111cb91329aaf0278e466c156 │ ├── cc │ │ └── a058f884adb6baa88854b7bbf3ea133db54768 │ ├── d1 │ │ └── b6bc777e139e246092bcfa959424f748f8ec7a │ ├── d2 │ │ └── 19521955915b26e31a36202856fc43a52897bb │ ├── d7 │ │ └── db4b323a02cce10ea34d84d963da24104020d7 │ ├── d8 │ │ ├── 263ee9860594d2806b0dfd1bfd17528b0ba2a4 │ │ ├── 5a0183fbefacfd4765bce938205344e671cfbc │ │ └── 7a2df10af643697fb1b64fe75a9b12b6c34d39 │ ├── d9 │ │ └── e01ad9e0b3117db75492a61710d1645fbf1a7d │ ├── dd │ │ └── 512c60999939734ab95886cb1703d0069e08a7 │ ├── de │ │ └── 48d5e2d946317062e6b76d71f244126e1e5624 │ ├── e2 │ │ └── 38444cda97f96fb94cdbb8bddcd936fc03f98a │ ├── e5 │ │ └── c411f6709390f03421dad62ce118642db882d3 │ ├── eb │ │ ├── 0e96b9da94722c3326fe96364d235f011bb329 │ │ └── ed6b498b3965a01f9c74ccd90f9ee424a1d246 │ ├── ed │ │ └── 471eb1fb9160bfa0fdfc7d630b1dd3a59e5859 │ ├── ef │ │ └── f39a72822658f3f87cfcf528895218ae388a86 │ ├── f1 │ │ └── 47b8d996a921d66b987b19630da2eeca07a94a │ ├── f8 │ │ └── aeb54d8d932018a61d2ee76707a16db10d5771 │ ├── f9 │ │ └── 6a5a412a7c15a475cd08e6300cf2c5a7b7f7e4 │ ├── fb │ │ └── 107a04328aa4b1e2a7e0814cc8d95804851cc2 │ ├── ff │ │ └── e1ed94c9679fd3705e05e9ba941c666fc34cf5 │ └── pack │ │ ├── pack-e57f36d39f53c34ab806172e661bd2c801affd11.bitmap │ │ ├── pack-e57f36d39f53c34ab806172e661bd2c801affd11.idx │ │ └── pack-e57f36d39f53c34ab806172e661bd2c801affd11.pack │ ├── packed-refs │ └── refs │ └── heads │ ├── erics-uf-user │ ├── locks │ ├── mailman-uf-user │ └── social ├── docker ├── .dockerignore └── Dockerfile ├── installation-eap ├── installation-eap.variables ├── libs └── coolstore-2.0.0.jar ├── settings.xml ├── standalone.xml ├── userinfo.properties └── windows ├── README └── unzip.vbs /.demo.yaml: -------------------------------------------------------------------------------- 1 | id: jbossdemocentral-brms-coolstore 2 | title: JBoss BRMS Cool Store Demo 3 | github_repo_url: https://github.com/jbossdemocentral/brms-coolstore-demo 4 | technologies: 5 | - RESTful 6 | - CEP 7 | - JBoss EAP 8 | - JBoss BRMS 9 | summary: This is a retail web store demo where you will find rules, decision tables, events, and a ruleflow that is leveraged by a web application. The web application is a WAR built using the JBoss BRMS generated project as a dependency, providing an example project showing how developers can focus on the application code while the business analysts can focus on rules, events, and ruleflows in the JBoss BRMS product web based dashboard. There are three options available to you for using this demo; local, Openshift and Containerized. 10 | level: Beginner 11 | product: brms 12 | author: Jason Milliron, Andrew Block, Eric D. Schabell, Duncan Doyle, Jaen Swart 13 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | #Ignore target directory 2 | target/ 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Dockerfile 2 | *.zip 3 | target/ 4 | .DS_Store 5 | *.classpath 6 | *.settings 7 | .security/ 8 | *.jar 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | JBoss BRMS Suite Cool Store Demo 2 | ================================ 3 | This is a retail web store demo where you will find rules, decision tables, events, and a ruleflow 4 | that is leveraged by a web application. The web application is a WAR built using the JBoss BRMS 5 | generated project as a dependency, providing an example project showing how developers can focus on the 6 | application code while the business analysts can focus on rules, events, and ruleflows in the 7 | JBoss BRMS product web based dashboard. 8 | 9 | This demo is self contained, it uses a custom maven settings to deploy all built JBoss BRMS knowledge artifacts 10 | into an external maven repository (not your local repository), in /tmp/maven-repo. 11 | 12 | There are four options available to you for using this demo; local, Docker, Openshift Online and Red Hat CDK OpenShift Enterprise. 13 | 14 | Software 15 | -------- 16 | The following software is required to run this demo: 17 | - [JBoss EAP 7.0 installer](https://developers.redhat.com/download-manager/file/jboss-eap-7.0.0-installer.jar) 18 | - [JBoss BRMS 6.4.0.GA deployable for EAP 7](https://developers.redhat.com/download-manager/content/origin/files/sha256/14/148eb9be40833d5da00bb6108cbed1852924135d25ceb6c601c62ba43f99f372/jboss-brms-6.4.0.GA-deployable-eap7.x.zip) 19 | - Git client 20 | - Maven 3.2+ 21 | - [7-Zip](http://www.7-zip.org/download.html) (Windows only): to overcome the Windows 260 character path length limit, we need 7-Zip to unzip the BRMS deployable. 22 | 23 | 24 | Option 1 - Install on your machine 25 | ---------------------------------- 26 | 1. [Download and unzip.](https://github.com/jbossdemocentral/brms-coolstore-demo/archive/master.zip) 27 | 28 | 2. Add products to installs directory. 29 | 30 | 3. Run 'init.sh' or 'init.bat' file. 'init.bat' must be run with Administrative privileges. 31 | 32 | 4. Start JBoss BRMS Server by running ./target/jboss-eap-7.0/bin/standalone.sh 33 | 34 | 5. Login to http://localhost:8080/business-central 35 | 36 | ``` 37 | - login for admin and analyst roles (u:brmsAdmin / p:jbossbrms1!) 38 | ``` 39 | 40 | 6. Build and deploy project. To do this, click on 'Authoring -> Project Authoring', this will open the 'Project Authoring' view. Click on the 'Open Project Editor' button, which opens the project editor. Now, click on the 'Build -> Build & Deploy' button, which can be found on the right-hand side of the project editor window. 41 | 42 | 7. Open shopping cart and demo away (http://localhost:8080/brms-coolstore-demo) 43 | 44 | 45 | Option 2 - Install on OpenShift 46 | ------------------------------- 47 | Running this demo in a container on any OpenShift Container Platform is [available at Red Hat Demo Central](https://github.com/redhatdemocentral/rhcs-coolstore-demo). 48 | 49 | 50 | Option 3 - Run in Docker 51 | ----------------------------------------- 52 | The following steps can be used to configure and run the demo in a container 53 | 54 | 1. [Download and unzip.](https://github.com/jbossdemocentral/brms-coolstore-demo/archive/master.zip) 55 | 56 | 2. Add the EAP installer and BPM Suite deployable to installs directory. 57 | 58 | 3. Run the 'init-docker.sh' or 'init-docker.ps1' file. 59 | 60 | 4. Start the container: `docker run -it -p 8080:8080 -p 9990:9990 jbossdemocentral/brms-coolstore-demo` 61 | 62 | 5. Login to http://<DOCKER_HOST>:8080/business-central 63 | 64 | ``` 65 | - login for admin and analyst roles (u:brmsAdmin / p:jbossbrms1!) 66 | ``` 67 | 68 | 6. Open shopping cart and demo away (http://<DOCKER_HOST>:8080/brms-coolstore-demo) 69 | 70 | Additional information can be found in the jbossdemocentral container [developer repository](https://github.com/jbossdemocentral/docker-developer) 71 | 72 | 73 | 74 | Notes 75 | ----- 76 | The web application (shopping cart) is built during demo installation with a provided coolstore project jar version 2.0.0. When you 77 | open the project you will find the version is also set to 2.0.0. You can run the web application as is, but if you build and deploy 78 | a new version of 2.0.0 to your maven repository it will find duplicate rules. To demo you deploy a new version of the coolstore 79 | project by bumping the version number on each build and deploy, noting the KieScanner picking up the new version within 10 seconds 80 | of a new deployment. For example, initially start project, bump the version to 3.0.0, build and deploy, open web application and 81 | watch KieScanner in server logs pick up the 3.0.0 version. Now change a shipping rule value in decision table, save, bump project 82 | version to 4.0.0, build and deploy, watch for KieScanner picking up new 4.0.0 version, now web application on next run will use new 83 | shipping values. 84 | 85 | 86 | Supporting Articles 87 | ------------------- 88 | - [JBoss BRMS Cool Store UI gets Vaadin facelift](http://www.schabell.org/2016/01/jboss-brms-coolstore-ui-vaadin-facelift.html) 89 | 90 | - [7 Steps to Your First Rules with JBoss BRMS Starter Kit](http://www.schabell.org/2015/08/7-steps-first-rules-jboss-brms-starter-kit.html) 91 | 92 | - [3 shockingly easy ways into JBoss rules, events, planning & BPM](http://www.schabell.org/2015/01/3-shockingly-easy-ways-into-jboss-brms-bpmsuite.html) 93 | 94 | - [Jump Start Your Rules, Events, Planning and BPM Today](http://www.schabell.org/2014/12/jump-start-rules-events-planning-bpm-today.html) 95 | 96 | - [4 Foolproof Tips Get You Started With JBoss BRMS 6.0.3](http://www.schabell.org/2014/10/4-foolproof-tips-get-started-jboss-brms-603.html) 97 | 98 | - [How to Use Rules and Events to Drive JBoss BRMS Cool Store for xPaaS](http://www.schabell.org/2014/08/how-to-use-rules-events-drive-jboss-brms-coolstore-xpaas.html) 99 | 100 | - [Red Hat JBoss BRMS - all product demos updated for version 6.0.2.GA release](http://www.schabell.org/2014/07/redhat-jboss-brms-product-demos-6.0.2-updated.html) 101 | 102 | - [Red Hat JBoss BRMS 6 - Demo Cool Store Dynamic Rule Updates (video)] (http://www.schabell.org/2014/05/redhat-jboss-brms6-demo-coolstore-dynamic-rule-updates.html) 103 | 104 | - [Red Hat JBoss BRMS 6 - The New Cool Store Demo] (http://www.schabell.org/2014/03/redhat-jboss-brms-v6-coolstore-demo.html) 105 | 106 | - [JBoss BRMS Cool Store Demo updated with EAP 6.1.1] (http://www.schabell.org/2013/09/jboss-brms-coolstore-demo-updated-eap-611.html) 107 | 108 | - [A shopping cart example in the Cool Store Demo] (http://www.schabell.org/2013/04/jboss-brms-coolstore-demo.html) 109 | 110 | - [Cool Store installation video part I] (http://www.schabell.org/2013/05/jboss-brms-coolstore-demo-video-partI.html) 111 | 112 | - [Cool Store CEP and Rules video part II] (http://www.schabell.org/2013/05/jboss-brms-coolstore-demo-video-partII.html) 113 | 114 | - [Cool Store BPM and Decision Tables video part III] (http://www.schabell.org/2013/05/jboss-brms-coolstore-demo-video-partIII.html) 115 | 116 | 117 | Released versions 118 | ----------------- 119 | See the tagged releases for the following versions of the product: 120 | 121 | - v3.8 JBoss BRMS 6.4.0.GA on JBoss EAP 7.0.0.GA with cool store installed and RH CDK on OSE Cloud install option. 122 | 123 | - v3.7 JBoss BRMS 6.3.0 on JBoss EAP 6.4.7 with cool store installed and RH CDK on OSE Cloud install option. 124 | 125 | - v3.6 JBoss BRMS 6.2.0-BZ-1299002 on JBoss EAP 6.4.4 with cool store installed and RH CDK on OSE Cloud install option. 126 | 127 | - v3.5 JBoss BRMS 6.2.0-BZ-1299002 on JBoss EAP 6.4.4 with cool store installed. 128 | 129 | - v3.4 JBoss BRMS 6.2.0, JBoss EAP 6.4.4 and OSE aligned containerization. 130 | 131 | - v3.3 JBoss BRMS 6.2.0, JBoss EAP 6.4.4 and cool store installed, UI updated to Vaadin 7.6.0. 132 | 133 | - v3.2 JBoss BRMS 6.2.0, JBoss EAP 6.4.4 and cool store installed, UI updated to Vaadin 7. 134 | 135 | - v3.1 JBoss BRMS 6.2.0, JBoss EAP 6.4.4 and cool store installed. 136 | 137 | - v3.0 JBoss BRMS 6.1.1 (patch update applied) with cool store installed and Albert Wong updates for JBDS project importing. 138 | 139 | - v2.9 JBoss BRMS 6.1.1 (patch update applied) with cool store installed. 140 | 141 | - v2.8 JBoss BRMS 6.1 with cool store installed. 142 | 143 | - v2.7 JBoss BRMS 6.0.3 installer with cool store configured to scan external maven repository. 144 | 145 | - v2.6 JBoss BRMS 6.0.3 installer with cool store updated so that project unit tests running again. 146 | 147 | - v2.5 JBoss BRMS 6.0.3 with optional containerized installation. 148 | 149 | - v2.4 moved to JBoss Demo Central, with updated windows init.bat support and one click install button. 150 | 151 | - v2.3 JBoss BRMS 6.0.3 installer with cool store demo installed. 152 | 153 | - v2.2 JBoss BPM Suite 6.0.2, JBoss EAP 6.1.1, cool store demo installed. 154 | 155 | - v2.1 JBoss BPM Suite 6.0.1, JBoss EAP 6.1.1, cool store demo installed. 156 | 157 | - v2.0 JBoss BPM Suite 6.0.0, JBoss EAP 6.1.1, cool store demo installed. 158 | 159 | - v1.4 is BRMS 5.3.1 deployable, running on JBoss EAP 6.1.1, integrated BRMS maven repo into project so no longer need to add to 160 | personal settings configuration which fully automates project build. 161 | 162 | - v1.3 is BRMS 5.3.1 deployable, running on JBoss EAP 6.1.1, and added Forge Laptop Sticker to store. 163 | 164 | - v1.2 is BRMS 5.3.1 deployable, running on JBoss EAP 6.1, mavenized using JBoss repo. 165 | 166 | - v1.1 new welcome screen and doc fixes. 167 | 168 | - v1.0 is BRMS 5.3.1 deployable, running on JBoss EAP 6. 169 | 170 | ![Announcement Sign](https://github.com/jbossdemocentral/brms-coolstore-demo/blob/master/docs/demo-images/announce-sign.jpg?raw=true) 171 | 172 | [![Video bpmPaaS CoolStore](https://github.com/jbossdemocentral/brms-coolstore-demo/blob/master/docs/demo-images/video-brms-coolstore-demo.png?raw=true)](https://vimeo.com/ericschabell/brms-coolstore-demo) 173 | 174 | [![Video bpmPaaS CoolStore](https://github.com/jbossdemocentral/brms-coolstore-demo/blob/master/docs/demo-images/video-bpmpaas-coolstore.png?raw=true)](http://vimeo.com/ericschabell/bpmpaas-brms-coolstore-demo) 175 | 176 | ![Decision Table](https://github.com/jbossdemocentral/brms-coolstore-demo/blob/master/docs/demo-images/coolstore-decision-table.png?raw=true) 177 | 178 | ![Domain Model](https://github.com/jbossdemocentral/brms-coolstore-demo/blob/master/docs/demo-images/coolstore-model.png?raw=true) 179 | -------------------------------------------------------------------------------- /docs/Demo Overview.odp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/Demo Overview.odp -------------------------------------------------------------------------------- /docs/Demo Overview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/Demo Overview.pdf -------------------------------------------------------------------------------- /docs/Quick Start Guide.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/Quick Start Guide.odt -------------------------------------------------------------------------------- /docs/Quick Start Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/Quick Start Guide.pdf -------------------------------------------------------------------------------- /docs/demo-images/announce-sign.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/announce-sign.jpg -------------------------------------------------------------------------------- /docs/demo-images/coolstore-decision-table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/coolstore-decision-table.png -------------------------------------------------------------------------------- /docs/demo-images/coolstore-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/coolstore-model.png -------------------------------------------------------------------------------- /docs/demo-images/coolstore-shoppingcart-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/coolstore-shoppingcart-0.png -------------------------------------------------------------------------------- /docs/demo-images/coolstore-shoppingcart-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/coolstore-shoppingcart-1.png -------------------------------------------------------------------------------- /docs/demo-images/coolstore-shoppingcart-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/coolstore-shoppingcart-2.png -------------------------------------------------------------------------------- /docs/demo-images/coolstore-shoppingcart-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/coolstore-shoppingcart-3.png -------------------------------------------------------------------------------- /docs/demo-images/coolstore-shoppingcart-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/coolstore-shoppingcart-4.png -------------------------------------------------------------------------------- /docs/demo-images/coolstore-shoppingcart-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/coolstore-shoppingcart-5.png -------------------------------------------------------------------------------- /docs/demo-images/ruleflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/ruleflow.png -------------------------------------------------------------------------------- /docs/demo-images/video-bpmpaas-coolstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/video-bpmpaas-coolstore.png -------------------------------------------------------------------------------- /docs/demo-images/video-brms-coolstore-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/docs/demo-images/video-brms-coolstore-demo.png -------------------------------------------------------------------------------- /init-docker.ps1: -------------------------------------------------------------------------------- 1 | 2 | # wipe screen 3 | Clear-Host 4 | 5 | $PROJECT_HOME = $PSScriptRoot 6 | $DEMO="JBoss BRMS Red Hat Cool Store Demo" 7 | $AUTHORS1="Jason Milliron, Andrew Block," 8 | $AUTHORS2="AMahdy AbdElAziz, Eric D. Schabell" 9 | $AUTHORS3="Duncan Doyle, Jaen Swart" 10 | $PROJECT="git@github.com:jbossdemocentral/brms-coolstore-demo.git" 11 | $PRODUCT="JBoss BRMS" 12 | $DOCKERFILE="support\docker\Dockerfile" 13 | $SRC_DIR="$PROJECT_HOME\installs" 14 | $SUPPORT_DIR="$PROJECT_HOME\support" 15 | $BRMS="jboss-brms-6.4.0.GA-deployable-eap7.x.zip" 16 | $EAP="jboss-eap-7.0.0-installer.jar" 17 | $VERSION="6.4" 18 | 19 | set NOPAUSE=true 20 | 21 | Write-Host "##############################################################" 22 | Write-Host "## ##" 23 | Write-Host "## Setting up the $DEMO ##" 24 | Write-Host "## ##" 25 | Write-Host "## ##" 26 | Write-Host "## #### #### # # ### ##" 27 | Write-Host "## # # # # # # # # # ##" 28 | Write-Host "## #### #### # # # ## ##" 29 | Write-Host "## # # # # # # # ##" 30 | Write-Host "## #### # # # # ### ##" 31 | Write-Host "## ##" 32 | Write-Host "## ##" 33 | Write-Host "## brought to you by, ##" 34 | Write-Host "## $AUTHORS1 ##" 35 | Write-Host "## $AUTHORS2 ##" 36 | Write-Host "## $AUTHORS3 ##" 37 | Write-Host "## ##" 38 | Write-Host "## $PROJECT ##" 39 | Write-Host "## ##" 40 | Write-Host "##############################################################`n" 41 | 42 | 43 | If (Test-Path "$SRC_DIR\$EAP") { 44 | Write-Host "Product sources are present...`n" 45 | } Else { 46 | Write-Host "Need to download $EAP package from the Customer Support Portal" 47 | Write-Host "and place it in the $SRC_DIR directory to proceed...`n" 48 | exit 49 | } 50 | 51 | #If (Test-Path "$SRC_DIR\$EAP_PATCH") { 52 | # Write-Host "Product patches are present...`n" 53 | #} Else { 54 | # Write-Host "Need to download $EAP_PATCH package from the Customer Support Portal" 55 | # Write-Host "and place it in the $SRC_DIR directory to proceed...`n" 56 | # exit 57 | #} 58 | 59 | If (Test-Path "$SRC_DIR\$BRMS") { 60 | Write-Host "Product sources are present...`n" 61 | } Else { 62 | Write-Host "Need to download $BRMS package from the Customer Support Portal" 63 | Write-Host "and place it in the $SRC_DIR directory to proceed...`n" 64 | exit 65 | } 66 | 67 | Copy-Item "$SUPPORT_DIR\docker\Dockerfile" "$PROJECT_HOME" -force 68 | 69 | Write-Host "Starting Docker build.`n" 70 | 71 | $argList = "build -t jbossdemocentral/brms-coolstore-demo $PROJECT_HOME" 72 | $process = (Start-Process -FilePath docker.exe -ArgumentList $argList -Wait -PassThru -NoNewWindow) 73 | Write-Host "`n" 74 | 75 | If ($process.ExitCode -ne 0) { 76 | Write-Error "Error occurred during Docker build!" 77 | exit 78 | } 79 | 80 | Write-Host "Docker build finished.`n" 81 | 82 | Remove-Item "$PROJECT_HOME\Dockerfile" -Force 83 | 84 | Write-Host "==================================================================================" 85 | Write-Host "= =" 86 | Write-Host "= You can now start the $PRODUCT in a Docker container with: =" 87 | Write-Host "= =" 88 | Write-Host "= docker run -it -p 8080:8080 -p 9990:9990 jbossdemocentral/brms-coolstore-demo =" 89 | Write-Host "= =" 90 | Write-Host "= Login into business central at: =" 91 | Write-Host "= =" 92 | Write-Host "= http://localhost:8080/business-central (u:brmsAdmin / p:jbossbrms1!) =" 93 | Write-Host "= =" 94 | Write-Host "= Login into the Coolstore application at: =" 95 | Write-Host "= =" 96 | Write-Host "= http://localhost:8080/brms-coolstore-demo =" 97 | Write-Host "= =" 98 | Write-Host "= See README.md for general details to run the various demo cases. =" 99 | Write-Host "= =" 100 | Write-Host "= $PRODUCT $VERSION $DEMO Setup Complete. =" 101 | Write-Host "= =" 102 | Write-Host "================================================================================" 103 | -------------------------------------------------------------------------------- /init-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | DEMO="JBoss BRMS Red Hat Cool Store Demo" 3 | AUTHORS1="Jason Milliron, Andrew Block," 4 | AUTHORS2="AMahdy AbdElAziz, Eric D. Schabell" 5 | AUTHORS3="Duncan Doyle, Jaen Swart" 6 | PROJECT="git@github.com:jbossdemocentral/brms-coolstore-demo.git" 7 | PRODUCT="JBoss BRMS" 8 | DOCKERFILE="support/docker/Dockerfile" 9 | SRC_DIR=./installs 10 | BRMS=jboss-brms-6.4.0.GA-deployable-eap7.x.zip 11 | EAP=jboss-eap-7.0.0-installer.jar 12 | VERSION=6.4 13 | 14 | # wipe screen. 15 | clear 16 | 17 | echo 18 | echo "##############################################################" 19 | echo "## ##" 20 | echo "## Setting up the ${DEMO} ##" 21 | echo "## ##" 22 | echo "## ##" 23 | echo "## #### #### # # ### ##" 24 | echo "## # # # # # # # # # ##" 25 | echo "## #### #### # # # ## ##" 26 | echo "## # # # # # # # ##" 27 | echo "## #### # # # # ### ##" 28 | echo "## ##" 29 | echo "## ##" 30 | echo "## brought to you by, ##" 31 | echo "## ${AUTHORS1} ##" 32 | echo "## ${AUTHORS2} ##" 33 | echo "## ${AUTHORS3} ##" 34 | echo "## ##" 35 | echo "## ${PROJECT} ##" 36 | echo "## ##" 37 | echo "##############################################################" 38 | echo 39 | 40 | # make some checks first before proceeding. 41 | if [ -r $SRC_DIR/$EAP ] || [ -L $SRC_DIR/$EAP ]; then 42 | echo Product sources are present... 43 | echo 44 | else 45 | echo Need to download $EAP package from the Customer Portal 46 | echo and place it in the $SRC_DIR directory to proceed... 47 | echo 48 | exit 49 | fi 50 | 51 | #if [ -r $SRC_DIR/$EAP_PATCH ] || [ -L $SRC_DIR/$EAP_PATCH ]; then 52 | # echo Product patches are present... 53 | # echo 54 | #else 55 | # echo Need to download $EAP_PATCH package from the Customer Portal 56 | # echo and place it in the $SRC_DIR directory to proceed... 57 | # echo 58 | # exit 59 | #fi 60 | 61 | if [ -r $SRC_DIR/$BRMS ] || [ -L $SRC_DIR/$BRMS ]; then 62 | echo Product sources are present... 63 | echo 64 | else 65 | echo Need to download $BRMS package from the Customer Portal 66 | echo and place it in the $SRC_DIR directory to proceed... 67 | echo 68 | exit 69 | fi 70 | 71 | cp support/docker/Dockerfile . 72 | 73 | echo Starting Docker build. 74 | echo 75 | 76 | docker build -t jbossdemocentral/brms-coolstore-demo . 77 | 78 | if [ $? -ne 0 ]; then 79 | echo 80 | echo Error occurred during Docker build! 81 | echo Consult the Docker build output for more information. 82 | exit 83 | fi 84 | 85 | echo Docker build finished. 86 | echo 87 | 88 | rm Dockerfile 89 | 90 | echo 91 | echo "===================================================================================" 92 | echo "= =" 93 | echo "= You can now start the $PRODUCT in a Docker container with: =" 94 | echo "= =" 95 | echo "= docker run -it -p 8080:8080 -p 9990:9990 jbossdemocentral/brms-coolstore-demo =" 96 | echo "= =" 97 | echo "= Login into business central at: =" 98 | echo "= =" 99 | echo "= http://localhost:8080/business-central (u:brmsAdmin / p:jbossbrms1!) =" 100 | echo "= =" 101 | echo "= Login into the Coostore application at: =" 102 | echo "= =" 103 | echo "= http://localhost:8080/brms-coolstore-demo =" 104 | echo "= =" 105 | echo "= =" 106 | echo "= $PRODUCT $VERSION $DEMO Setup Complete. =" 107 | echo "= =" 108 | echo "===================================================================================" 109 | -------------------------------------------------------------------------------- /init.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [switch]$h, 3 | [switch]$o 4 | ) 5 | 6 | 7 | Write-Host "Installing Coolstore Demo" 8 | 9 | # wipe screen 10 | Clear-Host 11 | 12 | $PROJECT_HOME = $PSScriptRoot 13 | $DEMO="JBoss BRMS Red Hat Cool Store Demo" 14 | $AUTHORS1="Jason Milliron, Andrew Block," 15 | $AUTHORS2="AMahdy AbdElAziz, Eric D. Schabell" 16 | $AUTHORS3="Duncan Doyle, Jaen Swart" 17 | $PROJECT="git@github.com:jbossdemocentral/brms-coolstore-demo.git" 18 | $PRODUCT="JBoss BRMS" 19 | $TARGET="$PROJECT_HOME\target" 20 | $JBOSS_HOME="$TARGET\jboss-eap-7.0" 21 | $SERVER_DIR="$JBOSS_HOME\standalone\deployments" 22 | $SERVER_CONF="$JBOSS_HOME\standalone\configuration" 23 | $SERVER_BIN="$JBOSS_HOME\bin" 24 | $SUPPORT_DIR="$PROJECT_HOME\support" 25 | $SRC_DIR="$PROJECT_HOME\installs" 26 | $PRJ_DIR="$PROJECT_HOME\projects\brms-coolstore-demo" 27 | $SUPPORT_LIBS="$PROJECT_HOME\support\libs" 28 | $WEB_INF_LIB="$PROJECT_HOME\projects\brms-coolstore-demo\src\main\webapp\WEB-INF\lib\" 29 | $BRMS="jboss-brms-6.4.0.GA-deployable-eap7.x.zip" 30 | $EAP="jboss-eap-7.0.0-installer.jar" 31 | #$EAP_PATCH="jboss-eap-6.4.7-patch.zip" 32 | $VERSION="6.4" 33 | $PROJECT_GIT_REPO="https://github.com/jbossdemocentral/brms-coolstore-repo" 34 | $PROJECT_GIT_DIR="$PROJECT_HOME\support\demo_project_git" 35 | $OFFLINE_MODE="false" 36 | 37 | 38 | If ($h) { 39 | Write-Host "Usage: init.ps1 [args...]" 40 | Write-Host "where args include:" 41 | Write-Host " -o run this script in offline mode. The project's Git repo will not be downloaded. Instead a cached version will be used if available." 42 | Write-Host " -h prints this help." 43 | exit 44 | } 45 | 46 | 47 | Write-Host "##############################################################" 48 | Write-Host "## ##" 49 | Write-Host "## Setting up the $DEMO ##" 50 | Write-Host "## ##" 51 | Write-Host "## ##" 52 | Write-Host "## #### #### # # ### ##" 53 | Write-Host "## # # # # # # # # # ##" 54 | Write-Host "## #### #### # # # ## ##" 55 | Write-Host "## # # # # # # # ##" 56 | Write-Host "## #### # # # # ### ##" 57 | Write-Host "## ##" 58 | Write-Host "## ##" 59 | Write-Host "## brought to you by, ##" 60 | Write-Host "## $AUTHORS1 ##" 61 | Write-Host "## $AUTHORS2 ##" 62 | Write-Host "## $AUTHORS3 ##" 63 | Write-Host "## ##" 64 | Write-Host "## $PROJECT ##" 65 | Write-Host "## ##" 66 | Write-Host "##############################################################`n" 67 | 68 | 69 | #Test whether Maven is available. 70 | if ((Get-Command "mvn" -ErrorAction SilentlyContinue) -eq $null) 71 | { 72 | Write-Host "Maven is required but not installed yet... aborting.`n" 73 | exit 74 | } 75 | 76 | 77 | If (Test-Path "$SRC_DIR\$EAP") { 78 | Write-Host "Product sources are present...`n" 79 | } Else { 80 | Write-Host "Need to download $EAP package from the Customer Support Portal" 81 | Write-Host "and place it in the $SRC_DIR directory to proceed...`n" 82 | exit 83 | } 84 | 85 | <# 86 | If (Test-Path "$SRC_DIR\$EAP_PATCH") { 87 | Write-Host "Product patches are present...`n" 88 | } Else { 89 | Write-Host "Need to download $EAP_PATCH package from the Customer Support Portal" 90 | Write-Host "and place it in the $SRC_DIR directory to proceed...`n" 91 | exit 92 | } 93 | #> 94 | 95 | If (Test-Path "$SRC_DIR\$BRMS") { 96 | Write-Host "Product sources are present...`n" 97 | } Else { 98 | Write-Host "Need to download $BRMS package from the Customer Support Portal" 99 | Write-Host "and place it in the $SRC_DIR directory to proceed...`n" 100 | exit 101 | } 102 | 103 | #Test whether Java is available. 104 | if ((Get-Command "java.exe" -ErrorAction SilentlyContinue) -eq $null) 105 | { 106 | Write-Host "The 'java' command is required but not available. Please install Java and add it to your PATH.`n" 107 | exit 108 | } 109 | 110 | if ((Get-Command "javac.exe" -ErrorAction SilentlyContinue) -eq $null) 111 | { 112 | Write-Host "The 'javac' command is required but not available. Please install Java and add it to your PATH.`n" 113 | exit 114 | } 115 | 116 | # Test whether 7Zip is available. 117 | # We use 7Zip because it seems to be one of the few ways to extract the BRMS zip file without hitting the 260 character limit problem of the Windows API. 118 | # This is definitely not ideal, but I can't unzip without problems when using the default Powershell unzip utilities. 119 | # 7-Zip can be downloaded here: http://www.7-zip.org/download.html 120 | if ((Get-Command "7z.exe" -ErrorAction SilentlyContinue) -eq $null) 121 | { 122 | Write-Host "The '7z.exe' command is required but not available. Please install 7-Zip.`n" 123 | Write-Host "7-Zip is used to overcome the Windows 260 character limit on paths while extracting the JBoss BRMS ZIP file.`n" 124 | Write-Host "7-Zip can be donwloaded here: http://www.7-zip.org/download.html`n" 125 | Write-Host "Please make sure to add '7z.exe' to your 'PATH' after installation.`n" 126 | exit 127 | } 128 | 129 | # Remove the old installation if it exists 130 | If (Test-Path "$JBOSS_HOME") { 131 | Write-Host "Removing existing installation.`n" 132 | # The "\\?\" prefix is a trick to get around the 256 path-length limit in Windows. 133 | # If we don't do this, the Remove-Item command fails when it tries to delete files with a name longer than 256 characters. 134 | Remove-Item "\\?\$JBOSS_HOME" -Force -Recurse 135 | # The command above does not seem to work reliably, so trying this alternative instead. 136 | #Get-ChildItem -Path "$JBOSS_HOME\\*" -Recurse | Remove-Item -Force -Recurse 137 | #Remove-Item $JBOSS_HOME 138 | } 139 | 140 | #Run installers. 141 | Write-Host "EAP installer running now...`n" 142 | $argList = "-jar $SRC_DIR\$EAP $SUPPORT_DIR\installation-eap -variablefile $SUPPORT_DIR\installation-eap.variables" 143 | $process = (Start-Process -FilePath java.exe -ArgumentList $argList -Wait -PassThru) 144 | Write-Host "Process finished with return code: " $process.ExitCode 145 | Write-Host "`n" 146 | 147 | If ($process.ExitCode -ne 0) { 148 | Write-Error "Error installing JBoss EAP." 149 | exit 150 | } 151 | 152 | <# 153 | Write-Host "Applying JBoss EAP patch now...`n" 154 | $argList = '--command="patch apply ' + "$SRC_DIR\$EAP_PATCH" + ' --override-all"' 155 | $patchProcess = (Start-Process -FilePath "$JBOSS_HOME\bin\jboss-cli.bat" -ArgumentList $argList -Wait -PassThru) 156 | Write-Host "Process finished with return code: " $patchProcess.ExitCode 157 | Write-Host "" 158 | 159 | If ($patchProcess.ExitCode -ne 0) { 160 | Write-Error "Error occurred during JBoss EAP patch installation." 161 | exit 162 | } 163 | 164 | Write-Host "JBoss EAP patch applied succesfully!`n" 165 | #> 166 | 167 | # Using 7-Zip. This currently seems to be the only way to overcome the Windows 260 character path limit. 168 | $argList = "x -o$TARGET -y $SRC_DIR\$BRMS" 169 | $unzipProcess = (Start-Process -FilePath 7z.exe -ArgumentList $argList -Wait -PassThru -NoNewWindow) 170 | 171 | If ($unzipProcess.ExitCode -ne 0) { 172 | Write-Error "Error occurred during JBoss BRMS installation." 173 | exit 174 | } 175 | 176 | Write-Host "" 177 | 178 | Write-Host "- enabling demo accounts setup ...`n" 179 | $argList1 = "-a -r ApplicationRealm -u brmsAdmin -p 'jbossbrms1!' -ro 'analyst,admin,manager,user,kie-server,kiemgmt,rest-all' --silent" 180 | $argList2 = "-a -r ApplicationRealm -u erics -p 'jbossbrms1!' -ro 'analyst,admin,manager,user,kie-server,kiemgmt,rest-all' --silent" 181 | try { 182 | Invoke-Expression "$JBOSS_HOME\bin\add-user.ps1 $argList1" 183 | Invoke-Expression "$JBOSS_HOME\bin\add-user.ps1 $argList2" 184 | } catch { 185 | Write-Error "Error occurred during user account setup." 186 | exit 187 | } 188 | 189 | ################################# Begin setup demo projects ########################################## 190 | 191 | Write-Host "- Setting up demo projects...`n" 192 | New-Item -ItemType directory -Path "$SERVER_BIN\.niogit\" | Out-Null 193 | Copy-Item "$SUPPORT_DIR\brms-demo-niogit\*" "$SERVER_BIN\.niogit\" -force -recurse 194 | 195 | If (! $o) { 196 | # Not in offline mode, so downloading the latest repo. We first download the repo in a temp dir and we only delete the old, cached repo, when the download is succesful. 197 | Write-Host " - cloning the project's Git repo from: $PROJECT_GIT_REPO`n" 198 | If (Test-Path "$PROJECT_HOME\target\temp") { 199 | Remove-Item "$PROJECT_HOME\target\temp" -Force -Recurse 200 | } 201 | $argList = "clone --bare $PROJECT_GIT_REPO $PROJECT_HOME\target\temp\brms-coolstore-repo.git" 202 | $gitProcess = (Start-Process -FilePath "git" -ArgumentList $argList -Wait -PassThru -NoNewWindow) 203 | If ($gitProcess.ExitCode -ne 0) { 204 | Write-Host "Error cloning the project's Git repo. If there is no Internet connection available, please run this script in 'offline-mode' ('-o') to use a previously downloaded and cached version of the project's Git repo... Aborting" 205 | exit 1 206 | } 207 | Write-Host "" 208 | Write-Host " - replacing cached project git repo: $PROJECT_GIT_DIR/brms-coolstore-repo.git`n" 209 | If (Test-Path "$PROJECT_GIT_DIR") { 210 | Remove-Item "$PROJECT_GIT_DIR" -Force -Recurse 211 | } 212 | New-Item -ItemType directory -Path "$PROJECT_GIT_DIR" 213 | Copy-Item "$PROJECT_HOME\target\temp\brms-coolstore-repo.git" "$PROJECT_GIT_DIR\brms-coolstore-repo.git" -Force -Recurse 214 | Remove-Item "$PROJECT_HOME\target\temp" -Force -Recurse 215 | } else { 216 | Write-Host " - running in offline-mode, using cached project's Git repo.`n" 217 | 218 | If (-Not (Test-Path "$PROJECT_GIT_DIR\brms-coolstore-repo.git")) { 219 | Write-Host "No project Git repo found. Please run the script without the 'offline' ('-o') option to automatically download the required Git repository!`n" 220 | exit 1 221 | } 222 | } 223 | # Copy the repo to the JBoss BPMSuite installation directory. 224 | Remove-Item "$JBOSS_HOME\bin\.niogit\coolstore-demo.git" -Force -Recurse 225 | Copy-Item "$PROJECT_GIT_DIR\brms-coolstore-repo.git" "$SERVER_BIN\.niogit\coolstore-demo.git" -force -recurse 226 | 227 | ################################# End setup demo projects ########################################## 228 | 229 | Write-Host "- setting up standalone.xml configuration adjustments...`n" 230 | Copy-Item "$SUPPORT_DIR\standalone.xml" "$SERVER_CONF" -force 231 | 232 | Write-Host "- setup email task notification user...`n" 233 | Copy-Item "$SUPPORT_DIR\userinfo.properties" "$SERVER_DIR\business-central.war\WEB-INF\classes\" -force 234 | 235 | Write-Host "- setting up custom maven settings so KieScanner finds repo updates..." 236 | Copy-Item "$SUPPORT_DIR\settings.xml" "$SERVER_BIN\.settings.xml" 237 | 238 | 239 | If (!(Test-Path "$WEB_INF_LIB")) { 240 | Write-Host "- missing web inf lib directory in project being created..." 241 | New-Item -ItemType directory -Path "$WEB_INF_LIB" | Out-Null 242 | } 243 | 244 | Write-Host "Installing Coolstore JAR in Maven repository..." 245 | $argList = "install:install-file -Dfile=$SUPPORT_LIBS\coolstore-2.0.0.jar -DgroupId=com.redhat -DartifactId=coolstore -Dversion=2.0.0 -Dpackaging=jar" 246 | $mvnFileProcess = (Start-Process -FilePath mvn -ArgumentList $argList -Wait -PassThru -NoNewWindow) 247 | Write-Host "Process finished with return code: " $mvnFileProcess.ExitCode 248 | Write-Host "" 249 | 250 | Write-Host "Running 'mvn clean install' on project." 251 | $argList = "clean install" 252 | $mvnProcess = (Start-Process -FilePath mvn -WorkingDirector "$PRJ_DIR" -ArgumentList $argList -Wait -PassThru -NoNewWindow) 253 | Write-Host "Process finished with return code: " $mvnProcess.ExitCode 254 | Write-Host "" 255 | 256 | Write-Host "Deploying the Cool Store web application." 257 | Copy-Item "$PRJ_DIR\target\brms-coolstore-demo.war" "$SERVER_DIR" 258 | 259 | 260 | Write-Host "============================================================================" 261 | Write-Host "= =" 262 | Write-Host "= You can now start the $PRODUCT with: =" 263 | Write-Host "= =" 264 | Write-Host "= $SERVER_BIN\standalone.ps1 =" 265 | Write-Host "= or =" 266 | Write-Host "= $SERVER_BIN\standalone.bat =" 267 | Write-Host "= =" 268 | Write-Host "= Login into business central at: =" 269 | Write-Host "= =" 270 | Write-Host "= http://localhost:8080/business-central (u:brmsAdmin / p:jbossbrms1!) =" 271 | Write-Host "= =" 272 | Write-Host "= Login into the Coolstore application at: =" 273 | Write-Host "= =" 274 | Write-Host "= http://localhost:8080/brms-coolstore-demo =" 275 | Write-Host "= =" 276 | Write-Host "= See README.md for general details to run the various demo cases. =" 277 | Write-Host "= =" 278 | Write-Host "= $PRODUCT $VERSION $DEMO Setup Complete. =" 279 | Write-Host "= =" 280 | Write-Host "============================================================================" 281 | -------------------------------------------------------------------------------- /init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | DEMO="JBoss BRMS Red Hat Cool Store Demo" 3 | AUTHORS1="Jason Milliron, Andrew Block," 4 | AUTHORS2="AMahdy AbdElAziz, Eric D. Schabell" 5 | AUTHORS3="Duncan Doyle, Jaen Swart" 6 | PROJECT="git@github.com:jbossdemocentral/brms-coolstore-demo.git" 7 | PRODUCT="JBoss BRMS" 8 | TARGET=./target 9 | JBOSS_HOME=$TARGET/jboss-eap-7.0 10 | SERVER_DIR=$JBOSS_HOME/standalone/deployments 11 | SERVER_CONF=$JBOSS_HOME/standalone/configuration 12 | SERVER_BIN=$JBOSS_HOME/bin 13 | SUPPORT_DIR=./support 14 | SRC_DIR=./installs 15 | PRJ_DIR=./projects/brms-coolstore-demo 16 | SUPPORT_LIBS=./support/libs/ 17 | WEB_INF_LIB=./projects/brms-coolstore-demo/src/main/webapp/WEB-INF/lib/ 18 | BRMS=jboss-brms-6.4.0.GA-deployable-eap7.x.zip 19 | EAP=jboss-eap-7.0.0-installer.jar 20 | #EAP_PATCH=jboss-eap-6.4.7-patch.zip 21 | VERSION=6.4 22 | PROJECT_GIT_REPO=https://github.com/jbossdemocentral/brms-coolstore-repo 23 | PROJECT_GIT_DIR=./support/demo_project_git 24 | OFFLINE_MODE=false 25 | 26 | # wipe screen. 27 | clear 28 | 29 | function usage { 30 | echo "Usage: init.sh [args...]" 31 | echo "where args include:" 32 | echo " -o run this script in offline mode. The project's Git repo will not be downloaded. Instead a cached version will be used if available." 33 | echo " -h prints this help." 34 | } 35 | 36 | #Parse the params 37 | while getopts "oh" opt; do 38 | case $opt in 39 | o) 40 | OFFLINE_MODE=true 41 | ;; 42 | h) 43 | usage 44 | exit 0 45 | ;; 46 | \?) 47 | echo "Invalid option: -$OPTARG" >&2 48 | exit 1 49 | ;; 50 | :) 51 | echo "Option -$OPTARG requires an argument." >&2 52 | exit 1 53 | ;; 54 | esac 55 | done 56 | 57 | echo 58 | echo "##############################################################" 59 | echo "## ##" 60 | echo "## Setting up the ${DEMO} ##" 61 | echo "## ##" 62 | echo "## ##" 63 | echo "## #### #### # # ### ##" 64 | echo "## # # # # # # # # # ##" 65 | echo "## #### #### # # # ## ##" 66 | echo "## # # # # # # # ##" 67 | echo "## #### # # # # ### ##" 68 | echo "## ##" 69 | echo "## ##" 70 | echo "## brought to you by, ##" 71 | echo "## ${AUTHORS1} ##" 72 | echo "## ${AUTHORS2} ##" 73 | echo "## ${AUTHORS3} ##" 74 | echo "## ##" 75 | echo "## ${PROJECT} ##" 76 | echo "## ##" 77 | echo "##############################################################" 78 | echo 79 | 80 | command -v mvn -q >/dev/null 2>&1 || { echo >&2 "Maven is required but not installed yet... aborting."; exit 1; } 81 | 82 | # make some checks first before proceeding. 83 | if [ -r $SRC_DIR/$EAP ] || [ -L $SRC_DIR/$EAP ]; then 84 | echo Product sources are present... 85 | echo 86 | else 87 | echo Need to download $EAP package from the Customer Portal 88 | echo and place it in the $SRC_DIR directory to proceed... 89 | echo 90 | exit 91 | fi 92 | 93 | #if [ -r $SRC_DIR/$EAP_PATCH ] || [ -L $SRC_DIR/$EAP_PATCH ]; then 94 | # echo Product patches are present... 95 | # echo 96 | #else 97 | # echo Need to download $EAP_PATCH package from the Customer Portal 98 | # echo and place it in the $SRC_DIR directory to proceed... 99 | # echo 100 | # exit 101 | #fi 102 | 103 | if [ -r $SRC_DIR/$BRMS ] || [ -L $SRC_DIR/$BRMS ]; then 104 | echo JBoss product sources are present... 105 | echo 106 | else 107 | echo Need to download $BRMS package from the Customer Portal 108 | echo and place it in the $SRC_DIR directory to proceed... 109 | exit 110 | fi 111 | 112 | # Remove the old JBoss instance, if it exists. 113 | if [ -x $JBOSS_HOME ]; then 114 | echo " - existing JBoss product install detected and removed..." 115 | echo 116 | rm -rf ./target 117 | fi 118 | 119 | # Run installers. 120 | echo "JBoss EAP installer running now..." 121 | echo 122 | java -jar $SRC_DIR/$EAP $SUPPORT_DIR/installation-eap -variablefile $SUPPORT_DIR/installation-eap.variables 123 | 124 | if [ $? -ne 0 ]; then 125 | echo 126 | echo Error occurred during JBoss EAP installation! 127 | exit 128 | fi 129 | 130 | #echo 131 | #echo "Applying JBoss EAP 6.4.7 patch now..." 132 | #echo 133 | #$JBOSS_HOME/bin/jboss-cli.sh --command="patch apply $SRC_DIR/$EAP_PATCH" 134 | 135 | #if [ $? -ne 0 ]; then 136 | # echo 137 | # echo Error occurred during JBoss EAP patching! 138 | # exit 139 | #fi 140 | 141 | echo 142 | echo "Deploying JBoss BRMS now..." 143 | echo 144 | unzip -qo $SRC_DIR/$BRMS -d $TARGET 145 | 146 | if [ $? -ne 0 ]; then 147 | echo 148 | echo Error occurred during $PRODUCT installation! 149 | exit 150 | fi 151 | 152 | echo 153 | echo " - enabling demo accounts setup..." 154 | echo 155 | $JBOSS_HOME/bin/add-user.sh -a -r ApplicationRealm -u brmsAdmin -p jbossbrms1! -ro analyst,admin,manager,user,kie-server,kiemgmt,rest-all --silent 156 | $JBOSS_HOME/bin/add-user.sh -a -r ApplicationRealm -u erics -p jbossbrms1! -ro analyst,admin,manager,user,kie-server,kiemgmt,rest-all --silent 157 | 158 | echo " - setting up demo projects..." 159 | echo 160 | # Copy the default (internal) BPMSuite repo's. 161 | cp -r $SUPPORT_DIR/brms-demo-niogit $SERVER_BIN/.niogit 162 | # Copy the demo project repo. 163 | if ! $OFFLINE_MODE 164 | then 165 | # Not in offline mode, so downloading the latest repo. We first download the repo in a temp dir and we only delete the old, cached repo, when the download is succesful. 166 | echo " - cloning the project's Git repo from: $PROJECT_GIT_REPO" 167 | echo 168 | rm -rf ./target/temp && git clone --bare $PROJECT_GIT_REPO ./target/temp/brms-coolstore-repo.git || { echo; echo >&2 "Error cloning the project's Git repo. If there is no Internet connection available, please run this script in 'offline-mode' ('-o') to use a previously downloaded and cached version of the project's Git repo... Aborting"; echo; exit 1; } 169 | 170 | echo " - replacing cached project git repo: $PROJECT_GIT_DIR/brms-coolstore-repo.git" 171 | echo 172 | rm -rf $PROJECT_GIT_DIR/brms-coolstore-repo.git && mkdir -p $PROJECT_GIT_DIR && cp -R target/temp/brms-coolstore-repo.git $PROJECT_GIT_DIR/brms-coolstore-repo.git && rm -rf ./target/temp 173 | else 174 | echo " - running in offline-mode, using cached project's Git repo." 175 | echo 176 | if [ ! -d "$PROJECT_GIT_DIR" ] 177 | then 178 | echo "No project Git repo found. Please run the script without the 'offline' ('-o') option to automatically download the required Git repository!" 179 | echo 180 | exit 1 181 | fi 182 | fi 183 | # Copy the repo to the JBoss BPMSuite installation directory. 184 | rm -rf $JBOSS_HOME/bin/.niogit/coolstore-demo.git && cp -R $PROJECT_GIT_DIR/brms-coolstore-repo.git $SERVER_BIN/.niogit/coolstore-demo.git 185 | 186 | 187 | echo " - setting up standalone.xml configuration adjustments..." 188 | echo 189 | cp $SUPPORT_DIR/standalone.xml $SERVER_CONF 190 | 191 | echo " - setup email notification users..." 192 | echo 193 | cp $SUPPORT_DIR/userinfo.properties $SERVER_DIR/business-central.war/WEB-INF/classes/ 194 | 195 | echo " - making sure standalone.sh for server is executable..." 196 | echo 197 | chmod u+x $JBOSS_HOME/bin/standalone.sh 198 | 199 | echo " - setting up custom maven settings so KieScanner finds repo updates..." 200 | echo 201 | cp $SUPPORT_DIR/settings.xml $SERVER_BIN/.settings.xml 202 | 203 | # ensure project lib dir exists. 204 | if [ ! -d $WEB_INF_LIB ]; then 205 | echo " - missing web inf lib directory in project being created..." 206 | echo 207 | mkdir -p $WEB_INF_LIB 208 | fi 209 | 210 | mvn install:install-file -Dfile=$SUPPORT_LIBS/coolstore-2.0.0.jar -DgroupId=com.redhat -DartifactId=coolstore -Dversion=2.0.0 -Dpackaging=jar 211 | 212 | echo 213 | echo Deploying the Cool Store web application. 214 | echo 215 | cd $PRJ_DIR 216 | mvn clean install 217 | cp target/brms-coolstore-demo.war ../../$SERVER_DIR 218 | cd ../.. 219 | 220 | echo 221 | echo "============================================================================" 222 | echo "= =" 223 | echo "= You can now start the $PRODUCT with: =" 224 | echo "= =" 225 | echo "= $SERVER_BIN/standalone.sh =" 226 | echo "= =" 227 | echo "= Login into business central at: =" 228 | echo "= =" 229 | echo "= http://localhost:8080/business-central (u:brmsAdmin / p:jbossbrms1!) =" 230 | echo "= =" 231 | echo "= Login into the Coostore application at: =" 232 | echo "= =" 233 | echo "= http://localhost:8080/brms-coolstore-demo =" 234 | echo "= =" 235 | echo "= See README.md for general details to run the various demo cases. =" 236 | echo "= =" 237 | echo "= $PRODUCT $VERSION $DEMO Setup Complete. =" 238 | echo "= =" 239 | echo "============================================================================" 240 | -------------------------------------------------------------------------------- /installs/.gitignore: -------------------------------------------------------------------------------- 1 | *.zip 2 | -------------------------------------------------------------------------------- /installs/README: -------------------------------------------------------------------------------- 1 | Download the following from http://developers.redhat.com 2 | 3 | * EAP installer (jboss-eap-7.0.0-installer.jar) 4 | * BRMS deployable (jboss-brms-6.4.0.GA-deployable-eap7.x.zip) 5 | 6 | and copy to this directory for the init.sh and init.ps1 scripts to work. 7 | 8 | Ensure that this file is executable by running: 9 | 10 | chmod +x /installs/jboss-eap-7.0.0-installer.jar 11 | -------------------------------------------------------------------------------- /projects/.gitignore: -------------------------------------------------------------------------------- 1 | .metadata/ 2 | RemoteSystemsTempFiles/ 3 | .project 4 | -------------------------------------------------------------------------------- /projects/README: -------------------------------------------------------------------------------- 1 | Directory for project that can be imported as a maven project into JBoss Developer Studio. 2 | 3 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.redhat 5 | brms-coolstore-demo 6 | 3.0.0-FINAL 7 | war 8 | Red Hat Cool Store 9 | 10 | 12 | ${project.artifactId} 13 | 14 | 16 | 17 | maven-compiler-plugin 18 | 3.0 19 | 20 | ${project.encoding} 21 | 1.8 22 | 1.8 23 | 24 | 25 | 26 | org.apache.maven.plugins 27 | maven-resources-plugin 28 | 3.0.0 29 | 30 | ${project.encoding} 31 | 32 | 33 | 34 | maven-war-plugin 35 | 3.0.0 36 | 37 | 38 | false 39 | 40 | WEB-INF/classes/VAADIN/widgetsets/WEB-INF/** 41 | 42 | 43 | 44 | com.vaadin 45 | vaadin-maven-plugin 46 | ${vaadin.plugin.version} 47 | 48 | 49 | 50 | update-theme 51 | update-widgetset 52 | compile 53 | 54 | compile-theme 55 | 56 | 57 | 58 | 59 | 60 | org.apache.maven.plugins 61 | maven-source-plugin 62 | 3.0.0 63 | 64 | 65 | org.apache.maven.plugins 66 | maven-clean-plugin 67 | 3.0.0 68 | 69 | 70 | 71 | 72 | src/main/webapp/VAADIN/themes 73 | 74 | **/styles.css 75 | **/styles.scss.cache 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | org.jboss.as.plugins 85 | jboss-as-maven-plugin 86 | 7.3.Final 87 | 88 | 89 | 90 | 91 | 92 | 93 | 95 | 97 | default 98 | 99 | true 100 | 101 | 102 | 103 | 104 | org.kie 105 | kie-ci 106 | 107 | 108 | 109 | 110 | com.google.inject.extensions 111 | guice-servlet 112 | ${version.com.google.inject.extensions.guice-servlet} 113 | compile 114 | 115 | 116 | 117 | 118 | org.jboss.shrinkwrap.resolver 119 | shrinkwrap-resolver-api 120 | test 121 | 122 | 123 | org.jboss.shrinkwrap.resolver 124 | shrinkwrap-resolver-spi 125 | test 126 | 127 | 128 | org.jboss.shrinkwrap.resolver 129 | shrinkwrap-resolver-api-maven 130 | test 131 | 132 | 133 | org.jboss.shrinkwrap.resolver 134 | shrinkwrap-resolver-spi-maven 135 | test 136 | 137 | 138 | org.jboss.shrinkwrap.resolver 139 | shrinkwrap-resolver-impl-maven 140 | test 141 | 142 | 143 | org.jboss.shrinkwrap.resolver 144 | shrinkwrap-resolver-impl-maven-archive 145 | test 146 | 147 | 148 | 149 | 150 | 151 | 152 | maven-surefire-plugin 153 | 2.19.1 154 | 155 | true 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 165 | 167 | 168 | arq-jbossas-managed 169 | 170 | 171 | org.jboss.as 172 | jboss-as-arquillian-container-managed 173 | test 174 | 175 | 176 | 177 | org.jboss.shrinkwrap.resolver 178 | shrinkwrap-resolver-api 179 | test 180 | 181 | 182 | org.jboss.shrinkwrap.resolver 183 | shrinkwrap-resolver-spi 184 | test 185 | 186 | 187 | org.jboss.shrinkwrap.resolver 188 | shrinkwrap-resolver-api-maven 189 | test 190 | 191 | 192 | org.jboss.shrinkwrap.resolver 193 | shrinkwrap-resolver-spi-maven 194 | test 195 | 196 | 197 | org.jboss.shrinkwrap.resolver 198 | shrinkwrap-resolver-impl-maven 199 | test 200 | 201 | 202 | org.jboss.shrinkwrap.resolver 203 | shrinkwrap-resolver-impl-maven-archive 204 | test 205 | 206 | 207 | 208 | 209 | org.kie 210 | kie-ci 211 | 212 | 213 | 214 | 215 | 216 | 218 | 219 | arq-jbossas-remote 220 | 221 | 222 | org.jboss.as 223 | jboss-as-arquillian-container-remote 224 | test 225 | 226 | 227 | 228 | org.jboss.shrinkwrap.resolver 229 | shrinkwrap-resolver-api 230 | test 231 | 232 | 233 | org.jboss.shrinkwrap.resolver 234 | shrinkwrap-resolver-spi 235 | test 236 | 237 | 238 | org.jboss.shrinkwrap.resolver 239 | shrinkwrap-resolver-api-maven 240 | test 241 | 242 | 243 | org.jboss.shrinkwrap.resolver 244 | shrinkwrap-resolver-spi-maven 245 | test 246 | 247 | 248 | org.jboss.shrinkwrap.resolver 249 | shrinkwrap-resolver-impl-maven 250 | test 251 | 252 | 253 | org.jboss.shrinkwrap.resolver 254 | shrinkwrap-resolver-impl-maven-archive 255 | test 256 | 257 | 258 | 259 | 260 | org.kie 261 | kie-ci 262 | 263 | 264 | 265 | 266 | 267 | 269 | 271 | 273 | 274 | openshift 275 | 276 | 277 | 278 | maven-war-plugin 279 | 2.6 280 | 281 | deployments 282 | ROOT 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | org.kie 291 | kie-ci 292 | 293 | 294 | 295 | org.jboss.shrinkwrap.resolver 296 | shrinkwrap-resolver-api 297 | test 298 | 299 | 300 | org.jboss.shrinkwrap.resolver 301 | shrinkwrap-resolver-spi 302 | test 303 | 304 | 305 | org.jboss.shrinkwrap.resolver 306 | shrinkwrap-resolver-api-maven 307 | test 308 | 309 | 310 | org.jboss.shrinkwrap.resolver 311 | shrinkwrap-resolver-spi-maven 312 | test 313 | 314 | 315 | org.jboss.shrinkwrap.resolver 316 | shrinkwrap-resolver-impl-maven 317 | test 318 | 319 | 320 | org.jboss.shrinkwrap.resolver 321 | shrinkwrap-resolver-impl-maven-archive 322 | test 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | org.jboss.bom.brms 332 | jboss-brms-bpmsuite-bom 333 | pom 334 | import 335 | ${jboss.brms.version} 336 | 337 | 338 | org.jboss.bom 339 | jboss-javaee-6.0-with-tools 340 | pom 341 | import 342 | ${javaee6.with.tools.version} 343 | 344 | 345 | org.jboss.shrinkwrap.resolver 346 | shrinkwrap-resolver-bom 347 | 2.2.2 348 | pom 349 | import 350 | 351 | 352 | com.vaadin 353 | vaadin-bom 354 | ${vaadin.version} 355 | pom 356 | import 357 | 358 | 359 | 360 | 361 | 363 | 365 | UTF-8 366 | 367 | 369 | yyyyMMdd'T'HHmmss 370 | 371 | 372 | 1.0.4.Final-redhat-4 373 | 374 | 375 | 376 | 6.3.0.GA-redhat-3 377 | 378 | 379 | 8.1.0 380 | 8.1.0 381 | 382 | cdn 383 | 384 | 385 | 3.0 386 | 387 | UTF-8 388 | 389 | 390 | 391 | 392 | jboss-maven-repository 393 | JBoss Maven Repository 394 | http://maven.repository.redhat.com/techpreview/all/ 395 | default 396 | 397 | true 398 | always 399 | 400 | 401 | true 402 | always 403 | 404 | 405 | 406 | vaadin-addons 407 | http://maven.vaadin.com/vaadin-addons 408 | 409 | 410 | vaadin-snapshots 411 | https://oss.sonatype.org/content/repositories/vaadin-snapshots/ 412 | 413 | true 414 | 415 | 416 | 417 | 418 | 419 | 420 | jboss-maven-repository 421 | JBoss Maven Repository 422 | http://maven.repository.redhat.com/techpreview/all/ 423 | default 424 | 425 | true 426 | always 427 | 428 | 429 | true 430 | always 431 | 432 | 433 | 434 | 435 | 436 | 437 | 439 | 440 | javax.enterprise 441 | cdi-api 442 | provided 443 | 444 | 445 | 447 | 448 | org.hibernate.javax.persistence 449 | hibernate-jpa-2.0-api 450 | provided 451 | 452 | 453 | 455 | 456 | org.jboss.spec.javax.ejb 457 | jboss-ejb-api_3.1_spec 458 | provided 459 | 460 | 461 | 462 | 463 | com.vaadin 464 | vaadin-server 465 | 466 | 467 | 468 | com.vaadin 469 | vaadin-themes 470 | 471 | 472 | 473 | com.vaadin 474 | vaadin-client 475 | 476 | 477 | 478 | com.vaadin 479 | vaadin-cdi 480 | 481 | 482 | 483 | org.vaadin 484 | viritin 485 | 2.0.beta2 486 | 487 | 488 | 489 | javax.validation 490 | validation-api 491 | provided 492 | 493 | 494 | 495 | javax 496 | javaee-web-api 497 | 6.0 498 | provided 499 | 500 | 501 | 502 | 503 | 504 | org.mvel 505 | mvel2 506 | 2.2.4.Final-redhat-1 507 | 508 | 509 | 510 | org.jboss.spec.javax.transaction 511 | jboss-transaction-api_1.1_spec 512 | provided 513 | 514 | 515 | org.jboss.remoting3 516 | jboss-remoting 517 | 3.2.16.GA-redhat-1 518 | 519 | provided 520 | 521 | 522 | org.slf4j 523 | slf4j-api 524 | 1.7.6 525 | 526 | provided 527 | 528 | 529 | 530 | 531 | com.redhat 532 | coolstore 533 | LATEST 534 | 535 | 536 | 537 | org.kie 538 | kie-internal 539 | 540 | 541 | org.jbpm 542 | jbpm-bpmn2 543 | 544 | 545 | 546 | 547 | org.drools 548 | drools-workbench-models-guided-dtable 549 | 550 | 551 | 552 | 553 | junit 554 | junit 555 | test 556 | 557 | 558 | 559 | org.jboss.arquillian.junit 560 | arquillian-junit-container 561 | test 562 | 563 | 564 | 565 | org.jboss.arquillian.protocol 566 | arquillian-protocol-servlet 567 | test 568 | 569 | 570 | 571 | 572 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/model/Product.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.model; 2 | 3 | public class Product { 4 | 5 | private String itemId; 6 | private String name; 7 | private String desc; 8 | private double price; 9 | 10 | public Product() { 11 | 12 | } 13 | 14 | public Product(String itemId, String name, String desc, double price) { 15 | super(); 16 | this.itemId = itemId; 17 | this.name = name; 18 | this.desc = desc; 19 | this.price = price; 20 | } 21 | public String getItemId() { 22 | return itemId; 23 | } 24 | public void setItemId(String itemId) { 25 | this.itemId = itemId; 26 | } 27 | public String getName() { 28 | return name; 29 | } 30 | public void setName(String name) { 31 | this.name = name; 32 | } 33 | public String getDesc() { 34 | return desc; 35 | } 36 | public void setDesc(String desc) { 37 | this.desc = desc; 38 | } 39 | public double getPrice() { 40 | return price; 41 | } 42 | public void setPrice(double price) { 43 | this.price = price; 44 | } 45 | 46 | @Override 47 | public String toString() { 48 | return "Product [itemId=" + itemId + ", name=" + name + ", desc=" 49 | + desc + ", price=" + price + "]"; 50 | } 51 | 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/model/Promotion.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.model; 2 | 3 | public class Promotion { 4 | 5 | private String itemId; 6 | 7 | private double percentOff; 8 | 9 | public Promotion() { 10 | 11 | } 12 | 13 | public Promotion(String itemId, double percentOff) { 14 | super(); 15 | this.itemId = itemId; 16 | this.percentOff = percentOff; 17 | } 18 | 19 | public String getItemId() { 20 | return itemId; 21 | } 22 | 23 | public void setItemId(String itemId) { 24 | this.itemId = itemId; 25 | } 26 | 27 | public double getPercentOff() { 28 | return percentOff; 29 | } 30 | 31 | public void setPercentOff(double percentOff) { 32 | this.percentOff = percentOff; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return "Promotion [itemId=" + itemId + ", percentOff=" + percentOff 38 | + "]"; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/model/ShoppingCart.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.model; 2 | 3 | import java.io.Serializable; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import javax.enterprise.context.SessionScoped; 8 | 9 | @SessionScoped 10 | public class ShoppingCart implements Serializable { 11 | 12 | private static final long serialVersionUID = -1108043957592113528L; 13 | 14 | private double cartItemTotal; 15 | 16 | private double cartItemPromoSavings; 17 | 18 | private double shippingTotal; 19 | 20 | private double shippingPromoSavings; 21 | 22 | private double cartTotal; 23 | 24 | private List shoppingCartItemList = new ArrayList(); 25 | 26 | public List getShoppingCartItemList() { 27 | return shoppingCartItemList; 28 | } 29 | 30 | public void setShoppingCartItemList(List shoppingCartItemList) { 31 | this.shoppingCartItemList = shoppingCartItemList; 32 | } 33 | 34 | public void resetShoppingCartItemList() { 35 | shoppingCartItemList = new ArrayList(); 36 | } 37 | 38 | public void addShoppingCartItem(ShoppingCartItem sci) { 39 | 40 | if ( sci != null ) { 41 | 42 | shoppingCartItemList.add(sci); 43 | 44 | 45 | } 46 | 47 | } 48 | 49 | public boolean removeShoppingCartItem(ShoppingCartItem sci) { 50 | 51 | boolean removed = false; 52 | 53 | if ( sci != null ) { 54 | 55 | removed = shoppingCartItemList.remove(sci); 56 | 57 | } 58 | 59 | return removed; 60 | 61 | } 62 | 63 | public double getCartItemTotal() { 64 | return cartItemTotal; 65 | } 66 | 67 | public void setCartItemTotal(double cartItemTotal) { 68 | this.cartItemTotal = cartItemTotal; 69 | } 70 | 71 | public double getShippingTotal() { 72 | return shippingTotal; 73 | } 74 | 75 | public void setShippingTotal(double shippingTotal) { 76 | this.shippingTotal = shippingTotal; 77 | } 78 | 79 | public double getCartTotal() { 80 | return cartTotal; 81 | } 82 | 83 | public void setCartTotal(double cartTotal) { 84 | this.cartTotal = cartTotal; 85 | } 86 | 87 | public double getCartItemPromoSavings() { 88 | return cartItemPromoSavings; 89 | } 90 | 91 | public void setCartItemPromoSavings(double cartItemPromoSavings) { 92 | this.cartItemPromoSavings = cartItemPromoSavings; 93 | } 94 | 95 | public double getShippingPromoSavings() { 96 | return shippingPromoSavings; 97 | } 98 | 99 | public void setShippingPromoSavings(double shippingPromoSavings) { 100 | this.shippingPromoSavings = shippingPromoSavings; 101 | } 102 | 103 | @Override 104 | public String toString() { 105 | return "ShoppingCart [cartItemTotal=" + cartItemTotal 106 | + ", cartItemPromoSavings=" + cartItemPromoSavings 107 | + ", shippingTotal=" + shippingTotal 108 | + ", shippingPromoSavings=" + shippingPromoSavings 109 | + ", cartTotal=" + cartTotal + ", shoppingCartItemList=" 110 | + shoppingCartItemList + "]"; 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/model/ShoppingCartItem.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.model; 2 | 3 | public class ShoppingCartItem { 4 | 5 | private double price; 6 | private int quantity; 7 | private double promoSavings; 8 | private Product product; 9 | 10 | public double getPrice() { 11 | return price; 12 | } 13 | 14 | public void setPrice(double price) { 15 | this.price = price; 16 | } 17 | 18 | public Product getProduct() { 19 | return product; 20 | } 21 | 22 | public void setProduct(Product product) { 23 | this.product = product; 24 | } 25 | 26 | public int getQuantity() { 27 | return quantity; 28 | } 29 | 30 | public void setQuantity(int quantity) { 31 | this.quantity = quantity; 32 | } 33 | 34 | public double getPromoSavings() { 35 | return promoSavings; 36 | } 37 | 38 | public void setPromoSavings(double promoSavings) { 39 | this.promoSavings = promoSavings; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return "ShoppingCartItem [price=" + price + ", quantity=" + quantity 45 | + ", promoSavings=" + promoSavings + ", product=" + product 46 | + "]"; 47 | } 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/service/ProductService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.service; 2 | 3 | import java.util.ArrayList; 4 | import java.util.HashMap; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import javax.ejb.Singleton; 9 | 10 | import com.redhat.coolstore.model.Product; 11 | 12 | @Singleton 13 | public class ProductService { 14 | 15 | private List products; 16 | 17 | public ProductService() { 18 | 19 | products = new ArrayList(); 20 | 21 | products.add(new Product("329299", "Red Fedora", "Official Red Hat Fedora", 34.99)); 22 | products.add(new Product("329199", "Forge Laptop Sticker", "JBoss Community Forge Project Sticker", 8.50)); 23 | products.add(new Product("165613", "Solid Performance Polo", "Moisture-wicking, antimicrobial 100% polyester design wicks for life of garment. No-curl, rib-knit collar; special collar band maintains crisp fold; three-button placket with dyed-to-match buttons; hemmed sleeves; even bottom with side vents; Import. Embroidery. Red Pepper.", 17.80)); 24 | products.add(new Product("165614", "Ogio Caliber Polo", "Moisture-wicking 100% polyester. Rib-knit collar and cuffs; Ogio jacquard tape inside neck; bar-tacked three-button placket with Ogio dyed-to-match buttons; side vents; tagless; Ogio badge on left sleeve. Import. Embroidery. Black.", 28.75)); 25 | products.add(new Product("165954", "16 oz. Vortex Tumbler", " Double-wall insulated, BPA-free, acrylic cup. Push-on lid with thumb-slide closure; for hot and cold beverages. Holds 16 oz. Hand wash only. Imprint. Clear.", 6.00)); 26 | 27 | } 28 | 29 | public List getProducts() { 30 | 31 | return new ArrayList(products); 32 | 33 | } 34 | 35 | public void setProducts(List products) { 36 | 37 | if ( products != null ) { 38 | 39 | this.products = new ArrayList(products); 40 | 41 | } else { 42 | 43 | this.products = new ArrayList(); 44 | } 45 | 46 | } 47 | 48 | public Map getProductMap() { 49 | 50 | Map productMap = new HashMap(); 51 | 52 | for (Product p : getProducts()) { 53 | 54 | productMap.put(p.getItemId(), p); 55 | 56 | } 57 | 58 | return productMap; 59 | 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/service/PromoService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.service; 2 | 3 | import java.io.Serializable; 4 | import java.util.HashMap; 5 | import java.util.HashSet; 6 | import java.util.Map; 7 | import java.util.Set; 8 | 9 | import javax.ejb.Singleton; 10 | 11 | import com.redhat.coolstore.model.Promotion; 12 | import com.redhat.coolstore.model.ShoppingCart; 13 | import com.redhat.coolstore.model.ShoppingCartItem; 14 | 15 | @Singleton 16 | public class PromoService implements Serializable { 17 | 18 | private static final long serialVersionUID = 2088590587856645568L; 19 | 20 | private String name = null; 21 | 22 | private Set promotionSet = null; 23 | 24 | public PromoService() { 25 | 26 | promotionSet = new HashSet(); 27 | 28 | promotionSet.add(new Promotion("329299", .25)); 29 | 30 | } 31 | 32 | public void applyCartItemPromotions(ShoppingCart shoppingCart) { 33 | 34 | if ( shoppingCart != null && shoppingCart.getShoppingCartItemList().size() > 0 ) { 35 | 36 | Map promoMap = new HashMap(); 37 | 38 | for (Promotion promo : getPromotions()) { 39 | 40 | promoMap.put(promo.getItemId(), promo); 41 | 42 | } 43 | 44 | for ( ShoppingCartItem sci : shoppingCart.getShoppingCartItemList() ) { 45 | 46 | String productId = sci.getProduct().getItemId(); 47 | 48 | Promotion promo = promoMap.get(productId); 49 | 50 | if ( promo != null ) { 51 | 52 | sci.setPromoSavings(sci.getProduct().getPrice() * promo.getPercentOff() * -1); 53 | sci.setPrice(sci.getProduct().getPrice() * (1-promo.getPercentOff())); 54 | 55 | } 56 | 57 | } 58 | 59 | } 60 | 61 | } 62 | 63 | public void applyShippingPromotions(ShoppingCart shoppingCart) { 64 | 65 | if ( shoppingCart != null ) { 66 | 67 | //PROMO: if cart total is greater than 75, free shipping 68 | if ( shoppingCart.getCartItemTotal() >= 75) { 69 | 70 | shoppingCart.setShippingPromoSavings(shoppingCart.getShippingTotal() * -1); 71 | shoppingCart.setShippingTotal(0); 72 | 73 | } 74 | 75 | } 76 | 77 | } 78 | 79 | public Set getPromotions() { 80 | 81 | if ( promotionSet == null ) { 82 | 83 | promotionSet = new HashSet(); 84 | 85 | } 86 | 87 | return new HashSet(promotionSet); 88 | 89 | } 90 | 91 | public void setPromotions(Set promotionSet) { 92 | 93 | if ( promotionSet != null ) { 94 | 95 | this.promotionSet = new HashSet(promotionSet); 96 | 97 | } else { 98 | 99 | this.promotionSet = new HashSet(); 100 | 101 | } 102 | 103 | } 104 | 105 | @Override 106 | public String toString() { 107 | return "PromoService [name=" + name + ", promotionSet=" + promotionSet 108 | + "]"; 109 | } 110 | 111 | } 112 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/service/ShippingService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.service; 2 | 3 | import javax.ejb.Stateless; 4 | 5 | import com.redhat.coolstore.model.ShoppingCart; 6 | 7 | @Stateless 8 | public class ShippingService { 9 | 10 | public void calculateShipping(ShoppingCart sc) { 11 | 12 | if ( sc != null ) { 13 | 14 | if ( sc.getCartItemTotal() >= 0 && sc.getCartItemTotal() < 25) { 15 | 16 | sc.setShippingTotal(2.99); 17 | 18 | } else if ( sc.getCartItemTotal() >= 25 && sc.getCartItemTotal() < 50) { 19 | 20 | sc.setShippingTotal(4.99); 21 | 22 | } else if ( sc.getCartItemTotal() >= 50 && sc.getCartItemTotal() < 75) { 23 | 24 | sc.setShippingTotal(6.99); 25 | 26 | } else if ( sc.getCartItemTotal() >= 75 && sc.getCartItemTotal() < 100) { 27 | 28 | sc.setShippingTotal(8.99); 29 | 30 | } else if ( sc.getCartItemTotal() >= 100 && sc.getCartItemTotal() < 10000) { 31 | 32 | sc.setShippingTotal(10.99); 33 | 34 | } 35 | 36 | } 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/service/ShoppingCartService.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.service; 2 | 3 | import com.redhat.coolstore.model.ShoppingCart; 4 | 5 | public interface ShoppingCartService { 6 | 7 | public void priceShoppingCart(ShoppingCart sc); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/service/ShoppingCartServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.service; 2 | 3 | import java.util.Map; 4 | 5 | import javax.ejb.Stateless; 6 | import javax.enterprise.inject.Alternative; 7 | import javax.inject.Inject; 8 | 9 | import com.redhat.coolstore.model.Product; 10 | import com.redhat.coolstore.model.ShoppingCart; 11 | import com.redhat.coolstore.model.ShoppingCartItem; 12 | 13 | @Alternative 14 | @Stateless 15 | public class ShoppingCartServiceImpl implements ShoppingCartService { 16 | 17 | @Inject 18 | ShippingService ss; 19 | 20 | @Inject 21 | PromoService ps; 22 | 23 | @Inject 24 | ProductService pp; 25 | 26 | @Override 27 | public void priceShoppingCart(ShoppingCart sc) { 28 | 29 | if ( sc != null ) { 30 | 31 | initShoppingCartForPricing(sc); 32 | 33 | if ( sc.getShoppingCartItemList() != null && sc.getShoppingCartItemList().size() > 0) { 34 | 35 | ps.applyCartItemPromotions(sc); 36 | 37 | for (ShoppingCartItem sci : sc.getShoppingCartItemList()) { 38 | 39 | sc.setCartItemPromoSavings(sc.getCartItemPromoSavings() + sci.getPromoSavings() * sci.getQuantity()); 40 | sc.setCartItemTotal(sc.getCartItemTotal() + sci.getPrice() * sci.getQuantity()); 41 | 42 | } 43 | 44 | ss.calculateShipping(sc); 45 | 46 | } 47 | 48 | ps.applyShippingPromotions(sc); 49 | 50 | sc.setCartTotal(sc.getCartItemTotal() + sc.getShippingTotal()); 51 | 52 | } 53 | 54 | } 55 | 56 | private void initShoppingCartForPricing(ShoppingCart sc) { 57 | 58 | sc.setCartItemTotal(0); 59 | sc.setCartItemPromoSavings(0); 60 | sc.setShippingTotal(0); 61 | sc.setShippingPromoSavings(0); 62 | sc.setCartTotal(0); 63 | 64 | Map productMap = pp.getProductMap(); 65 | 66 | for (ShoppingCartItem sci : sc.getShoppingCartItemList()) { 67 | 68 | Product p = productMap.get(sci.getProduct().getItemId()); 69 | 70 | //if product exist, create new product to reset price 71 | if ( p != null ) { 72 | 73 | sci.setProduct(new Product(p.getItemId(), p.getName(), p.getDesc(), p.getPrice())); 74 | sci.setPrice(p.getPrice()); 75 | } 76 | 77 | sci.setPromoSavings(0); 78 | 79 | } 80 | 81 | 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/service/ShoppingCartServiceImplBRMS.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.service; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.ejb.Stateful; 6 | import javax.inject.Inject; 7 | 8 | import org.kie.api.runtime.KieSession; 9 | import org.kie.api.runtime.rule.EntryPoint; 10 | 11 | import com.redhat.coolstore.PromoEvent; 12 | import com.redhat.coolstore.model.Promotion; 13 | import com.redhat.coolstore.model.ShoppingCart; 14 | import com.redhat.coolstore.model.ShoppingCartItem; 15 | import com.redhat.coolstore.util.BRMSUtil; 16 | 17 | @Stateful 18 | public class ShoppingCartServiceImplBRMS implements ShoppingCartService, Serializable { 19 | 20 | private static final long serialVersionUID = 6821952169434330759L; 21 | 22 | @Inject 23 | private BRMSUtil brmsUtil; 24 | 25 | @Inject 26 | private PromoService promoService; 27 | 28 | public ShoppingCartServiceImplBRMS() { 29 | 30 | } 31 | 32 | @Override 33 | public void priceShoppingCart(ShoppingCart sc) { 34 | 35 | if ( sc != null ) { 36 | 37 | com.redhat.coolstore.ShoppingCart factShoppingCart = new com.redhat.coolstore.ShoppingCart(); 38 | 39 | factShoppingCart.setCartItemPromoSavings(0d); 40 | factShoppingCart.setCartItemTotal(0d); 41 | factShoppingCart.setCartTotal(0d); 42 | factShoppingCart.setShippingPromoSavings(0d); 43 | factShoppingCart.setShippingTotal(0d); 44 | 45 | KieSession ksession = null; 46 | 47 | try { 48 | 49 | //if at least one shopping cart item exist 50 | if ( sc.getShoppingCartItemList().size() > 0 ) { 51 | 52 | ksession = brmsUtil.getStatefulSession(); 53 | 54 | EntryPoint promoStream = ksession.getEntryPoint("Promo Stream"); 55 | 56 | for (Promotion promo : promoService.getPromotions()) { 57 | 58 | PromoEvent pv = new PromoEvent(promo.getItemId(), promo.getPercentOff()); 59 | 60 | promoStream.insert(pv); 61 | 62 | } 63 | 64 | ksession.insert(factShoppingCart); 65 | 66 | for (ShoppingCartItem sci : sc.getShoppingCartItemList()) { 67 | 68 | com.redhat.coolstore.ShoppingCartItem factShoppingCartItem = new com.redhat.coolstore.ShoppingCartItem(); 69 | factShoppingCartItem.setItemId(sci.getProduct().getItemId()); 70 | factShoppingCartItem.setName(sci.getProduct().getName()); 71 | factShoppingCartItem.setPrice(sci.getProduct().getPrice()); 72 | factShoppingCartItem.setQuantity(sci.getQuantity()); 73 | factShoppingCartItem.setShoppingCart(factShoppingCart); 74 | factShoppingCartItem.setPromoSavings(0d); 75 | 76 | ksession.insert(factShoppingCartItem); 77 | 78 | } 79 | 80 | ksession.startProcess("com.redhat.coolstore.PriceProcess"); 81 | 82 | ksession.fireAllRules(); 83 | 84 | } 85 | 86 | sc.setCartItemTotal(factShoppingCart.getCartItemTotal()); 87 | sc.setCartItemPromoSavings(factShoppingCart.getCartItemPromoSavings()); 88 | sc.setShippingTotal(factShoppingCart.getShippingTotal()); 89 | sc.setShippingPromoSavings(factShoppingCart.getShippingPromoSavings()); 90 | sc.setCartTotal(factShoppingCart.getCartTotal()); 91 | 92 | } finally { 93 | 94 | if ( ksession != null ) { 95 | 96 | ksession.dispose(); 97 | 98 | } 99 | } 100 | } 101 | 102 | } 103 | 104 | } 105 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/util/BRMSUtil.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.util; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.inject.Singleton; 6 | 7 | import org.kie.api.KieServices; 8 | import org.kie.api.builder.KieScanner; 9 | import org.kie.api.builder.ReleaseId; 10 | import org.kie.api.runtime.KieContainer; 11 | import org.kie.api.runtime.KieSession; 12 | import org.kie.api.runtime.StatelessKieSession; 13 | 14 | @Singleton 15 | public class BRMSUtil implements Serializable { 16 | 17 | private static final long serialVersionUID = 1562882558996412866L; 18 | 19 | private KieContainer kContainer = null; 20 | 21 | public BRMSUtil() { 22 | 23 | KieServices kServices = KieServices.Factory.get(); 24 | 25 | ReleaseId releaseId = kServices.newReleaseId( "com.redhat", "coolstore", "LATEST" ); 26 | 27 | kContainer = kServices.newKieContainer( releaseId ); 28 | 29 | KieScanner kScanner = kServices.newKieScanner( kContainer ); 30 | 31 | 32 | // Start the KieScanner polling the maven repository every 10 seconds 33 | System.out.println("Starting KieScanner..."); 34 | System.out.println(); 35 | kScanner.start( 10000L ); 36 | System.out.println("Started KieScanner sucessfully..."); 37 | System.out.println(); 38 | } 39 | 40 | 41 | 42 | public StatelessKieSession getStatelessSession() { 43 | 44 | return kContainer.newStatelessKieSession(); 45 | 46 | } 47 | 48 | /* 49 | * KieSession is the new StatefulKnowledgeSession from BRMS 5.3. 50 | */ 51 | public KieSession getStatefulSession() { 52 | 53 | return kContainer.newKieSession(); 54 | 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/web/CoolStoreApplication.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.web; 2 | 3 | import com.redhat.coolstore.web.ui.ProductsView; 4 | import com.redhat.coolstore.web.ui.ShoppingCartView; 5 | import com.vaadin.annotations.Theme; 6 | import com.vaadin.annotations.Title; 7 | import com.vaadin.cdi.CDIUI; 8 | import com.vaadin.server.ThemeResource; 9 | import com.vaadin.server.VaadinRequest; 10 | import com.vaadin.ui.Embedded; 11 | import com.vaadin.ui.HorizontalSplitPanel; 12 | import com.vaadin.ui.UI; 13 | import com.vaadin.ui.themes.ValoTheme; 14 | import com.vaadin.ui.VerticalLayout; 15 | 16 | import javax.inject.Inject; 17 | 18 | @Theme("coolstoretheme") 19 | @Title("Red Hat Cool Store") 20 | @CDIUI("") 21 | public class CoolStoreApplication extends UI { 22 | 23 | private static final long serialVersionUID = 8436561253049378320L; 24 | 25 | private Embedded logo = new Embedded("", new ThemeResource( 26 | "./images/logo.png")); 27 | 28 | @Inject 29 | private ProductsView productView; 30 | 31 | @Inject 32 | private ShoppingCartView shoppingCartView; 33 | 34 | @Override 35 | public void init(VaadinRequest request) { 36 | 37 | VerticalLayout vl = new VerticalLayout(); 38 | vl.setHeight("100%"); 39 | vl.setWidth("80em"); 40 | 41 | vl.addComponent(logo); 42 | 43 | HorizontalSplitPanel hsp = new HorizontalSplitPanel(); 44 | hsp.addStyleName(ValoTheme.SPLITPANEL_LARGE); 45 | hsp.setWidth("100%"); 46 | hsp.setHeightUndefined(); 47 | hsp.setFirstComponent(productView); 48 | hsp.setSplitPosition(65); 49 | hsp.setSecondComponent(shoppingCartView); 50 | 51 | vl.addComponent(hsp); 52 | vl.setExpandRatio(hsp, 1); 53 | 54 | setContent(vl); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/web/ui/AbstractView.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.web.ui; 2 | 3 | import com.redhat.coolstore.model.ShoppingCart; 4 | import com.vaadin.cdi.UIScoped; 5 | import com.vaadin.icons.VaadinIcons; 6 | import com.vaadin.ui.Button; 7 | import com.vaadin.ui.Button.ClickListener; 8 | import com.vaadin.ui.Panel; 9 | import com.vaadin.ui.themes.ValoTheme; 10 | import com.vaadin.ui.HorizontalLayout; 11 | import com.vaadin.ui.Label; 12 | import com.vaadin.ui.VerticalLayout; 13 | 14 | import javax.annotation.PostConstruct; 15 | import javax.inject.Inject; 16 | 17 | @UIScoped 18 | public abstract class AbstractView extends Panel implements ClickListener { 19 | 20 | /** 21 | * 22 | */ 23 | private static final long serialVersionUID = -2404594287924999036L; 24 | 25 | @Inject 26 | private ShoppingCart shoppingCart; 27 | 28 | private VerticalLayout layout; 29 | private HorizontalLayout controllerLayout; 30 | 31 | private static final String BUTTON_WIDTH = "10em"; 32 | 33 | public AbstractView() { 34 | super(); 35 | 36 | setHeight("23em"); 37 | layout = new VerticalLayout(); 38 | 39 | setContent(layout); 40 | } 41 | 42 | @PostConstruct 43 | private void init() { 44 | Label headerLabel = new Label(getViewHeader() + ":"); 45 | headerLabel.addStyleName(ValoTheme.LABEL_H1); 46 | layout.addComponent(headerLabel); 47 | 48 | createLayout(layout); 49 | 50 | controllerLayout = new HorizontalLayout(); 51 | controllerLayout.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING); 52 | controllerLayout.setMargin(false); 53 | 54 | createControllerButtons(); 55 | 56 | layout.addComponent(controllerLayout); 57 | } 58 | 59 | protected void resetShoppingCart() { 60 | shoppingCart.setCartItemPromoSavings(0D); 61 | shoppingCart.setCartItemTotal(0D); 62 | shoppingCart.setCartTotal(0D); 63 | shoppingCart.setShippingPromoSavings(0D); 64 | shoppingCart.setShippingTotal(0D); 65 | shoppingCart.resetShoppingCartItemList(); 66 | } 67 | 68 | protected ShoppingCart getShoppingCart() { 69 | return shoppingCart; 70 | } 71 | 72 | protected abstract String getViewHeader(); 73 | 74 | protected abstract void createLayout(VerticalLayout layout); 75 | 76 | protected abstract void createControllerButtons(); 77 | 78 | protected void createButton(Button button, String caption, VaadinIcons icon) { 79 | 80 | button.addClickListener(this); 81 | button.setCaption(caption); 82 | button.setIcon(icon); 83 | button.setWidth(BUTTON_WIDTH); 84 | 85 | controllerLayout.addComponent(button); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/web/ui/ProductsView.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.web.ui; 2 | 3 | import com.redhat.coolstore.model.Product; 4 | import com.redhat.coolstore.service.ProductService; 5 | import com.redhat.coolstore.web.ui.events.UpdateShopppingCartEvent; 6 | import com.redhat.coolstore.web.ui.util.Formatter; 7 | import com.vaadin.cdi.UIScoped; 8 | import com.vaadin.event.ShortcutAction.KeyCode; 9 | import com.vaadin.icons.VaadinIcons; 10 | import com.vaadin.ui.Button; 11 | import com.vaadin.ui.Button.ClickEvent; 12 | import com.vaadin.ui.CheckBoxGroup; 13 | import com.vaadin.ui.Notification; 14 | import com.vaadin.ui.VerticalLayout; 15 | import com.vaadin.ui.themes.ValoTheme; 16 | 17 | import javax.inject.Inject; 18 | import java.util.List; 19 | import java.util.Set; 20 | 21 | @UIScoped 22 | public class ProductsView extends AbstractView { 23 | 24 | @Inject 25 | private ProductService productService; 26 | 27 | @Inject 28 | private javax.enterprise.event.Event updateCart; 29 | 30 | private Button addToCartButton = new Button(); 31 | 32 | private Button checkAllButton = new Button(); 33 | 34 | private Button uncheckAllButton = new Button(); 35 | 36 | private CheckBoxGroup options = new CheckBoxGroup<>(); 37 | 38 | private List products; 39 | 40 | /** 41 | * 42 | */ 43 | private static final long serialVersionUID = 962893447423474540L; 44 | 45 | @Override 46 | protected void createLayout(VerticalLayout layout) { 47 | 48 | products = productService.getProducts(); 49 | 50 | options.setItems(products); 51 | options.setItemCaptionGenerator(product -> product.getName() + " (" 52 | + Formatter.formatPrice(product.getPrice()) 53 | + ")"); 54 | options.addStyleName(ValoTheme.OPTIONGROUP_LARGE); 55 | options.addValueChangeListener(evt -> updateControlButtons()); 56 | 57 | layout.addComponent(options); 58 | } 59 | 60 | @Override 61 | protected String getViewHeader() { 62 | return "Products"; 63 | } 64 | 65 | @Override 66 | protected void createControllerButtons() { 67 | createButton(addToCartButton, "Add To Cart", VaadinIcons.CART_O); 68 | addToCartButton.setClickShortcut(KeyCode.ENTER); 69 | addToCartButton.addStyleName(ValoTheme.BUTTON_FRIENDLY); 70 | 71 | createButton(checkAllButton, "Check All", VaadinIcons.CHECK_SQUARE_O); 72 | 73 | createButton(uncheckAllButton, "Uncheck All", VaadinIcons.THIN_SQUARE); 74 | 75 | updateControlButtons(); 76 | } 77 | 78 | private Button getAddToCartButton() { 79 | return addToCartButton; 80 | } 81 | 82 | private Button getCheckAllButton() { 83 | return checkAllButton; 84 | } 85 | 86 | private Button getUncheckAllButton() { 87 | return uncheckAllButton; 88 | } 89 | 90 | private void checkAllBoxes(boolean select) { 91 | if (select) { 92 | products.forEach(options::select); 93 | } else { 94 | options.deselectAll(); 95 | } 96 | } 97 | 98 | private Set getSelectedProducts() { 99 | return options.getValue(); 100 | } 101 | 102 | private void updateControlButtons() { 103 | 104 | int size = options.getValue().size(); 105 | if (size == 0) { 106 | checkAllButton.setEnabled(true); 107 | uncheckAllButton.setEnabled(false); 108 | 109 | addToCartButton.setEnabled(false); 110 | } else if (size == products.size()) { 111 | checkAllButton.setEnabled(false); 112 | uncheckAllButton.setEnabled(true); 113 | 114 | addToCartButton.setEnabled(true); 115 | } else { 116 | checkAllButton.setEnabled(true); 117 | uncheckAllButton.setEnabled(true); 118 | 119 | addToCartButton.setEnabled(true); 120 | } 121 | } 122 | 123 | @Override 124 | public void buttonClick(ClickEvent event) { 125 | 126 | if (event.getButton() == getAddToCartButton()) { 127 | 128 | Notification.show("Adding item(s) to cart."); 129 | 130 | updateCart 131 | .fire(new UpdateShopppingCartEvent(getSelectedProducts())); 132 | 133 | checkAllBoxes(false); 134 | } else if (event.getButton() == getCheckAllButton()) { 135 | 136 | checkAllBoxes(true); 137 | } else if (event.getButton() == getUncheckAllButton()) { 138 | 139 | checkAllBoxes(false); 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/web/ui/ShoppingCartView.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.web.ui; 2 | 3 | import com.redhat.coolstore.model.Product; 4 | import com.redhat.coolstore.model.ShoppingCart; 5 | import com.redhat.coolstore.model.ShoppingCartItem; 6 | import com.redhat.coolstore.service.ShoppingCartService; 7 | import com.redhat.coolstore.web.ui.components.CheckoutWindow; 8 | import com.redhat.coolstore.web.ui.components.ShoppingCartLine; 9 | import com.redhat.coolstore.web.ui.events.UpdateShopppingCartEvent; 10 | import com.vaadin.annotations.PropertyId; 11 | import com.vaadin.cdi.UIScoped; 12 | import com.vaadin.data.Binder; 13 | import com.vaadin.icons.VaadinIcons; 14 | import com.vaadin.ui.Button; 15 | import com.vaadin.ui.Button.ClickEvent; 16 | import com.vaadin.ui.UI; 17 | import com.vaadin.ui.VerticalLayout; 18 | import com.vaadin.ui.Window.CloseEvent; 19 | import com.vaadin.ui.Window.CloseListener; 20 | import com.vaadin.ui.themes.ValoTheme; 21 | import org.vaadin.dialogs.ConfirmDialog; 22 | import org.vaadin.viritin.fields.LabelField; 23 | 24 | import javax.enterprise.event.Observes; 25 | import javax.inject.Inject; 26 | import java.util.HashMap; 27 | import java.util.Map; 28 | import java.util.Set; 29 | 30 | @UIScoped 31 | public class ShoppingCartView extends AbstractView { 32 | 33 | @Inject 34 | private ShoppingCartService shoppingCartService; 35 | 36 | private Button checkoutButton = new Button(); 37 | 38 | private Button clearButton = new Button(); 39 | 40 | @PropertyId("cartItemTotal") 41 | private LabelField subtotalValue = new LabelField(); 42 | 43 | @PropertyId("cartItemPromoSavings") 44 | private LabelField cartPromoValue = new LabelField(); 45 | 46 | @PropertyId("shippingTotal") 47 | private LabelField shippingValue = new LabelField(); 48 | 49 | @PropertyId("shippingPromoSavings") 50 | private LabelField shippingPromoValue = new LabelField(); 51 | 52 | @PropertyId("cartTotal") 53 | private LabelField cartTotalValue = new LabelField(); 54 | 55 | private Binder binder = new Binder<>(ShoppingCart.class); 56 | 57 | /** 58 | * 59 | */ 60 | private static final long serialVersionUID = 962893447423474540L; 61 | 62 | @Override 63 | protected void createLayout(VerticalLayout layout) { 64 | 65 | layout.addComponent(new ShoppingCartLine("Subtotal:", subtotalValue, binder)); 66 | layout.addComponent(new ShoppingCartLine("Promotion(s):", 67 | cartPromoValue, binder, true)); 68 | layout.addComponent(new ShoppingCartLine("Shipping:", shippingValue, binder)); 69 | layout.addComponent(new ShoppingCartLine("Promotion(s):", 70 | shippingPromoValue, binder, true)); 71 | layout.addComponent(new ShoppingCartLine("Cart Total:", cartTotalValue, binder)); 72 | 73 | binder.bindInstanceFields(this); 74 | 75 | updateDatasource(); 76 | } 77 | 78 | @Override 79 | protected String getViewHeader() { 80 | return "Shopping Cart"; 81 | } 82 | 83 | @Override 84 | protected void createControllerButtons() { 85 | createButton(checkoutButton, "Checkout", VaadinIcons.FLAG_CHECKERED); 86 | checkoutButton.addStyleName(ValoTheme.BUTTON_PRIMARY); 87 | 88 | createButton(clearButton, "Clear", VaadinIcons.CLOSE); 89 | } 90 | 91 | private Button getCheckoutButton() { 92 | return checkoutButton; 93 | } 94 | 95 | private Button getClearButton() { 96 | return clearButton; 97 | } 98 | 99 | private void updateDatasource() { 100 | ShoppingCart sc = getShoppingCart(); 101 | 102 | if (sc.getShoppingCartItemList().size() > 0) { 103 | shoppingCartService.priceShoppingCart(sc); 104 | 105 | checkoutButton.setEnabled(true); 106 | } else { 107 | checkoutButton.setEnabled(false); 108 | } 109 | 110 | binder.setBean(sc); 111 | } 112 | 113 | public void updateShoppingCart(@Observes UpdateShopppingCartEvent event) { 114 | addItemsToShoppingCart(event.getSelectedProducts()); 115 | updateDatasource(); 116 | } 117 | 118 | private void clear() { 119 | resetShoppingCart(); 120 | updateDatasource(); 121 | } 122 | 123 | private void addItemsToShoppingCart(Set productsToAddList) { 124 | 125 | Map shoppingCartItemMap = new HashMap(); 126 | 127 | for (ShoppingCartItem sci : getShoppingCart().getShoppingCartItemList()) { 128 | shoppingCartItemMap.put(sci.getProduct().getItemId(), sci); 129 | } 130 | 131 | if (productsToAddList != null && productsToAddList.size() > 0) { 132 | for (Product p : productsToAddList) { 133 | if (shoppingCartItemMap.containsKey(p.getItemId())) { 134 | ShoppingCartItem sci = shoppingCartItemMap.get(p 135 | .getItemId()); 136 | sci.setQuantity(sci.getQuantity() + 1); 137 | } else { 138 | ShoppingCartItem sci = new ShoppingCartItem(); 139 | sci.setProduct(p); 140 | sci.setQuantity(1); 141 | getShoppingCart().addShoppingCartItem(sci); 142 | shoppingCartItemMap.put(p.getItemId(), sci); 143 | } 144 | } 145 | } 146 | } 147 | 148 | private void clearShoppingCart() { 149 | ConfirmDialog dialog = ConfirmDialog.show(UI.getCurrent(), 150 | "Confirm Clearing Shopping Cart", 151 | "Are you sure you want to clear the shopping cart?", "Clear", 152 | "Keep", new ConfirmDialog.Listener() { 153 | 154 | /** 155 | * 156 | */ 157 | private static final long serialVersionUID = 8604235590327706594L; 158 | 159 | @Override 160 | public void onClose(ConfirmDialog dialog) { 161 | if (dialog.isConfirmed()) { 162 | // Confirmed to clear 163 | clear(); 164 | } 165 | } 166 | }); 167 | 168 | dialog.getOkButton().addStyleName(ValoTheme.BUTTON_DANGER); 169 | dialog.getCancelButton().addStyleName(ValoTheme.BUTTON_LINK); 170 | } 171 | 172 | private void checkout() { 173 | 174 | CheckoutWindow window = new CheckoutWindow(getShoppingCart()); 175 | window.addCloseListener(new CloseListener() { 176 | 177 | /** 178 | * 179 | */ 180 | private static final long serialVersionUID = -6352682494377073401L; 181 | 182 | @Override 183 | public void windowClose(CloseEvent e) { 184 | clear(); 185 | } 186 | }); 187 | 188 | UI.getCurrent().addWindow(window); 189 | } 190 | 191 | @Override 192 | public void buttonClick(ClickEvent event) { 193 | if (event.getButton() == getClearButton()) { 194 | clearShoppingCart(); 195 | } else if (event.getButton() == getCheckoutButton()) { 196 | checkout(); 197 | } 198 | } 199 | } 200 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/web/ui/components/CheckoutWindow.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.web.ui.components; 2 | 3 | import com.redhat.coolstore.model.ShoppingCart; 4 | import com.redhat.coolstore.model.ShoppingCartItem; 5 | import com.redhat.coolstore.web.ui.util.Formatter; 6 | import com.vaadin.ui.Grid; 7 | import com.vaadin.ui.UI; 8 | import com.vaadin.ui.Window; 9 | import com.vaadin.ui.components.grid.FooterRow; 10 | 11 | public class CheckoutWindow extends Window { 12 | 13 | /** 14 | * 15 | */ 16 | private static final long serialVersionUID = -8504668339755922310L; 17 | 18 | private static final String PROPERTY_PRODUCT_NAME = "productName"; 19 | private static final String PROPERTY_UNIT_PRICE = "unitPrice"; 20 | private static final String PROPERTY_QUANTITY = "quantity"; 21 | private static final String PROPERTY_PRODUCT_TOTAL = "productTotal"; 22 | 23 | public CheckoutWindow(ShoppingCart shoppingCart) { 24 | 25 | Grid grid = new Grid<>(); 26 | grid.setItems(shoppingCart.getShoppingCartItemList()); 27 | grid.addColumn(item -> item.getProduct().getName()).setCaption("Product Name").setId(PROPERTY_PRODUCT_NAME); 28 | grid.addColumn(item -> item.getProduct().getPrice()).setCaption("Unit Price").setId(PROPERTY_UNIT_PRICE); 29 | grid.addColumn(ShoppingCartItem::getQuantity).setCaption("Quantity").setId(PROPERTY_QUANTITY); 30 | grid.addColumn(item -> Formatter.formatPrice(item.getProduct().getPrice() * item.getQuantity())) 31 | .setCaption("Product Total").setId(PROPERTY_PRODUCT_TOTAL); 32 | grid.setSizeFull(); 33 | 34 | FooterRow gridFooter = grid.appendFooterRow(); 35 | gridFooter.join(PROPERTY_PRODUCT_NAME, PROPERTY_UNIT_PRICE, 36 | PROPERTY_QUANTITY).setText( 37 | "Total: [Promotion(s) " 38 | + Formatter.formatPrice(shoppingCart 39 | .getCartItemPromoSavings()) + "]"); 40 | gridFooter.getCell(PROPERTY_PRODUCT_TOTAL).setText( 41 | Formatter.formatPrice(shoppingCart.getCartItemTotal())); 42 | 43 | gridFooter = grid.appendFooterRow(); 44 | gridFooter.join(PROPERTY_PRODUCT_NAME, PROPERTY_UNIT_PRICE, 45 | PROPERTY_QUANTITY).setText( 46 | "Shipping Total: [Promotion(s) " 47 | + Formatter.formatPrice(shoppingCart 48 | .getShippingPromoSavings()) + "]"); 49 | gridFooter.getCell(PROPERTY_PRODUCT_TOTAL).setText( 50 | Formatter.formatPrice(shoppingCart.getShippingTotal())); 51 | 52 | gridFooter = grid.appendFooterRow(); 53 | gridFooter.join(PROPERTY_PRODUCT_NAME, PROPERTY_UNIT_PRICE, 54 | PROPERTY_QUANTITY).setText("Order Total:"); 55 | gridFooter.getCell(PROPERTY_PRODUCT_TOTAL).setText( 56 | Formatter.formatPrice(shoppingCart.getCartTotal())); 57 | 58 | setCaption("

Thank you for your order!

"); 59 | setCaptionAsHtml(true); 60 | center(); 61 | setResizable(false); 62 | setDraggable(false); 63 | setModal(true); 64 | setWidth(4 * UI.getCurrent().getWidth() / 5, UI.getCurrent() 65 | .getWidthUnits()); 66 | setHeight(4 * UI.getCurrent().getHeight() / 5, UI.getCurrent() 67 | .getHeightUnits()); 68 | 69 | setContent(grid); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/web/ui/components/ShoppingCartLine.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.web.ui.components; 2 | 3 | import com.redhat.coolstore.model.ShoppingCart; 4 | import com.redhat.coolstore.web.ui.util.Formatter; 5 | import com.vaadin.data.Binder; 6 | import com.vaadin.ui.Alignment; 7 | import com.vaadin.ui.HorizontalLayout; 8 | import com.vaadin.ui.Label; 9 | import com.vaadin.ui.themes.ValoTheme; 10 | import org.vaadin.viritin.fields.LabelField; 11 | 12 | public class ShoppingCartLine extends HorizontalLayout { 13 | 14 | /** 15 | * 16 | */ 17 | private static final long serialVersionUID = 6465756664279342573L; 18 | 19 | private static final String LABEL_WIDTH = "8em"; 20 | 21 | public ShoppingCartLine(String caption, LabelField value, Binder binder) { 22 | this(caption, value, binder, false); 23 | } 24 | 25 | public ShoppingCartLine(String caption, LabelField value, Binder binder, 26 | boolean isSecondary) { 27 | super(); 28 | 29 | setWidth("100%"); 30 | 31 | Label label = new Label(caption); 32 | if (isSecondary) { 33 | label.addStyleName(ValoTheme.LABEL_LIGHT); 34 | } else { 35 | label.addStyleName(ValoTheme.LABEL_BOLD); 36 | } 37 | label.setWidth(LABEL_WIDTH); 38 | 39 | binder.forMemberField(value).withConverter(toModel -> { 40 | if (toModel.charAt(0) == '-') { 41 | return -1 * Double.parseDouble(toModel.substring(2)); 42 | } else { 43 | return Double.parseDouble(toModel.substring(1)); 44 | } 45 | }, Formatter::formatPrice); 46 | value.setWidth(LABEL_WIDTH); 47 | 48 | addComponent(label); 49 | addComponent(value); 50 | setComponentAlignment(value, Alignment.MIDDLE_RIGHT); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/web/ui/events/UpdateShopppingCartEvent.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.web.ui.events; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * Simple event to notify shopping cart about updates 7 | * 8 | */ 9 | import com.redhat.coolstore.model.Product; 10 | 11 | public class UpdateShopppingCartEvent { 12 | 13 | private Set selectedProducts; 14 | 15 | public UpdateShopppingCartEvent(Set selectedProducts) { 16 | this.selectedProducts = selectedProducts; 17 | } 18 | 19 | public Set getSelectedProducts() { 20 | return selectedProducts; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/java/com/redhat/coolstore/web/ui/util/Formatter.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.web.ui.util; 2 | 3 | import java.text.DecimalFormat; 4 | 5 | public class Formatter { 6 | 7 | private static final DecimalFormat DF = new DecimalFormat("'$'0.00"); 8 | 9 | public static String formatPrice(double value) { 10 | return DF.format(value); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/addons.scss: -------------------------------------------------------------------------------- 1 | /* This file is automatically managed and will be overwritten from time to time. */ 2 | /* Do not manually edit this file. */ 3 | 4 | /* Import and include this mixin into your project theme to include the addon themes */ 5 | @mixin addons { 6 | } 7 | 8 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/coolstoretheme.scss: -------------------------------------------------------------------------------- 1 | // Global variable overrides. Must be declared before importing Valo. 2 | 3 | // Defines the plaintext font size, weight and family. Font size affects general component sizing. 4 | //$v-font-size: 16px; 5 | //$v-font-weight: 300; 6 | //$v-font-family: "Open Sans", sans-serif; 7 | 8 | // Defines the border used by all components. 9 | //$v-border: 1px solid (v-shade 0.7); 10 | //$v-border-radius: 4px; 11 | 12 | // Affects the color of some component elements, e.g Button, Panel title, etc 13 | //$v-background-color: hsl(210, 0%, 98%); 14 | // Affects the color of content areas, e.g Panel and Window content, TextField input etc 15 | //$v-app-background-color: $v-background-color; 16 | 17 | // Affects the visual appearance of all components 18 | //$v-gradient: v-linear 8%; 19 | //$v-bevel-depth: 30%; 20 | //$v-shadow-opacity: 5%; 21 | 22 | // Defines colors for indicating status (focus, success, failure) 23 | //$v-focus-color: valo-focus-color(); // Calculates a suitable color automatically 24 | //$v-friendly-color: #2c9720; 25 | //$v-error-indicator-color: #ed473b; 26 | 27 | // For more information, see: https://vaadin.com/book/-/page/themes.valo.html 28 | // Example variants can be copy/pasted from https://vaadin.com/wiki/-/wiki/Main/Valo+Examples 29 | 30 | @font-face { 31 | font-family: 'Vaadin-Icons'; 32 | src: url('fonts/Vaadin-Icons.eot'); 33 | src: url('fonts/Vaadin-Icons.eot?#iefix') format('embedded-opentype'), 34 | url('fonts/Vaadin-Icons.woff') format('woff'), 35 | url('fonts/Vaadin-Icons.ttf') format('truetype'), 36 | url('fonts/Vaadin-Icons.svg#icomoon') format('svg'); 37 | } 38 | 39 | @import "../valo/valo.scss"; 40 | 41 | @mixin coolstoretheme { 42 | @include valo; 43 | 44 | // Insert your own theme rules here 45 | .Vaadin-Icons { 46 | font-family: 'Vaadin-Icons'; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/favicon.ico -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/fonts/Vaadin-Icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/fonts/Vaadin-Icons.eot -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/fonts/Vaadin-Icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/fonts/Vaadin-Icons.ttf -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/fonts/Vaadin-Icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/fonts/Vaadin-Icons.woff -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/images/logo.png -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/webapp/VAADIN/themes/coolstoretheme/styles.scss: -------------------------------------------------------------------------------- 1 | @import "coolstoretheme.scss"; 2 | @import "addons.scss"; 3 | 4 | // This file prefixes all rules with the theme name to avoid causing conflicts with other themes. 5 | // The actual styles should be defined in mytheme.scss 6 | 7 | .coolstoretheme { 8 | @include addons; 9 | @include coolstoretheme; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/test/java/com/redhat/coolstore/DefaultDeployment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JBoss, Home of Professional Open Source 3 | * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual 4 | * contributors by the @authors tag. See the copyright.txt in the 5 | * distribution for a full listing of individual contributors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.redhat.coolstore; 18 | 19 | import java.io.File; 20 | 21 | import org.jboss.shrinkwrap.api.ArchivePaths; 22 | import org.jboss.shrinkwrap.api.ShrinkWrap; 23 | import org.jboss.shrinkwrap.api.spec.WebArchive; 24 | import org.jboss.shrinkwrap.resolver.api.maven.Maven; 25 | 26 | public class DefaultDeployment { 27 | 28 | public static WebArchive deployment() { 29 | 30 | WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war") 31 | .addPackages(true, "com.redhat.coolstore.model") 32 | .addPackages(true, "com.redhat.coolstore.service") 33 | .addPackages(true, "com.redhat.coolstore.util") 34 | .addAsWebInfResource(new File("src/main/webapp/WEB-INF/beans.xml"), ArchivePaths.create("beans.xml")); 35 | 36 | File[] f = null; 37 | 38 | try { 39 | 40 | f = Maven.configureResolver() 41 | .loadPomFromFile("pom.xml") 42 | .resolve( 43 | "org.kie:kie-internal", 44 | "org.kie:kie-ci", 45 | "org.jbpm:jbpm-bpmn2", 46 | "org.mvel:mvel2", 47 | "com.vaadin:vaadin-server", 48 | "com.redhat:coolstore" 49 | ) 50 | .withTransitivity().asFile(); 51 | 52 | war.addAsLibraries(f); 53 | 54 | } catch (Exception e) { 55 | System.out.println(e.getMessage()); 56 | } 57 | 58 | return war; 59 | 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/test/java/com/redhat/coolstore/service/PromoServiceTest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.service; 2 | 3 | import java.io.FileNotFoundException; 4 | import java.util.HashSet; 5 | import java.util.Set; 6 | 7 | import javax.inject.Inject; 8 | 9 | import junit.framework.Assert; 10 | 11 | import org.jboss.arquillian.container.test.api.Deployment; 12 | import org.jboss.arquillian.junit.Arquillian; 13 | import org.jboss.shrinkwrap.api.spec.WebArchive; 14 | import org.junit.After; 15 | import org.junit.Before; 16 | import org.junit.Test; 17 | import org.junit.runner.RunWith; 18 | 19 | import com.redhat.coolstore.DefaultDeployment; 20 | import com.redhat.coolstore.model.Product; 21 | import com.redhat.coolstore.model.ShoppingCartItem; 22 | import com.redhat.coolstore.model.Promotion; 23 | import com.redhat.coolstore.model.ShoppingCart; 24 | 25 | @RunWith(Arquillian.class) 26 | public class PromoServiceTest { 27 | 28 | @Deployment 29 | public static WebArchive deployment() throws IllegalArgumentException, FileNotFoundException { 30 | return DefaultDeployment.deployment(); 31 | } 32 | 33 | @Inject 34 | private ShoppingCart shoppingCart; 35 | 36 | @Inject 37 | private PromoService promoService; 38 | 39 | @Before 40 | public void setUp() throws Exception { 41 | 42 | } 43 | 44 | @After 45 | public void tearDown() throws Exception { 46 | 47 | } 48 | 49 | @Test 50 | public void freeShippingPromoTest() { 51 | 52 | //cart total 0 53 | Assert.assertEquals(0, shoppingCart.getCartItemTotal(), 0); 54 | 55 | promoService.applyShippingPromotions(shoppingCart); 56 | 57 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 58 | 59 | //cart total 74.99 60 | shoppingCart.setCartItemTotal(74.99); 61 | shoppingCart.setShippingTotal(4.99); 62 | 63 | promoService.applyShippingPromotions(shoppingCart); 64 | 65 | Assert.assertEquals(4.99, shoppingCart.getShippingTotal(), 0); 66 | 67 | //cart total 75 68 | shoppingCart.setCartItemTotal(75); 69 | shoppingCart.setShippingTotal(4.99); 70 | 71 | promoService.applyShippingPromotions(shoppingCart); 72 | 73 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 74 | 75 | 76 | } 77 | 78 | @Test 79 | public void cartPromoTest() { 80 | 81 | //cart total 0 82 | Assert.assertEquals(0, shoppingCart.getCartItemTotal(), 0); 83 | 84 | promoService.applyCartItemPromotions(shoppingCart); 85 | 86 | Assert.assertEquals(0, shoppingCart.getCartItemPromoSavings(), 0); 87 | 88 | Set promotionSet = new HashSet(); 89 | 90 | Promotion p1 = new Promotion("123", .25); 91 | 92 | promotionSet.add(p1); 93 | 94 | promoService.setPromotions(promotionSet); 95 | 96 | ShoppingCartItem sci = new ShoppingCartItem(); 97 | sci.setQuantity(1); 98 | 99 | Product p = new Product(); 100 | p.setItemId("234"); 101 | p.setPrice(10.00); 102 | 103 | sci.setProduct(p); 104 | 105 | shoppingCart.addShoppingCartItem(sci); 106 | 107 | Assert.assertEquals(10, sci.getProduct().getPrice(), 0); 108 | Assert.assertEquals(0, sci.getPromoSavings(), 0); 109 | 110 | promoService.applyCartItemPromotions(shoppingCart); 111 | 112 | Assert.assertEquals(10, sci.getProduct().getPrice(), 0); 113 | Assert.assertEquals(0, sci.getPromoSavings(), 0); 114 | 115 | p.setItemId("123"); 116 | 117 | promoService.applyCartItemPromotions(shoppingCart); 118 | 119 | Assert.assertEquals(10, sci.getProduct().getPrice(), 0); 120 | Assert.assertEquals(7.5, sci.getPrice(), 0); 121 | Assert.assertEquals(-2.5, sci.getPromoSavings(), 0); 122 | 123 | } 124 | 125 | } 126 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/test/java/com/redhat/coolstore/service/ShippingServiceTest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.service; 2 | 3 | import java.io.FileNotFoundException; 4 | 5 | import javax.inject.Inject; 6 | 7 | import junit.framework.Assert; 8 | 9 | import org.jboss.arquillian.container.test.api.Deployment; 10 | import org.jboss.arquillian.junit.Arquillian; 11 | import org.jboss.shrinkwrap.api.spec.WebArchive; 12 | import org.junit.After; 13 | import org.junit.Before; 14 | import org.junit.Test; 15 | import org.junit.runner.RunWith; 16 | 17 | import com.redhat.coolstore.DefaultDeployment; 18 | import com.redhat.coolstore.model.ShoppingCart; 19 | 20 | @RunWith(Arquillian.class) 21 | public class ShippingServiceTest { 22 | 23 | @Deployment 24 | public static WebArchive deployment() throws IllegalArgumentException, FileNotFoundException { 25 | return DefaultDeployment.deployment(); 26 | } 27 | 28 | @Inject 29 | private ShoppingCart shoppingCart; 30 | 31 | @Inject 32 | private ShippingService shippingService; 33 | 34 | @Before 35 | public void setUp() throws Exception { 36 | 37 | } 38 | 39 | @After 40 | public void tearDown() throws Exception { 41 | 42 | } 43 | 44 | @Test 45 | public void calculateShippingTest() { 46 | 47 | //0 48 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 49 | 50 | shippingService.calculateShipping(shoppingCart); 51 | 52 | Assert.assertEquals(2.99, shoppingCart.getShippingTotal(), 0); 53 | 54 | //0.01 - 24.99 55 | shoppingCart.setCartItemTotal(0.01); 56 | 57 | shippingService.calculateShipping(shoppingCart); 58 | 59 | Assert.assertEquals(2.99, shoppingCart.getShippingTotal(), 0); 60 | 61 | shoppingCart.setCartItemTotal(24.99); 62 | 63 | shippingService.calculateShipping(shoppingCart); 64 | 65 | Assert.assertEquals(2.99, shoppingCart.getShippingTotal(), 0); 66 | 67 | //25 - 49.99 68 | shoppingCart.setCartItemTotal(25.00); 69 | 70 | shippingService.calculateShipping(shoppingCart); 71 | 72 | Assert.assertEquals(4.99, shoppingCart.getShippingTotal(), 0); 73 | 74 | shoppingCart.setCartItemTotal(49.99); 75 | 76 | shippingService.calculateShipping(shoppingCart); 77 | 78 | Assert.assertEquals(4.99, shoppingCart.getShippingTotal(), 0); 79 | 80 | //50 - 74.99 81 | shoppingCart.setCartItemTotal(50.00); 82 | 83 | shippingService.calculateShipping(shoppingCart); 84 | 85 | Assert.assertEquals(6.99, shoppingCart.getShippingTotal(), 0); 86 | 87 | shoppingCart.setCartItemTotal(74.99); 88 | 89 | shippingService.calculateShipping(shoppingCart); 90 | 91 | Assert.assertEquals(6.99, shoppingCart.getShippingTotal(), 0); 92 | 93 | //75 - 99.99 94 | shoppingCart.setCartItemTotal(75.00); 95 | 96 | shippingService.calculateShipping(shoppingCart); 97 | 98 | Assert.assertEquals(8.99, shoppingCart.getShippingTotal(), 0); 99 | 100 | shoppingCart.setCartItemTotal(99.99); 101 | 102 | shippingService.calculateShipping(shoppingCart); 103 | 104 | Assert.assertEquals(8.99, shoppingCart.getShippingTotal(), 0); 105 | 106 | // > 100 107 | shoppingCart.setCartItemTotal(100.00); 108 | 109 | shippingService.calculateShipping(shoppingCart); 110 | 111 | Assert.assertEquals(10.99, shoppingCart.getShippingTotal(), 0); 112 | 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/test/java/com/redhat/coolstore/service/ShoppingCartServiceTest.java: -------------------------------------------------------------------------------- 1 | package com.redhat.coolstore.service; 2 | 3 | import java.io.FileNotFoundException; 4 | import java.util.Arrays; 5 | import java.util.HashSet; 6 | import java.util.Set; 7 | 8 | import javax.inject.Inject; 9 | 10 | import junit.framework.Assert; 11 | 12 | import org.jboss.arquillian.container.test.api.Deployment; 13 | import org.jboss.arquillian.junit.Arquillian; 14 | import org.jboss.shrinkwrap.api.spec.WebArchive; 15 | import org.junit.Before; 16 | import org.junit.Test; 17 | import org.junit.runner.RunWith; 18 | 19 | import com.redhat.coolstore.DefaultDeployment; 20 | import com.redhat.coolstore.model.Product; 21 | import com.redhat.coolstore.model.Promotion; 22 | import com.redhat.coolstore.model.ShoppingCart; 23 | import com.redhat.coolstore.model.ShoppingCartItem; 24 | 25 | @RunWith(Arquillian.class) 26 | public class ShoppingCartServiceTest { 27 | 28 | @Deployment 29 | public static WebArchive deployment() throws IllegalArgumentException, FileNotFoundException { 30 | return DefaultDeployment.deployment(); 31 | } 32 | 33 | @Inject 34 | private ShoppingCart shoppingCart; 35 | 36 | @Inject 37 | private ShoppingCartService shoppingCartService; 38 | 39 | @Inject 40 | PromoService promoService; 41 | 42 | @Inject 43 | ProductService productService; 44 | 45 | @Before 46 | public void clearPromos() { 47 | 48 | promoService.setPromotions(new HashSet()); 49 | 50 | } 51 | 52 | @Test 53 | public void priceShoppingCartEmpty() { 54 | 55 | Assert.assertEquals(0, shoppingCart.getCartItemTotal(), 0); 56 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 57 | Assert.assertEquals(0, shoppingCart.getCartTotal(), 0); 58 | 59 | shoppingCartService.priceShoppingCart(shoppingCart); 60 | 61 | Assert.assertEquals(0, shoppingCart.getCartItemTotal(), 0); 62 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 63 | Assert.assertEquals(0, shoppingCart.getCartTotal(), 0); 64 | 65 | } 66 | 67 | @Test 68 | public void priceShoppingCartOneItem() { 69 | 70 | Assert.assertEquals(0, shoppingCart.getCartItemTotal(), 0); 71 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 72 | Assert.assertEquals(0, shoppingCart.getCartTotal(), 0); 73 | 74 | ShoppingCartItem sci = new ShoppingCartItem(); 75 | Product p = new Product(); 76 | p.setItemId("123"); 77 | p.setPrice(10.00); 78 | sci.setQuantity(2); 79 | sci.setProduct(p); 80 | 81 | productService.setProducts(Arrays.asList(p)); 82 | 83 | shoppingCart.addShoppingCartItem(sci); 84 | 85 | shoppingCartService.priceShoppingCart(shoppingCart); 86 | 87 | Assert.assertEquals(20, shoppingCart.getCartItemTotal(), 0); 88 | Assert.assertEquals(2.99, shoppingCart.getShippingTotal(), 0); 89 | Assert.assertEquals(22.99, shoppingCart.getCartTotal(), 0.001); 90 | 91 | } 92 | 93 | @Test 94 | public void priceShoppingCartMultipleItem() { 95 | 96 | Assert.assertEquals(0, shoppingCart.getCartItemTotal(), 0); 97 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 98 | Assert.assertEquals(0, shoppingCart.getCartTotal(), 0); 99 | 100 | ShoppingCartItem sci1 = new ShoppingCartItem(); 101 | Product p1 = new Product(); 102 | p1.setItemId("123"); 103 | p1.setPrice(9.99); 104 | sci1.setQuantity(3); 105 | sci1.setProduct(p1); 106 | 107 | ShoppingCartItem sci2 = new ShoppingCartItem(); 108 | Product p2 = new Product(); 109 | p2.setItemId("234"); 110 | p2.setPrice(6.77); 111 | sci2.setQuantity(1); 112 | sci2.setProduct(p2); 113 | 114 | ShoppingCartItem sci3 = new ShoppingCartItem(); 115 | Product p3 = new Product(); 116 | p3.setItemId("345"); 117 | p3.setPrice(2.00); 118 | sci3.setQuantity(2); 119 | sci3.setProduct(p3); 120 | 121 | shoppingCart.addShoppingCartItem(sci1); 122 | shoppingCart.addShoppingCartItem(sci2); 123 | shoppingCart.addShoppingCartItem(sci3); 124 | 125 | productService.setProducts(Arrays.asList(p1, p2, p3)); 126 | 127 | shoppingCartService.priceShoppingCart(shoppingCart); 128 | 129 | Assert.assertEquals(40.74, shoppingCart.getCartItemTotal(), 0.001); 130 | Assert.assertEquals(4.99, shoppingCart.getShippingTotal(), 0); 131 | Assert.assertEquals(45.73, shoppingCart.getCartTotal(), 0.001); 132 | 133 | } 134 | 135 | @Test 136 | public void priceShoppingCartMultipleTimes() { 137 | 138 | Assert.assertEquals(0, shoppingCart.getCartItemTotal(), 0); 139 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 140 | Assert.assertEquals(0, shoppingCart.getCartTotal(), 0); 141 | 142 | ShoppingCartItem sci = new ShoppingCartItem(); 143 | Product p = new Product(); 144 | p.setItemId("123"); 145 | p.setPrice(10.00); 146 | sci.setQuantity(2); 147 | sci.setProduct(p); 148 | 149 | shoppingCart.addShoppingCartItem(sci); 150 | 151 | productService.setProducts(Arrays.asList(p)); 152 | 153 | shoppingCartService.priceShoppingCart(shoppingCart); 154 | 155 | Assert.assertEquals(20, shoppingCart.getCartItemTotal(), 0); 156 | Assert.assertEquals(2.99, shoppingCart.getShippingTotal(), 0); 157 | Assert.assertEquals(22.99, shoppingCart.getCartTotal(), 0.001); 158 | 159 | shoppingCartService.priceShoppingCart(shoppingCart); 160 | 161 | Assert.assertEquals(20, shoppingCart.getCartItemTotal(), 0); 162 | Assert.assertEquals(2.99, shoppingCart.getShippingTotal(), 0); 163 | Assert.assertEquals(22.99, shoppingCart.getCartTotal(), 0.001); 164 | 165 | } 166 | 167 | @Test 168 | public void priceShoppingCartWithCartPromoTest() { 169 | 170 | //cart total 0 171 | Assert.assertEquals(0, shoppingCart.getCartItemTotal(), 0); 172 | 173 | shoppingCartService.priceShoppingCart(shoppingCart); 174 | 175 | Assert.assertEquals(0, shoppingCart.getCartItemPromoSavings(), 0); 176 | 177 | //TODO: uncomment and fix. reguardless of promotionSet passed in constructor overrides for promotionSet 178 | Set promotionSet = new HashSet(); 179 | 180 | Promotion p1 = new Promotion("123", .25); 181 | 182 | promotionSet.add(p1); 183 | 184 | promoService.setPromotions(promotionSet); 185 | 186 | ShoppingCartItem sci = new ShoppingCartItem(); 187 | sci.setQuantity(1); 188 | 189 | Product p = new Product(); 190 | p.setItemId("234"); 191 | p.setPrice(10.00); 192 | 193 | sci.setProduct(p); 194 | 195 | shoppingCart.addShoppingCartItem(sci); 196 | 197 | productService.setProducts(Arrays.asList(p)); 198 | 199 | Assert.assertEquals(0, shoppingCart.getCartItemTotal(), 0); 200 | Assert.assertEquals(0, shoppingCart.getCartItemPromoSavings(), 0); 201 | 202 | shoppingCartService.priceShoppingCart(shoppingCart); 203 | 204 | Assert.assertEquals(10, shoppingCart.getCartItemTotal(), 0); 205 | Assert.assertEquals(0, shoppingCart.getCartItemPromoSavings(), 0); 206 | 207 | p.setItemId("123"); 208 | sci.setProduct(p); 209 | 210 | shoppingCartService.priceShoppingCart(shoppingCart); 211 | 212 | Assert.assertEquals(7.5, shoppingCart.getCartItemTotal(), 0); 213 | Assert.assertEquals(-2.5, shoppingCart.getCartItemPromoSavings(), 0); 214 | 215 | shoppingCartService.priceShoppingCart(shoppingCart); 216 | 217 | Assert.assertEquals(7.5, shoppingCart.getCartItemTotal(), 0); 218 | Assert.assertEquals(-2.5, shoppingCart.getCartItemPromoSavings(), 0); 219 | 220 | } 221 | 222 | @Test 223 | public void priceShoppingCartWithShippingPromoTest() { 224 | 225 | ShoppingCartItem sci = new ShoppingCartItem(); 226 | sci.setQuantity(1); 227 | 228 | Product p = new Product(); 229 | p.setItemId("456"); 230 | p.setPrice(74.99); 231 | 232 | sci.setProduct(p); 233 | 234 | shoppingCart.addShoppingCartItem(sci); 235 | 236 | productService.setProducts(Arrays.asList(p)); 237 | 238 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 239 | Assert.assertEquals(0, shoppingCart.getShippingPromoSavings(), 0); 240 | 241 | shoppingCartService.priceShoppingCart(shoppingCart); 242 | 243 | Assert.assertEquals(6.99, shoppingCart.getShippingTotal(), 0); 244 | Assert.assertEquals(0, shoppingCart.getShippingPromoSavings(), 0); 245 | 246 | p.setPrice(75.00); 247 | 248 | shoppingCartService.priceShoppingCart(shoppingCart); 249 | 250 | Assert.assertEquals(0, shoppingCart.getShippingTotal(), 0); 251 | Assert.assertEquals(-8.99, shoppingCart.getShippingPromoSavings(), 0); 252 | 253 | 254 | } 255 | } 256 | -------------------------------------------------------------------------------- /projects/brms-coolstore-demo/src/test/resources/arquillian.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | ../../target/jboss-eap-6.4 24 | true 25 | -XX:MaxPermSize=256m -Xms1313m -Xmx1313m 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /support/README: -------------------------------------------------------------------------------- 1 | Directory to hold helper files if needed. 2 | 3 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/coolstore-demo.git/FETCH_HEAD: -------------------------------------------------------------------------------- 1 | 9c9d263af8bb8e59ad5c82a43bd9389669064746 not-for-merge branch 'master' of file:///Users/erics/demo-projects/brms/brms-coolstore-demo/support/brms-demo-niogit/coolstore.git 2 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/coolstore-demo.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/coolstore-demo.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | symlinks = false 3 | repositoryformatversion = 0 4 | filemode = true 5 | bare = true 6 | logallrefupdates = false 7 | precomposeunicode = true 8 | [remote "origin"] 9 | url = file:///Users/erics/demo-projects/brms/brms-coolstore-demo/support/brms-demo-niogit/coolstore.git 10 | fetch = +refs/heads/*:refs/heads/* 11 | [branch "master"] 12 | remote = origin 13 | merge = refs/heads/master 14 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/coolstore-demo.git/objects/pack/pack-7a4ce6bee80c6d0d9506d7ea8045f1fe245d856f.bitmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/coolstore-demo.git/objects/pack/pack-7a4ce6bee80c6d0d9506d7ea8045f1fe245d856f.bitmap -------------------------------------------------------------------------------- /support/brms-demo-niogit/coolstore-demo.git/objects/pack/pack-7a4ce6bee80c6d0d9506d7ea8045f1fe245d856f.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/coolstore-demo.git/objects/pack/pack-7a4ce6bee80c6d0d9506d7ea8045f1fe245d856f.idx -------------------------------------------------------------------------------- /support/brms-demo-niogit/coolstore-demo.git/objects/pack/pack-7a4ce6bee80c6d0d9506d7ea8045f1fe245d856f.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/coolstore-demo.git/objects/pack/pack-7a4ce6bee80c6d0d9506d7ea8045f1fe245d856f.pack -------------------------------------------------------------------------------- /support/brms-demo-niogit/coolstore-demo.git/packed-refs: -------------------------------------------------------------------------------- 1 | # pack-refs with: peeled 2 | 33383f3c25b63501fbc607f4e323793ce7f27b0c refs/heads/master 3 | 9c9d263af8bb8e59ad5c82a43bd9389669064746 refs/remotes/origin/master 4 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/datasets.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/datasets.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | symlinks = false 3 | repositoryformatversion = 0 4 | filemode = true 5 | bare = true 6 | logallrefupdates = false 7 | precomposeunicode = true 8 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/datasets.git/objects/pack/pack-01196499aa7b7a7bddea9eb6a6c7ef6d4608afc6.bitmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/datasets.git/objects/pack/pack-01196499aa7b7a7bddea9eb6a6c7ef6d4608afc6.bitmap -------------------------------------------------------------------------------- /support/brms-demo-niogit/datasets.git/objects/pack/pack-01196499aa7b7a7bddea9eb6a6c7ef6d4608afc6.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/datasets.git/objects/pack/pack-01196499aa7b7a7bddea9eb6a6c7ef6d4608afc6.idx -------------------------------------------------------------------------------- /support/brms-demo-niogit/datasets.git/objects/pack/pack-01196499aa7b7a7bddea9eb6a6c7ef6d4608afc6.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/datasets.git/objects/pack/pack-01196499aa7b7a7bddea9eb6a6c7ef6d4608afc6.pack -------------------------------------------------------------------------------- /support/brms-demo-niogit/datasets.git/packed-refs: -------------------------------------------------------------------------------- 1 | # pack-refs with: peeled 2 | d620dfc8a87c34e9f5ccc915fc479c9a237afbae refs/heads/master 3 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/plugins.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/plugins.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | symlinks = false 3 | repositoryformatversion = 0 4 | filemode = true 5 | bare = true 6 | logallrefupdates = false 7 | precomposeunicode = true 8 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/plugins.git/objects/pack/pack-19a1c22be99237dab51cac280dacc819f07b8f30.bitmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/plugins.git/objects/pack/pack-19a1c22be99237dab51cac280dacc819f07b8f30.bitmap -------------------------------------------------------------------------------- /support/brms-demo-niogit/plugins.git/objects/pack/pack-19a1c22be99237dab51cac280dacc819f07b8f30.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/plugins.git/objects/pack/pack-19a1c22be99237dab51cac280dacc819f07b8f30.idx -------------------------------------------------------------------------------- /support/brms-demo-niogit/plugins.git/objects/pack/pack-19a1c22be99237dab51cac280dacc819f07b8f30.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/plugins.git/objects/pack/pack-19a1c22be99237dab51cac280dacc819f07b8f30.pack -------------------------------------------------------------------------------- /support/brms-demo-niogit/plugins.git/packed-refs: -------------------------------------------------------------------------------- 1 | # pack-refs with: peeled 2 | 53a0ca8b81092a5d44230b4de6fc7719913f5686 refs/heads/master 3 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | symlinks = false 3 | repositoryformatversion = 0 4 | filemode = true 5 | bare = true 6 | logallrefupdates = false 7 | precomposeunicode = true 8 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/04/d4ceb8528cbd07094119840c69ddf21f5c36b9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/04/d4ceb8528cbd07094119840c69ddf21f5c36b9 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/07/7ef1f2a9175ec2c9141d73edd8401be4fddaa6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/07/7ef1f2a9175ec2c9141d73edd8401be4fddaa6 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/07/d4d7da564840fd73c6763cc80d6bb17cb33f91: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/07/d4d7da564840fd73c6763cc80d6bb17cb33f91 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/09/b85cc7cc1e96806ec90df8362e1c8166fab8e8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/09/b85cc7cc1e96806ec90df8362e1c8166fab8e8 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/11/bfb700db69cd1233e596d3bb072e91ea766f52: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/11/bfb700db69cd1233e596d3bb072e91ea766f52 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/13/d39e410467ab46eab6bf4cce6df7015ef557b8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/13/d39e410467ab46eab6bf4cce6df7015ef557b8 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/16/f842f2248407b6360c97f281432d65d9f49e19: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/16/f842f2248407b6360c97f281432d65d9f49e19 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/19/d6e41a0c4bf81a91c25cd71aece91903349c60: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/19/d6e41a0c4bf81a91c25cd71aece91903349c60 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/1a/9be5ba7f9a104ee3b188c39ef52af71de96c0f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/1a/9be5ba7f9a104ee3b188c39ef52af71de96c0f -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/1d/deae9d4e29c3d053b0614558d0f49a2304dc95: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/1d/deae9d4e29c3d053b0614558d0f49a2304dc95 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/22/07c054e1402cc62918ec14c3afb619e51a7f97: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/22/07c054e1402cc62918ec14c3afb619e51a7f97 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/26/18861519a724a345c34df6022be441bc738e7c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/26/18861519a724a345c34df6022be441bc738e7c -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/36/8ab4471e657decb89defd8d8d9b3519512b4a9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/36/8ab4471e657decb89defd8d8d9b3519512b4a9 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/37/5ce337896d120338de0c2221d9f9c5ee42d515: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/37/5ce337896d120338de0c2221d9f9c5ee42d515 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/38/4afb53fbf0faf51bc8b34d64d6c8dfc07705d7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/38/4afb53fbf0faf51bc8b34d64d6c8dfc07705d7 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/3c/31f6c686ea9ddccb0af84edd70e7ed63adb1f2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/3c/31f6c686ea9ddccb0af84edd70e7ed63adb1f2 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/40/ca10baed0048ffe47c220d813284f503087a00: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/40/ca10baed0048ffe47c220d813284f503087a00 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/45/67e8d15a3af09f10612381eed9fd2cc3edbae1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/45/67e8d15a3af09f10612381eed9fd2cc3edbae1 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/47/f0cf4531e44aa5244ff803e0ab7c3db5312e87: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/47/f0cf4531e44aa5244ff803e0ab7c3db5312e87 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/49/58c5b7e82654cf1165b0f1ef9dc93a6dd9ba7b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/49/58c5b7e82654cf1165b0f1ef9dc93a6dd9ba7b -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/4b/0749ad01611be0cc331e3e9c8350edda67ba2d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/4b/0749ad01611be0cc331e3e9c8350edda67ba2d -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/4d/8d2c61f117e5aff4f7e17b8e409baa283c47ac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/4d/8d2c61f117e5aff4f7e17b8e409baa283c47ac -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/4e/6de0decebfb3316447cf7db712f988654e815d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/4e/6de0decebfb3316447cf7db712f988654e815d -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/5b/c804f0541d48deb069850c5d804ebf260b73f1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/5b/c804f0541d48deb069850c5d804ebf260b73f1 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/5d/442486fc274a7ee03221efe988c8ac4123a5d7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/5d/442486fc274a7ee03221efe988c8ac4123a5d7 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/5d/cba9ae10bd32e79b5a8e8e2c59dfcc35dc2725: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/5d/cba9ae10bd32e79b5a8e8e2c59dfcc35dc2725 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/5d/e60f7de7b0813ac26589129826099cf95f2883: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/5d/e60f7de7b0813ac26589129826099cf95f2883 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/63/af35397d5d9e663a9fdafeb093e393beabc873: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/63/af35397d5d9e663a9fdafeb093e393beabc873 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/6a/1a0fb5de924957a42e60cffd091fb8f79fed57: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/6a/1a0fb5de924957a42e60cffd091fb8f79fed57 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/6b/a27a433bd9af3a29e7d4659105ea88250f594c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/6b/a27a433bd9af3a29e7d4659105ea88250f594c -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/6c/fadcee5f7e839b5b62880229785d8cbce4de84: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/6c/fadcee5f7e839b5b62880229785d8cbce4de84 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/70/1d2154e6bc07eaddfcc8e0e30d95a90e22c97d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/70/1d2154e6bc07eaddfcc8e0e30d95a90e22c97d -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/71/9fc5544455bc27d7a807bab335b7b2b9f86bda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/71/9fc5544455bc27d7a807bab335b7b2b9f86bda -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/78/bd34ebcd86c1b285f11756c6417f23a19717f5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/78/bd34ebcd86c1b285f11756c6417f23a19717f5 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/79/fd5550a68f9f22cd21b5d5c2127015a619f560: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/79/fd5550a68f9f22cd21b5d5c2127015a619f560 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/84/1f5768057e997cf221cdfd8f5e8200e154ddd3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/84/1f5768057e997cf221cdfd8f5e8200e154ddd3 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/84/43f4ca74bb2836bb3327ae0dc8b971c0883cfc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/84/43f4ca74bb2836bb3327ae0dc8b971c0883cfc -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/87/d0c1eccbe5f2263d9142e4038e4f0ea8787d9d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/87/d0c1eccbe5f2263d9142e4038e4f0ea8787d9d -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/8d/801e1ef1207fd0453e47888cf630ac802814ee: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/8d/801e1ef1207fd0453e47888cf630ac802814ee -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/8d/8378eddff6ebfb70dd438d9e58517809f854ef: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/8d/8378eddff6ebfb70dd438d9e58517809f854ef -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/8d/b7060ef6127373be243f614b824fc8be47c527: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/8d/b7060ef6127373be243f614b824fc8be47c527 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/8e/506ee8bee5311f08553d6929f319f98e7f15b5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/8e/506ee8bee5311f08553d6929f319f98e7f15b5 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/92/0019cbdbc4769573c868f432773c893079b049: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/92/0019cbdbc4769573c868f432773c893079b049 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/94/ba1ca5ac0ef23c34671f8ee6821f7fd3288551: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/94/ba1ca5ac0ef23c34671f8ee6821f7fd3288551 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/95/a6ce36b2ee6952be775cccffc67c7433b39608: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/95/a6ce36b2ee6952be775cccffc67c7433b39608 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/9a/07d303f1b3c2043f6c2d679b376d21e90be1ca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/9a/07d303f1b3c2043f6c2d679b376d21e90be1ca -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/a6/1ed1234206137e32430f8c709ee05bb13a07e7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/a6/1ed1234206137e32430f8c709ee05bb13a07e7 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/a7/ed672aae4cdec13910ed5bc34d07d41b354415: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/a7/ed672aae4cdec13910ed5bc34d07d41b354415 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/a8/1bc501dce5f65bdf051bfe31223e47c9252917: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/a8/1bc501dce5f65bdf051bfe31223e47c9252917 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/ab/208545034a3b8140c4d43c6df2857c00724248: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/ab/208545034a3b8140c4d43c6df2857c00724248 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/b1/68da72abfb92d2f9de2e44f56fca580471fc6c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/b1/68da72abfb92d2f9de2e44f56fca580471fc6c -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/b2/f615badb4b518bd7a4c8072ce9dc53766875c4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/b2/f615badb4b518bd7a4c8072ce9dc53766875c4 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/b3/2f5760532d0e4f76e10faa013c54948c6c894a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/b3/2f5760532d0e4f76e10faa013c54948c6c894a -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/b3/4d5df8dec6da642cae7cfa062b34e18b9c0141: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/b3/4d5df8dec6da642cae7cfa062b34e18b9c0141 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/b3/56fb9d0f221e76910f60aef8c4810b0b77ee92: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/b3/56fb9d0f221e76910f60aef8c4810b0b77ee92 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/b7/13d89aed190df1cba854e8baa7bace16b14cb1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/b7/13d89aed190df1cba854e8baa7bace16b14cb1 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/ba/cdad69cf3bf7d078e0e5b2771adc0fffa1346d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/ba/cdad69cf3bf7d078e0e5b2771adc0fffa1346d -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/bf/6ffa7b3ecbfcb5edd2011565fb30d8c174cd08: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/bf/6ffa7b3ecbfcb5edd2011565fb30d8c174cd08 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/c1/0178885e8801a681779c4d362648aa35582e6e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/c1/0178885e8801a681779c4d362648aa35582e6e -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/c4/9609270bf1146e53c026c81cc02ca40142ce82: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/c4/9609270bf1146e53c026c81cc02ca40142ce82 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/cb/7017d3dcbd4e3111cb91329aaf0278e466c156: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/cb/7017d3dcbd4e3111cb91329aaf0278e466c156 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/cc/a058f884adb6baa88854b7bbf3ea133db54768: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/cc/a058f884adb6baa88854b7bbf3ea133db54768 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/d1/b6bc777e139e246092bcfa959424f748f8ec7a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/d1/b6bc777e139e246092bcfa959424f748f8ec7a -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/d2/19521955915b26e31a36202856fc43a52897bb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/d2/19521955915b26e31a36202856fc43a52897bb -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/d7/db4b323a02cce10ea34d84d963da24104020d7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/d7/db4b323a02cce10ea34d84d963da24104020d7 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/d8/263ee9860594d2806b0dfd1bfd17528b0ba2a4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/d8/263ee9860594d2806b0dfd1bfd17528b0ba2a4 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/d8/5a0183fbefacfd4765bce938205344e671cfbc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/d8/5a0183fbefacfd4765bce938205344e671cfbc -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/d8/7a2df10af643697fb1b64fe75a9b12b6c34d39: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/d8/7a2df10af643697fb1b64fe75a9b12b6c34d39 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/d9/e01ad9e0b3117db75492a61710d1645fbf1a7d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/d9/e01ad9e0b3117db75492a61710d1645fbf1a7d -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/dd/512c60999939734ab95886cb1703d0069e08a7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/dd/512c60999939734ab95886cb1703d0069e08a7 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/de/48d5e2d946317062e6b76d71f244126e1e5624: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/de/48d5e2d946317062e6b76d71f244126e1e5624 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/e2/38444cda97f96fb94cdbb8bddcd936fc03f98a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/e2/38444cda97f96fb94cdbb8bddcd936fc03f98a -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/e5/c411f6709390f03421dad62ce118642db882d3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/e5/c411f6709390f03421dad62ce118642db882d3 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/eb/0e96b9da94722c3326fe96364d235f011bb329: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/eb/0e96b9da94722c3326fe96364d235f011bb329 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/eb/ed6b498b3965a01f9c74ccd90f9ee424a1d246: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/eb/ed6b498b3965a01f9c74ccd90f9ee424a1d246 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/ed/471eb1fb9160bfa0fdfc7d630b1dd3a59e5859: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/ed/471eb1fb9160bfa0fdfc7d630b1dd3a59e5859 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/ef/f39a72822658f3f87cfcf528895218ae388a86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/ef/f39a72822658f3f87cfcf528895218ae388a86 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/f1/47b8d996a921d66b987b19630da2eeca07a94a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/f1/47b8d996a921d66b987b19630da2eeca07a94a -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/f8/aeb54d8d932018a61d2ee76707a16db10d5771: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/f8/aeb54d8d932018a61d2ee76707a16db10d5771 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/f9/6a5a412a7c15a475cd08e6300cf2c5a7b7f7e4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/f9/6a5a412a7c15a475cd08e6300cf2c5a7b7f7e4 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/fb/107a04328aa4b1e2a7e0814cc8d95804851cc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/fb/107a04328aa4b1e2a7e0814cc8d95804851cc2 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/ff/e1ed94c9679fd3705e05e9ba941c666fc34cf5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/ff/e1ed94c9679fd3705e05e9ba941c666fc34cf5 -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/pack/pack-e57f36d39f53c34ab806172e661bd2c801affd11.bitmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/pack/pack-e57f36d39f53c34ab806172e661bd2c801affd11.bitmap -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/pack/pack-e57f36d39f53c34ab806172e661bd2c801affd11.idx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/pack/pack-e57f36d39f53c34ab806172e661bd2c801affd11.idx -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/objects/pack/pack-e57f36d39f53c34ab806172e661bd2c801affd11.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/brms-demo-niogit/system.git/objects/pack/pack-e57f36d39f53c34ab806172e661bd2c801affd11.pack -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/packed-refs: -------------------------------------------------------------------------------- 1 | # pack-refs with: peeled 2 | e6e22b69d61ec4889cc2aaa1fa7ed000a0cabda6 refs/heads/erics-uf-user 3 | 67bfba9bf7f38434c7463f10d8eef3119bc8b9cf refs/heads/locks 4 | a8d7aa5bc8948700735b03dc55af6a2edc7ad205 refs/heads/mailman-uf-user 5 | aba4c50c5f0151cc006967dbdd7ba61345fe1292 refs/heads/master 6 | bc17701203b9ee8717dd5f29e52208de2bef4cbf refs/heads/social 7 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/refs/heads/erics-uf-user: -------------------------------------------------------------------------------- 1 | ab208545034a3b8140c4d43c6df2857c00724248 2 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/refs/heads/locks: -------------------------------------------------------------------------------- 1 | bf6ffa7b3ecbfcb5edd2011565fb30d8c174cd08 2 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/refs/heads/mailman-uf-user: -------------------------------------------------------------------------------- 1 | cb7017d3dcbd4e3111cb91329aaf0278e466c156 2 | -------------------------------------------------------------------------------- /support/brms-demo-niogit/system.git/refs/heads/social: -------------------------------------------------------------------------------- 1 | 8e506ee8bee5311f08553d6929f319f98e7f15b5 2 | -------------------------------------------------------------------------------- /support/docker/.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | target 3 | docs 4 | init.bat 5 | init.sh 6 | README.md 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /support/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use jbossdemocentral/developer as the base 2 | FROM jbossdemocentral/developer:jdk8-uid 3 | 4 | # Maintainer details 5 | MAINTAINER Andrew Block, Eric D. Schabell, Duncan Doylle, Jaen Swart 6 | 7 | # Environment Variables 8 | ENV BRMS_HOME /opt/jboss/brms/jboss-eap-7.0 9 | ENV BRMS_VERSION_MAJOR 6 10 | ENV BRMS_VERSION_MINOR 4 11 | ENV BRMS_VERSION_MICRO 0 12 | ENV BRMS_VERSION_PATCH GA 13 | 14 | ENV EAP_VERSION_MAJOR 7 15 | ENV EAP_VERSION_MINOR 0 16 | ENV EAP_VERSION_MICRO 0 17 | #ENV EAP_VERSION_PATCH 7 18 | 19 | ENV EAP_INSTALLER=jboss-eap-$EAP_VERSION_MAJOR.$EAP_VERSION_MINOR.$EAP_VERSION_MICRO-installer.jar 20 | ENV BRMS_DEPLOYABLE=jboss-brms-$BRMS_VERSION_MAJOR.$BRMS_VERSION_MINOR.$BRMS_VERSION_MICRO.$BRMS_VERSION_PATCH-deployable-eap7.x.zip 21 | 22 | # ADD Installation Files 23 | COPY support/installation-eap support/installation-eap.variables installs/$BRMS_DEPLOYABLE installs/$EAP_INSTALLER /opt/jboss/ 24 | 25 | # Update Permissions on Installers 26 | USER root 27 | RUN chown 1000:1000 /opt/jboss/$EAP_INSTALLER /opt/jboss/$BRMS_DEPLOYABLE 28 | USER 1000 29 | 30 | # Prepare and run installer and cleanup installation components 31 | RUN sed -i "s:.*:$BRMS_HOME:" /opt/jboss/installation-eap \ 32 | && java -jar /opt/jboss/$EAP_INSTALLER /opt/jboss/installation-eap -variablefile /opt/jboss/installation-eap.variables \ 33 | #&& $BRMS_HOME/bin/jboss-cli.sh --command="patch apply /opt/jboss/jboss-eap-$EAP_VERSION_MAJOR.$EAP_VERSION_MINOR.$EAP_VERSION_PATCH-patch.zip --override-all" \ 34 | && unzip -qo /opt/jboss/$BRMS_DEPLOYABLE -d $BRMS_HOME/.. \ 35 | && rm -rf /opt/jboss/$BRMS_DEPLOYABLE /opt/jboss/$EAP_INSTALLER /opt/jboss/installation-eap /opt/jboss/installation-eap.variables $BRMS_HOME/standalone/configuration/standalone_xml_history/ 36 | 37 | # Copy demo and support files 38 | COPY support/brms-demo-niogit $BRMS_HOME/bin/.niogit 39 | # Clone the brms-coolstore-repo repository 40 | USER root 41 | RUN rm -rf $BRMS_HOME/bin/.niogit/coolstore-demo.git && git clone --bare https://github.com/jbossdemocentral/brms-coolstore-repo.git $BRMS_HOME/bin/.niogit/coolstore-demo.git 42 | USER 1000 43 | 44 | COPY projects /opt/jboss/brms-projects 45 | COPY support/libs /opt/jboss/brms-projects/libs 46 | COPY support/userinfo.properties $BRMS_HOME/standalone/deployments/business-central.war/WEB-INF/classes/ 47 | COPY support/standalone.xml $BRMS_HOME/standalone/configuration/ 48 | 49 | # Create users. 50 | RUN $BRMS_HOME/bin/add-user.sh -a -r ApplicationRealm -u brmsAdmin -p jbossbrms1! -ro analyst,admin,manager,user,kie-server,kiemgmt,rest-all --silent \ 51 | && $BRMS_HOME/bin/add-user.sh -a -r ApplicationRealm -u erics -p jbossbrms1! -ro analyst,admin,manager,user,kie-server,kiemgmt,rest-all --silent 52 | 53 | 54 | # Switch back to root user to perform build and cleanup 55 | USER root 56 | 57 | # Run Demo Maven build and cleanup 58 | RUN mvn install:install-file -Dfile=/opt/jboss/brms-projects/libs/coolstore-2.0.0.jar -DgroupId=com.redhat -DartifactId=coolstore -Dversion=2.0.0 -Dpackaging=jar \ 59 | && mvn clean install -f /opt/jboss/brms-projects/brms-coolstore-demo/pom.xml \ 60 | && cp /opt/jboss/brms-projects/brms-coolstore-demo/target/brms-coolstore-demo.war $BRMS_HOME/standalone/deployments/ \ 61 | && chown -R jboss:jboss $BRMS_HOME/bin/.niogit $BRMS_HOME/standalone/configuration/application-roles.properties $BRMS_HOME/standalone/configuration/standalone.xml $BRMS_HOME/standalone/deployments/brms-coolstore-demo.war $BRMS_HOME/standalone/deployments/business-central.war/WEB-INF/classes/userinfo.properties \ 62 | && rm -rf ~/.m2/repository /opt/jboss/brms-projects 63 | 64 | # Run as JBoss 65 | USER 1000 66 | 67 | # Expose Ports 68 | EXPOSE 9990 9999 8080 69 | 70 | # Run BRMS 71 | CMD ["/opt/jboss/brms/jboss-eap-7.0/bin/standalone.sh","-c","standalone.xml","-b", "0.0.0.0","-bmanagement","0.0.0.0"] 72 | -------------------------------------------------------------------------------- /support/installation-eap: -------------------------------------------------------------------------------- 1 | 2 | 3 | EAP 4 | 7.0.0 5 | 6 | 7 | ./target/jboss-eap-7.0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /support/installation-eap.variables: -------------------------------------------------------------------------------- 1 | adminPassword=jbosseap1! 2 | -------------------------------------------------------------------------------- /support/libs/coolstore-2.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbossdemocentral/brms-coolstore-demo/9306435deb2ded08af2d068d333e38b3b38162ec/support/libs/coolstore-2.0.0.jar -------------------------------------------------------------------------------- /support/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | /tmp/maven-repo 9 | 10 | 11 | 12 | guvnor-m2-repo 13 | erics 14 | jbossbrms1! 15 | 16 | httpclient 17 | 18 | 19 | true 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | jboss-bpm-suite-repo 31 | JBoss BPM Suite Maven Repository 32 | file://tmp/maven-repo 33 | default 34 | 35 | true 36 | always 37 | 38 | 39 | true 40 | always 41 | 42 | 43 | 44 | 45 | 46 | 47 | jboss-bpm-suite-repo 48 | JBoss BPM Suite Maven Repository 49 | file:///tmp/maven-repo 50 | default 51 | 52 | true 53 | always 54 | 55 | 56 | true 57 | always 58 | 59 | 60 | 61 | tmp-repository 62 | 63 | 64 | 65 | 66 | 67 | never 68 | 69 | 70 | always 71 | 72 | jboss-public-repository-group 73 | JBoss Public Maven Repository Group 74 | https://repository.jboss.org/nexus/content/groups/public 75 | 76 | 77 | 78 | 79 | 80 | never 81 | 82 | 83 | false 84 | always 85 | 86 | jboss-public-plugin-repository-group 87 | https://repository.jboss.org/nexus/content/groups/public 88 | 89 | 90 | jboss-public-repository 91 | 92 | 93 | 94 | 95 | 96 | never 97 | 98 | 99 | always 100 | 101 | redhat-ga-repository-group 102 | JBoss Public Maven Repository Group 103 | https://maven.repository.redhat.com/ga 104 | 105 | 106 | 107 | 108 | 109 | never 110 | 111 | 112 | false 113 | always 114 | 115 | rehdhat-ga-plugin-repository-group 116 | https://maven.repository.redhat.com/ga 117 | 118 | 119 | redhat-ga-repository 120 | 121 | 122 | 123 | tmp-repository 124 | jboss-public-repository 125 | redhat-ga-repository 126 | 127 | 128 | -------------------------------------------------------------------------------- /support/standalone.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE 163 | h2 164 | 165 | sa 166 | sa 167 | 168 | 169 | 170 | 171 | org.h2.jdbcx.JdbcDataSource 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | false 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | ${jboss.bind.address:127.0.0.1} 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | -------------------------------------------------------------------------------- /support/userinfo.properties: -------------------------------------------------------------------------------- 1 | erics=erics@domain.com:en-UK:erics 2 | Administrator=administrator@domain.com:en-UK:Administrator 3 | Administrators=administrators@domain.com:en-UK:Administrators:[Administrator] 4 | manager=manager@domain.com:en-UK:manager:[erics] 5 | -------------------------------------------------------------------------------- /support/windows/README: -------------------------------------------------------------------------------- 1 | WINDOWS INSTALLATION: 2 | ==================== 3 | This directory contains a Windows Batch file and a corresponding VBScript file which is used as a 4 | utility to unzip files (since Windows has no native unzip functionality within Batch files). 5 | 6 | unzip.vsb - utility to unzip files. 7 | 8 | Notes and tips: 9 | - the unzip.vbs file needs to be located in the root of the project. 10 | - you might run into some issues while extracting some of the BRMS components because the 11 | file path of the extracted file became greater than 255 chars (yet another windows 12 | headache). By putting the project in a higher directory (c:\demo), the issue can be 13 | resolved. 14 | - if you find errors with the installation, please fix and push back to project, we don't have 15 | a windows environment to test and keep these scripts updated. 16 | -------------------------------------------------------------------------------- /support/windows/unzip.vbs: -------------------------------------------------------------------------------- 1 | '* Script name: unzip.vbs 2 | '* Created on: 4/8/2013 3 | '* Author: Andrew Block 4 | '* Purpose: Extracts the contents of a specified compressed file 5 | '* to a specified folder 6 | 7 | 8 | Dim pathToZipFile 9 | Dim dirToExtractFiles 10 | 11 | If WScript.Arguments.Count = 2 Then 12 | pathToZipFile = WScript.Arguments.Item(0) 13 | dirToExtractFiles = WScript.Arguments.Item(1) 14 | Else 15 | WScript.Echo "2 Parameters are Required" 16 | WScript.Quit(99) 17 | End If 18 | 19 | Dim fso 20 | Set fso = CreateObject("Scripting.FileSystemObject") 21 | 22 | pathToZipFile = fso.GetAbsolutePathName(pathToZipFile) 23 | dirToExtractFiles = fso.GetAbsolutePathName(dirToExtractFiles) 24 | 25 | If (Not fso.FileExists(pathToZipFile)) Then 26 | WScript.Echo "Zip file does not exist: " & pathToZipFile 27 | WScript.Quit(99) 28 | End If 29 | 30 | If Not fso.FolderExists(dirToExtractFiles) Then 31 | WScript.Echo "Directory does not exist: " & dirToExtractFiles 32 | WScript.Quit(99) 33 | End If 34 | 35 | dim sa 36 | set sa = CreateObject("Shell.Application") 37 | 38 | Dim zip 39 | Set zip = sa.NameSpace(pathToZipFile) 40 | 41 | Dim d 42 | Set d = sa.NameSpace(dirToExtractFiles) 43 | 44 | 'd.CopyHere zip.items, 4 45 | d.CopyHere zip.items, 20 46 | 47 | Do Until zip.Items.Count <= d.Items.Count 48 | Wscript.Sleep(200) 49 | Loop --------------------------------------------------------------------------------