├── extra.gradle
├── modules
├── core
│ ├── db
│ │ ├── init
│ │ │ └── hsql
│ │ │ │ ├── 30.create-db.sql
│ │ │ │ ├── 42.create-db.sql
│ │ │ │ ├── 50.create-db.sql
│ │ │ │ ├── 40.create-db.sql
│ │ │ │ ├── 20.create-db.sql
│ │ │ │ ├── 60.create-db.sql
│ │ │ │ ├── 51.create-db.sql
│ │ │ │ ├── 10.create-db.sql
│ │ │ │ ├── 71.create-db.sql
│ │ │ │ └── 41.create-db.sql
│ │ └── update
│ │ │ └── hsql
│ │ │ └── 18
│ │ │ ├── 180403-2-updateProduct.sql
│ │ │ ├── 180322-2-createOrder.sql
│ │ │ ├── 180322-2-createAddress.sql
│ │ │ ├── 180403-2-updateProduct01.sql
│ │ │ ├── 180417-2-updateCustomer.sql
│ │ │ ├── 180322-2-createDocument.sql
│ │ │ ├── 180322-2-createLineItem.sql
│ │ │ ├── 180322-1-createProduct.sql
│ │ │ ├── 180417-1-createTenant.sql
│ │ │ ├── 180403-1-createProductCategory.sql
│ │ │ ├── 180322-1-createCustomer.sql
│ │ │ ├── 180322-1-createOrder.sql
│ │ │ ├── 180322-1-createDocument.sql
│ │ │ ├── 180322-1-createAddress.sql
│ │ │ └── 180322-1-createLineItem.sql
│ ├── src
│ │ └── com
│ │ │ └── roadtocubaandbeyond
│ │ │ └── ordermanagement
│ │ │ ├── spring.xml
│ │ │ ├── listener
│ │ │ └── OrderIdCreator.java
│ │ │ ├── service
│ │ │ └── ReportLoadServiceBean.java
│ │ │ ├── app.properties
│ │ │ └── fts.xml
│ ├── web
│ │ ├── META-INF
│ │ │ └── context.xml
│ │ └── WEB-INF
│ │ │ └── web.xml
│ └── test
│ │ └── com
│ │ └── roadtocubaandbeyond
│ │ └── ordermanagement
│ │ ├── core
│ │ └── SampleIntegrationTest.java
│ │ └── RtcaboTestContainer.java
├── web
│ ├── src
│ │ └── com
│ │ │ └── roadtocubaandbeyond
│ │ │ └── ordermanagement
│ │ │ ├── web
│ │ │ ├── address
│ │ │ │ ├── messages.properties
│ │ │ │ ├── messages_de.properties
│ │ │ │ ├── AddressEdit.java
│ │ │ │ └── address-edit.xml
│ │ │ ├── document
│ │ │ │ ├── messages.properties
│ │ │ │ ├── messages_de.properties
│ │ │ │ ├── DocumentEdit.java
│ │ │ │ └── document-edit.xml
│ │ │ ├── lineitem
│ │ │ │ ├── messages.properties
│ │ │ │ ├── messages_de.properties
│ │ │ │ ├── LineItemEdit.java
│ │ │ │ └── line-item-edit.xml
│ │ │ ├── product
│ │ │ │ ├── messages.properties
│ │ │ │ ├── messages_de.properties
│ │ │ │ ├── ProductBrowse.java
│ │ │ │ ├── ProductEdit.java
│ │ │ │ ├── product-edit.xml
│ │ │ │ └── product-browse.xml
│ │ │ ├── tenant
│ │ │ │ ├── messages.properties
│ │ │ │ ├── TenantBrowse.java
│ │ │ │ ├── TenantEdit.java
│ │ │ │ ├── tenant-edit.xml
│ │ │ │ └── tenant-browse.xml
│ │ │ ├── productcategory
│ │ │ │ ├── messages.properties
│ │ │ │ ├── ProductCategoryBrowse.java
│ │ │ │ ├── ProductCategoryEdit.java
│ │ │ │ ├── product-category-edit.xml
│ │ │ │ └── product-category-browse.xml
│ │ │ ├── customer
│ │ │ │ ├── messages.properties
│ │ │ │ ├── messages_de.properties
│ │ │ │ ├── CustomerBrowse.java
│ │ │ │ ├── CustomerEdit.java
│ │ │ │ ├── customer-browse.xml
│ │ │ │ └── customer-edit.xml
│ │ │ ├── order
│ │ │ │ ├── messages.properties
│ │ │ │ ├── messages_de.properties
│ │ │ │ ├── OrderBrowse.java
│ │ │ │ ├── order-browse.xml
│ │ │ │ ├── OrderEdit.java
│ │ │ │ └── order-edit.xml
│ │ │ ├── messages_de.properties
│ │ │ └── messages.properties
│ │ │ ├── web-dispatcher-spring.xml
│ │ │ ├── web-permissions.xml
│ │ │ ├── web-menu.xml
│ │ │ ├── web-spring.xml
│ │ │ ├── web-app.properties
│ │ │ └── web-screens.xml
│ ├── web
│ │ ├── META-INF
│ │ │ └── context.xml
│ │ └── WEB-INF
│ │ │ └── web.xml
│ └── test
│ │ ├── features
│ │ └── login.feature
│ │ └── com
│ │ └── roadtocubaandbeyond
│ │ └── ordermanagement
│ │ └── web
│ │ ├── CucumberRunner.java
│ │ ├── service
│ │ └── UserService.java
│ │ ├── steps
│ │ └── LoginSteps.java
│ │ └── screens
│ │ └── LoginWindow.java
├── gui
│ └── src
│ │ └── com
│ │ └── roadtocubaandbeyond
│ │ └── ordermanagement
│ │ └── screens.xml
└── global
│ └── src
│ └── com
│ └── roadtocubaandbeyond
│ └── ordermanagement
│ ├── metadata.xml
│ ├── service
│ └── ReportLoadService.java
│ ├── entity
│ ├── DocumentType.java
│ ├── messages_de.properties
│ ├── ProductCategory.java
│ ├── Tenant.java
│ ├── messages.properties
│ ├── StandardTenantEntity.java
│ ├── Product.java
│ ├── Address.java
│ ├── Document.java
│ ├── LineItem.java
│ ├── Customer.java
│ └── Order.java
│ ├── persistence.xml
│ └── views.xml
├── img
├── domain-model.png
└── domain-model.yuml
├── reports
└── Order Invoice.zip
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── .idea
├── vcs.xml
├── encodings.xml
├── misc.xml
├── gradle.xml
├── cuba-project.xml
└── workspace.xml
├── .travis.yml
├── studio-intellij.xml
├── studio-settings.xml
├── settings.gradle
├── README.md
├── gradlew.bat
└── gradlew
/extra.gradle:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/30.create-db.sql:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/img/domain-model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariodavid/rtcab-ordermanagement/HEAD/img/domain-model.png
--------------------------------------------------------------------------------
/reports/Order Invoice.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariodavid/rtcab-ordermanagement/HEAD/reports/Order Invoice.zip
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/address/messages.properties:
--------------------------------------------------------------------------------
1 | editorCaption = Address editor
2 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180403-2-updateProduct.sql:
--------------------------------------------------------------------------------
1 | alter table RTCABO_PRODUCT add column CATEGORY_ID varchar(36) ;
2 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/document/messages.properties:
--------------------------------------------------------------------------------
1 | editorCaption = Document editor
2 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/lineitem/messages.properties:
--------------------------------------------------------------------------------
1 | editorCaption = LineItem editor
2 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/address/messages_de.properties:
--------------------------------------------------------------------------------
1 | editorCaption = Adresse bearbeiten
2 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/document/messages_de.properties:
--------------------------------------------------------------------------------
1 | editorCaption = Dokument bearbeiten
2 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariodavid/rtcab-ordermanagement/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/lineitem/messages_de.properties:
--------------------------------------------------------------------------------
1 | editorCaption = Bestellposition bearbeiten
2 |
--------------------------------------------------------------------------------
/img/domain-model.yuml:
--------------------------------------------------------------------------------
1 | [Customer]<>-->[Order]
2 | [Order]-[note: Aggregate Root{bg:cornsilk}]
3 | [Order]<>-->[LineItem]
4 | [LineItem]-->[Product]
--------------------------------------------------------------------------------
/modules/web/web/META-INF/context.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/product/messages.properties:
--------------------------------------------------------------------------------
1 | browseCaption = Product browser
2 | editorCaption = Product editor
3 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/product/messages_de.properties:
--------------------------------------------------------------------------------
1 | browseCaption = Produkte
2 | editorCaption = Produkt bearbeiten
3 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/tenant/messages.properties:
--------------------------------------------------------------------------------
1 | browseCaption = Tenant browser
2 | editorCaption = Tenant editor
3 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/productcategory/messages.properties:
--------------------------------------------------------------------------------
1 | browseCaption = ProductCategory browser
2 | editorCaption = ProductCategory editor
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | .studio
3 | *.ipr
4 | *.iml
5 | *.iws
6 | build/*
7 | deploy/*
8 | modules/*/build/*
9 | out
10 | test-run
11 |
12 | .DS_Store
13 | modules/*/test-home/*
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/modules/gui/src/com/roadtocubaandbeyond/ordermanagement/screens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web-dispatcher-spring.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/customer/messages.properties:
--------------------------------------------------------------------------------
1 | browseCaption = Customer browser
2 | editorCaption = Customer editor
3 | customerData=Customer data
4 | orders=Orders
5 | addresses=Addresses
6 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/order/messages.properties:
--------------------------------------------------------------------------------
1 | browseCaption = Order browser
2 | editorCaption = Order editor
3 | dataTab=Order Data
4 | documents=Documents
5 | generateInvoice=Generate Invoice
6 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web-permissions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/customer/messages_de.properties:
--------------------------------------------------------------------------------
1 | browseCaption = Kunden
2 | editorCaption = Kunde bearbeiten
3 | customerData= Kundeninformationen
4 | orders= Bestellungen
5 | addresses= Adressen
6 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/order/messages_de.properties:
--------------------------------------------------------------------------------
1 | browseCaption = Bestellungen
2 | editorCaption = Bestellung bearbeiten
3 | dataTab= Bestelldaten
4 | documents= Dokumente
5 | generateInvoice= Rechnung erzeugen
6 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-2-createOrder.sql:
--------------------------------------------------------------------------------
1 | alter table RTCABO_ORDER add constraint FK_RTCABO_ORDER_CUSTOMER foreign key (CUSTOMER_ID) references RTCABO_CUSTOMER(ID);
2 | create index IDX_RTCABO_ORDER_CUSTOMER on RTCABO_ORDER (CUSTOMER_ID);
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
6 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: groovy
2 | jdk:
3 | - oraclejdk8
4 | cache:
5 | directories:
6 | - $HOME/.gradle/caches/
7 | - $HOME/.gradle/wrapper/
8 |
9 | before_install:
10 | - chmod +x ./gradlew
11 |
12 | script:
13 | - ./gradlew assemble
14 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-2-createAddress.sql:
--------------------------------------------------------------------------------
1 | alter table RTCABO_ADDRESS add constraint FK_RTCABO_ADDRESS_CUSTOMER foreign key (CUSTOMER_ID) references RTCABO_CUSTOMER(ID);
2 | create index IDX_RTCABO_ADDRESS_CUSTOMER on RTCABO_ADDRESS (CUSTOMER_ID);
3 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/order/OrderBrowse.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.order;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractLookup;
4 |
5 | public class OrderBrowse extends AbstractLookup {
6 | }
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180403-2-updateProduct01.sql:
--------------------------------------------------------------------------------
1 | alter table RTCABO_PRODUCT add constraint FK_RTCABO_PRODUCT_CATEGORY foreign key (CATEGORY_ID) references RTCABO_PRODUCT_CATEGORY(ID);
2 | create index IDX_RTCABO_PRODUCT_CATEGORY on RTCABO_PRODUCT (CATEGORY_ID);
3 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/product/ProductBrowse.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.product;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractLookup;
4 |
5 | public class ProductBrowse extends AbstractLookup {
6 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/tenant/TenantBrowse.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.tenant;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractLookup;
4 |
5 | public class TenantBrowse extends AbstractLookup {
6 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/customer/CustomerBrowse.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.customer;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractLookup;
4 |
5 | public class CustomerBrowse extends AbstractLookup {
6 | }
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180417-2-updateCustomer.sql:
--------------------------------------------------------------------------------
1 | alter table RTCABO_CUSTOMER add column TENANT_ID varchar(36) ^
2 | update RTCABO_CUSTOMER set TENANT_ID = '00000000-0000-0000-0000-000000000000' where TENANT_ID is null ;
3 | alter table RTCABO_CUSTOMER alter column TENANT_ID set not null ;
4 |
--------------------------------------------------------------------------------
/modules/web/test/features/login.feature:
--------------------------------------------------------------------------------
1 | Feature: Login
2 |
3 | Scenario: An existing user can login into the system
4 | Given there is a user "admin" in the system
5 | When I log in as the user "admin" with password "admin"
6 | Then I am logged in and can navigate through the application
7 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/productcategory/ProductCategoryBrowse.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.productcategory;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractLookup;
4 |
5 | public class ProductCategoryBrowse extends AbstractLookup {
6 | }
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/metadata.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/tenant/TenantEdit.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.tenant;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractEditor;
4 | import com.roadtocubaandbeyond.ordermanagement.entity.Tenant;
5 |
6 | public class TenantEdit extends AbstractEditor {
7 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/address/AddressEdit.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.address;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractEditor;
4 | import com.roadtocubaandbeyond.ordermanagement.entity.Address;
5 |
6 | public class AddressEdit extends AbstractEditor {
7 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/product/ProductEdit.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.product;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractEditor;
4 | import com.roadtocubaandbeyond.ordermanagement.entity.Product;
5 |
6 | public class ProductEdit extends AbstractEditor {
7 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/customer/CustomerEdit.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.customer;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractEditor;
4 | import com.roadtocubaandbeyond.ordermanagement.entity.Customer;
5 |
6 | public class CustomerEdit extends AbstractEditor {
7 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/document/DocumentEdit.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.document;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractEditor;
4 | import com.roadtocubaandbeyond.ordermanagement.entity.Document;
5 |
6 | public class DocumentEdit extends AbstractEditor {
7 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/lineitem/LineItemEdit.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.lineitem;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractEditor;
4 | import com.roadtocubaandbeyond.ordermanagement.entity.LineItem;
5 |
6 | public class LineItemEdit extends AbstractEditor {
7 | }
--------------------------------------------------------------------------------
/studio-intellij.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/service/ReportLoadService.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.service;
2 |
3 |
4 | import com.haulmont.reports.entity.Report;
5 |
6 | public interface ReportLoadService {
7 | String NAME = "rtcabo_ReportLoadService";
8 |
9 | Report loadReportBySystemcode(String systemCode);
10 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/productcategory/ProductCategoryEdit.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.productcategory;
2 |
3 | import com.haulmont.cuba.gui.components.AbstractEditor;
4 | import com.roadtocubaandbeyond.ordermanagement.entity.ProductCategory;
5 |
6 | public class ProductCategoryEdit extends AbstractEditor {
7 | }
--------------------------------------------------------------------------------
/modules/core/src/com/roadtocubaandbeyond/ordermanagement/spring.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-2-createDocument.sql:
--------------------------------------------------------------------------------
1 | alter table RTCABO_DOCUMENT add constraint FK_RTCABO_DOCUMENT_FILE foreign key (FILE_ID) references SYS_FILE(ID);
2 | alter table RTCABO_DOCUMENT add constraint FK_RTCABO_DOCUMENT_ORDER foreign key (ORDER_ID) references RTCABO_ORDER(ID);
3 | create index IDX_RTCABO_DOCUMENT_FILE on RTCABO_DOCUMENT (FILE_ID);
4 | create index IDX_RTCABO_DOCUMENT_ORDER on RTCABO_DOCUMENT (ORDER_ID);
5 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-2-createLineItem.sql:
--------------------------------------------------------------------------------
1 | alter table RTCABO_LINE_ITEM add constraint FK_RTCABO_LINE_ITEM_PRODUCT foreign key (PRODUCT_ID) references RTCABO_PRODUCT(ID);
2 | alter table RTCABO_LINE_ITEM add constraint FK_RTCABO_LINE_ITEM_ORDER foreign key (ORDER_ID) references RTCABO_ORDER(ID);
3 | create index IDX_RTCABO_LINE_ITEM_PRODUCT on RTCABO_LINE_ITEM (PRODUCT_ID);
4 | create index IDX_RTCABO_LINE_ITEM_ORDER on RTCABO_LINE_ITEM (ORDER_ID);
5 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-1-createProduct.sql:
--------------------------------------------------------------------------------
1 | create table RTCABO_PRODUCT (
2 | ID varchar(36) not null,
3 | VERSION integer not null,
4 | CREATE_TS timestamp,
5 | CREATED_BY varchar(50),
6 | UPDATE_TS timestamp,
7 | UPDATED_BY varchar(50),
8 | DELETE_TS timestamp,
9 | DELETED_BY varchar(50),
10 | --
11 | NAME varchar(255) not null,
12 | CODE varchar(255),
13 | --
14 | primary key (ID)
15 | );
16 |
--------------------------------------------------------------------------------
/studio-settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
8 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180417-1-createTenant.sql:
--------------------------------------------------------------------------------
1 | create table RTCABO_TENANT (
2 | ID varchar(36) not null,
3 | VERSION integer not null,
4 | CREATE_TS timestamp,
5 | CREATED_BY varchar(50),
6 | UPDATE_TS timestamp,
7 | UPDATED_BY varchar(50),
8 | DELETE_TS timestamp,
9 | DELETED_BY varchar(50),
10 | --
11 | NAME varchar(255) not null,
12 | CODE varchar(255) not null,
13 | --
14 | primary key (ID)
15 | );
16 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180403-1-createProductCategory.sql:
--------------------------------------------------------------------------------
1 | create table RTCABO_PRODUCT_CATEGORY (
2 | ID varchar(36) not null,
3 | VERSION integer not null,
4 | CREATE_TS timestamp,
5 | CREATED_BY varchar(50),
6 | UPDATE_TS timestamp,
7 | UPDATED_BY varchar(50),
8 | DELETE_TS timestamp,
9 | DELETED_BY varchar(50),
10 | --
11 | NAME varchar(255) not null,
12 | CODE varchar(255),
13 | --
14 | primary key (ID)
15 | );
16 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-1-createCustomer.sql:
--------------------------------------------------------------------------------
1 | create table RTCABO_CUSTOMER (
2 | ID varchar(36) not null,
3 | VERSION integer not null,
4 | CREATE_TS timestamp,
5 | CREATED_BY varchar(50),
6 | UPDATE_TS timestamp,
7 | UPDATED_BY varchar(50),
8 | DELETE_TS timestamp,
9 | DELETED_BY varchar(50),
10 | --
11 | NAME varchar(255) not null,
12 | FIRST_NAME varchar(255),
13 | BIRTHDAY date not null,
14 | --
15 | primary key (ID)
16 | );
17 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/messages_de.properties:
--------------------------------------------------------------------------------
1 | application.caption = CUBA Application
2 | application.logoImage = branding/app-icon-menu.png
3 |
4 | loginWindow.caption = CUBA Login
5 | loginWindow.welcomeLabel = Willkommen bei CUBA!
6 | loginWindow.logoImage = branding/app-icon-login.png
7 |
8 | menu-config.application-rtcabo = Anwendung
9 | menu-config.rtcabo$Customer.browse = Kunden
10 | menu-config.rtcabo$Product.browse = Produkte
11 | menu-config.rtcabo$Order.browse = Bestellungen
12 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-1-createOrder.sql:
--------------------------------------------------------------------------------
1 | create table RTCABO_ORDER (
2 | ID varchar(36) not null,
3 | VERSION integer not null,
4 | CREATE_TS timestamp,
5 | CREATED_BY varchar(50),
6 | UPDATE_TS timestamp,
7 | UPDATED_BY varchar(50),
8 | DELETE_TS timestamp,
9 | DELETED_BY varchar(50),
10 | --
11 | CUSTOMER_ID varchar(36) not null,
12 | ORDER_ID varchar(255),
13 | ORDER_DATE date not null,
14 | DELIVERY_DATE date not null,
15 | --
16 | primary key (ID)
17 | );
18 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'rtcab-ordermanagement'
2 | def modulePrefix = 'app'
3 | include(":${modulePrefix}-global", ":${modulePrefix}-core", ":${modulePrefix}-gui", ":${modulePrefix}-web")
4 | project(":${modulePrefix}-global").projectDir = new File(settingsDir, 'modules/global')
5 | project(":${modulePrefix}-core").projectDir = new File(settingsDir, 'modules/core')
6 | project(":${modulePrefix}-gui").projectDir = new File(settingsDir, 'modules/gui')
7 | project(":${modulePrefix}-web").projectDir = new File(settingsDir, 'modules/web')
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-1-createDocument.sql:
--------------------------------------------------------------------------------
1 | create table RTCABO_DOCUMENT (
2 | ID varchar(36) not null,
3 | VERSION integer not null,
4 | CREATE_TS timestamp,
5 | CREATED_BY varchar(50),
6 | UPDATE_TS timestamp,
7 | UPDATED_BY varchar(50),
8 | DELETE_TS timestamp,
9 | DELETED_BY varchar(50),
10 | --
11 | NAME varchar(255) not null,
12 | FILE_ID varchar(36) not null,
13 | TYPE_ varchar(50),
14 | ORDER_ID varchar(36) not null,
15 | --
16 | primary key (ID)
17 | );
18 |
--------------------------------------------------------------------------------
/modules/web/test/com/roadtocubaandbeyond/ordermanagement/web/CucumberRunner.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web;
2 |
3 | import org.junit.runner.RunWith;
4 | import cucumber.api.CucumberOptions;
5 | import cucumber.api.junit.Cucumber;
6 |
7 | @RunWith(Cucumber.class)
8 | @CucumberOptions(
9 | features = "classpath:features",
10 | glue = "com.roadtocubaandbeyond.ordermanagement.web.steps",
11 | plugin = {"pretty"},
12 | tags = {"not @Ignore"}
13 | )
14 | public class CucumberRunner {
15 |
16 | }
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-1-createAddress.sql:
--------------------------------------------------------------------------------
1 | create table RTCABO_ADDRESS (
2 | ID varchar(36) not null,
3 | VERSION integer not null,
4 | CREATE_TS timestamp,
5 | CREATED_BY varchar(50),
6 | UPDATE_TS timestamp,
7 | UPDATED_BY varchar(50),
8 | DELETE_TS timestamp,
9 | DELETED_BY varchar(50),
10 | --
11 | STREET varchar(255) not null,
12 | POST_CODE varchar(255) not null,
13 | CITY varchar(255) not null,
14 | CUSTOMER_ID varchar(36) not null,
15 | --
16 | primary key (ID)
17 | );
18 |
--------------------------------------------------------------------------------
/modules/core/db/update/hsql/18/180322-1-createLineItem.sql:
--------------------------------------------------------------------------------
1 | create table RTCABO_LINE_ITEM (
2 | ID varchar(36) not null,
3 | VERSION integer not null,
4 | CREATE_TS timestamp,
5 | CREATED_BY varchar(50),
6 | UPDATE_TS timestamp,
7 | UPDATED_BY varchar(50),
8 | DELETE_TS timestamp,
9 | DELETED_BY varchar(50),
10 | --
11 | PRODUCT_ID varchar(36) not null,
12 | PRICE decimal(19, 2) not null,
13 | QUANTITY integer not null,
14 | ORDER_ID varchar(36) not null,
15 | --
16 | primary key (ID)
17 | );
18 |
--------------------------------------------------------------------------------
/modules/core/web/META-INF/context.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web-menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
--------------------------------------------------------------------------------
/modules/web/test/com/roadtocubaandbeyond/ordermanagement/web/service/UserService.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.service;
2 |
3 | import com.haulmont.cuba.security.entity.User;
4 | import okhttp3.ResponseBody;
5 | import retrofit2.Call;
6 | import retrofit2.http.Body;
7 | import retrofit2.http.GET;
8 | import retrofit2.http.POST;
9 |
10 | import java.util.List;
11 |
12 | public interface UserService {
13 | @GET("entities/sec$User")
14 | Call> all();
15 |
16 | @POST("entities/sec$User")
17 | Call create(@Body User user);
18 | }
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/messages.properties:
--------------------------------------------------------------------------------
1 | application.caption = CUBA Application
2 | application.logoImage = branding/app-icon-menu.png
3 |
4 | loginWindow.caption = CUBA Login
5 | loginWindow.welcomeLabel = Welcome to CUBA!
6 | loginWindow.logoImage = branding/app-icon-login.png
7 |
8 | menu-config.application-rtcabo = Application
9 | menu-config.rtcabo$Customer.browse = Customers
10 | menu-config.rtcabo$Product.browse = Products
11 | menu-config.rtcabo$Order.browse = Orders
12 | menu-config.rtcabo$ProductCategory.browse = Product Categories
13 | menu-config.rtcabo$Tenant.browse = Tenants
14 |
--------------------------------------------------------------------------------
/modules/core/src/com/roadtocubaandbeyond/ordermanagement/listener/OrderIdCreator.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.listener;
2 |
3 | import com.haulmont.cuba.core.app.UniqueNumbersAPI;
4 | import org.springframework.stereotype.Component;
5 | import com.haulmont.cuba.core.listener.BeforeInsertEntityListener;
6 | import com.haulmont.cuba.core.EntityManager;
7 | import com.roadtocubaandbeyond.ordermanagement.entity.Order;
8 |
9 | import javax.inject.Inject;
10 |
11 | @Component("rtcabo_OrderIdCreator")
12 | public class OrderIdCreator implements BeforeInsertEntityListener {
13 |
14 | @Inject
15 | protected UniqueNumbersAPI uniqueNumbersAPI;
16 |
17 | @Override
18 | public void onBeforeInsert(Order entity, EntityManager entityManager) {
19 |
20 |
21 | entity.setOrderId("" + uniqueNumbersAPI.getNextNumber("orderId"));
22 | }
23 |
24 |
25 | }
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/DocumentType.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import com.haulmont.chile.core.datatypes.impl.EnumClass;
4 |
5 | import javax.annotation.Nullable;
6 |
7 |
8 | public enum DocumentType implements EnumClass {
9 |
10 | INVOICE("INVOICE"),
11 | SHIPMENT_NOTE("SHIPMENT_NOTE"),
12 | REMINDER("REMINDER");
13 |
14 | private String id;
15 |
16 | DocumentType(String value) {
17 | this.id = value;
18 | }
19 |
20 | public String getId() {
21 | return id;
22 | }
23 |
24 | @Nullable
25 | public static DocumentType fromId(String id) {
26 | for (DocumentType at : DocumentType.values()) {
27 | if (at.getId().equals(id)) {
28 | return at;
29 | }
30 | }
31 | return null;
32 | }
33 | }
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
22 |
23 |
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/42.create-db.sql:
--------------------------------------------------------------------------------
1 |
2 | -- Users
3 | insert into SEC_USER
4 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, LOGIN, LOGIN_LC, PASSWORD, NAME, FIRST_NAME, LAST_NAME, MIDDLE_NAME, POSITION_, EMAIL, LANGUAGE_, TIME_ZONE, TIME_ZONE_AUTO, ACTIVE, CHANGE_PASSWORD_AT_LOGON, GROUP_ID, IP_MASK)
5 | values ('ae9f257a-c287-d9b8-90c7-110fbe9b09a7', 1, '2018-04-03 13:12:05', 'admin', '2018-04-03 13:12:05', null, null, null, 'jesse', 'jesse', '84943970a2df8c80b7d98ae39adab1c295dd9234', 'Jesse ', 'Jesse', null, null, null, null, 'en', null, null, true, false, '0fa2b1a5-1d68-4d69-9fbd-dff348347f93', null);
6 |
7 |
8 | -- UserRoles
9 | insert into SEC_USER_ROLE
10 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, USER_ID, ROLE_ID)
11 | values ('d932d5a6-512a-cc4b-3468-45813d5cda1c', 1, '2018-04-03 13:12:05', 'admin', '2018-04-03 13:12:05', null, null, null, 'ae9f257a-c287-d9b8-90c7-110fbe9b09a7', '2aa8f801-492b-7a61-60c0-2d013e799450');
12 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web-spring.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/messages_de.properties:
--------------------------------------------------------------------------------
1 | Customer.birthday = Geburtsdatum
2 | Customer.name = Name
3 | Customer.firstName = Vorname
4 | Customer = Kunde
5 | Customer.addresses = Adressen
6 | Customer.orders = Bestellungen
7 | Address.city = Ort
8 | Address.street = Straße
9 | Address.postCode = PLZ
10 | Address = Adresse
11 | Address.customer = Kunde
12 | Product.code = Code
13 | Product.name = Name
14 | Product = Produkt
15 | LineItem.price = Preis
16 | LineItem.quantity = Anzahl
17 | LineItem.product = Produkt
18 | LineItem = Bestellposition
19 | LineItem.order = Bestellung
20 | Order.orderDate = Bestelldatum
21 | Order.deliveryDate = Lieferdatum
22 | Order.orderId = Bestellnummer
23 | Order.customer = Kunde
24 | Order.lineItems = Bestellpositionen
25 | Order = Bestellung
26 | Order.documents = Dokumente
27 | Document.file = Datei
28 | Document.name = Name
29 | Document = Dokument
30 | Document.type = Typ
31 | Document.order = Bestellung
32 | DocumentType.INVOICE = Rechnung
33 | DocumentType.SHIPMENT_NOTE = Lieferschein
34 | DocumentType.REMINDER = Mahnung
35 |
--------------------------------------------------------------------------------
/modules/core/src/com/roadtocubaandbeyond/ordermanagement/service/ReportLoadServiceBean.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.service;
2 |
3 | import com.haulmont.cuba.core.global.DataManager;
4 | import com.haulmont.cuba.core.global.LoadContext;
5 | import com.haulmont.reports.entity.Report;
6 | import org.springframework.stereotype.Service;
7 |
8 | import javax.inject.Inject;
9 | import java.util.List;
10 |
11 | @Service(ReportLoadService.NAME)
12 | public class ReportLoadServiceBean implements ReportLoadService {
13 |
14 |
15 | @Inject
16 | protected DataManager dataManager;
17 |
18 | @Override
19 | public Report loadReportBySystemcode(String systemCode) {
20 |
21 | LoadContext loadContext = LoadContext.create(Report.class)
22 | .setQuery(LoadContext.createQuery("select e from report$Report e where e.code = :systemCode")
23 | .setParameter("systemCode", systemCode))
24 | .setView("report.view");
25 | List allReports = dataManager.loadList(loadContext);
26 |
27 | return allReports.get(0);
28 | }
29 | }
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/persistence.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 | com.roadtocubaandbeyond.ordermanagement.entity.Customer
7 | com.roadtocubaandbeyond.ordermanagement.entity.Address
8 | com.roadtocubaandbeyond.ordermanagement.entity.Product
9 | com.roadtocubaandbeyond.ordermanagement.entity.LineItem
10 | com.roadtocubaandbeyond.ordermanagement.entity.Order
11 | com.roadtocubaandbeyond.ordermanagement.entity.Document
12 | com.roadtocubaandbeyond.ordermanagement.entity.ProductCategory
13 | com.roadtocubaandbeyond.ordermanagement.entity.StandardTenantEntity
14 | com.roadtocubaandbeyond.ordermanagement.entity.Tenant
15 |
16 |
17 |
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/50.create-db.sql:
--------------------------------------------------------------------------------
1 | -- Product Categories
2 | insert into RTCABO_PRODUCT_CATEGORY
3 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE)
4 | values ('0e64cc13-739f-e917-0ad9-6409d18283ac', 1, '2018-04-03 13:04:38', 'admin', '2018-04-03 13:04:38', null, null, null, 'Leftorium', null);
5 | insert into RTCABO_PRODUCT_CATEGORY
6 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE)
7 | values ('eb9f23c1-da3a-e228-3df4-60c879a2b7fd', 1, '2018-04-03 13:04:47', 'admin', '2018-04-03 13:04:47', null, null, null, 'Food', null);
8 | insert into RTCABO_PRODUCT_CATEGORY
9 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE)
10 | values ('16e94cde-727c-54f5-3cd5-15a378234afc', 1, '2018-04-03 13:04:50', 'admin', '2018-04-03 13:04:50', null, null, null, 'Stuff', null);
11 | insert into RTCABO_PRODUCT_CATEGORY
12 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE)
13 | values ('cd8c67ed-bbd5-2fb6-a1d6-b4aa240a1422', 1, '2018-04-03 13:04:42', 'admin', '2018-04-03 13:04:42', null, null, null, 'Beer', null);
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/ProductCategory.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 | import javax.persistence.Column;
6 | import javax.validation.constraints.NotNull;
7 | import com.haulmont.cuba.core.entity.StandardEntity;
8 | import com.haulmont.chile.core.annotations.NamePattern;
9 |
10 | @NamePattern("%s|name")
11 | @Table(name = "RTCABO_PRODUCT_CATEGORY")
12 | @Entity(name = "rtcabo$ProductCategory")
13 | public class ProductCategory extends StandardEntity {
14 | private static final long serialVersionUID = 4930505662638424L;
15 |
16 | @NotNull
17 | @Column(name = "NAME", nullable = false)
18 | protected String name;
19 |
20 | @Column(name = "CODE")
21 | protected String code;
22 |
23 | public void setName(String name) {
24 | this.name = name;
25 | }
26 |
27 | public String getName() {
28 | return name;
29 | }
30 |
31 | public void setCode(String code) {
32 | this.code = code;
33 | }
34 |
35 | public String getCode() {
36 | return code;
37 | }
38 |
39 |
40 | }
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/Tenant.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 | import javax.persistence.Column;
6 | import javax.validation.constraints.NotNull;
7 | import com.haulmont.cuba.core.entity.StandardEntity;
8 | import com.haulmont.chile.core.annotations.NamePattern;
9 |
10 | @NamePattern("%s|name")
11 | @Table(name = "RTCABO_TENANT")
12 | @Entity(name = "rtcabo$Tenant")
13 | public class Tenant extends StandardEntity {
14 | private static final long serialVersionUID = -6213800796238754110L;
15 |
16 | @NotNull
17 | @Column(name = "NAME", nullable = false)
18 | protected String name;
19 |
20 | @NotNull
21 | @Column(name = "CODE", nullable = false)
22 | protected String code;
23 |
24 | public void setName(String name) {
25 | this.name = name;
26 | }
27 |
28 | public String getName() {
29 | return name;
30 | }
31 |
32 | public void setCode(String code) {
33 | this.code = code;
34 | }
35 |
36 | public String getCode() {
37 | return code;
38 | }
39 |
40 |
41 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/address/address-edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/tenant/tenant-edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
15 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/document/document-edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
15 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/productcategory/product-category-edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
15 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/40.create-db.sql:
--------------------------------------------------------------------------------
1 | -- Config
2 | insert into SYS_CONFIG
3 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, NAME, VALUE)
4 | values ('a2856777-3d69-212a-ac5a-fedb35e00851', 1, '2018-04-01 20:36:31', 'admin', '2018-04-01 20:36:31', null, 'fts.enabled', 'true');
5 | insert into SYS_CONFIG
6 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, NAME, VALUE)
7 | values ('9dd02ff0-8ebb-6ad5-181e-7dd295157ede', 1, '2018-04-01 20:36:38', 'admin', '2018-04-01 20:36:38', null, 'cuba.schedulingActive', 'true');
8 |
9 | -- Scheduled Tasks
10 | insert into SYS_SCHEDULED_TASK
11 | (ID, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, DEFINED_BY, BEAN_NAME, METHOD_NAME, CLASS_NAME, SCRIPT_NAME, USER_NAME, IS_SINGLETON, IS_ACTIVE, PERIOD, TIMEOUT, START_DATE, CRON, SCHEDULING_TYPE, TIME_FRAME, START_DELAY, PERMITTED_SERVERS, LOG_START, LOG_FINISH, LAST_START_TIME, LAST_START_SERVER, METHOD_PARAMS, DESCRIPTION)
12 | values ('3c7eaf4b-b5fa-5ef3-e1e8-d03cd91c3d56', '2018-04-01 20:37:02', 'admin', '2018-04-01 20:37:03', 'admin', null, null, 'B', 'cuba_FtsManager', 'processQueue', null, null, null, null, true, 60, null, null, null, 'P', null, null, null, true, true, null, null, '
13 |
14 |
15 | ', null);
16 |
--------------------------------------------------------------------------------
/modules/core/src/com/roadtocubaandbeyond/ordermanagement/app.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Configuration #
3 | ###############################################################################
4 |
5 | cuba.dbmsType = hsql
6 |
7 | cuba.springContextConfig = +com/roadtocubaandbeyond/ordermanagement/spring.xml
8 |
9 | cuba.persistenceConfig = +com/roadtocubaandbeyond/ordermanagement/persistence.xml
10 |
11 | cuba.metadataConfig = +com/roadtocubaandbeyond/ordermanagement/metadata.xml
12 |
13 | cuba.viewsConfig = +com/roadtocubaandbeyond/ordermanagement/views.xml
14 |
15 | cuba.mainMessagePack = +com.roadtocubaandbeyond.ordermanagement.core
16 |
17 | cuba.keyForSecurityTokenEncryption = knMxH5wqQ8wlTIp9
18 |
19 | cuba.anonymousSessionId = dc22f5b1-7284-2e6d-8d2c-3f9876e004b6
20 |
21 | ###############################################################################
22 | # Other #
23 | ###############################################################################
24 |
25 | cuba.webContextName = app-core
26 | cuba.availableLocales = English|en;German|de
27 | cuba.localeSelectVisible = true
28 | cuba.ftsConfig = +com/roadtocubaandbeyond/ordermanagement/fts.xml
29 |
--------------------------------------------------------------------------------
/modules/core/src/com/roadtocubaandbeyond/ordermanagement/fts.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 |
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/messages.properties:
--------------------------------------------------------------------------------
1 | Customer.birthday = Birthday
2 | Customer.name = Name
3 | Customer.firstName = First name
4 | Customer = Customer
5 | Customer.addresses = Addresses
6 | Customer.orders = Orders
7 | Address.city = City
8 | Address.street = Street
9 | Address.postCode = Post code
10 | Address = Address
11 | Address.customer = Customer
12 | Product.code = Code
13 | Product.name = Name
14 | Product = Product
15 | Product.category = Category
16 | LineItem.price = Price
17 | LineItem.quantity = Quantity
18 | LineItem.product = Product
19 | LineItem = Line Item
20 | LineItem.order = Order
21 | Order.orderDate = Order date
22 | Order.deliveryDate = Delivery date
23 | Order.orderId = Order ID
24 | Order.customer = Customer
25 | Order.lineItems = Line items
26 | Order = Order
27 | Order.documents = Documents
28 | Document.file = File
29 | Document.name = Name
30 | Document = Document
31 | Document.type = Type
32 | Document.order = Order
33 | DocumentType.INVOICE = Invoice
34 | DocumentType.SHIPMENT_NOTE = Shipment note
35 | DocumentType.REMINDER = Reminder
36 | ProductCategory.code = Code
37 | ProductCategory.name = Name
38 | ProductCategory = Product Category
39 | StandardTenantEntity.tenantId = Tenant id
40 | StandardTenantEntity = Standard Tenant Entity
41 | Tenant.name = Name
42 | Tenant.code = Code
43 | Tenant = Tenant
44 |
--------------------------------------------------------------------------------
/modules/core/web/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | appPropertiesConfig
9 | classpath:com/roadtocubaandbeyond/ordermanagement/app.properties
10 | /WEB-INF/local.app.properties
11 | "file:${catalina.base}/conf/app-core/local.app.properties"
12 |
13 |
14 |
15 | appComponents
16 | com.haulmont.cuba com.haulmont.reports com.haulmont.fts de.balvi.cuba.translationde
17 |
18 |
19 | com.haulmont.cuba.core.sys.AppContextLoader
20 |
21 |
22 | remoting
23 | com.haulmont.cuba.core.sys.remoting.RemotingServlet
24 | 1
25 |
26 |
27 | remoting
28 | /remoting/*
29 |
30 |
31 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/product/product-edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
15 |
16 |
18 |
20 |
22 |
23 |
24 |
25 |
27 |
28 |
29 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/modules/core/test/com/roadtocubaandbeyond/ordermanagement/core/SampleIntegrationTest.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.core;
2 |
3 | import com.roadtocubaandbeyond.ordermanagement.RtcaboTestContainer;
4 | import com.haulmont.cuba.core.EntityManager;
5 | import com.haulmont.cuba.core.Persistence;
6 | import com.haulmont.cuba.core.Transaction;
7 | import com.haulmont.cuba.core.TypedQuery;
8 | import com.haulmont.cuba.core.global.AppBeans;
9 | import com.haulmont.cuba.core.global.DataManager;
10 | import com.haulmont.cuba.core.global.Metadata;
11 | import com.haulmont.cuba.security.entity.User;
12 | import org.junit.After;
13 | import org.junit.Before;
14 | import org.junit.ClassRule;
15 | import org.junit.Test;
16 |
17 | import java.util.List;
18 |
19 | import static org.junit.Assert.assertEquals;
20 | import static org.junit.Assert.assertTrue;
21 |
22 | public class SampleIntegrationTest {
23 |
24 | @ClassRule
25 | public static RtcaboTestContainer cont = RtcaboTestContainer.Common.INSTANCE;
26 |
27 | private Metadata metadata;
28 | private Persistence persistence;
29 | private DataManager dataManager;
30 |
31 | @Before
32 | public void setUp() throws Exception {
33 | metadata = cont.metadata();
34 | persistence = cont.persistence();
35 | dataManager = AppBeans.get(DataManager.class);
36 | }
37 |
38 | @After
39 | public void tearDown() throws Exception {
40 | }
41 |
42 | @Test
43 | public void testLoadUser() {
44 | assertTrue(true);
45 | }
46 | }
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/StandardTenantEntity.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import javax.annotation.PostConstruct;
4 | import javax.persistence.MappedSuperclass;
5 | import java.util.UUID;
6 | import javax.persistence.Column;
7 | import javax.validation.constraints.NotNull;
8 | import com.haulmont.cuba.core.entity.StandardEntity;
9 | import com.haulmont.cuba.core.global.AppBeans;
10 | import com.haulmont.cuba.core.global.UserSessionSource;
11 | import com.haulmont.cuba.security.app.UserSessionService;
12 |
13 | @MappedSuperclass
14 | public class StandardTenantEntity extends StandardEntity {
15 | private static final long serialVersionUID = -3799879781351079930L;
16 |
17 | @NotNull
18 | @Column(name = "TENANT_ID", nullable = false)
19 | protected UUID tenantId;
20 |
21 | public void setTenantId(UUID tenantId) {
22 | this.tenantId = tenantId;
23 | }
24 |
25 | public UUID getTenantId() {
26 | return tenantId;
27 | }
28 |
29 |
30 | @PostConstruct
31 | protected void initTenantId() {
32 |
33 | UserSessionSource uss = AppBeans.get(UserSessionSource.NAME);
34 |
35 | UUID sessionTenantId = uss.getUserSession().getAttribute("tenantId");
36 |
37 |
38 | if (sessionTenantId == null) {
39 | throw new IllegalArgumentException("User has currently no tenant assigned. Entity instance cannot be created");
40 | }
41 |
42 |
43 | setTenantId(sessionTenantId);
44 |
45 | }
46 |
47 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/lineitem/line-item-edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
24 |
25 |
27 |
28 |
29 |
30 |
31 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/views.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
8 |
10 |
11 |
14 |
16 |
17 |
20 |
22 |
24 |
26 |
27 |
30 |
32 |
33 |
36 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/20.create-db.sql:
--------------------------------------------------------------------------------
1 | -- begin RTCABO_ADDRESS
2 | alter table RTCABO_ADDRESS add constraint FK_RTCABO_ADDRESS_CUSTOMER foreign key (CUSTOMER_ID) references RTCABO_CUSTOMER(ID)^
3 | create index IDX_RTCABO_ADDRESS_CUSTOMER on RTCABO_ADDRESS (CUSTOMER_ID)^
4 | -- end RTCABO_ADDRESS
5 | -- begin RTCABO_LINE_ITEM
6 | alter table RTCABO_LINE_ITEM add constraint FK_RTCABO_LINE_ITEM_PRODUCT foreign key (PRODUCT_ID) references RTCABO_PRODUCT(ID)^
7 | alter table RTCABO_LINE_ITEM add constraint FK_RTCABO_LINE_ITEM_ORDER foreign key (ORDER_ID) references RTCABO_ORDER(ID)^
8 | create index IDX_RTCABO_LINE_ITEM_PRODUCT on RTCABO_LINE_ITEM (PRODUCT_ID)^
9 | create index IDX_RTCABO_LINE_ITEM_ORDER on RTCABO_LINE_ITEM (ORDER_ID)^
10 | -- end RTCABO_LINE_ITEM
11 | -- begin RTCABO_ORDER
12 | alter table RTCABO_ORDER add constraint FK_RTCABO_ORDER_CUSTOMER foreign key (CUSTOMER_ID) references RTCABO_CUSTOMER(ID)^
13 | create index IDX_RTCABO_ORDER_CUSTOMER on RTCABO_ORDER (CUSTOMER_ID)^
14 | -- end RTCABO_ORDER
15 | -- begin RTCABO_DOCUMENT
16 | alter table RTCABO_DOCUMENT add constraint FK_RTCABO_DOCUMENT_FILE foreign key (FILE_ID) references SYS_FILE(ID)^
17 | alter table RTCABO_DOCUMENT add constraint FK_RTCABO_DOCUMENT_ORDER foreign key (ORDER_ID) references RTCABO_ORDER(ID)^
18 | create index IDX_RTCABO_DOCUMENT_FILE on RTCABO_DOCUMENT (FILE_ID)^
19 | create index IDX_RTCABO_DOCUMENT_ORDER on RTCABO_DOCUMENT (ORDER_ID)^
20 | -- end RTCABO_DOCUMENT
21 | -- begin RTCABO_PRODUCT
22 | alter table RTCABO_PRODUCT add constraint FK_RTCABO_PRODUCT_CATEGORY foreign key (CATEGORY_ID) references RTCABO_PRODUCT_CATEGORY(ID)^
23 | create index IDX_RTCABO_PRODUCT_CATEGORY on RTCABO_PRODUCT (CATEGORY_ID)^
24 | -- end RTCABO_PRODUCT
25 |
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/Product.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 | import javax.persistence.Column;
6 | import javax.validation.constraints.NotNull;
7 | import com.haulmont.cuba.core.entity.StandardEntity;
8 | import com.haulmont.chile.core.annotations.NamePattern;
9 | import com.haulmont.cuba.core.entity.annotation.Lookup;
10 | import com.haulmont.cuba.core.entity.annotation.LookupType;
11 | import javax.persistence.FetchType;
12 | import javax.persistence.JoinColumn;
13 | import javax.persistence.ManyToOne;
14 |
15 | @NamePattern("%s|name")
16 | @Table(name = "RTCABO_PRODUCT")
17 | @Entity(name = "rtcabo$Product")
18 | public class Product extends StandardEntity {
19 | private static final long serialVersionUID = -2053662418539889040L;
20 |
21 | @NotNull
22 | @Column(name = "NAME", nullable = false)
23 | protected String name;
24 |
25 | @Column(name = "CODE")
26 | protected String code;
27 |
28 | @Lookup(type = LookupType.DROPDOWN, actions = {"lookup", "clear"})
29 | @ManyToOne(fetch = FetchType.LAZY)
30 | @JoinColumn(name = "CATEGORY_ID")
31 | protected ProductCategory category;
32 |
33 | public void setCategory(ProductCategory category) {
34 | this.category = category;
35 | }
36 |
37 | public ProductCategory getCategory() {
38 | return category;
39 | }
40 |
41 |
42 | public void setName(String name) {
43 | this.name = name;
44 | }
45 |
46 | public String getName() {
47 | return name;
48 | }
49 |
50 | public void setCode(String code) {
51 | this.code = code;
52 | }
53 |
54 | public String getCode() {
55 | return code;
56 | }
57 |
58 |
59 | }
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/Address.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 | import javax.persistence.Column;
6 | import javax.validation.constraints.NotNull;
7 | import com.haulmont.cuba.core.entity.StandardEntity;
8 | import com.haulmont.chile.core.annotations.NamePattern;
9 | import javax.persistence.FetchType;
10 | import javax.persistence.JoinColumn;
11 | import javax.persistence.ManyToOne;
12 |
13 | @NamePattern("%s, %s %s|street,postCode,city")
14 | @Table(name = "RTCABO_ADDRESS")
15 | @Entity(name = "rtcabo$Address")
16 | public class Address extends StandardEntity {
17 | private static final long serialVersionUID = -8428991748490450321L;
18 |
19 | @NotNull
20 | @Column(name = "STREET", nullable = false)
21 | protected String street;
22 |
23 | @NotNull
24 | @Column(name = "POST_CODE", nullable = false)
25 | protected String postCode;
26 |
27 | @NotNull
28 | @Column(name = "CITY", nullable = false)
29 | protected String city;
30 |
31 | @ManyToOne(fetch = FetchType.LAZY, optional = false)
32 | @JoinColumn(name = "CUSTOMER_ID")
33 | protected Customer customer;
34 |
35 | public void setCustomer(Customer customer) {
36 | this.customer = customer;
37 | }
38 |
39 | public Customer getCustomer() {
40 | return customer;
41 | }
42 |
43 |
44 | public void setStreet(String street) {
45 | this.street = street;
46 | }
47 |
48 | public String getStreet() {
49 | return street;
50 | }
51 |
52 | public void setPostCode(String postCode) {
53 | this.postCode = postCode;
54 | }
55 |
56 | public String getPostCode() {
57 | return postCode;
58 | }
59 |
60 | public void setCity(String city) {
61 | this.city = city;
62 | }
63 |
64 | public String getCity() {
65 | return city;
66 | }
67 |
68 |
69 | }
--------------------------------------------------------------------------------
/modules/web/test/com/roadtocubaandbeyond/ordermanagement/web/steps/LoginSteps.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.steps;
2 |
3 | import com.roadtocubaandbeyond.ordermanagement.web.service.UserService;
4 | import com.roadtocubaandbeyond.ordermanagement.web.screens.LoginWindow;
5 | import com.haulmont.cuba.security.entity.User;
6 | import com.haulmont.masquerade.Connectors;
7 | import com.haulmont.masquerade.components.AppMenu;
8 | import cucumber.api.PendingException;
9 | import cucumber.api.java.en.Given;
10 | import cucumber.api.java.en.Then;
11 | import cucumber.api.java.en.When;
12 |
13 |
14 | import java.util.List;
15 |
16 | import static com.codeborne.selenide.Selenide.open;
17 | import static com.haulmont.masquerade.Components._$;
18 | import static org.junit.Assert.assertTrue;
19 |
20 | public class LoginSteps {
21 | @Given("^there is a user \"([^\"]*)\" in the system$")
22 | public void thereIsAUserInTheSystem(String username) throws Throwable {
23 | UserService userService = Connectors.restApi(UserService.class);
24 |
25 | List allUsers = userService.all().execute().body();
26 | assertTrue(allUsers.stream().anyMatch(user -> user.getLogin().equals(username)));
27 | }
28 |
29 | @When("^I log in as the user \"([^\"]*)\" with password \"([^\"]*)\"$")
30 | public void iLogInAsTheUserWithPassword(String username, String password) throws Throwable {
31 | open("http://localhost:8080/app");
32 |
33 | LoginWindow loginWindow = _$(LoginWindow.class);
34 | loginWindow.getLoginField().setValue(username);
35 | loginWindow.getPasswordField().setValue(password);
36 |
37 | _$(LoginWindow.class).getLoginButton().click();
38 |
39 | }
40 |
41 | @Then("^I am logged in and can navigate through the application$")
42 | public void iAmLoggedInAndCanNavigateThroughTheApplication() throws Throwable {
43 |
44 | _$(AppMenu.class).openItem("administration", "sec$User.browse");
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/Document.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 | import com.haulmont.cuba.core.entity.FileDescriptor;
6 | import javax.persistence.Column;
7 | import javax.persistence.FetchType;
8 | import javax.persistence.JoinColumn;
9 | import javax.persistence.ManyToOne;
10 | import javax.validation.constraints.NotNull;
11 | import com.haulmont.cuba.core.entity.StandardEntity;
12 | import com.haulmont.chile.core.annotations.NamePattern;
13 |
14 | @NamePattern("%s|name")
15 | @Table(name = "RTCABO_DOCUMENT")
16 | @Entity(name = "rtcabo$Document")
17 | public class Document extends StandardEntity {
18 | private static final long serialVersionUID = -7919115810258492166L;
19 |
20 | @NotNull
21 | @Column(name = "NAME", nullable = false)
22 | protected String name;
23 |
24 | @NotNull
25 | @ManyToOne(fetch = FetchType.LAZY, optional = false)
26 | @JoinColumn(name = "FILE_ID")
27 | protected FileDescriptor file;
28 |
29 | @Column(name = "TYPE_")
30 | protected String type;
31 |
32 | @ManyToOne(fetch = FetchType.LAZY, optional = false)
33 | @JoinColumn(name = "ORDER_ID")
34 | protected Order order;
35 |
36 | public void setOrder(Order order) {
37 | this.order = order;
38 | }
39 |
40 | public Order getOrder() {
41 | return order;
42 | }
43 |
44 |
45 | public void setType(DocumentType type) {
46 | this.type = type == null ? null : type.getId();
47 | }
48 |
49 | public DocumentType getType() {
50 | return type == null ? null : DocumentType.fromId(type);
51 | }
52 |
53 |
54 | public void setName(String name) {
55 | this.name = name;
56 | }
57 |
58 | public String getName() {
59 | return name;
60 | }
61 |
62 | public void setFile(FileDescriptor file) {
63 | this.file = file;
64 | }
65 |
66 | public FileDescriptor getFile() {
67 | return file;
68 | }
69 |
70 |
71 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web-app.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Configuration #
3 | ###############################################################################
4 |
5 | cuba.springContextConfig = +com/roadtocubaandbeyond/ordermanagement/web-spring.xml
6 |
7 | cuba.dispatcherSpringContextConfig = +com/roadtocubaandbeyond/ordermanagement/web-dispatcher-spring.xml
8 |
9 | cuba.persistenceConfig = +com/roadtocubaandbeyond/ordermanagement/persistence.xml
10 |
11 | cuba.metadataConfig = +com/roadtocubaandbeyond/ordermanagement/metadata.xml
12 |
13 | cuba.viewsConfig = +com/roadtocubaandbeyond/ordermanagement/views.xml
14 |
15 | cuba.windowConfig = +com/roadtocubaandbeyond/ordermanagement/web-screens.xml
16 |
17 | cuba.menuConfig = +com/roadtocubaandbeyond/ordermanagement/web-menu.xml
18 |
19 | cuba.permissionConfig = +com/roadtocubaandbeyond/ordermanagement/web-permissions.xml
20 |
21 | cuba.mainMessagePack = +com.roadtocubaandbeyond.ordermanagement.web
22 |
23 | cuba.anonymousSessionId = dc22f5b1-7284-2e6d-8d2c-3f9876e004b6
24 |
25 | cuba.creditsConfig = +
26 |
27 | ###############################################################################
28 | # Other #
29 | ###############################################################################
30 |
31 | # Middleware connection
32 | cuba.connectionUrlList = http://localhost:8080/app-core
33 |
34 | # Set to false if the middleware works on different JVM
35 | cuba.useLocalServiceInvocation = true
36 |
37 | cuba.webContextName = app
38 | cuba.availableLocales = English|en;German|de
39 | cuba.localeSelectVisible = true
40 |
41 | cuba.testMode = true
42 | cuba.web.theme = halo
43 | cuba.themeConfig=com/haulmont/cuba/havana-theme.properties com/haulmont/cuba/halo-theme.properties com/haulmont/cuba/hover-theme.properties
44 | cuba.web.loginScreenId=loginWindow
45 | cuba.web.mainScreenId=mainWindow
46 | cuba.gui.genericFilterApplyImmediately=false
47 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/tenant/tenant-browse.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
21 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
41 |
43 |
45 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web-screens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
8 |
10 |
12 |
14 |
16 |
18 |
20 |
22 |
24 |
26 |
28 |
30 |
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RTCAB - ordermanagement
2 |
3 | In this repository you'll find an implementation of an ordermanagement system done with CUBA platform.
4 | It is a showcase application that shows the built-in features of the platform itself as well as how you can implement everyday requirements that might come up in your specific case.
5 |
6 | The domain model of the application looks like this:
7 |
8 | 
9 |
10 | The application will be developed with corresponding screencasts, that can be found on the YouTube playlist:
11 |
12 | [CUBA platform ordermanagement](https://www.youtube.com/playlist?list=PLJ0nYE0NtQxbSV0Oocu6LL-RgLl04PUqb)
13 |
14 | All videos in detail:
15 | * [01 - develop an ordermanagement app with CUBA Platform](https://youtu.be/K8kIrEwnTJ4)
16 | * [02 - ordermanagement - auto generate invoice and save to order](https://youtu.be/sg2CbGUQahw)
17 | * [03 - ordermanagement - internationalization of the application (i18n)](https://youtu.be/wodRfEv1h-Y)
18 | * [04 - ordermanagement - search data via full text search](https://youtu.be/OoZCoXwJfwU)
19 | * [05 - ordermanagement - hide customer selection in order screen](https://youtu.be/OxUKyd_E58k)
20 | * [06 - ordermanagement - role with subset of features](https://youtu.be/bBFhHkz0BCk)
21 | * [07 - ordermanagement - automatic download of translation app component](https://youtu.be/YngfAJSZ52A)
22 | * [08 - ordermanagement - storing tenant information with business objects](https://youtu.be/s3AFVtHOByU)
23 |
24 | More detailed information on certain topics of the platform can be found here: [road-to-cuba-and-beyond.com](https://www.road-to-cuba-and-beyond.com)
25 |
26 |
27 | ## acceptance tests
28 |
29 | This project uses acceptance test to describe the overall behavior of the system. The following test technologies are used:
30 |
31 | * [Cucumber](https://cucumber.io/)
32 | * [Selenium](https://www.seleniumhq.org/)
33 | * [masquerade](https://github.com/cuba-platform/masquerade)
34 |
35 | ```
36 | ./gradlew testUi -Dselenide.browser=firefox -Dwebdriver.gecko.driver=/usr/local/bin/geckodriver
37 | ```
38 |
--------------------------------------------------------------------------------
/modules/web/test/com/roadtocubaandbeyond/ordermanagement/web/screens/LoginWindow.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.screens;
2 |
3 | import com.haulmont.masquerade.Wire;
4 | import com.haulmont.masquerade.base.Composite;
5 | import com.haulmont.masquerade.components.*;
6 |
7 | /**
8 | * This class is the abstraction of the Login Window screen and defines all components to be displayed
9 | */
10 | public class LoginWindow extends Composite {
11 |
12 |
13 | @Wire
14 | private TextField loginField;
15 | @Wire
16 | private PasswordField passwordField;
17 | @Wire
18 | private CheckBox rememberMeCheckBox;
19 | @Wire
20 | private Button loginButton;
21 | @Wire
22 | private LookupField localesSelect;
23 | @Wire
24 | private Label welcomeLabel;
25 |
26 | public TextField getLoginField() {
27 | return loginField;
28 | }
29 |
30 | public void setLoginField(TextField loginField) {
31 | this.loginField = loginField;
32 | }
33 |
34 | public PasswordField getPasswordField() {
35 | return passwordField;
36 | }
37 |
38 | public void setPasswordField(PasswordField passwordField) {
39 | this.passwordField = passwordField;
40 | }
41 |
42 | public CheckBox getRememberMeCheckBox() {
43 | return rememberMeCheckBox;
44 | }
45 |
46 | public void setRememberMeCheckBox(CheckBox rememberMeCheckBox) {
47 | this.rememberMeCheckBox = rememberMeCheckBox;
48 | }
49 |
50 | public Button getLoginButton() {
51 | return loginButton;
52 | }
53 |
54 | public void setLoginButton(Button loginButton) {
55 | this.loginButton = loginButton;
56 | }
57 |
58 | public LookupField getLocalesSelect() {
59 | return localesSelect;
60 | }
61 |
62 | public void setLocalesSelect(LookupField localesSelect) {
63 | this.localesSelect = localesSelect;
64 | }
65 |
66 | public Label getWelcomeLabel() {
67 | return welcomeLabel;
68 | }
69 |
70 | public void setWelcomeLabel(Label welcomeLabel) {
71 | this.welcomeLabel = welcomeLabel;
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/product/product-browse.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
21 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
42 |
44 |
46 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/order/order-browse.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
21 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
45 |
47 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/customer/customer-browse.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
21 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
42 |
44 |
46 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/LineItem.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 | import com.haulmont.cuba.core.entity.annotation.Lookup;
6 | import com.haulmont.cuba.core.entity.annotation.LookupType;
7 | import java.math.BigDecimal;
8 | import javax.persistence.Column;
9 | import javax.persistence.FetchType;
10 | import javax.persistence.JoinColumn;
11 | import javax.persistence.ManyToOne;
12 | import javax.validation.constraints.NotNull;
13 | import com.haulmont.cuba.core.entity.StandardEntity;
14 | import com.haulmont.chile.core.annotations.NamePattern;
15 |
16 | @NamePattern("%s|product")
17 | @Table(name = "RTCABO_LINE_ITEM")
18 | @Entity(name = "rtcabo$LineItem")
19 | public class LineItem extends StandardEntity {
20 | private static final long serialVersionUID = -2794487394719161058L;
21 |
22 | @Lookup(type = LookupType.DROPDOWN, actions = {"lookup"})
23 | @NotNull
24 | @ManyToOne(fetch = FetchType.LAZY, optional = false)
25 | @JoinColumn(name = "PRODUCT_ID")
26 | protected Product product;
27 |
28 | @NotNull
29 | @Column(name = "PRICE", nullable = false)
30 | protected BigDecimal price;
31 |
32 | @NotNull
33 | @Column(name = "QUANTITY", nullable = false)
34 | protected Integer quantity;
35 |
36 | @ManyToOne(fetch = FetchType.LAZY, optional = false)
37 | @JoinColumn(name = "ORDER_ID")
38 | protected Order order;
39 |
40 | public void setOrder(Order order) {
41 | this.order = order;
42 | }
43 |
44 | public Order getOrder() {
45 | return order;
46 | }
47 |
48 |
49 | public void setProduct(Product product) {
50 | this.product = product;
51 | }
52 |
53 | public Product getProduct() {
54 | return product;
55 | }
56 |
57 | public void setPrice(BigDecimal price) {
58 | this.price = price;
59 | }
60 |
61 | public BigDecimal getPrice() {
62 | return price;
63 | }
64 |
65 | public void setQuantity(Integer quantity) {
66 | this.quantity = quantity;
67 | }
68 |
69 | public Integer getQuantity() {
70 | return quantity;
71 | }
72 |
73 |
74 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/productcategory/product-category-browse.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
21 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
41 |
43 |
45 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/modules/web/web/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | appPropertiesConfig
9 | classpath:com/roadtocubaandbeyond/ordermanagement/web-app.properties
10 | /WEB-INF/local.app.properties
11 | "file:${catalina.base}/conf/app/local.app.properties"
12 |
13 |
14 |
15 | appComponents
16 | com.haulmont.cuba com.haulmont.reports com.haulmont.fts de.balvi.cuba.translationde
17 |
18 |
19 | com.vaadin.server.communication.JSR356WebsocketInitializer
20 |
21 |
22 | com.haulmont.cuba.web.sys.WebAppContextLoader
23 |
24 |
25 | app_servlet
26 | com.haulmont.cuba.web.sys.CubaApplicationServlet
27 | true
28 |
29 |
30 | dispatcher
31 | com.haulmont.cuba.web.sys.CubaDispatcherServlet
32 | 1
33 |
34 |
35 | dispatcher
36 | /dispatch/*
37 |
38 |
39 | app_servlet
40 | /*
41 |
42 |
43 | cuba_filter
44 | com.haulmont.cuba.web.sys.CubaHttpFilter
45 | true
46 |
47 |
48 | cuba_filter
49 | /*
50 |
51 |
52 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/Customer.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 | import java.util.Date;
6 | import javax.persistence.Column;
7 | import javax.persistence.Temporal;
8 | import javax.persistence.TemporalType;
9 | import javax.validation.constraints.NotNull;
10 | import com.haulmont.cuba.core.entity.StandardEntity;
11 | import com.haulmont.chile.core.annotations.NamePattern;
12 | import com.haulmont.chile.core.annotations.Composition;
13 | import com.haulmont.cuba.core.entity.annotation.OnDelete;
14 | import com.haulmont.cuba.core.global.DeletePolicy;
15 | import java.util.List;
16 | import javax.persistence.OneToMany;
17 |
18 | @NamePattern("%s|name")
19 | @Table(name = "RTCABO_CUSTOMER")
20 | @Entity(name = "rtcabo$Customer")
21 | public class Customer extends StandardTenantEntity {
22 | private static final long serialVersionUID = 5364214967783482854L;
23 |
24 | @NotNull
25 | @Column(name = "NAME", nullable = false)
26 | protected String name;
27 |
28 | @Column(name = "FIRST_NAME")
29 | protected String firstName;
30 |
31 | @Temporal(TemporalType.DATE)
32 | @NotNull
33 | @Column(name = "BIRTHDAY", nullable = false)
34 | protected Date birthday;
35 |
36 | @Composition
37 | @OnDelete(DeletePolicy.CASCADE)
38 | @OneToMany(mappedBy = "customer")
39 | protected List addresses;
40 |
41 | @Composition
42 | @OnDelete(DeletePolicy.CASCADE)
43 | @OneToMany(mappedBy = "customer")
44 | protected List orders;
45 |
46 | public void setOrders(List orders) {
47 | this.orders = orders;
48 | }
49 |
50 | public List getOrders() {
51 | return orders;
52 | }
53 |
54 |
55 | public void setAddresses(List addresses) {
56 | this.addresses = addresses;
57 | }
58 |
59 | public List getAddresses() {
60 | return addresses;
61 | }
62 |
63 |
64 | public void setName(String name) {
65 | this.name = name;
66 | }
67 |
68 | public String getName() {
69 | return name;
70 | }
71 |
72 | public void setFirstName(String firstName) {
73 | this.firstName = firstName;
74 | }
75 |
76 | public String getFirstName() {
77 | return firstName;
78 | }
79 |
80 | public void setBirthday(Date birthday) {
81 | this.birthday = birthday;
82 | }
83 |
84 | public Date getBirthday() {
85 | return birthday;
86 | }
87 |
88 |
89 | }
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/order/OrderEdit.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.web.order;
2 |
3 | import com.haulmont.cuba.core.entity.FileDescriptor;
4 | import com.haulmont.cuba.core.global.Metadata;
5 | import com.haulmont.cuba.gui.components.AbstractEditor;
6 | import com.haulmont.cuba.gui.components.LookupPickerField;
7 | import com.haulmont.cuba.gui.data.CollectionDatasource;
8 | import com.haulmont.reports.app.service.ReportService;
9 | import com.haulmont.reports.entity.Report;
10 | import com.roadtocubaandbeyond.ordermanagement.entity.Document;
11 | import com.roadtocubaandbeyond.ordermanagement.entity.DocumentType;
12 | import com.roadtocubaandbeyond.ordermanagement.entity.Order;
13 | import com.roadtocubaandbeyond.ordermanagement.service.ReportLoadService;
14 |
15 | import javax.inject.Inject;
16 | import javax.inject.Named;
17 | import java.util.HashMap;
18 | import java.util.Map;
19 | import java.util.UUID;
20 |
21 | public class OrderEdit extends AbstractEditor {
22 |
23 |
24 | @Inject
25 | protected ReportLoadService reportLoadService;
26 |
27 | @Inject
28 | protected ReportService reportService;
29 |
30 | @Inject
31 | protected CollectionDatasource documentsDs;
32 |
33 | @Inject
34 | protected Metadata metadata;
35 |
36 | @Named("fieldGroup.customer")
37 | protected LookupPickerField customerField;
38 |
39 | @Override
40 | protected void initNewItem(Order item) {
41 | if (item.getCustomer() != null) {
42 | customerField.setVisible(false);
43 | }
44 | }
45 |
46 | @Override
47 | protected boolean preCommit() {
48 | if(getItem().getOrderDate().after(getItem().getDeliveryDate())) {
49 | showNotification("something is wrong here...", NotificationType.ERROR);
50 | return false;
51 | }
52 | else {
53 | return true;
54 | }
55 | }
56 |
57 | public void generateInvoice() {
58 |
59 | Report invoiceReport = reportLoadService.loadReportBySystemcode("order_invoice");
60 |
61 |
62 | String fileName = "myFile";
63 | Map params = new HashMap<>();
64 | params.put("entity", getItem());
65 | FileDescriptor invoiceFile = reportService.createAndSaveReport(invoiceReport, params, fileName);
66 |
67 |
68 | Document invoiceDocument = metadata.create(Document.class);
69 | invoiceDocument.setFile(invoiceFile);
70 | invoiceDocument.setName(fileName);
71 | invoiceDocument.setType(DocumentType.INVOICE);
72 | invoiceDocument.setOrder(getItem());
73 |
74 |
75 | documentsDs.addItem(invoiceDocument);
76 | }
77 | }
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/60.create-db.sql:
--------------------------------------------------------------------------------
1 |
2 | -- Customers
3 | insert into RTCABO_CUSTOMER
4 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, FIRST_NAME, BIRTHDAY)
5 | values ('1bfe10de-61f4-30ac-b4b0-3db8a60eff31', 1, '2018-03-31 10:03:27', 'admin', '2018-03-31 10:03:27', null, null, null, 'Szyslak', 'Moe', '1976-08-12');
6 | insert into RTCABO_CUSTOMER
7 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, FIRST_NAME, BIRTHDAY)
8 | values ('1f265104-2f16-8dcb-c242-b812f21fc61f', 1, '2018-03-31 10:03:59', 'admin', '2018-03-31 10:03:59', null, null, null, 'Flanders', 'Ned', '1971-09-08');
9 | insert into RTCABO_CUSTOMER
10 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, FIRST_NAME, BIRTHDAY)
11 | values ('256a008b-9c52-d047-e112-510ffb644abf', 1, '2018-03-31 10:05:19', 'admin', '2018-03-31 10:05:19', null, null, null, 'the Clown', 'Krusty', '1984-12-12');
12 | insert into RTCABO_CUSTOMER
13 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, FIRST_NAME, BIRTHDAY)
14 | values ('6185ce21-8e3e-dbea-86b8-cd15cb60f16b', 1, '2018-03-31 10:04:55', 'admin', '2018-03-31 10:04:55', null, null, null, 'Wiggum', 'Ralph', '1985-01-01');
15 | insert into RTCABO_CUSTOMER
16 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, FIRST_NAME, BIRTHDAY)
17 | values ('bc4bb62e-aab9-6808-20d3-66c2177b3ea6', 1, '2018-03-31 10:04:31', 'admin', '2018-03-31 10:04:31', null, null, null, 'Simpson', 'Marge', '1981-01-13');
18 | insert into RTCABO_CUSTOMER
19 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, FIRST_NAME, BIRTHDAY)
20 | values ('cc0b565a-5af1-2e5e-9ca3-54a010bb8981', 1, '2018-03-31 10:02:58', 'admin', '2018-03-31 10:02:58', null, null, null, 'Van Houten', 'Milhouse', '1980-03-31');
21 | insert into RTCABO_CUSTOMER
22 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, FIRST_NAME, BIRTHDAY)
23 | values ('d268d90d-1fa7-cdd5-15eb-492d260eed1e', 1, '2018-03-30 22:14:44', 'admin', '2018-03-30 22:14:44', null, null, null, 'Krababbel', 'Edna', '1965-04-18');
24 | insert into RTCABO_CUSTOMER
25 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, FIRST_NAME, BIRTHDAY)
26 | values ('f601c835-8b0d-bcf3-5026-10447ee826d4', 1, '2018-03-31 10:04:19', 'admin', '2018-03-31 10:04:19', null, null, null, 'Simpson', 'Homer', '1968-06-04');
27 | insert into RTCABO_CUSTOMER
28 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, FIRST_NAME, BIRTHDAY)
29 | values ('f76b4f21-66a4-3036-f763-3b5fdd20cb78', 1, '2018-03-31 10:02:29', 'admin', '2018-03-31 10:02:29', null, null, null, 'Nahasapeemapetilon', 'Apu', '1966-01-03');
30 |
--------------------------------------------------------------------------------
/modules/core/test/com/roadtocubaandbeyond/ordermanagement/RtcaboTestContainer.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement;
2 |
3 | import com.haulmont.bali.util.Dom4j;
4 | import com.haulmont.cuba.testsupport.TestContainer;
5 | import org.dom4j.Document;
6 | import org.dom4j.Element;
7 |
8 | import java.io.File;
9 | import java.util.ArrayList;
10 | import java.util.Arrays;
11 |
12 | public class RtcaboTestContainer extends TestContainer {
13 |
14 | public RtcaboTestContainer() {
15 | super();
16 | appComponents = new ArrayList<>(Arrays.asList(
17 | "com.haulmont.cuba"
18 | // add CUBA premium add-ons here
19 | // "com.haulmont.bpm",
20 | // "com.haulmont.charts",
21 | // "com.haulmont.fts",
22 | // "com.haulmont.reports",
23 | // and custom app components if any
24 | ));
25 | appPropertiesFiles = Arrays.asList(
26 | // List the files defined in your web.xml
27 | // in appPropertiesConfig context parameter of the core module
28 | "com/roadtocubaandbeyond/ordermanagement/app.properties",
29 | // Add this file which is located in CUBA and defines some properties
30 | // specifically for test environment. You can replace it with your own
31 | // or add another one in the end.
32 | "test-app.properties");
33 | initDbProperties();
34 | }
35 |
36 | private void initDbProperties() {
37 | File contextXmlFile = new File("modules/core/web/META-INF/context.xml");
38 | if (!contextXmlFile.exists()) {
39 | contextXmlFile = new File("web/META-INF/context.xml");
40 | }
41 | if (!contextXmlFile.exists()) {
42 | throw new RuntimeException("Cannot find 'context.xml' file to read database connection properties. " +
43 | "You can set them explicitly in this method.");
44 | }
45 | Document contextXmlDoc = Dom4j.readDocument(contextXmlFile);
46 | Element resourceElem = contextXmlDoc.getRootElement().element("Resource");
47 |
48 | dbDriver = resourceElem.attributeValue("driverClassName");
49 | dbUrl = resourceElem.attributeValue("url");
50 | dbUser = resourceElem.attributeValue("username");
51 | dbPassword = resourceElem.attributeValue("password");
52 | }
53 |
54 | public static class Common extends RtcaboTestContainer {
55 |
56 | public static final RtcaboTestContainer.Common INSTANCE = new RtcaboTestContainer.Common();
57 |
58 | private static volatile boolean initialized;
59 |
60 | private Common() {
61 | }
62 |
63 | @Override
64 | public void before() throws Throwable {
65 | if (!initialized) {
66 | super.before();
67 | initialized = true;
68 | }
69 | setupContext();
70 | }
71 |
72 | @Override
73 | public void after() {
74 | cleanupContext();
75 | // never stops - do not call super
76 | }
77 | }
78 | }
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/51.create-db.sql:
--------------------------------------------------------------------------------
1 | insert into RTCABO_PRODUCT
2 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
3 | values ('0e5cf113-ccc5-a80d-5fe8-e4bc3bd65011', 2, '2018-03-31 10:10:52', 'admin', '2018-04-03 13:05:45', 'admin', null, null, 'Left power - Sign', null, '0e64cc13-739f-e917-0ad9-6409d18283ac');
4 | insert into RTCABO_PRODUCT
5 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
6 | values ('1c0d74aa-c461-88d1-e5ad-d5ec55564a5e', 3, '2018-03-31 10:10:05', 'admin', '2018-04-03 13:05:41', 'admin', null, null, 'Lord love a lefty - T-Shirt', null, '0e64cc13-739f-e917-0ad9-6409d18283ac');
7 | insert into RTCABO_PRODUCT
8 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
9 | values ('275805a1-7be6-cee6-0843-a729f74e49a5', 3, '2018-03-22 20:04:21', 'admin', '2018-04-03 13:05:32', 'admin', null, null, 'Krusty Kolonge', null, '16e94cde-727c-54f5-3cd5-15a378234afc');
10 | insert into RTCABO_PRODUCT
11 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
12 | values ('2820300d-f01c-b08e-583b-072206040bfe', 2, '2018-03-31 10:07:21', 'admin', '2018-04-03 13:05:37', 'admin', null, null, 'Desperation by Krusty', null, '16e94cde-727c-54f5-3cd5-15a378234afc');
13 | insert into RTCABO_PRODUCT
14 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
15 | values ('4030f09c-246f-b3aa-9de4-2e814c16dcb8', 2, '2018-03-31 10:07:48', 'admin', '2018-04-03 13:05:02', 'admin', null, null, 'Duff Beer', null, 'cd8c67ed-bbd5-2fb6-a1d6-b4aa240a1422');
16 | insert into RTCABO_PRODUCT
17 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
18 | values ('7f1fbdc3-4b14-6bac-90b2-9182663f5746', 2, '2018-03-31 10:07:52', 'admin', '2018-04-03 13:05:07', 'admin', null, null, 'Duff Light', null, 'cd8c67ed-bbd5-2fb6-a1d6-b4aa240a1422');
19 | insert into RTCABO_PRODUCT
20 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
21 | values ('85644457-3c30-8731-cc3c-718a449b1efc', 2, '2018-03-31 10:07:29', 'admin', '2018-04-03 13:05:27', 'admin', null, null, 'Donut', null, 'eb9f23c1-da3a-e228-3df4-60c879a2b7fd');
22 | insert into RTCABO_PRODUCT
23 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
24 | values ('8f880879-7fdf-bec9-735f-f7b979397530', 3, '2018-03-22 20:04:26', 'admin', '2018-04-03 13:05:22', 'admin', null, null, 'Soy Pop', null, '16e94cde-727c-54f5-3cd5-15a378234afc');
25 | insert into RTCABO_PRODUCT
26 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
27 | values ('9983452b-8734-3edf-c2d9-11a7fa4b04e5', 3, '2018-03-22 20:04:33', 'admin', '2018-04-03 13:05:11', 'admin', null, null, 'Nuts and Gum', null, 'eb9f23c1-da3a-e228-3df4-60c879a2b7fd');
28 | insert into RTCABO_PRODUCT
29 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, CODE, CATEGORY_ID)
30 | values ('b57f5e89-d979-4a78-4391-2284e76890f1', 2, '2018-03-31 10:07:04', 'admin', '2018-04-03 13:05:16', 'admin', null, null, 'TUBBB', null, '16e94cde-727c-54f5-3cd5-15a378234afc');
--------------------------------------------------------------------------------
/modules/global/src/com/roadtocubaandbeyond/ordermanagement/entity/Order.java:
--------------------------------------------------------------------------------
1 | package com.roadtocubaandbeyond.ordermanagement.entity;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 | import com.haulmont.chile.core.annotations.Composition;
6 | import com.haulmont.cuba.core.entity.annotation.Lookup;
7 | import com.haulmont.cuba.core.entity.annotation.LookupType;
8 | import com.haulmont.cuba.core.entity.annotation.OnDelete;
9 | import com.haulmont.cuba.core.global.DeletePolicy;
10 | import java.util.Date;
11 | import java.util.List;
12 | import javax.persistence.Column;
13 | import javax.persistence.FetchType;
14 | import javax.persistence.JoinColumn;
15 | import javax.persistence.ManyToOne;
16 | import javax.persistence.OneToMany;
17 | import javax.persistence.Temporal;
18 | import javax.persistence.TemporalType;
19 | import javax.validation.constraints.NotNull;
20 | import com.haulmont.cuba.core.entity.StandardEntity;
21 | import com.haulmont.chile.core.annotations.NamePattern;
22 | import com.haulmont.cuba.core.entity.annotation.Listeners;
23 |
24 | @Listeners("rtcabo_OrderIdCreator")
25 | @NamePattern("%s|orderId")
26 | @Table(name = "RTCABO_ORDER")
27 | @Entity(name = "rtcabo$Order")
28 | public class Order extends StandardEntity {
29 | private static final long serialVersionUID = -5946720611973108189L;
30 |
31 | @Lookup(type = LookupType.DROPDOWN, actions = {"lookup", "open"})
32 | @NotNull
33 | @ManyToOne(fetch = FetchType.LAZY, optional = false)
34 | @JoinColumn(name = "CUSTOMER_ID")
35 | protected Customer customer;
36 |
37 | @Column(name = "ORDER_ID")
38 | protected String orderId;
39 |
40 | @Temporal(TemporalType.DATE)
41 | @NotNull
42 | @Column(name = "ORDER_DATE", nullable = false)
43 | protected Date orderDate;
44 |
45 | @Temporal(TemporalType.DATE)
46 | @NotNull
47 | @Column(name = "DELIVERY_DATE", nullable = false)
48 | protected Date deliveryDate;
49 |
50 | @Composition
51 | @OnDelete(DeletePolicy.CASCADE)
52 | @OneToMany(mappedBy = "order")
53 | protected List lineItems;
54 |
55 | @Composition
56 | @OnDelete(DeletePolicy.CASCADE)
57 | @OneToMany(mappedBy = "order")
58 | protected List documents;
59 |
60 | public void setDocuments(List documents) {
61 | this.documents = documents;
62 | }
63 |
64 | public List getDocuments() {
65 | return documents;
66 | }
67 |
68 |
69 | public void setCustomer(Customer customer) {
70 | this.customer = customer;
71 | }
72 |
73 | public Customer getCustomer() {
74 | return customer;
75 | }
76 |
77 | public void setOrderId(String orderId) {
78 | this.orderId = orderId;
79 | }
80 |
81 | public String getOrderId() {
82 | return orderId;
83 | }
84 |
85 | public void setOrderDate(Date orderDate) {
86 | this.orderDate = orderDate;
87 | }
88 |
89 | public Date getOrderDate() {
90 | return orderDate;
91 | }
92 |
93 | public void setDeliveryDate(Date deliveryDate) {
94 | this.deliveryDate = deliveryDate;
95 | }
96 |
97 | public Date getDeliveryDate() {
98 | return deliveryDate;
99 | }
100 |
101 | public void setLineItems(List lineItems) {
102 | this.lineItems = lineItems;
103 | }
104 |
105 | public List getLineItems() {
106 | return lineItems;
107 | }
108 |
109 |
110 | }
--------------------------------------------------------------------------------
/.idea/cuba-project.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 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/customer/customer-edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
14 |
16 |
17 |
18 |
19 |
20 |
21 |
23 |
25 |
26 |
27 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
65 |
66 |
68 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/10.create-db.sql:
--------------------------------------------------------------------------------
1 | -- begin RTCABO_CUSTOMER
2 | create table RTCABO_CUSTOMER (
3 | ID varchar(36) not null,
4 | VERSION integer not null,
5 | CREATE_TS timestamp,
6 | CREATED_BY varchar(50),
7 | UPDATE_TS timestamp,
8 | UPDATED_BY varchar(50),
9 | DELETE_TS timestamp,
10 | DELETED_BY varchar(50),
11 | TENANT_ID varchar(36) not null,
12 | --
13 | NAME varchar(255) not null,
14 | FIRST_NAME varchar(255),
15 | BIRTHDAY date not null,
16 | --
17 | primary key (ID)
18 | )^
19 | -- end RTCABO_CUSTOMER
20 | -- begin RTCABO_ADDRESS
21 | create table RTCABO_ADDRESS (
22 | ID varchar(36) not null,
23 | VERSION integer not null,
24 | CREATE_TS timestamp,
25 | CREATED_BY varchar(50),
26 | UPDATE_TS timestamp,
27 | UPDATED_BY varchar(50),
28 | DELETE_TS timestamp,
29 | DELETED_BY varchar(50),
30 | --
31 | STREET varchar(255) not null,
32 | POST_CODE varchar(255) not null,
33 | CITY varchar(255) not null,
34 | CUSTOMER_ID varchar(36) not null,
35 | --
36 | primary key (ID)
37 | )^
38 | -- end RTCABO_ADDRESS
39 | -- begin RTCABO_PRODUCT
40 | create table RTCABO_PRODUCT (
41 | ID varchar(36) not null,
42 | VERSION integer not null,
43 | CREATE_TS timestamp,
44 | CREATED_BY varchar(50),
45 | UPDATE_TS timestamp,
46 | UPDATED_BY varchar(50),
47 | DELETE_TS timestamp,
48 | DELETED_BY varchar(50),
49 | --
50 | NAME varchar(255) not null,
51 | CODE varchar(255),
52 | CATEGORY_ID varchar(36),
53 | --
54 | primary key (ID)
55 | )^
56 | -- end RTCABO_PRODUCT
57 | -- begin RTCABO_LINE_ITEM
58 | create table RTCABO_LINE_ITEM (
59 | ID varchar(36) not null,
60 | VERSION integer not null,
61 | CREATE_TS timestamp,
62 | CREATED_BY varchar(50),
63 | UPDATE_TS timestamp,
64 | UPDATED_BY varchar(50),
65 | DELETE_TS timestamp,
66 | DELETED_BY varchar(50),
67 | --
68 | PRODUCT_ID varchar(36) not null,
69 | PRICE decimal(19, 2) not null,
70 | QUANTITY integer not null,
71 | ORDER_ID varchar(36) not null,
72 | --
73 | primary key (ID)
74 | )^
75 | -- end RTCABO_LINE_ITEM
76 | -- begin RTCABO_ORDER
77 | create table RTCABO_ORDER (
78 | ID varchar(36) not null,
79 | VERSION integer not null,
80 | CREATE_TS timestamp,
81 | CREATED_BY varchar(50),
82 | UPDATE_TS timestamp,
83 | UPDATED_BY varchar(50),
84 | DELETE_TS timestamp,
85 | DELETED_BY varchar(50),
86 | --
87 | CUSTOMER_ID varchar(36) not null,
88 | ORDER_ID varchar(255),
89 | ORDER_DATE date not null,
90 | DELIVERY_DATE date not null,
91 | --
92 | primary key (ID)
93 | )^
94 | -- end RTCABO_ORDER
95 | -- begin RTCABO_DOCUMENT
96 | create table RTCABO_DOCUMENT (
97 | ID varchar(36) not null,
98 | VERSION integer not null,
99 | CREATE_TS timestamp,
100 | CREATED_BY varchar(50),
101 | UPDATE_TS timestamp,
102 | UPDATED_BY varchar(50),
103 | DELETE_TS timestamp,
104 | DELETED_BY varchar(50),
105 | --
106 | NAME varchar(255) not null,
107 | FILE_ID varchar(36) not null,
108 | TYPE_ varchar(50),
109 | ORDER_ID varchar(36) not null,
110 | --
111 | primary key (ID)
112 | )^
113 | -- end RTCABO_DOCUMENT
114 | -- begin RTCABO_PRODUCT_CATEGORY
115 | create table RTCABO_PRODUCT_CATEGORY (
116 | ID varchar(36) not null,
117 | VERSION integer not null,
118 | CREATE_TS timestamp,
119 | CREATED_BY varchar(50),
120 | UPDATE_TS timestamp,
121 | UPDATED_BY varchar(50),
122 | DELETE_TS timestamp,
123 | DELETED_BY varchar(50),
124 | --
125 | NAME varchar(255) not null,
126 | CODE varchar(255),
127 | --
128 | primary key (ID)
129 | )^
130 | -- end RTCABO_PRODUCT_CATEGORY
131 | -- begin RTCABO_TENANT
132 | create table RTCABO_TENANT (
133 | ID varchar(36) not null,
134 | VERSION integer not null,
135 | CREATE_TS timestamp,
136 | CREATED_BY varchar(50),
137 | UPDATE_TS timestamp,
138 | UPDATED_BY varchar(50),
139 | DELETE_TS timestamp,
140 | DELETED_BY varchar(50),
141 | --
142 | NAME varchar(255) not null,
143 | CODE varchar(255) not null,
144 | --
145 | primary key (ID)
146 | )^
147 | -- end RTCABO_TENANT
148 |
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/71.create-db.sql:
--------------------------------------------------------------------------------
1 |
2 |
3 | -- Orders
4 | insert into RTCABO_ORDER
5 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, CUSTOMER_ID, ORDER_ID, ORDER_DATE, DELIVERY_DATE)
6 | values ('52f92cef-9833-347c-b788-5f5840e401e9', 1, '2018-03-31 10:12:42', 'admin', '2018-03-31 10:12:42', null, null, null, '6185ce21-8e3e-dbea-86b8-cd15cb60f16b', '5', '2018-03-01', '2018-03-13');
7 | insert into RTCABO_ORDER
8 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, CUSTOMER_ID, ORDER_ID, ORDER_DATE, DELIVERY_DATE)
9 | values ('afd3bf35-faf5-4a1b-61d4-bab10f5c32e7', 1, '2018-03-31 10:12:22', 'admin', '2018-03-31 10:12:22', null, null, null, '256a008b-9c52-d047-e112-510ffb644abf', '4', '2018-02-04', '2018-02-20');
10 | insert into RTCABO_ORDER
11 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, CUSTOMER_ID, ORDER_ID, ORDER_DATE, DELIVERY_DATE)
12 | values ('f2959bcf-1abe-d9a0-44dc-284f647cfff2', 1, '2018-03-31 10:13:06', 'admin', '2018-03-31 10:13:06', null, null, null, 'f601c835-8b0d-bcf3-5026-10447ee826d4', '6', '2018-03-27', '2018-03-29');
13 | insert into RTCABO_ORDER
14 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, CUSTOMER_ID, ORDER_ID, ORDER_DATE, DELIVERY_DATE)
15 | values ('fa212c49-699b-79c8-2af4-1ac1d7856214', 1, '2018-03-31 10:09:12', 'admin', '2018-03-31 10:09:12', null, null, null, '1f265104-2f16-8dcb-c242-b812f21fc61f', '3', '2018-03-30', '2018-04-14');
16 |
17 | insert into RTCABO_LINE_ITEM
18 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PRODUCT_ID, PRICE, QUANTITY, ORDER_ID)
19 | values ('35ea0b47-0fb9-5a30-089a-23763fe4ac82', 1, '2018-03-31 10:12:42', 'admin', '2018-03-31 10:12:42', null, null, null, '8f880879-7fdf-bec9-735f-f7b979397530', 3.00, 3, '52f92cef-9833-347c-b788-5f5840e401e9');
20 | insert into RTCABO_LINE_ITEM
21 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PRODUCT_ID, PRICE, QUANTITY, ORDER_ID)
22 | values ('391f4584-a947-4448-225d-6e282a3b95a9', 1, '2018-03-31 10:12:22', 'admin', '2018-03-31 10:12:22', null, null, null, '9983452b-8734-3edf-c2d9-11a7fa4b04e5', 4.99, 10, 'afd3bf35-faf5-4a1b-61d4-bab10f5c32e7');
23 | insert into RTCABO_LINE_ITEM
24 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PRODUCT_ID, PRICE, QUANTITY, ORDER_ID)
25 | values ('bdd2040f-0fe4-591a-2a8a-720113074b99', 1, '2018-03-31 10:12:22', 'admin', '2018-03-31 10:12:22', null, null, null, '7f1fbdc3-4b14-6bac-90b2-9182663f5746', 1.50, 45, 'afd3bf35-faf5-4a1b-61d4-bab10f5c32e7');
26 | insert into RTCABO_LINE_ITEM
27 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PRODUCT_ID, PRICE, QUANTITY, ORDER_ID)
28 | values ('63998484-512a-c094-d890-e3e1ab4c5967', 1, '2018-03-31 10:12:22', 'admin', '2018-03-31 10:12:22', null, null, null, '1c0d74aa-c461-88d1-e5ad-d5ec55564a5e', 19.00, 1, 'afd3bf35-faf5-4a1b-61d4-bab10f5c32e7');
29 | insert into RTCABO_LINE_ITEM
30 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PRODUCT_ID, PRICE, QUANTITY, ORDER_ID)
31 | values ('65270534-9bbb-17e6-47d6-154d4fa87033', 1, '2018-03-31 10:13:06', 'admin', '2018-03-31 10:13:06', null, null, null, '4030f09c-246f-b3aa-9de4-2e814c16dcb8', 2.99, 40, 'f2959bcf-1abe-d9a0-44dc-284f647cfff2');
32 | insert into RTCABO_LINE_ITEM
33 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PRODUCT_ID, PRICE, QUANTITY, ORDER_ID)
34 | values ('af585ec4-e7e3-8af4-8ea6-c5c1225c2ae1', 1, '2018-03-31 10:13:06', 'admin', '2018-03-31 10:13:06', null, null, null, '7f1fbdc3-4b14-6bac-90b2-9182663f5746', 1.99, 20, 'f2959bcf-1abe-d9a0-44dc-284f647cfff2');
35 | insert into RTCABO_LINE_ITEM
36 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PRODUCT_ID, PRICE, QUANTITY, ORDER_ID)
37 | values ('df91fc78-fb63-e29d-e069-f8234c65160c', 1, '2018-03-31 10:09:12', 'admin', '2018-03-31 10:09:12', null, null, null, '4030f09c-246f-b3aa-9de4-2e814c16dcb8', 5.00, 10, 'fa212c49-699b-79c8-2af4-1ac1d7856214');
38 | insert into RTCABO_LINE_ITEM
39 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PRODUCT_ID, PRICE, QUANTITY, ORDER_ID)
40 | values ('b586d3df-90eb-45be-8aff-2bddc37a46af', 1, '2018-03-31 10:09:12', 'admin', '2018-03-31 10:09:12', null, null, null, '85644457-3c30-8731-cc3c-718a449b1efc', 7.00, 30, 'fa212c49-699b-79c8-2af4-1ac1d7856214');
41 |
42 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/modules/web/src/com/roadtocubaandbeyond/ordermanagement/web/order/order-edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
14 |
16 |
17 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
30 |
31 |
33 |
34 |
35 |
37 |
39 |
40 |
45 |
47 |
48 |
50 |
52 |
53 |
54 |
55 |
56 |
58 |
61 |
62 |
64 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
111 |
115 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/modules/core/db/init/hsql/41.create-db.sql:
--------------------------------------------------------------------------------
1 |
2 | -- Roles
3 |
4 | insert into SEC_ROLE
5 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, NAME, LOC_NAME, DESCRIPTION, ROLE_TYPE, IS_DEFAULT_ROLE)
6 | values ('2aa8f801-492b-7a61-60c0-2d013e799450', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 'Master data manager', null, null, 0, null);
7 |
8 | insert into SEC_PERMISSION
9 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
10 | values ('7ab918f2-7da0-3bcb-f8b1-123495365892', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Product:read', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
11 |
12 | insert into SEC_PERMISSION
13 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
14 | values ('21be9363-d13b-449a-2266-c75d3fb23471', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Customer:create', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
15 |
16 | insert into SEC_PERMISSION
17 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
18 | values ('fc1c1c39-0f37-e7d1-c003-0e5046fcaae9', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 10, 'rtcabo$ProductCategory.browse', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
19 |
20 | insert into SEC_PERMISSION
21 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
22 | values ('d0d4aabe-cd47-4818-506c-040262069817', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Product:update', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
23 |
24 | insert into SEC_PERMISSION
25 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
26 | values ('8b0b54e7-8c5b-4f3a-1cf9-fd05f7dad267', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$ProductCategory:delete', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
27 |
28 | insert into SEC_PERMISSION
29 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
30 | values ('34e8a33c-7457-f2a1-ddd6-aefd7f0dcfcb', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 10, 'rtcabo$Order.browse', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
31 |
32 | insert into SEC_PERMISSION
33 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
34 | values ('cd8d7d52-fe02-0834-1258-5865236d6bf6', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$ProductCategory:update', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
35 |
36 | insert into SEC_PERMISSION
37 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
38 | values ('586e8fda-48bc-a8b4-14d9-769dbc015e2b', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Order:read', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
39 |
40 | insert into SEC_PERMISSION
41 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
42 | values ('191c0691-5439-520c-8a87-240a8197dbf5', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Customer:update', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
43 |
44 | insert into SEC_PERMISSION
45 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
46 | values ('4760ff7d-1a50-7645-8f7c-92d3209499eb', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Customer:read', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
47 |
48 | insert into SEC_PERMISSION
49 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
50 | values ('050131d9-42ec-8c51-b9fb-6490121b1c4c', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 10, 'administration', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
51 |
52 | insert into SEC_PERMISSION
53 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
54 | values ('453be1b0-9bfe-ee32-8658-da20aec6ce22', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Customer:delete', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
55 |
56 | insert into SEC_PERMISSION
57 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
58 | values ('c1b2d650-bbf5-5345-1a07-54f19a7ae8c0', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Order:create', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
59 |
60 | insert into SEC_PERMISSION
61 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
62 | values ('381b63f0-5892-888e-4cd6-960a4acd6882', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$ProductCategory:create', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
63 |
64 | insert into SEC_PERMISSION
65 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
66 | values ('22552bb7-9db0-8bf0-d510-e38c1cce0298', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 10, 'reports', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
67 |
68 | insert into SEC_PERMISSION
69 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
70 | values ('b0ba4af1-f135-1cfc-9371-36432740cb98', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Order:update', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
71 |
72 | insert into SEC_PERMISSION
73 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
74 | values ('b93e1405-616c-ea91-394a-dec037ce4daa', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 40, 'cuba.restApi.enabled', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
75 |
76 | insert into SEC_PERMISSION
77 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
78 | values ('1b63d135-43e4-cbc4-2931-946cab32c433', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$LineItem:update', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
79 |
80 | insert into SEC_PERMISSION
81 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
82 | values ('982939ab-e2cf-3b81-982b-d9eac0f1d390', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$LineItem:read', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
83 |
84 | insert into SEC_PERMISSION
85 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
86 | values ('13d11613-b50c-c0bb-7097-ca134271f32c', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Product:create', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
87 |
88 | insert into SEC_PERMISSION
89 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
90 | values ('d7c0d040-7318-e9d5-701a-5bac52518d87', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$ProductCategory:read', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
91 |
92 | insert into SEC_PERMISSION
93 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
94 | values ('b7788113-034a-2c39-5e8f-7997f668355c', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 10, 'rtcabo$Product.browse', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
95 |
96 | insert into SEC_PERMISSION
97 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
98 | values ('88c28988-367f-c3fc-c9b7-69e50ca73609', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$LineItem:create', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
99 |
100 | insert into SEC_PERMISSION
101 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
102 | values ('b5280f08-31e8-4f67-8aee-f7e7f3a737f7', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Product:delete', 1, '2aa8f801-492b-7a61-60c0-2d013e799450');
103 |
104 | insert into SEC_PERMISSION
105 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
106 | values ('0314faba-46cb-e162-b51f-90bedeb644a8', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$LineItem:delete', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
107 |
108 | insert into SEC_PERMISSION
109 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
110 | values ('6069a0b2-a9bb-53ae-93a4-0adc7a4de9c0', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 10, 'rtcabo$Customer.browse', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
111 |
112 | insert into SEC_PERMISSION
113 | (ID, VERSION, CREATE_TS, CREATED_BY, UPDATE_TS, UPDATED_BY, DELETE_TS, DELETED_BY, PERMISSION_TYPE, TARGET, VALUE, ROLE_ID)
114 | values ('2baddbab-3906-d064-c286-359d84dde9df', 1, '2018-04-03 13:10:29', 'admin', '2018-04-03 13:10:29', null, null, null, 20, 'rtcabo$Order:delete', 0, '2aa8f801-492b-7a61-60c0-2d013e799450');
115 |
--------------------------------------------------------------------------------
/.idea/workspace.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 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
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 | 1570210422316
155 |
156 |
157 | 1570210422316
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
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 | rtcab-ordermanagement
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
--------------------------------------------------------------------------------