From e6094a63a29aa79bc98518d1cf76bdfa34d45681 Mon Sep 17 00:00:00 2001 From: Juhan Aasaru Date: Fri, 1 Dec 2023 15:44:59 +0200 Subject: [PATCH] rename "drools8" package to "droolsoopath" --- CHANGELOG.md | 12 ++++++++-- pom.xml | 1 + .../section03/step1/PassportRuleUnit.java | 6 ----- .../section03/step2/PassportRuleUnit.java | 6 ----- .../section03/step3/PassportRuleUnit.java | 6 ----- .../section03/step4/PassportRuleUnit.java | 6 ----- .../section03/step5/PassportRuleUnit.java | 6 ----- .../section03/step6/PassportRuleUnit.java | 6 ----- .../section04/step1/PassportRuleUnit.java | 6 ----- .../section04/step2/PassportRuleUnit.java | 6 ----- .../section05/step1/RuleUnitSection05.java | 6 ----- .../section05/step2/RuleUnitSection05.java | 6 ----- .../section05/step3/RuleUnitSection05.java | 6 ----- .../section06/step1/RuleUnitSection06.java | 6 ----- .../section06/step2/RuleUnitSection06.java | 6 ----- .../section08/step1/RuleUnitSection08.java | 4 ---- .../section08/step2/RuleUnitSection08.java | 4 ---- .../section08/step3/RuleUnitSection08.java | 4 ---- .../section08/step4/RuleUnitSection08.java | 4 ---- .../section08/step5/RuleUnitSection08.java | 4 ---- .../query/SessionQueryUtil.java | 4 +--- .../ruledata/PassportRuleUnit.java | 2 +- .../ruledata/StepRuleUnitUtil.java | 4 ++-- .../section03/PassportValidationOO.java} | 8 +++---- .../section03/step1/PassportRuleUnit.java | 6 +++++ .../section03/step2/PassportRuleUnit.java | 6 +++++ .../section03/step3/PassportRuleUnit.java | 6 +++++ .../section03/step4/PassportRuleUnit.java | 6 +++++ .../section03/step5/PassportRuleUnit.java | 6 +++++ .../section03/step6/PassportRuleUnit.java | 6 +++++ .../StatefulPassportValidationOO.java} | 8 +++---- .../section04/step1/PassportRuleUnit.java | 6 +++++ .../section04/step2/PassportRuleUnit.java | 6 +++++ .../section05/RuleUnitSection05.java | 2 +- .../VisaApplicationValidationOO.java} | 6 ++--- .../section05/step1/RuleUnitSection05.java | 6 +++++ .../section05/step2/RuleUnitSection05.java | 6 +++++ .../section05/step3/RuleUnitSection05.java | 6 +++++ .../section06/RuleUnitSection06.java | 2 +- .../section06/VisaIssueOO.java} | 6 ++--- .../section06/step1/RuleUnitSection06.java | 6 +++++ .../section06/step2/RuleUnitSection06.java | 6 +++++ .../section07/RuleUnitSection07.java | 2 +- .../section07/VisaAddLogicalOO.java} | 8 +++---- .../section07/step1/RuleUnitSection07.java | 4 ++-- .../section07/step2/RuleUnitSection07.java | 4 ++-- .../section07/step3/RuleUnitSection07.java | 4 ++-- .../section07/step4/RuleUnitSection07.java | 4 ++-- .../FamilyVisaApplicationValidationOO.java} | 8 +++---- .../section08/RuleUnitSection08.java | 2 +- .../section08/step1/RuleUnitSection08.java | 4 ++++ .../section08/step2/RuleUnitSection08.java | 4 ++++ .../section08/step3/RuleUnitSection08.java | 4 ++++ .../section08/step4/RuleUnitSection08.java | 4 ++++ .../section08/step5/RuleUnitSection08.java | 4 ++++ .../step2/FamilyVisaApplicationValidation.drl | 2 +- .../drools8/section08/step5/queries.drl | 19 --------------- .../section03/step1/PassportValidation.drl | 2 +- .../section03/step2/PassportValidation.drl | 2 +- .../section03/step3/PassportValidation.drl | 2 +- .../section03/step4/PassportValidation.drl | 2 +- .../section03/step5/PassportValidation.drl | 2 +- .../section03/step6/PassportValidation.drl | 2 +- .../section04/step1/PassportValidation.drl | 2 +- .../section04/step2/PassportValidation.drl | 2 +- .../section05/step1/PassportValidation.drl | 2 +- .../step1/VisaApplicationValidation.drl | 2 +- .../section05/step2/PassportValidation.drl | 2 +- .../step2/VisaApplicationValidation.drl | 2 +- .../section05/step3/PassportValidation.drl | 2 +- .../step3/VisaApplicationValidation.drl | 2 +- .../section06/step1/IssueVisa.drl | 2 +- .../section06/step1/PassportValidation.drl | 2 +- .../step1/VisaApplicationValidation.drl | 2 +- .../section06/step1/VisaQuery.drl | 2 +- .../section06/step2/IssueVisaWithSalience.drl | 2 +- .../section06/step2/PassportValidation.drl | 2 +- .../step2/VisaApplicationValidation.drl | 2 +- .../section06/step2/VisaQuery.drl | 2 +- .../section07/step1/IssueVisaAddLogical.drl | 2 +- .../step1/VisaApplicationValidation.drl | 2 +- .../section07/step1/XPassportValidation.drl | 2 +- .../section07/step1/queries.drl | 2 +- .../section07/step2/PassportValidation.drl | 2 +- .../section07/step2/queries.drl | 2 +- .../step3/IssueVisaInsertLogical.drl | 2 +- .../section07/step3/PassportValidation.drl | 2 +- .../step3/VisaApplicationValidation.drl | 2 +- .../section07/step3}/queries.drl | 2 +- .../section07/step4/IssueVisaAddLogical.drl | 2 +- .../section07/step4/PassportValidation.drl | 2 +- .../step4/VisaApplicationValidation.drl | 2 +- .../section07/step4}/queries.drl | 2 +- .../step1/FamilyVisaApplicationValidation.drl | 2 +- .../section08/step1/IssueVisaAddLogical.drl | 2 +- .../section08/step1/PassportValidation.drl | 2 +- .../section08/step1}/queries.drl | 2 +- .../step2/FamilyVisaApplicationValidation.drl | 5 ++-- .../section08/step2}/IssueVisaAddLogical.drl | 2 +- .../section08/step2}/PassportValidation.drl | 2 +- .../section08/step2}/queries.drl | 2 +- .../step3/FamilyVisaApplicationValidation.drl | 2 +- .../section08/step3}/IssueVisaAddLogical.drl | 2 +- .../section08/step3/PassportValidation.drl | 2 +- .../section08/step3}/queries.drl | 2 +- .../step4/FamilyVisaApplicationValidation.drl | 2 +- .../section08/step4}/IssueVisaAddLogical.drl | 2 +- .../section08/step4}/PassportValidation.drl | 2 +- .../section08/step4}/queries.drl | 2 +- .../step5/FamilyVisaApplicationValidation.drl | 2 +- .../section08/step5/IssueVisaAddLogical.drl | 2 +- .../section08/step5}/PassportValidation.drl | 2 +- .../section08/step5/Statistics.drl | 2 +- .../droolsoopath/section08/step5/queries.drl | 19 +++++++++++++++ .../section03/PassportValidationOOTest.java} | 16 ++++++------- .../StatefulPassportValidationOOTest.java} | 9 ++++--- .../VisaApplicationValidationOOTest.java} | 11 ++++----- .../section06/VisaIssueOOTest.java} | 8 +++---- .../section07/VisaAddLogicalOOTest.java} | 18 +++++++------- ...amilyVisaApplicationValidationOOTest.java} | 24 +++++++++---------- 120 files changed, 266 insertions(+), 262 deletions(-) delete mode 100644 src/main/java/io/github/aasaru/drools8/section03/step1/PassportRuleUnit.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section03/step2/PassportRuleUnit.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section03/step3/PassportRuleUnit.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section03/step4/PassportRuleUnit.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section03/step5/PassportRuleUnit.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section03/step6/PassportRuleUnit.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section04/step1/PassportRuleUnit.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section04/step2/PassportRuleUnit.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section05/step1/RuleUnitSection05.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section05/step2/RuleUnitSection05.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section05/step3/RuleUnitSection05.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section06/step1/RuleUnitSection06.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section06/step2/RuleUnitSection06.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section08/step1/RuleUnitSection08.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section08/step2/RuleUnitSection08.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section08/step3/RuleUnitSection08.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section08/step4/RuleUnitSection08.java delete mode 100644 src/main/java/io/github/aasaru/drools8/section08/step5/RuleUnitSection08.java rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/query/SessionQueryUtil.java (95%) rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/ruledata/PassportRuleUnit.java (89%) rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/ruledata/StepRuleUnitUtil.java (76%) rename src/main/java/io/github/aasaru/{drools8/section03/PassportValidationD8.java => droolsoopath/section03/PassportValidationOO.java} (88%) create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section03/step1/PassportRuleUnit.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section03/step2/PassportRuleUnit.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section03/step3/PassportRuleUnit.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section03/step4/PassportRuleUnit.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section03/step5/PassportRuleUnit.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section03/step6/PassportRuleUnit.java rename src/main/java/io/github/aasaru/{drools8/section04/StatefulPassportValidationD8.java => droolsoopath/section04/StatefulPassportValidationOO.java} (85%) create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section04/step1/PassportRuleUnit.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section04/step2/PassportRuleUnit.java rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/section05/RuleUnitSection05.java (93%) rename src/main/java/io/github/aasaru/{drools8/section05/VisaApplicationValidationD8.java => droolsoopath/section05/VisaApplicationValidationOO.java} (92%) create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section05/step1/RuleUnitSection05.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section05/step2/RuleUnitSection05.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section05/step3/RuleUnitSection05.java rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/section06/RuleUnitSection06.java (94%) rename src/main/java/io/github/aasaru/{drools8/section06/VisaIssueD8.java => droolsoopath/section06/VisaIssueOO.java} (94%) create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section06/step1/RuleUnitSection06.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section06/step2/RuleUnitSection06.java rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/section07/RuleUnitSection07.java (97%) rename src/main/java/io/github/aasaru/{drools8/section07/VisaAddLogicalD8.java => droolsoopath/section07/VisaAddLogicalOO.java} (95%) rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/section07/step1/RuleUnitSection07.java (60%) rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/section07/step2/RuleUnitSection07.java (60%) rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/section07/step3/RuleUnitSection07.java (60%) rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/section07/step4/RuleUnitSection07.java (60%) rename src/main/java/io/github/aasaru/{drools8/section08/FamilyVisaApplicationValidationD8.java => droolsoopath/section08/FamilyVisaApplicationValidationOO.java} (93%) rename src/main/java/io/github/aasaru/{drools8 => droolsoopath}/section08/RuleUnitSection08.java (96%) create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section08/step1/RuleUnitSection08.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section08/step2/RuleUnitSection08.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section08/step3/RuleUnitSection08.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section08/step4/RuleUnitSection08.java create mode 100644 src/main/java/io/github/aasaru/droolsoopath/section08/step5/RuleUnitSection08.java delete mode 100644 src/main/resources/io/github/aasaru/drools8/section08/step5/queries.drl rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section03/step1/PassportValidation.drl (88%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section03/step2/PassportValidation.drl (90%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section03/step3/PassportValidation.drl (91%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section03/step4/PassportValidation.drl (93%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section03/step5/PassportValidation.drl (93%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section03/step6/PassportValidation.drl (93%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section04/step1/PassportValidation.drl (93%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section04/step2/PassportValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section05/step1/PassportValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section05/step1/VisaApplicationValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section05/step2/PassportValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section05/step2/VisaApplicationValidation.drl (96%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section05/step3/PassportValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section05/step3/VisaApplicationValidation.drl (96%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section06/step1/IssueVisa.drl (88%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section06/step1/PassportValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section06/step1/VisaApplicationValidation.drl (96%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section06/step1/VisaQuery.drl (55%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section06/step2/IssueVisaWithSalience.drl (88%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section06/step2/PassportValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section06/step2/VisaApplicationValidation.drl (96%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section06/step2/VisaQuery.drl (55%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step1/IssueVisaAddLogical.drl (88%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step1/VisaApplicationValidation.drl (96%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step1/XPassportValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step1/queries.drl (55%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step2/PassportValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step2/queries.drl (76%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step3/IssueVisaInsertLogical.drl (88%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step3/PassportValidation.drl (94%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step3/VisaApplicationValidation.drl (97%) rename src/main/resources/io/github/aasaru/{drools8/section07/step4 => droolsoopath/section07/step3}/queries.drl (88%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step4/IssueVisaAddLogical.drl (90%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step4/PassportValidation.drl (91%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section07/step4/VisaApplicationValidation.drl (91%) rename src/main/resources/io/github/aasaru/{drools8/section07/step3 => droolsoopath/section07/step4}/queries.drl (88%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step1/FamilyVisaApplicationValidation.drl (90%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step1/IssueVisaAddLogical.drl (90%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step1/PassportValidation.drl (91%) rename src/main/resources/io/github/aasaru/{drools8/section08/step2 => droolsoopath/section08/step1}/queries.drl (85%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step2/FamilyVisaApplicationValidation.drl (79%) rename src/main/resources/io/github/aasaru/{drools8/section08/step3 => droolsoopath/section08/step2}/IssueVisaAddLogical.drl (90%) rename src/main/resources/io/github/aasaru/{drools8/section08/step5 => droolsoopath/section08/step2}/PassportValidation.drl (91%) rename src/main/resources/io/github/aasaru/{drools8/section08/step3 => droolsoopath/section08/step2}/queries.drl (85%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step3/FamilyVisaApplicationValidation.drl (95%) rename src/main/resources/io/github/aasaru/{drools8/section08/step4 => droolsoopath/section08/step3}/IssueVisaAddLogical.drl (90%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step3/PassportValidation.drl (91%) rename src/main/resources/io/github/aasaru/{drools8/section08/step4 => droolsoopath/section08/step3}/queries.drl (85%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step4/FamilyVisaApplicationValidation.drl (97%) rename src/main/resources/io/github/aasaru/{drools8/section08/step2 => droolsoopath/section08/step4}/IssueVisaAddLogical.drl (90%) rename src/main/resources/io/github/aasaru/{drools8/section08/step2 => droolsoopath/section08/step4}/PassportValidation.drl (91%) rename src/main/resources/io/github/aasaru/{drools8/section08/step1 => droolsoopath/section08/step4}/queries.drl (85%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step5/FamilyVisaApplicationValidation.drl (97%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step5/IssueVisaAddLogical.drl (90%) rename src/main/resources/io/github/aasaru/{drools8/section08/step4 => droolsoopath/section08/step5}/PassportValidation.drl (91%) rename src/main/resources/io/github/aasaru/{drools8 => droolsoopath}/section08/step5/Statistics.drl (79%) create mode 100644 src/main/resources/io/github/aasaru/droolsoopath/section08/step5/queries.drl rename src/test/java/io/github/aasaru/{drools8/section03/PassportValidationD8Test.java => droolsoopath/section03/PassportValidationOOTest.java} (94%) rename src/test/java/io/github/aasaru/{drools8/section04/StatefulPassportValidationD8Test.java => droolsoopath/section04/StatefulPassportValidationOOTest.java} (91%) rename src/test/java/io/github/aasaru/{drools8/section05/VisaApplicationValidationD8Test.java => droolsoopath/section05/VisaApplicationValidationOOTest.java} (94%) rename src/test/java/io/github/aasaru/{drools8/section06/VisaIssueD8Test.java => droolsoopath/section06/VisaIssueOOTest.java} (86%) rename src/test/java/io/github/aasaru/{drools8/section07/VisaAddLogicalD8Test.java => droolsoopath/section07/VisaAddLogicalOOTest.java} (88%) rename src/test/java/io/github/aasaru/{drools8/section08/FamilyVisaApplicationValidationD8Test.java => droolsoopath/section08/FamilyVisaApplicationValidationOOTest.java} (86%) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5ac4bf..b359155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,15 @@ # Changes -## November 2023 -* lift to Drools 8 +## Dec 1, 2023 +* upgrade to Drools version 8 (8.45.0-SNAPSHOT) +* for each Drools code example, add second examples written in OOPath notation +* io.github.aasaru.drools.section08.step2 -> FamilyVisaApplicationValidation.drl changed to use "contains" constructor + +## Aug 10, 2022 +* upgrade Drools version to 7.73.0 + +## Sept 29, 2021 +* change dialect from "mvel" to "java" in all *.drl files (because of a bug) ## Aug 9, 2021 * upgrade Drools version to 7.58.0 diff --git a/pom.xml b/pom.xml index d74a0ee..367fb45 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,7 @@ io.github.aasaru.drools-training UTF-8 8.45.0-SNAPSHOT + 11 diff --git a/src/main/java/io/github/aasaru/drools8/section03/step1/PassportRuleUnit.java b/src/main/java/io/github/aasaru/drools8/section03/step1/PassportRuleUnit.java deleted file mode 100644 index d560412..0000000 --- a/src/main/java/io/github/aasaru/drools8/section03/step1/PassportRuleUnit.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section03.step1; - -import org.drools.ruleunits.api.RuleUnitData; - -public class PassportRuleUnit extends io.github.aasaru.drools8.ruledata.PassportRuleUnit implements RuleUnitData { -} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/drools8/section03/step2/PassportRuleUnit.java b/src/main/java/io/github/aasaru/drools8/section03/step2/PassportRuleUnit.java deleted file mode 100644 index 89383af..0000000 --- a/src/main/java/io/github/aasaru/drools8/section03/step2/PassportRuleUnit.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section03.step2; - -import org.drools.ruleunits.api.RuleUnitData; - -public class PassportRuleUnit extends io.github.aasaru.drools8.ruledata.PassportRuleUnit implements RuleUnitData { -} diff --git a/src/main/java/io/github/aasaru/drools8/section03/step3/PassportRuleUnit.java b/src/main/java/io/github/aasaru/drools8/section03/step3/PassportRuleUnit.java deleted file mode 100644 index 38348e7..0000000 --- a/src/main/java/io/github/aasaru/drools8/section03/step3/PassportRuleUnit.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section03.step3; - -import org.drools.ruleunits.api.RuleUnitData; - -public class PassportRuleUnit extends io.github.aasaru.drools8.ruledata.PassportRuleUnit implements RuleUnitData { -} diff --git a/src/main/java/io/github/aasaru/drools8/section03/step4/PassportRuleUnit.java b/src/main/java/io/github/aasaru/drools8/section03/step4/PassportRuleUnit.java deleted file mode 100644 index 60138e4..0000000 --- a/src/main/java/io/github/aasaru/drools8/section03/step4/PassportRuleUnit.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section03.step4; - -import org.drools.ruleunits.api.RuleUnitData; - -public class PassportRuleUnit extends io.github.aasaru.drools8.ruledata.PassportRuleUnit implements RuleUnitData { -} diff --git a/src/main/java/io/github/aasaru/drools8/section03/step5/PassportRuleUnit.java b/src/main/java/io/github/aasaru/drools8/section03/step5/PassportRuleUnit.java deleted file mode 100644 index 97e51fb..0000000 --- a/src/main/java/io/github/aasaru/drools8/section03/step5/PassportRuleUnit.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section03.step5; - -import org.drools.ruleunits.api.RuleUnitData; - -public class PassportRuleUnit extends io.github.aasaru.drools8.ruledata.PassportRuleUnit implements RuleUnitData { -} diff --git a/src/main/java/io/github/aasaru/drools8/section03/step6/PassportRuleUnit.java b/src/main/java/io/github/aasaru/drools8/section03/step6/PassportRuleUnit.java deleted file mode 100644 index 6ec1722..0000000 --- a/src/main/java/io/github/aasaru/drools8/section03/step6/PassportRuleUnit.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section03.step6; - -import org.drools.ruleunits.api.RuleUnitData; - -public class PassportRuleUnit extends io.github.aasaru.drools8.ruledata.PassportRuleUnit implements RuleUnitData { -} diff --git a/src/main/java/io/github/aasaru/drools8/section04/step1/PassportRuleUnit.java b/src/main/java/io/github/aasaru/drools8/section04/step1/PassportRuleUnit.java deleted file mode 100644 index a745a1c..0000000 --- a/src/main/java/io/github/aasaru/drools8/section04/step1/PassportRuleUnit.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section04.step1; - -import org.drools.ruleunits.api.RuleUnitData; - -public class PassportRuleUnit extends io.github.aasaru.drools8.ruledata.PassportRuleUnit implements RuleUnitData { -} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/drools8/section04/step2/PassportRuleUnit.java b/src/main/java/io/github/aasaru/drools8/section04/step2/PassportRuleUnit.java deleted file mode 100644 index ce003b1..0000000 --- a/src/main/java/io/github/aasaru/drools8/section04/step2/PassportRuleUnit.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section04.step2; - -import org.drools.ruleunits.api.RuleUnitData; - -public class PassportRuleUnit extends io.github.aasaru.drools8.ruledata.PassportRuleUnit implements RuleUnitData { -} diff --git a/src/main/java/io/github/aasaru/drools8/section05/step1/RuleUnitSection05.java b/src/main/java/io/github/aasaru/drools8/section05/step1/RuleUnitSection05.java deleted file mode 100644 index 5fbcb6c..0000000 --- a/src/main/java/io/github/aasaru/drools8/section05/step1/RuleUnitSection05.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section05.step1; - -import org.drools.ruleunits.api.RuleUnitData; - -public class RuleUnitSection05 extends io.github.aasaru.drools8.section05.RuleUnitSection05 implements RuleUnitData { -} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/drools8/section05/step2/RuleUnitSection05.java b/src/main/java/io/github/aasaru/drools8/section05/step2/RuleUnitSection05.java deleted file mode 100644 index be9bbd7..0000000 --- a/src/main/java/io/github/aasaru/drools8/section05/step2/RuleUnitSection05.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section05.step2; - -import org.drools.ruleunits.api.RuleUnitData; - -public class RuleUnitSection05 extends io.github.aasaru.drools8.section05.RuleUnitSection05 implements RuleUnitData { -} diff --git a/src/main/java/io/github/aasaru/drools8/section05/step3/RuleUnitSection05.java b/src/main/java/io/github/aasaru/drools8/section05/step3/RuleUnitSection05.java deleted file mode 100644 index d326204..0000000 --- a/src/main/java/io/github/aasaru/drools8/section05/step3/RuleUnitSection05.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section05.step3; - -import org.drools.ruleunits.api.RuleUnitData; - -public class RuleUnitSection05 extends io.github.aasaru.drools8.section05.RuleUnitSection05 implements RuleUnitData { -} diff --git a/src/main/java/io/github/aasaru/drools8/section06/step1/RuleUnitSection06.java b/src/main/java/io/github/aasaru/drools8/section06/step1/RuleUnitSection06.java deleted file mode 100644 index 5f90b6f..0000000 --- a/src/main/java/io/github/aasaru/drools8/section06/step1/RuleUnitSection06.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section06.step1; - -import org.drools.ruleunits.api.RuleUnitData; - -public class RuleUnitSection06 extends io.github.aasaru.drools8.section06.RuleUnitSection06 implements RuleUnitData { -} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/drools8/section06/step2/RuleUnitSection06.java b/src/main/java/io/github/aasaru/drools8/section06/step2/RuleUnitSection06.java deleted file mode 100644 index 860fbdd..0000000 --- a/src/main/java/io/github/aasaru/drools8/section06/step2/RuleUnitSection06.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.github.aasaru.drools8.section06.step2; - -import org.drools.ruleunits.api.RuleUnitData; - -public class RuleUnitSection06 extends io.github.aasaru.drools8.section06.RuleUnitSection06 implements RuleUnitData { -} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/drools8/section08/step1/RuleUnitSection08.java b/src/main/java/io/github/aasaru/drools8/section08/step1/RuleUnitSection08.java deleted file mode 100644 index 48b895d..0000000 --- a/src/main/java/io/github/aasaru/drools8/section08/step1/RuleUnitSection08.java +++ /dev/null @@ -1,4 +0,0 @@ -package io.github.aasaru.drools8.section08.step1; - -public class RuleUnitSection08 extends io.github.aasaru.drools8.section08.RuleUnitSection08 { -} diff --git a/src/main/java/io/github/aasaru/drools8/section08/step2/RuleUnitSection08.java b/src/main/java/io/github/aasaru/drools8/section08/step2/RuleUnitSection08.java deleted file mode 100644 index a0f323d..0000000 --- a/src/main/java/io/github/aasaru/drools8/section08/step2/RuleUnitSection08.java +++ /dev/null @@ -1,4 +0,0 @@ -package io.github.aasaru.drools8.section08.step2; - -public class RuleUnitSection08 extends io.github.aasaru.drools8.section08.RuleUnitSection08 { -} diff --git a/src/main/java/io/github/aasaru/drools8/section08/step3/RuleUnitSection08.java b/src/main/java/io/github/aasaru/drools8/section08/step3/RuleUnitSection08.java deleted file mode 100644 index e796e94..0000000 --- a/src/main/java/io/github/aasaru/drools8/section08/step3/RuleUnitSection08.java +++ /dev/null @@ -1,4 +0,0 @@ -package io.github.aasaru.drools8.section08.step3; - -public class RuleUnitSection08 extends io.github.aasaru.drools8.section08.RuleUnitSection08 { -} diff --git a/src/main/java/io/github/aasaru/drools8/section08/step4/RuleUnitSection08.java b/src/main/java/io/github/aasaru/drools8/section08/step4/RuleUnitSection08.java deleted file mode 100644 index c9e1586..0000000 --- a/src/main/java/io/github/aasaru/drools8/section08/step4/RuleUnitSection08.java +++ /dev/null @@ -1,4 +0,0 @@ -package io.github.aasaru.drools8.section08.step4; - -public class RuleUnitSection08 extends io.github.aasaru.drools8.section08.RuleUnitSection08 { -} diff --git a/src/main/java/io/github/aasaru/drools8/section08/step5/RuleUnitSection08.java b/src/main/java/io/github/aasaru/drools8/section08/step5/RuleUnitSection08.java deleted file mode 100644 index 07087a9..0000000 --- a/src/main/java/io/github/aasaru/drools8/section08/step5/RuleUnitSection08.java +++ /dev/null @@ -1,4 +0,0 @@ -package io.github.aasaru.drools8.section08.step5; - -public class RuleUnitSection08 extends io.github.aasaru.drools8.section08.RuleUnitSection08 { -} diff --git a/src/main/java/io/github/aasaru/drools8/query/SessionQueryUtil.java b/src/main/java/io/github/aasaru/droolsoopath/query/SessionQueryUtil.java similarity index 95% rename from src/main/java/io/github/aasaru/drools8/query/SessionQueryUtil.java rename to src/main/java/io/github/aasaru/droolsoopath/query/SessionQueryUtil.java index 348f414..6eab3ca 100644 --- a/src/main/java/io/github/aasaru/drools8/query/SessionQueryUtil.java +++ b/src/main/java/io/github/aasaru/droolsoopath/query/SessionQueryUtil.java @@ -1,12 +1,10 @@ -package io.github.aasaru.drools8.query; +package io.github.aasaru.droolsoopath.query; import io.github.aasaru.drools.domain.*; -import io.github.aasaru.drools8.section07.RuleUnitSection07; import org.drools.ruleunits.api.RuleUnitData; import org.drools.ruleunits.api.RuleUnitInstance; import java.util.Collection; -import java.util.List; import java.util.stream.Collectors; public class SessionQueryUtil { diff --git a/src/main/java/io/github/aasaru/drools8/ruledata/PassportRuleUnit.java b/src/main/java/io/github/aasaru/droolsoopath/ruledata/PassportRuleUnit.java similarity index 89% rename from src/main/java/io/github/aasaru/drools8/ruledata/PassportRuleUnit.java rename to src/main/java/io/github/aasaru/droolsoopath/ruledata/PassportRuleUnit.java index 8acde96..6a5b052 100644 --- a/src/main/java/io/github/aasaru/drools8/ruledata/PassportRuleUnit.java +++ b/src/main/java/io/github/aasaru/droolsoopath/ruledata/PassportRuleUnit.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.ruledata; +package io.github.aasaru.droolsoopath.ruledata; import io.github.aasaru.drools.domain.Passport; import org.drools.ruleunits.api.DataSource; diff --git a/src/main/java/io/github/aasaru/drools8/ruledata/StepRuleUnitUtil.java b/src/main/java/io/github/aasaru/droolsoopath/ruledata/StepRuleUnitUtil.java similarity index 76% rename from src/main/java/io/github/aasaru/drools8/ruledata/StepRuleUnitUtil.java rename to src/main/java/io/github/aasaru/droolsoopath/ruledata/StepRuleUnitUtil.java index 3a4a4f7..8672471 100644 --- a/src/main/java/io/github/aasaru/drools8/ruledata/StepRuleUnitUtil.java +++ b/src/main/java/io/github/aasaru/droolsoopath/ruledata/StepRuleUnitUtil.java @@ -1,11 +1,11 @@ -package io.github.aasaru.drools8.ruledata; +package io.github.aasaru.droolsoopath.ruledata; import org.drools.ruleunits.api.RuleUnitData; public class StepRuleUnitUtil { public T getRuleUnit(Class clazzIn, int section, int step) { - String stepDataClassTemplate = "io.github.aasaru.drools8.section0%d.step%d." + clazzIn.getSimpleName(); + String stepDataClassTemplate = "io.github.aasaru.droolsoopath.section0%d.step%d." + clazzIn.getSimpleName(); String className = String.format(stepDataClassTemplate, section, step); try { Class clazz = Class.forName(className); diff --git a/src/main/java/io/github/aasaru/drools8/section03/PassportValidationD8.java b/src/main/java/io/github/aasaru/droolsoopath/section03/PassportValidationOO.java similarity index 88% rename from src/main/java/io/github/aasaru/drools8/section03/PassportValidationD8.java rename to src/main/java/io/github/aasaru/droolsoopath/section03/PassportValidationOO.java index ce8964c..bb8a5c8 100644 --- a/src/main/java/io/github/aasaru/drools8/section03/PassportValidationD8.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section03/PassportValidationOO.java @@ -8,19 +8,19 @@ * work. If not, see . */ -package io.github.aasaru.drools8.section03; +package io.github.aasaru.droolsoopath.section03; import io.github.aasaru.drools.Common; import io.github.aasaru.drools.domain.Passport; import io.github.aasaru.drools.repository.ApplicationRepository; -import io.github.aasaru.drools8.ruledata.PassportRuleUnit; -import io.github.aasaru.drools8.ruledata.StepRuleUnitUtil; +import io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit; +import io.github.aasaru.droolsoopath.ruledata.StepRuleUnitUtil; import org.drools.ruleunits.api.RuleUnitInstance; import org.drools.ruleunits.api.RuleUnitProvider; import java.util.List; -public class PassportValidationD8 { +public class PassportValidationOO { public static void main(final String[] args) { execute(Common.promptForStepD8(3, args, 1, 6)); } diff --git a/src/main/java/io/github/aasaru/droolsoopath/section03/step1/PassportRuleUnit.java b/src/main/java/io/github/aasaru/droolsoopath/section03/step1/PassportRuleUnit.java new file mode 100644 index 0000000..6c52a8d --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section03/step1/PassportRuleUnit.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section03.step1; + +import org.drools.ruleunits.api.RuleUnitData; + +public class PassportRuleUnit extends io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit implements RuleUnitData { +} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/droolsoopath/section03/step2/PassportRuleUnit.java b/src/main/java/io/github/aasaru/droolsoopath/section03/step2/PassportRuleUnit.java new file mode 100644 index 0000000..8dcf371 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section03/step2/PassportRuleUnit.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section03.step2; + +import org.drools.ruleunits.api.RuleUnitData; + +public class PassportRuleUnit extends io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit implements RuleUnitData { +} diff --git a/src/main/java/io/github/aasaru/droolsoopath/section03/step3/PassportRuleUnit.java b/src/main/java/io/github/aasaru/droolsoopath/section03/step3/PassportRuleUnit.java new file mode 100644 index 0000000..ce2ba65 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section03/step3/PassportRuleUnit.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section03.step3; + +import org.drools.ruleunits.api.RuleUnitData; + +public class PassportRuleUnit extends io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit implements RuleUnitData { +} diff --git a/src/main/java/io/github/aasaru/droolsoopath/section03/step4/PassportRuleUnit.java b/src/main/java/io/github/aasaru/droolsoopath/section03/step4/PassportRuleUnit.java new file mode 100644 index 0000000..ba8228a --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section03/step4/PassportRuleUnit.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section03.step4; + +import org.drools.ruleunits.api.RuleUnitData; + +public class PassportRuleUnit extends io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit implements RuleUnitData { +} diff --git a/src/main/java/io/github/aasaru/droolsoopath/section03/step5/PassportRuleUnit.java b/src/main/java/io/github/aasaru/droolsoopath/section03/step5/PassportRuleUnit.java new file mode 100644 index 0000000..8a8e831 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section03/step5/PassportRuleUnit.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section03.step5; + +import org.drools.ruleunits.api.RuleUnitData; + +public class PassportRuleUnit extends io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit implements RuleUnitData { +} diff --git a/src/main/java/io/github/aasaru/droolsoopath/section03/step6/PassportRuleUnit.java b/src/main/java/io/github/aasaru/droolsoopath/section03/step6/PassportRuleUnit.java new file mode 100644 index 0000000..b6bec3b --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section03/step6/PassportRuleUnit.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section03.step6; + +import org.drools.ruleunits.api.RuleUnitData; + +public class PassportRuleUnit extends io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit implements RuleUnitData { +} diff --git a/src/main/java/io/github/aasaru/drools8/section04/StatefulPassportValidationD8.java b/src/main/java/io/github/aasaru/droolsoopath/section04/StatefulPassportValidationOO.java similarity index 85% rename from src/main/java/io/github/aasaru/drools8/section04/StatefulPassportValidationD8.java rename to src/main/java/io/github/aasaru/droolsoopath/section04/StatefulPassportValidationOO.java index 507c5e2..06e6d1c 100644 --- a/src/main/java/io/github/aasaru/drools8/section04/StatefulPassportValidationD8.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section04/StatefulPassportValidationOO.java @@ -1,16 +1,16 @@ -package io.github.aasaru.drools8.section04; +package io.github.aasaru.droolsoopath.section04; import io.github.aasaru.drools.Common; import io.github.aasaru.drools.domain.Passport; import io.github.aasaru.drools.repository.ApplicationRepository; -import io.github.aasaru.drools8.ruledata.PassportRuleUnit; -import io.github.aasaru.drools8.ruledata.StepRuleUnitUtil; +import io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit; +import io.github.aasaru.droolsoopath.ruledata.StepRuleUnitUtil; import org.drools.ruleunits.api.RuleUnitInstance; import org.drools.ruleunits.api.RuleUnitProvider; import java.util.List; -public class StatefulPassportValidationD8 { +public class StatefulPassportValidationOO { public static void main(final String[] args) { execute(Common.promptForStepD8(4, args, 1, 2)); diff --git a/src/main/java/io/github/aasaru/droolsoopath/section04/step1/PassportRuleUnit.java b/src/main/java/io/github/aasaru/droolsoopath/section04/step1/PassportRuleUnit.java new file mode 100644 index 0000000..6500c08 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section04/step1/PassportRuleUnit.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section04.step1; + +import org.drools.ruleunits.api.RuleUnitData; + +public class PassportRuleUnit extends io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit implements RuleUnitData { +} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/droolsoopath/section04/step2/PassportRuleUnit.java b/src/main/java/io/github/aasaru/droolsoopath/section04/step2/PassportRuleUnit.java new file mode 100644 index 0000000..2f1ad2b --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section04/step2/PassportRuleUnit.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section04.step2; + +import org.drools.ruleunits.api.RuleUnitData; + +public class PassportRuleUnit extends io.github.aasaru.droolsoopath.ruledata.PassportRuleUnit implements RuleUnitData { +} diff --git a/src/main/java/io/github/aasaru/drools8/section05/RuleUnitSection05.java b/src/main/java/io/github/aasaru/droolsoopath/section05/RuleUnitSection05.java similarity index 93% rename from src/main/java/io/github/aasaru/drools8/section05/RuleUnitSection05.java rename to src/main/java/io/github/aasaru/droolsoopath/section05/RuleUnitSection05.java index 92ab105..2e46075 100644 --- a/src/main/java/io/github/aasaru/drools8/section05/RuleUnitSection05.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section05/RuleUnitSection05.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section05; +package io.github.aasaru.droolsoopath.section05; import io.github.aasaru.drools.domain.Passport; import io.github.aasaru.drools.domain.VisaApplication; diff --git a/src/main/java/io/github/aasaru/drools8/section05/VisaApplicationValidationD8.java b/src/main/java/io/github/aasaru/droolsoopath/section05/VisaApplicationValidationOO.java similarity index 92% rename from src/main/java/io/github/aasaru/drools8/section05/VisaApplicationValidationD8.java rename to src/main/java/io/github/aasaru/droolsoopath/section05/VisaApplicationValidationOO.java index 09bd5c6..e73ef0c 100644 --- a/src/main/java/io/github/aasaru/drools8/section05/VisaApplicationValidationD8.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section05/VisaApplicationValidationOO.java @@ -8,16 +8,16 @@ * work. If not, see . */ -package io.github.aasaru.drools8.section05; +package io.github.aasaru.droolsoopath.section05; import io.github.aasaru.drools.Common; import io.github.aasaru.drools.domain.SessionData; import io.github.aasaru.drools.repository.ApplicationRepository; -import io.github.aasaru.drools8.ruledata.StepRuleUnitUtil; +import io.github.aasaru.droolsoopath.ruledata.StepRuleUnitUtil; import org.drools.ruleunits.api.RuleUnitInstance; import org.drools.ruleunits.api.RuleUnitProvider; -public class VisaApplicationValidationD8 { +public class VisaApplicationValidationOO { public static void main(final String[] args) { execute(Common.promptForStepD8(5, args, 1, 3)); } diff --git a/src/main/java/io/github/aasaru/droolsoopath/section05/step1/RuleUnitSection05.java b/src/main/java/io/github/aasaru/droolsoopath/section05/step1/RuleUnitSection05.java new file mode 100644 index 0000000..25928f5 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section05/step1/RuleUnitSection05.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section05.step1; + +import org.drools.ruleunits.api.RuleUnitData; + +public class RuleUnitSection05 extends io.github.aasaru.droolsoopath.section05.RuleUnitSection05 implements RuleUnitData { +} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/droolsoopath/section05/step2/RuleUnitSection05.java b/src/main/java/io/github/aasaru/droolsoopath/section05/step2/RuleUnitSection05.java new file mode 100644 index 0000000..0fb74bb --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section05/step2/RuleUnitSection05.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section05.step2; + +import org.drools.ruleunits.api.RuleUnitData; + +public class RuleUnitSection05 extends io.github.aasaru.droolsoopath.section05.RuleUnitSection05 implements RuleUnitData { +} diff --git a/src/main/java/io/github/aasaru/droolsoopath/section05/step3/RuleUnitSection05.java b/src/main/java/io/github/aasaru/droolsoopath/section05/step3/RuleUnitSection05.java new file mode 100644 index 0000000..0c9f207 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section05/step3/RuleUnitSection05.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section05.step3; + +import org.drools.ruleunits.api.RuleUnitData; + +public class RuleUnitSection05 extends io.github.aasaru.droolsoopath.section05.RuleUnitSection05 implements RuleUnitData { +} diff --git a/src/main/java/io/github/aasaru/drools8/section06/RuleUnitSection06.java b/src/main/java/io/github/aasaru/droolsoopath/section06/RuleUnitSection06.java similarity index 94% rename from src/main/java/io/github/aasaru/drools8/section06/RuleUnitSection06.java rename to src/main/java/io/github/aasaru/droolsoopath/section06/RuleUnitSection06.java index 04e980e..494d626 100644 --- a/src/main/java/io/github/aasaru/drools8/section06/RuleUnitSection06.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section06/RuleUnitSection06.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section06; +package io.github.aasaru.droolsoopath.section06; import io.github.aasaru.drools.domain.Passport; import io.github.aasaru.drools.domain.Visa; diff --git a/src/main/java/io/github/aasaru/drools8/section06/VisaIssueD8.java b/src/main/java/io/github/aasaru/droolsoopath/section06/VisaIssueOO.java similarity index 94% rename from src/main/java/io/github/aasaru/drools8/section06/VisaIssueD8.java rename to src/main/java/io/github/aasaru/droolsoopath/section06/VisaIssueOO.java index 5524498..4e27304 100644 --- a/src/main/java/io/github/aasaru/drools8/section06/VisaIssueD8.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section06/VisaIssueOO.java @@ -8,14 +8,14 @@ * work. If not, see . */ -package io.github.aasaru.drools8.section06; +package io.github.aasaru.droolsoopath.section06; import io.github.aasaru.drools.Common; import io.github.aasaru.drools.domain.Passport; import io.github.aasaru.drools.domain.Visa; import io.github.aasaru.drools.domain.VisaApplication; import io.github.aasaru.drools.repository.ApplicationRepository; -import io.github.aasaru.drools8.ruledata.StepRuleUnitUtil; +import io.github.aasaru.droolsoopath.ruledata.StepRuleUnitUtil; import org.drools.ruleunits.api.RuleUnitInstance; import org.drools.ruleunits.api.RuleUnitProvider; @@ -23,7 +23,7 @@ import java.util.List; import java.util.stream.Collectors; -public class VisaIssueD8 { +public class VisaIssueOO { public static void main(final String[] args) { execute(Common.promptForStepD8(6, args, 1, 3)); } diff --git a/src/main/java/io/github/aasaru/droolsoopath/section06/step1/RuleUnitSection06.java b/src/main/java/io/github/aasaru/droolsoopath/section06/step1/RuleUnitSection06.java new file mode 100644 index 0000000..d7e9d74 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section06/step1/RuleUnitSection06.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section06.step1; + +import org.drools.ruleunits.api.RuleUnitData; + +public class RuleUnitSection06 extends io.github.aasaru.droolsoopath.section06.RuleUnitSection06 implements RuleUnitData { +} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/droolsoopath/section06/step2/RuleUnitSection06.java b/src/main/java/io/github/aasaru/droolsoopath/section06/step2/RuleUnitSection06.java new file mode 100644 index 0000000..5e36786 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section06/step2/RuleUnitSection06.java @@ -0,0 +1,6 @@ +package io.github.aasaru.droolsoopath.section06.step2; + +import org.drools.ruleunits.api.RuleUnitData; + +public class RuleUnitSection06 extends io.github.aasaru.droolsoopath.section06.RuleUnitSection06 implements RuleUnitData { +} \ No newline at end of file diff --git a/src/main/java/io/github/aasaru/drools8/section07/RuleUnitSection07.java b/src/main/java/io/github/aasaru/droolsoopath/section07/RuleUnitSection07.java similarity index 97% rename from src/main/java/io/github/aasaru/drools8/section07/RuleUnitSection07.java rename to src/main/java/io/github/aasaru/droolsoopath/section07/RuleUnitSection07.java index 06bdb0c..67bd55f 100644 --- a/src/main/java/io/github/aasaru/drools8/section07/RuleUnitSection07.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section07/RuleUnitSection07.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07; +package io.github.aasaru.droolsoopath.section07; import io.github.aasaru.drools.domain.*; import org.drools.ruleunits.api.DataSource; diff --git a/src/main/java/io/github/aasaru/drools8/section07/VisaAddLogicalD8.java b/src/main/java/io/github/aasaru/droolsoopath/section07/VisaAddLogicalOO.java similarity index 95% rename from src/main/java/io/github/aasaru/drools8/section07/VisaAddLogicalD8.java rename to src/main/java/io/github/aasaru/droolsoopath/section07/VisaAddLogicalOO.java index a956ef5..9833429 100644 --- a/src/main/java/io/github/aasaru/drools8/section07/VisaAddLogicalD8.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section07/VisaAddLogicalOO.java @@ -8,15 +8,15 @@ * work. If not, see . */ -package io.github.aasaru.drools8.section07; +package io.github.aasaru.droolsoopath.section07; import io.github.aasaru.drools.Common; import io.github.aasaru.drools.domain.Passport; import io.github.aasaru.drools.domain.SessionData; import io.github.aasaru.drools.domain.VisaApplication; import io.github.aasaru.drools.repository.ApplicationRepository; -import io.github.aasaru.drools8.query.SessionQueryUtil; -import io.github.aasaru.drools8.ruledata.StepRuleUnitUtil; +import io.github.aasaru.droolsoopath.query.SessionQueryUtil; +import io.github.aasaru.droolsoopath.ruledata.StepRuleUnitUtil; import org.drools.ruleunits.api.RuleUnitInstance; import org.drools.ruleunits.api.RuleUnitProvider; import org.drools.ruleunits.api.conf.RuleConfig; @@ -27,7 +27,7 @@ import java.util.List; -public class VisaAddLogicalD8 { +public class VisaAddLogicalOO { public static void main(final String[] args) { execute(Common.promptForStepD8(7, args, 1, 4)); } diff --git a/src/main/java/io/github/aasaru/drools8/section07/step1/RuleUnitSection07.java b/src/main/java/io/github/aasaru/droolsoopath/section07/step1/RuleUnitSection07.java similarity index 60% rename from src/main/java/io/github/aasaru/drools8/section07/step1/RuleUnitSection07.java rename to src/main/java/io/github/aasaru/droolsoopath/section07/step1/RuleUnitSection07.java index 972dfa5..cc7fcb8 100644 --- a/src/main/java/io/github/aasaru/drools8/section07/step1/RuleUnitSection07.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section07/step1/RuleUnitSection07.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step1; +package io.github.aasaru.droolsoopath.section07.step1; import org.drools.ruleunits.api.RuleUnitData; @@ -6,6 +6,6 @@ * This class ensures that we have a separate RuleUnit for each step. */ public class RuleUnitSection07 - extends io.github.aasaru.drools8.section07.RuleUnitSection07 + extends io.github.aasaru.droolsoopath.section07.RuleUnitSection07 implements RuleUnitData { } diff --git a/src/main/java/io/github/aasaru/drools8/section07/step2/RuleUnitSection07.java b/src/main/java/io/github/aasaru/droolsoopath/section07/step2/RuleUnitSection07.java similarity index 60% rename from src/main/java/io/github/aasaru/drools8/section07/step2/RuleUnitSection07.java rename to src/main/java/io/github/aasaru/droolsoopath/section07/step2/RuleUnitSection07.java index ca55008..978c687 100644 --- a/src/main/java/io/github/aasaru/drools8/section07/step2/RuleUnitSection07.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section07/step2/RuleUnitSection07.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step2; +package io.github.aasaru.droolsoopath.section07.step2; import org.drools.ruleunits.api.RuleUnitData; @@ -6,6 +6,6 @@ * This class ensures that we have a separate RuleUnit for each step. */ public class RuleUnitSection07 - extends io.github.aasaru.drools8.section07.RuleUnitSection07 + extends io.github.aasaru.droolsoopath.section07.RuleUnitSection07 implements RuleUnitData { } diff --git a/src/main/java/io/github/aasaru/drools8/section07/step3/RuleUnitSection07.java b/src/main/java/io/github/aasaru/droolsoopath/section07/step3/RuleUnitSection07.java similarity index 60% rename from src/main/java/io/github/aasaru/drools8/section07/step3/RuleUnitSection07.java rename to src/main/java/io/github/aasaru/droolsoopath/section07/step3/RuleUnitSection07.java index d0c8914..358d4c1 100644 --- a/src/main/java/io/github/aasaru/drools8/section07/step3/RuleUnitSection07.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section07/step3/RuleUnitSection07.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step3; +package io.github.aasaru.droolsoopath.section07.step3; import org.drools.ruleunits.api.RuleUnitData; @@ -6,6 +6,6 @@ * This class ensures that we have a separate RuleUnit for each step. */ public class RuleUnitSection07 - extends io.github.aasaru.drools8.section07.RuleUnitSection07 + extends io.github.aasaru.droolsoopath.section07.RuleUnitSection07 implements RuleUnitData { } diff --git a/src/main/java/io/github/aasaru/drools8/section07/step4/RuleUnitSection07.java b/src/main/java/io/github/aasaru/droolsoopath/section07/step4/RuleUnitSection07.java similarity index 60% rename from src/main/java/io/github/aasaru/drools8/section07/step4/RuleUnitSection07.java rename to src/main/java/io/github/aasaru/droolsoopath/section07/step4/RuleUnitSection07.java index dff6371..e51cbb5 100644 --- a/src/main/java/io/github/aasaru/drools8/section07/step4/RuleUnitSection07.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section07/step4/RuleUnitSection07.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step4; +package io.github.aasaru.droolsoopath.section07.step4; import org.drools.ruleunits.api.RuleUnitData; @@ -6,6 +6,6 @@ * This class ensures that we have a separate RuleUnit for each step. */ public class RuleUnitSection07 - extends io.github.aasaru.drools8.section07.RuleUnitSection07 + extends io.github.aasaru.droolsoopath.section07.RuleUnitSection07 implements RuleUnitData { } diff --git a/src/main/java/io/github/aasaru/drools8/section08/FamilyVisaApplicationValidationD8.java b/src/main/java/io/github/aasaru/droolsoopath/section08/FamilyVisaApplicationValidationOO.java similarity index 93% rename from src/main/java/io/github/aasaru/drools8/section08/FamilyVisaApplicationValidationD8.java rename to src/main/java/io/github/aasaru/droolsoopath/section08/FamilyVisaApplicationValidationOO.java index e993836..fc3c4bb 100644 --- a/src/main/java/io/github/aasaru/drools8/section08/FamilyVisaApplicationValidationD8.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section08/FamilyVisaApplicationValidationOO.java @@ -7,21 +7,21 @@ * You should have received a copy of the license along with this * work. If not, see . */ -package io.github.aasaru.drools8.section08; +package io.github.aasaru.droolsoopath.section08; import io.github.aasaru.drools.Common; import io.github.aasaru.drools.domain.FamilyVisaApplication; import io.github.aasaru.drools.domain.Passport; import io.github.aasaru.drools.domain.SessionData; import io.github.aasaru.drools.repository.ApplicationRepository; -import io.github.aasaru.drools8.query.SessionQueryUtil; -import io.github.aasaru.drools8.ruledata.StepRuleUnitUtil; +import io.github.aasaru.droolsoopath.query.SessionQueryUtil; +import io.github.aasaru.droolsoopath.ruledata.StepRuleUnitUtil; import org.drools.ruleunits.api.RuleUnitInstance; import org.drools.ruleunits.api.RuleUnitProvider; import java.util.List; -public class FamilyVisaApplicationValidationD8 { +public class FamilyVisaApplicationValidationOO { public static SessionQueryUtil sessionQueryUtil = new SessionQueryUtil<>(); public static void main(final String[] args) { diff --git a/src/main/java/io/github/aasaru/drools8/section08/RuleUnitSection08.java b/src/main/java/io/github/aasaru/droolsoopath/section08/RuleUnitSection08.java similarity index 96% rename from src/main/java/io/github/aasaru/drools8/section08/RuleUnitSection08.java rename to src/main/java/io/github/aasaru/droolsoopath/section08/RuleUnitSection08.java index 3d5d352..740760e 100644 --- a/src/main/java/io/github/aasaru/drools8/section08/RuleUnitSection08.java +++ b/src/main/java/io/github/aasaru/droolsoopath/section08/RuleUnitSection08.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08; +package io.github.aasaru.droolsoopath.section08; import io.github.aasaru.drools.domain.*; import org.drools.ruleunits.api.DataSource; diff --git a/src/main/java/io/github/aasaru/droolsoopath/section08/step1/RuleUnitSection08.java b/src/main/java/io/github/aasaru/droolsoopath/section08/step1/RuleUnitSection08.java new file mode 100644 index 0000000..19345d3 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section08/step1/RuleUnitSection08.java @@ -0,0 +1,4 @@ +package io.github.aasaru.droolsoopath.section08.step1; + +public class RuleUnitSection08 extends io.github.aasaru.droolsoopath.section08.RuleUnitSection08 { +} diff --git a/src/main/java/io/github/aasaru/droolsoopath/section08/step2/RuleUnitSection08.java b/src/main/java/io/github/aasaru/droolsoopath/section08/step2/RuleUnitSection08.java new file mode 100644 index 0000000..d478485 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section08/step2/RuleUnitSection08.java @@ -0,0 +1,4 @@ +package io.github.aasaru.droolsoopath.section08.step2; + +public class RuleUnitSection08 extends io.github.aasaru.droolsoopath.section08.RuleUnitSection08 { +} diff --git a/src/main/java/io/github/aasaru/droolsoopath/section08/step3/RuleUnitSection08.java b/src/main/java/io/github/aasaru/droolsoopath/section08/step3/RuleUnitSection08.java new file mode 100644 index 0000000..4a549f3 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section08/step3/RuleUnitSection08.java @@ -0,0 +1,4 @@ +package io.github.aasaru.droolsoopath.section08.step3; + +public class RuleUnitSection08 extends io.github.aasaru.droolsoopath.section08.RuleUnitSection08 { +} diff --git a/src/main/java/io/github/aasaru/droolsoopath/section08/step4/RuleUnitSection08.java b/src/main/java/io/github/aasaru/droolsoopath/section08/step4/RuleUnitSection08.java new file mode 100644 index 0000000..ed8045d --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section08/step4/RuleUnitSection08.java @@ -0,0 +1,4 @@ +package io.github.aasaru.droolsoopath.section08.step4; + +public class RuleUnitSection08 extends io.github.aasaru.droolsoopath.section08.RuleUnitSection08 { +} diff --git a/src/main/java/io/github/aasaru/droolsoopath/section08/step5/RuleUnitSection08.java b/src/main/java/io/github/aasaru/droolsoopath/section08/step5/RuleUnitSection08.java new file mode 100644 index 0000000..5805af7 --- /dev/null +++ b/src/main/java/io/github/aasaru/droolsoopath/section08/step5/RuleUnitSection08.java @@ -0,0 +1,4 @@ +package io.github.aasaru.droolsoopath.section08.step5; + +public class RuleUnitSection08 extends io.github.aasaru.droolsoopath.section08.RuleUnitSection08 { +} diff --git a/src/main/resources/io/github/aasaru/drools/section08/step2/FamilyVisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/drools/section08/step2/FamilyVisaApplicationValidation.drl index 65dfb5b..2a3fa35 100644 --- a/src/main/resources/io/github/aasaru/drools/section08/step2/FamilyVisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/drools/section08/step2/FamilyVisaApplicationValidation.drl @@ -9,7 +9,7 @@ rule "Invalidate visa applications with invalid passport" dialect "java" when $familyVisaApplication: FamilyVisaApplication( ) - exists InvalidPassport( $familyVisaApplication.passportNumbers.contains(this.passport.passportNumber) ) + exists InvalidPassport( $familyVisaApplication.passportNumbers contains this.passport.passportNumber ) then System.out.println( "Set " + $familyVisaApplication + " invalid as it contains invalid passport"); insert( new InvalidFamilyVisaApplication($familyVisaApplication) ); diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step5/queries.drl b/src/main/resources/io/github/aasaru/drools8/section08/step5/queries.drl deleted file mode 100644 index 2b2b57d..0000000 --- a/src/main/resources/io/github/aasaru/drools8/section08/step5/queries.drl +++ /dev/null @@ -1,19 +0,0 @@ -package io.github.aasaru.drools8.section08.step5 - -unit RuleUnitSection08; - -query GetAllVisas - $allVisas: /visas -end - -query GetAllInvalidPassports - $allInvalidPassports: /invalidPassports -end - -query GetAllInvalidFamilyVisaApplications - $allInvalidFamilyVisaApplications: /invalidFamilyVisaApplications -end - -query GetAllGroupLeaders - $allGroupLeaders: /groupLeaders -end diff --git a/src/main/resources/io/github/aasaru/drools8/section03/step1/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section03/step1/PassportValidation.drl similarity index 88% rename from src/main/resources/io/github/aasaru/drools8/section03/step1/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section03/step1/PassportValidation.drl index 9df89a3..7936d34 100644 --- a/src/main/resources/io/github/aasaru/drools8/section03/step1/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section03/step1/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section03.step1 +package io.github.aasaru.droolsoopath.section03.step1 unit PassportRuleUnit; diff --git a/src/main/resources/io/github/aasaru/drools8/section03/step2/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section03/step2/PassportValidation.drl similarity index 90% rename from src/main/resources/io/github/aasaru/drools8/section03/step2/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section03/step2/PassportValidation.drl index afa556d..a42fcc3 100644 --- a/src/main/resources/io/github/aasaru/drools8/section03/step2/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section03/step2/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section03.step2 +package io.github.aasaru.droolsoopath.section03.step2 unit PassportRuleUnit; diff --git a/src/main/resources/io/github/aasaru/drools8/section03/step3/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section03/step3/PassportValidation.drl similarity index 91% rename from src/main/resources/io/github/aasaru/drools8/section03/step3/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section03/step3/PassportValidation.drl index c6f4172..30efb9f 100644 --- a/src/main/resources/io/github/aasaru/drools8/section03/step3/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section03/step3/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section03.step3 +package io.github.aasaru.droolsoopath.section03.step3 unit PassportRuleUnit; diff --git a/src/main/resources/io/github/aasaru/drools8/section03/step4/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section03/step4/PassportValidation.drl similarity index 93% rename from src/main/resources/io/github/aasaru/drools8/section03/step4/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section03/step4/PassportValidation.drl index 90d1224..f39a55b 100644 --- a/src/main/resources/io/github/aasaru/drools8/section03/step4/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section03/step4/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section03.step4 +package io.github.aasaru.droolsoopath.section03.step4 unit PassportRuleUnit; diff --git a/src/main/resources/io/github/aasaru/drools8/section03/step5/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section03/step5/PassportValidation.drl similarity index 93% rename from src/main/resources/io/github/aasaru/drools8/section03/step5/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section03/step5/PassportValidation.drl index 0f039c8..c746a11 100644 --- a/src/main/resources/io/github/aasaru/drools8/section03/step5/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section03/step5/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section03.step5 +package io.github.aasaru.droolsoopath.section03.step5 unit PassportRuleUnit; diff --git a/src/main/resources/io/github/aasaru/drools8/section03/step6/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section03/step6/PassportValidation.drl similarity index 93% rename from src/main/resources/io/github/aasaru/drools8/section03/step6/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section03/step6/PassportValidation.drl index bf86996..ede4d00 100644 --- a/src/main/resources/io/github/aasaru/drools8/section03/step6/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section03/step6/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section03.step6 +package io.github.aasaru.droolsoopath.section03.step6 unit PassportRuleUnit; diff --git a/src/main/resources/io/github/aasaru/drools8/section04/step1/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section04/step1/PassportValidation.drl similarity index 93% rename from src/main/resources/io/github/aasaru/drools8/section04/step1/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section04/step1/PassportValidation.drl index 79a8e0e..0084a5f 100644 --- a/src/main/resources/io/github/aasaru/drools8/section04/step1/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section04/step1/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section04.step1 +package io.github.aasaru.droolsoopath.section04.step1 unit PassportRuleUnit; diff --git a/src/main/resources/io/github/aasaru/drools8/section04/step2/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section04/step2/PassportValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section04/step2/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section04/step2/PassportValidation.drl index 0f2cb3c..aaa151c 100644 --- a/src/main/resources/io/github/aasaru/drools8/section04/step2/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section04/step2/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section04.step2 +package io.github.aasaru.droolsoopath.section04.step2 unit PassportRuleUnit; diff --git a/src/main/resources/io/github/aasaru/drools8/section05/step1/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section05/step1/PassportValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section05/step1/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section05/step1/PassportValidation.drl index 72fabba..57575f6 100644 --- a/src/main/resources/io/github/aasaru/drools8/section05/step1/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section05/step1/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section05.step1 +package io.github.aasaru.droolsoopath.section05.step1 unit RuleUnitSection05; diff --git a/src/main/resources/io/github/aasaru/drools8/section05/step1/VisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section05/step1/VisaApplicationValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section05/step1/VisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section05/step1/VisaApplicationValidation.drl index bd752cb..b14a67c 100644 --- a/src/main/resources/io/github/aasaru/drools8/section05/step1/VisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section05/step1/VisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section05.step1 +package io.github.aasaru.droolsoopath.section05.step1 unit RuleUnitSection05; diff --git a/src/main/resources/io/github/aasaru/drools8/section05/step2/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section05/step2/PassportValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section05/step2/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section05/step2/PassportValidation.drl index e3bec5d..5a72c31 100644 --- a/src/main/resources/io/github/aasaru/drools8/section05/step2/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section05/step2/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section05.step2 +package io.github.aasaru.droolsoopath.section05.step2 unit RuleUnitSection05; diff --git a/src/main/resources/io/github/aasaru/drools8/section05/step2/VisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section05/step2/VisaApplicationValidation.drl similarity index 96% rename from src/main/resources/io/github/aasaru/drools8/section05/step2/VisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section05/step2/VisaApplicationValidation.drl index 4d49386..d45b5e1 100644 --- a/src/main/resources/io/github/aasaru/drools8/section05/step2/VisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section05/step2/VisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section05.step2 +package io.github.aasaru.droolsoopath.section05.step2 unit RuleUnitSection05; diff --git a/src/main/resources/io/github/aasaru/drools8/section05/step3/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section05/step3/PassportValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section05/step3/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section05/step3/PassportValidation.drl index 9069e29..84f4277 100644 --- a/src/main/resources/io/github/aasaru/drools8/section05/step3/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section05/step3/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section05.step3 +package io.github.aasaru.droolsoopath.section05.step3 unit RuleUnitSection05; diff --git a/src/main/resources/io/github/aasaru/drools8/section05/step3/VisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section05/step3/VisaApplicationValidation.drl similarity index 96% rename from src/main/resources/io/github/aasaru/drools8/section05/step3/VisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section05/step3/VisaApplicationValidation.drl index 554c39e..41d918f 100644 --- a/src/main/resources/io/github/aasaru/drools8/section05/step3/VisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section05/step3/VisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section05.step3 +package io.github.aasaru.droolsoopath.section05.step3 unit RuleUnitSection05; diff --git a/src/main/resources/io/github/aasaru/drools8/section06/step1/IssueVisa.drl b/src/main/resources/io/github/aasaru/droolsoopath/section06/step1/IssueVisa.drl similarity index 88% rename from src/main/resources/io/github/aasaru/drools8/section06/step1/IssueVisa.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section06/step1/IssueVisa.drl index 3b84019..825b1d9 100644 --- a/src/main/resources/io/github/aasaru/drools8/section06/step1/IssueVisa.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section06/step1/IssueVisa.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section06.step1 +package io.github.aasaru.droolsoopath.section06.step1 unit RuleUnitSection06; diff --git a/src/main/resources/io/github/aasaru/drools8/section06/step1/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section06/step1/PassportValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section06/step1/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section06/step1/PassportValidation.drl index bc2dbb8..a7ca74f 100644 --- a/src/main/resources/io/github/aasaru/drools8/section06/step1/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section06/step1/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section06.step1 +package io.github.aasaru.droolsoopath.section06.step1 unit RuleUnitSection06; diff --git a/src/main/resources/io/github/aasaru/drools8/section06/step1/VisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section06/step1/VisaApplicationValidation.drl similarity index 96% rename from src/main/resources/io/github/aasaru/drools8/section06/step1/VisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section06/step1/VisaApplicationValidation.drl index 8b0cfca..4d6cbeb 100644 --- a/src/main/resources/io/github/aasaru/drools8/section06/step1/VisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section06/step1/VisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section06.step1 +package io.github.aasaru.droolsoopath.section06.step1 unit RuleUnitSection06; diff --git a/src/main/resources/io/github/aasaru/drools8/section06/step1/VisaQuery.drl b/src/main/resources/io/github/aasaru/droolsoopath/section06/step1/VisaQuery.drl similarity index 55% rename from src/main/resources/io/github/aasaru/drools8/section06/step1/VisaQuery.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section06/step1/VisaQuery.drl index 12b622e..3987e04 100644 --- a/src/main/resources/io/github/aasaru/drools8/section06/step1/VisaQuery.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section06/step1/VisaQuery.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section06.step1 +package io.github.aasaru.droolsoopath.section06.step1 unit RuleUnitSection06; diff --git a/src/main/resources/io/github/aasaru/drools8/section06/step2/IssueVisaWithSalience.drl b/src/main/resources/io/github/aasaru/droolsoopath/section06/step2/IssueVisaWithSalience.drl similarity index 88% rename from src/main/resources/io/github/aasaru/drools8/section06/step2/IssueVisaWithSalience.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section06/step2/IssueVisaWithSalience.drl index 9c7dd55..80fb008 100644 --- a/src/main/resources/io/github/aasaru/drools8/section06/step2/IssueVisaWithSalience.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section06/step2/IssueVisaWithSalience.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section06.step2 +package io.github.aasaru.droolsoopath.section06.step2 unit RuleUnitSection06; diff --git a/src/main/resources/io/github/aasaru/drools8/section06/step2/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section06/step2/PassportValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section06/step2/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section06/step2/PassportValidation.drl index fcc51bf..adea5b4 100644 --- a/src/main/resources/io/github/aasaru/drools8/section06/step2/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section06/step2/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section06.step2 +package io.github.aasaru.droolsoopath.section06.step2 unit RuleUnitSection06; diff --git a/src/main/resources/io/github/aasaru/drools8/section06/step2/VisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section06/step2/VisaApplicationValidation.drl similarity index 96% rename from src/main/resources/io/github/aasaru/drools8/section06/step2/VisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section06/step2/VisaApplicationValidation.drl index c2c4b29..c0833a2 100644 --- a/src/main/resources/io/github/aasaru/drools8/section06/step2/VisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section06/step2/VisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section06.step2 +package io.github.aasaru.droolsoopath.section06.step2 unit RuleUnitSection06; diff --git a/src/main/resources/io/github/aasaru/drools8/section06/step2/VisaQuery.drl b/src/main/resources/io/github/aasaru/droolsoopath/section06/step2/VisaQuery.drl similarity index 55% rename from src/main/resources/io/github/aasaru/drools8/section06/step2/VisaQuery.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section06/step2/VisaQuery.drl index a20077f..d667ef5 100644 --- a/src/main/resources/io/github/aasaru/drools8/section06/step2/VisaQuery.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section06/step2/VisaQuery.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section06.step2 +package io.github.aasaru.droolsoopath.section06.step2 unit RuleUnitSection06; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step1/IssueVisaAddLogical.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step1/IssueVisaAddLogical.drl similarity index 88% rename from src/main/resources/io/github/aasaru/drools8/section07/step1/IssueVisaAddLogical.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step1/IssueVisaAddLogical.drl index 9d76225..49126f0 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step1/IssueVisaAddLogical.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step1/IssueVisaAddLogical.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step1 +package io.github.aasaru.droolsoopath.section07.step1 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step1/VisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step1/VisaApplicationValidation.drl similarity index 96% rename from src/main/resources/io/github/aasaru/drools8/section07/step1/VisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step1/VisaApplicationValidation.drl index 03d79a7..981837a 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step1/VisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step1/VisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step1 +package io.github.aasaru.droolsoopath.section07.step1 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step1/XPassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step1/XPassportValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section07/step1/XPassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step1/XPassportValidation.drl index 0cf1bfb..b850729 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step1/XPassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step1/XPassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step1 +package io.github.aasaru.droolsoopath.section07.step1 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step1/queries.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step1/queries.drl similarity index 55% rename from src/main/resources/io/github/aasaru/drools8/section07/step1/queries.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step1/queries.drl index 3109d25..32544ba 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step1/queries.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step1/queries.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step1 +package io.github.aasaru.droolsoopath.section07.step1 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step2/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step2/PassportValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section07/step2/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step2/PassportValidation.drl index 06fcc16..0c87bfa 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step2/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step2/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step2 +package io.github.aasaru.droolsoopath.section07.step2 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step2/queries.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step2/queries.drl similarity index 76% rename from src/main/resources/io/github/aasaru/drools8/section07/step2/queries.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step2/queries.drl index 0d635b1..405e694 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step2/queries.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step2/queries.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step2 +package io.github.aasaru.droolsoopath.section07.step2 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step3/IssueVisaInsertLogical.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step3/IssueVisaInsertLogical.drl similarity index 88% rename from src/main/resources/io/github/aasaru/drools8/section07/step3/IssueVisaInsertLogical.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step3/IssueVisaInsertLogical.drl index 4b54ede..f61daf9 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step3/IssueVisaInsertLogical.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step3/IssueVisaInsertLogical.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step3 +package io.github.aasaru.droolsoopath.section07.step3 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step3/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step3/PassportValidation.drl similarity index 94% rename from src/main/resources/io/github/aasaru/drools8/section07/step3/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step3/PassportValidation.drl index 98a02f8..c309ead 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step3/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step3/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step3 +package io.github.aasaru.droolsoopath.section07.step3 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step3/VisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step3/VisaApplicationValidation.drl similarity index 97% rename from src/main/resources/io/github/aasaru/drools8/section07/step3/VisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step3/VisaApplicationValidation.drl index ecfb4cd..c33e85e 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step3/VisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step3/VisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step3 +package io.github.aasaru.droolsoopath.section07.step3 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step4/queries.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step3/queries.drl similarity index 88% rename from src/main/resources/io/github/aasaru/drools8/section07/step4/queries.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step3/queries.drl index 425e5d4..68d97d6 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step4/queries.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step3/queries.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step4 +package io.github.aasaru.droolsoopath.section07.step3 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step4/IssueVisaAddLogical.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step4/IssueVisaAddLogical.drl similarity index 90% rename from src/main/resources/io/github/aasaru/drools8/section07/step4/IssueVisaAddLogical.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step4/IssueVisaAddLogical.drl index b1549fb..4fba152 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step4/IssueVisaAddLogical.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step4/IssueVisaAddLogical.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step4 +package io.github.aasaru.droolsoopath.section07.step4 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step4/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step4/PassportValidation.drl similarity index 91% rename from src/main/resources/io/github/aasaru/drools8/section07/step4/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step4/PassportValidation.drl index a868e57..22366fa 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step4/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step4/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step4 +package io.github.aasaru.droolsoopath.section07.step4 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step4/VisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step4/VisaApplicationValidation.drl similarity index 91% rename from src/main/resources/io/github/aasaru/drools8/section07/step4/VisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step4/VisaApplicationValidation.drl index a30c1f2..c1eacf5 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step4/VisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step4/VisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step4 +package io.github.aasaru.droolsoopath.section07.step4 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section07/step3/queries.drl b/src/main/resources/io/github/aasaru/droolsoopath/section07/step4/queries.drl similarity index 88% rename from src/main/resources/io/github/aasaru/drools8/section07/step3/queries.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section07/step4/queries.drl index db11243..5278bbf 100644 --- a/src/main/resources/io/github/aasaru/drools8/section07/step3/queries.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section07/step4/queries.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section07.step3 +package io.github.aasaru.droolsoopath.section07.step4 unit RuleUnitSection07; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step1/FamilyVisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step1/FamilyVisaApplicationValidation.drl similarity index 90% rename from src/main/resources/io/github/aasaru/drools8/section08/step1/FamilyVisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step1/FamilyVisaApplicationValidation.drl index 5976efa..3c8ed41 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step1/FamilyVisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step1/FamilyVisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step1 +package io.github.aasaru.droolsoopath.section08.step1 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step1/IssueVisaAddLogical.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step1/IssueVisaAddLogical.drl similarity index 90% rename from src/main/resources/io/github/aasaru/drools8/section08/step1/IssueVisaAddLogical.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step1/IssueVisaAddLogical.drl index 0948fe2..0841752 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step1/IssueVisaAddLogical.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step1/IssueVisaAddLogical.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step1 +package io.github.aasaru.droolsoopath.section08.step1 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step1/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step1/PassportValidation.drl similarity index 91% rename from src/main/resources/io/github/aasaru/drools8/section08/step1/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step1/PassportValidation.drl index 6afc617..58ce25f 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step1/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step1/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step1 +package io.github.aasaru.droolsoopath.section08.step1 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step2/queries.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step1/queries.drl similarity index 85% rename from src/main/resources/io/github/aasaru/drools8/section08/step2/queries.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step1/queries.drl index 23b3bc5..6ecffb4 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step2/queries.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step1/queries.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step2 +package io.github.aasaru.droolsoopath.section08.step1 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step2/FamilyVisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step2/FamilyVisaApplicationValidation.drl similarity index 79% rename from src/main/resources/io/github/aasaru/drools8/section08/step2/FamilyVisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step2/FamilyVisaApplicationValidation.drl index db0cd06..93f73cd 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step2/FamilyVisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step2/FamilyVisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step2 +package io.github.aasaru.droolsoopath.section08.step2 unit RuleUnitSection08; @@ -8,8 +8,7 @@ rule "Invalidate visa applications with invalid passport" dialect "java" when $familyVisaApplication: /familyVisaApplications - // TODO could we refactor contains? - exists /invalidPassports[ $familyVisaApplication.passportNumbers.contains(this.passport.passportNumber) ] + exists /invalidPassports[ $familyVisaApplication.passportNumbers contains this.passport.passportNumber ] then System.out.println( "Set " + $familyVisaApplication + " invalid as it contains invalid passport"); invalidFamilyVisaApplications.add( new InvalidFamilyVisaApplication($familyVisaApplication) ); diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step3/IssueVisaAddLogical.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step2/IssueVisaAddLogical.drl similarity index 90% rename from src/main/resources/io/github/aasaru/drools8/section08/step3/IssueVisaAddLogical.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step2/IssueVisaAddLogical.drl index 419df01..7875880 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step3/IssueVisaAddLogical.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step2/IssueVisaAddLogical.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step3 +package io.github.aasaru.droolsoopath.section08.step2 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step5/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step2/PassportValidation.drl similarity index 91% rename from src/main/resources/io/github/aasaru/drools8/section08/step5/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step2/PassportValidation.drl index 61d2728..433d5f6 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step5/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step2/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step5 +package io.github.aasaru.droolsoopath.section08.step2 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step3/queries.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step2/queries.drl similarity index 85% rename from src/main/resources/io/github/aasaru/drools8/section08/step3/queries.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step2/queries.drl index 1ef7049..77eb087 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step3/queries.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step2/queries.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step3 +package io.github.aasaru.droolsoopath.section08.step2 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step3/FamilyVisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step3/FamilyVisaApplicationValidation.drl similarity index 95% rename from src/main/resources/io/github/aasaru/drools8/section08/step3/FamilyVisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step3/FamilyVisaApplicationValidation.drl index e56b0e2..040a39a 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step3/FamilyVisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step3/FamilyVisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step3 +package io.github.aasaru.droolsoopath.section08.step3 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step4/IssueVisaAddLogical.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step3/IssueVisaAddLogical.drl similarity index 90% rename from src/main/resources/io/github/aasaru/drools8/section08/step4/IssueVisaAddLogical.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step3/IssueVisaAddLogical.drl index b1db734..4f3b6b6 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step4/IssueVisaAddLogical.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step3/IssueVisaAddLogical.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step4 +package io.github.aasaru.droolsoopath.section08.step3 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step3/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step3/PassportValidation.drl similarity index 91% rename from src/main/resources/io/github/aasaru/drools8/section08/step3/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step3/PassportValidation.drl index 41107aa..2e05855 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step3/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step3/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step3 +package io.github.aasaru.droolsoopath.section08.step3 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step4/queries.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step3/queries.drl similarity index 85% rename from src/main/resources/io/github/aasaru/drools8/section08/step4/queries.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step3/queries.drl index 52c124f..963706e 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step4/queries.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step3/queries.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step4 +package io.github.aasaru.droolsoopath.section08.step3 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step4/FamilyVisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step4/FamilyVisaApplicationValidation.drl similarity index 97% rename from src/main/resources/io/github/aasaru/drools8/section08/step4/FamilyVisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step4/FamilyVisaApplicationValidation.drl index 17fd849..d21af82 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step4/FamilyVisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step4/FamilyVisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step4 +package io.github.aasaru.droolsoopath.section08.step4 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step2/IssueVisaAddLogical.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step4/IssueVisaAddLogical.drl similarity index 90% rename from src/main/resources/io/github/aasaru/drools8/section08/step2/IssueVisaAddLogical.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step4/IssueVisaAddLogical.drl index 9e68d22..4e9c3bb 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step2/IssueVisaAddLogical.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step4/IssueVisaAddLogical.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step2 +package io.github.aasaru.droolsoopath.section08.step4 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step2/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step4/PassportValidation.drl similarity index 91% rename from src/main/resources/io/github/aasaru/drools8/section08/step2/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step4/PassportValidation.drl index 276b818..5402e5e 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step2/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step4/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step2 +package io.github.aasaru.droolsoopath.section08.step4 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step1/queries.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step4/queries.drl similarity index 85% rename from src/main/resources/io/github/aasaru/drools8/section08/step1/queries.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step4/queries.drl index 75833e0..f087e49 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step1/queries.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step4/queries.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step1 +package io.github.aasaru.droolsoopath.section08.step4 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step5/FamilyVisaApplicationValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/FamilyVisaApplicationValidation.drl similarity index 97% rename from src/main/resources/io/github/aasaru/drools8/section08/step5/FamilyVisaApplicationValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step5/FamilyVisaApplicationValidation.drl index 6e189b4..8a379f2 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step5/FamilyVisaApplicationValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/FamilyVisaApplicationValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step5 +package io.github.aasaru.droolsoopath.section08.step5 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step5/IssueVisaAddLogical.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/IssueVisaAddLogical.drl similarity index 90% rename from src/main/resources/io/github/aasaru/drools8/section08/step5/IssueVisaAddLogical.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step5/IssueVisaAddLogical.drl index 87ded52..117a521 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step5/IssueVisaAddLogical.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/IssueVisaAddLogical.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step5 +package io.github.aasaru.droolsoopath.section08.step5 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step4/PassportValidation.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/PassportValidation.drl similarity index 91% rename from src/main/resources/io/github/aasaru/drools8/section08/step4/PassportValidation.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step5/PassportValidation.drl index 3db95b6..8a97c35 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step4/PassportValidation.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/PassportValidation.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step4 +package io.github.aasaru.droolsoopath.section08.step5 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/drools8/section08/step5/Statistics.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/Statistics.drl similarity index 79% rename from src/main/resources/io/github/aasaru/drools8/section08/step5/Statistics.drl rename to src/main/resources/io/github/aasaru/droolsoopath/section08/step5/Statistics.drl index f2b4a94..8f545dd 100644 --- a/src/main/resources/io/github/aasaru/drools8/section08/step5/Statistics.drl +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/Statistics.drl @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section08.step5 +package io.github.aasaru.droolsoopath.section08.step5 unit RuleUnitSection08; diff --git a/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/queries.drl b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/queries.drl new file mode 100644 index 0000000..2557cff --- /dev/null +++ b/src/main/resources/io/github/aasaru/droolsoopath/section08/step5/queries.drl @@ -0,0 +1,19 @@ +package io.github.aasaru.droolsoopath.section08.step5 + +unit RuleUnitSection08; + +query GetAllVisas + $allVisas: /visas +end + +query GetAllInvalidPassports + $allInvalidPassports: /invalidPassports +end + +query GetAllInvalidFamilyVisaApplications + $allInvalidFamilyVisaApplications: /invalidFamilyVisaApplications +end + +query GetAllGroupLeaders + $allGroupLeaders: /groupLeaders +end diff --git a/src/test/java/io/github/aasaru/drools8/section03/PassportValidationD8Test.java b/src/test/java/io/github/aasaru/droolsoopath/section03/PassportValidationOOTest.java similarity index 94% rename from src/test/java/io/github/aasaru/drools8/section03/PassportValidationD8Test.java rename to src/test/java/io/github/aasaru/droolsoopath/section03/PassportValidationOOTest.java index 9abc881..6d333ab 100644 --- a/src/test/java/io/github/aasaru/drools8/section03/PassportValidationD8Test.java +++ b/src/test/java/io/github/aasaru/droolsoopath/section03/PassportValidationOOTest.java @@ -1,4 +1,4 @@ -package io.github.aasaru.drools8.section03; +package io.github.aasaru.droolsoopath.section03; import org.junit.jupiter.api.Test; @@ -6,12 +6,12 @@ import static io.github.aasaru.drools.SystemOutTestUtil.getLinesWrittenToSystemOut; import static org.assertj.core.api.Assertions.assertThat; -public class PassportValidationD8Test { +public class PassportValidationOOTest { @Test void testStep1() { recordLinesWrittenToSystemOut(); - PassportValidationD8.execute(1); + PassportValidationOO.execute(1); assertThat(getLinesWrittenToSystemOut()).containsExactlyInAnyOrder( "Running step 1", @@ -26,7 +26,7 @@ void testStep1() { @Test void testStep2_executableModel_sameOutput() { recordLinesWrittenToSystemOut(); - PassportValidationD8.execute(2); + PassportValidationOO.execute(2); assertThat(getLinesWrittenToSystemOut()).containsExactlyInAnyOrder( "Running step 2", @@ -41,7 +41,7 @@ void testStep2_executableModel_sameOutput() { @Test void testStep3_recordSystemOut_correctOutput() { recordLinesWrittenToSystemOut(); - PassportValidationD8.execute(3); + PassportValidationOO.execute(3); assertThat(getLinesWrittenToSystemOut()).containsExactlyInAnyOrder( "Running step 3", @@ -56,7 +56,7 @@ void testStep3_recordSystemOut_correctOutput() { @Test void testStep4_recordSystemOut_correctOutput() { recordLinesWrittenToSystemOut(); - PassportValidationD8.execute(4); + PassportValidationOO.execute(4); assertThat(getLinesWrittenToSystemOut()).containsExactlyInAnyOrder( "Running step 4", @@ -77,7 +77,7 @@ void testStep4_recordSystemOut_correctOutput() { @Test void testStep5_recordSystemOut_correctOutput() { recordLinesWrittenToSystemOut(); - PassportValidationD8.execute(5); + PassportValidationOO.execute(5); assertThat(getLinesWrittenToSystemOut()).containsExactlyInAnyOrder( "Running step 5", @@ -100,7 +100,7 @@ void testStep5_recordSystemOut_correctOutput() { @Test void testStep6_recordSystemOut_correctOutput() { recordLinesWrittenToSystemOut(); - PassportValidationD8.execute(6); + PassportValidationOO.execute(6); assertThat(getLinesWrittenToSystemOut()).containsExactlyInAnyOrder( "Running step 6", diff --git a/src/test/java/io/github/aasaru/drools8/section04/StatefulPassportValidationD8Test.java b/src/test/java/io/github/aasaru/droolsoopath/section04/StatefulPassportValidationOOTest.java similarity index 91% rename from src/test/java/io/github/aasaru/drools8/section04/StatefulPassportValidationD8Test.java rename to src/test/java/io/github/aasaru/droolsoopath/section04/StatefulPassportValidationOOTest.java index c93fce9..ee5605c 100644 --- a/src/test/java/io/github/aasaru/drools8/section04/StatefulPassportValidationD8Test.java +++ b/src/test/java/io/github/aasaru/droolsoopath/section04/StatefulPassportValidationOOTest.java @@ -8,21 +8,20 @@ * work. If not, see . */ -package io.github.aasaru.drools8.section04; +package io.github.aasaru.droolsoopath.section04; -import io.github.aasaru.drools.section04.StatefulPassportValidation; import org.junit.jupiter.api.Test; import static io.github.aasaru.drools.SystemOutTestUtil.getLinesWrittenToSystemOut; import static io.github.aasaru.drools.SystemOutTestUtil.recordLinesWrittenToSystemOut; import static org.assertj.core.api.Assertions.assertThat; -class StatefulPassportValidationD8Test { +class StatefulPassportValidationOOTest { @Test void testStep1_recordSystemOut_correctOutput() { recordLinesWrittenToSystemOut(); - StatefulPassportValidationD8.execute(1); + StatefulPassportValidationOO.execute(1); assertThat(getLinesWrittenToSystemOut()).containsExactlyInAnyOrder( "Running step 1", @@ -42,7 +41,7 @@ void testStep1_recordSystemOut_correctOutput() { @Test void testStep2_recordSystemOut_correctOutput() { recordLinesWrittenToSystemOut(); - StatefulPassportValidationD8.execute(2); + StatefulPassportValidationOO.execute(2); assertThat(getLinesWrittenToSystemOut()).containsExactlyInAnyOrder( "Running step 2", diff --git a/src/test/java/io/github/aasaru/drools8/section05/VisaApplicationValidationD8Test.java b/src/test/java/io/github/aasaru/droolsoopath/section05/VisaApplicationValidationOOTest.java similarity index 94% rename from src/test/java/io/github/aasaru/drools8/section05/VisaApplicationValidationD8Test.java rename to src/test/java/io/github/aasaru/droolsoopath/section05/VisaApplicationValidationOOTest.java index 78f8e49..077b881 100644 --- a/src/test/java/io/github/aasaru/drools8/section05/VisaApplicationValidationD8Test.java +++ b/src/test/java/io/github/aasaru/droolsoopath/section05/VisaApplicationValidationOOTest.java @@ -8,7 +8,7 @@ * work. If not, see . */ -package io.github.aasaru.drools8.section05; +package io.github.aasaru.droolsoopath.section05; import io.github.aasaru.drools.TestUtil; import io.github.aasaru.drools.domain.Passport; @@ -18,7 +18,6 @@ import org.junit.jupiter.api.Test; import java.util.Collection; -import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; @@ -27,7 +26,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; -class VisaApplicationValidationD8Test { +class VisaApplicationValidationOOTest { @Test void testStep1() { @@ -36,7 +35,7 @@ void testStep1() { String kieSessionName = "VisaApplicationStep" + step; TestUtil.disposeKieSessionIfExists(kieSessionName); - SessionData sessionData = VisaApplicationValidationD8.execute(step); + SessionData sessionData = VisaApplicationValidationOO.execute(step); Collection visaApplicationsInSession = sessionData.visaApplications; @@ -65,7 +64,7 @@ void testStep2() { String kieSessionName = "VisaApplicationStep" + step; TestUtil.disposeKieSessionIfExists(kieSessionName); - SessionData sessionData = VisaApplicationValidationD8.execute(step); + SessionData sessionData = VisaApplicationValidationOO.execute(step); Collection visaApplicationsInSession = sessionData.visaApplications; @@ -94,7 +93,7 @@ void testStep3() { String kieSessionName = "VisaApplicationStep" + step; TestUtil.disposeKieSessionIfExists(kieSessionName); - SessionData sessionData = VisaApplicationValidationD8.execute(step); + SessionData sessionData = VisaApplicationValidationOO.execute(step); Collection visaApplicationsInSession = sessionData.visaApplications; diff --git a/src/test/java/io/github/aasaru/drools8/section06/VisaIssueD8Test.java b/src/test/java/io/github/aasaru/droolsoopath/section06/VisaIssueOOTest.java similarity index 86% rename from src/test/java/io/github/aasaru/drools8/section06/VisaIssueD8Test.java rename to src/test/java/io/github/aasaru/droolsoopath/section06/VisaIssueOOTest.java index 5d0b9ef..c301820 100644 --- a/src/test/java/io/github/aasaru/drools8/section06/VisaIssueD8Test.java +++ b/src/test/java/io/github/aasaru/droolsoopath/section06/VisaIssueOOTest.java @@ -8,7 +8,7 @@ * work. If not, see . */ -package io.github.aasaru.drools8.section06; +package io.github.aasaru.droolsoopath.section06; import io.github.aasaru.drools.TestUtil; import io.github.aasaru.drools.domain.Visa; @@ -17,7 +17,7 @@ import java.util.Collection; -class VisaIssueD8Test { +class VisaIssueOOTest { @Test void testStep1_ruleExecutionOrderAffectsResult_oneOrTwoOrFourVisasAreIssued() { @@ -26,7 +26,7 @@ void testStep1_ruleExecutionOrderAffectsResult_oneOrTwoOrFourVisasAreIssued() { String kieSessionName = "VisaIssueStep" + step; TestUtil.disposeKieSessionIfExists(kieSessionName); - Collection visasInSession = VisaIssueD8.execute(step); + Collection visasInSession = VisaIssueOO.execute(step); Assertions.assertThat(visasInSession).hasSizeBetween(1, 4); Assertions.assertThat(visasInSession) @@ -38,7 +38,7 @@ void testStep1_ruleExecutionOrderAffectsResult_oneOrTwoOrFourVisasAreIssued() { void testStep2_exactlyOneVisaIsIssued() { int step = 2; - Collection visasInSession = VisaIssueD8.execute(step); + Collection visasInSession = VisaIssueOO.execute(step); Assertions.assertThat(visasInSession).hasSize(1); Assertions.assertThat(visasInSession) diff --git a/src/test/java/io/github/aasaru/drools8/section07/VisaAddLogicalD8Test.java b/src/test/java/io/github/aasaru/droolsoopath/section07/VisaAddLogicalOOTest.java similarity index 88% rename from src/test/java/io/github/aasaru/drools8/section07/VisaAddLogicalD8Test.java rename to src/test/java/io/github/aasaru/droolsoopath/section07/VisaAddLogicalOOTest.java index 8d6b495..0bce29c 100644 --- a/src/test/java/io/github/aasaru/drools8/section07/VisaAddLogicalD8Test.java +++ b/src/test/java/io/github/aasaru/droolsoopath/section07/VisaAddLogicalOOTest.java @@ -8,7 +8,7 @@ * work. If not, see . */ -package io.github.aasaru.drools8.section07; +package io.github.aasaru.droolsoopath.section07; import io.github.aasaru.drools.Common; import io.github.aasaru.drools.domain.*; @@ -23,14 +23,14 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; -class VisaAddLogicalD8Test { +class VisaAddLogicalOOTest { @Test void shouldExecuteAllSteps() { - VisaAddLogicalD8.execute(1); - VisaAddLogicalD8.execute(2); - VisaAddLogicalD8.execute(3); - VisaAddLogicalD8.execute(4); + VisaAddLogicalOO.execute(1); + VisaAddLogicalOO.execute(2); + VisaAddLogicalOO.execute(3); + VisaAddLogicalOO.execute(4); } @Test @@ -38,7 +38,7 @@ void testStep1() { int step = 1; Common.disposeSession = false; - SessionData sessionData = VisaAddLogicalD8.execute(step); + SessionData sessionData = VisaAddLogicalOO.execute(step); Assertions.assertThat(sessionData.visas) .map(Visa::getPassportNumber) @@ -51,7 +51,7 @@ void testStep1() { void testStep2() { int step = 2; - SessionData sessionData = VisaAddLogicalD8.execute(step); + SessionData sessionData = VisaAddLogicalOO.execute(step); assertThat(getPassportNumbersOfValidPassports(sessionData), containsInAnyOrder(EMILY_PASSPORT_NUMBER, JAMES_PASSPORT_NUMBER)); assertThat(getPassportNumbersOfInvalidPassports(sessionData), containsInAnyOrder(SARAH_PASSPORT_NUMBER, SIMON_PASSPORT_NUMBER)); @@ -62,7 +62,7 @@ void testStep2() { void testStep3() { int step = 3; - SessionData sessionData = VisaAddLogicalD8.execute(step); + SessionData sessionData = VisaAddLogicalOO.execute(step); assertThat(sessionData.validVisaApplications.stream().findFirst().get().getVisaApplication().getPassportNumber(), is(equalTo(EMILY_PASSPORT_NUMBER))); diff --git a/src/test/java/io/github/aasaru/drools8/section08/FamilyVisaApplicationValidationD8Test.java b/src/test/java/io/github/aasaru/droolsoopath/section08/FamilyVisaApplicationValidationOOTest.java similarity index 86% rename from src/test/java/io/github/aasaru/drools8/section08/FamilyVisaApplicationValidationD8Test.java rename to src/test/java/io/github/aasaru/droolsoopath/section08/FamilyVisaApplicationValidationOOTest.java index 969a9a3..f39e70f 100644 --- a/src/test/java/io/github/aasaru/drools8/section08/FamilyVisaApplicationValidationD8Test.java +++ b/src/test/java/io/github/aasaru/droolsoopath/section08/FamilyVisaApplicationValidationOOTest.java @@ -7,7 +7,7 @@ * You should have received a copy of the license along with this * work. If not, see . */ -package io.github.aasaru.drools8.section08; +package io.github.aasaru.droolsoopath.section08; import io.github.aasaru.drools.Common; import io.github.aasaru.drools.domain.GroupLeader; @@ -21,17 +21,17 @@ import java.nio.charset.StandardCharsets; import java.util.Collection; -public class FamilyVisaApplicationValidationD8Test { +public class FamilyVisaApplicationValidationOOTest { @Test void shouldExecuteAllSteps() { - FamilyVisaApplicationValidationD8.execute(1); - FamilyVisaApplicationValidationD8.execute(2); + FamilyVisaApplicationValidationOO.execute(1); + FamilyVisaApplicationValidationOO.execute(2); emulateInputFromKeyboard("yes"); - FamilyVisaApplicationValidationD8.execute(3); + FamilyVisaApplicationValidationOO.execute(3); - FamilyVisaApplicationValidationD8.execute(4); + FamilyVisaApplicationValidationOO.execute(4); } @Test @@ -39,7 +39,7 @@ void test_runStep1_invalidVisaApplication10isFoundTwoTimes() { Common.disposeSession = false; int step = 1; - SessionData sessionData = FamilyVisaApplicationValidationD8.execute(step); + SessionData sessionData = FamilyVisaApplicationValidationOO.execute(step); Assertions.assertThat(sessionData.invalidFamilyVisaApplications).hasSize(2); Assertions.assertThat(sessionData.invalidFamilyVisaApplications).extracting("familyVisaApplication.applicationId").containsOnly(10); @@ -52,7 +52,7 @@ void test_runStep2_invalidVisaApplication10isFoundOnlyOnce() { Common.disposeSession = false; int step = 2; - SessionData sessionData = FamilyVisaApplicationValidationD8.execute(step); + SessionData sessionData = FamilyVisaApplicationValidationOO.execute(step); assertOnlyVisaApplication10isMarkedInvalid(sessionData.invalidFamilyVisaApplications); assertVisasForEmilyAndJamesWereIssued(sessionData.visas); @@ -64,7 +64,7 @@ void testStep3_makeEveryone3yearsYounger_bothVisaApplicationsAreMarkedInvalid() int step = 3; emulateInputFromKeyboard("yes"); - SessionData sessionData = FamilyVisaApplicationValidationD8.execute(step); + SessionData sessionData = FamilyVisaApplicationValidationOO.execute(step); assertBothFamilyVisaApplicationsAreMarkedAsInvalid(sessionData.invalidFamilyVisaApplications); assertNoVisasAreIssued(sessionData.visas); @@ -76,7 +76,7 @@ void testStep3_doNotMakeAnyoneYounger_visaApplication11isNotMarkedInvalid() { int step = 3; emulateInputFromKeyboard("no"); - SessionData sessionData = FamilyVisaApplicationValidationD8.execute(step); + SessionData sessionData = FamilyVisaApplicationValidationOO.execute(step); assertOnlyVisaApplication10isMarkedInvalid(sessionData.invalidFamilyVisaApplications); assertVisasForEmilyAndJamesWereIssued(sessionData.visas); @@ -87,7 +87,7 @@ void testStep4_jamesIsSelectedAsGroupLeader() { Common.disposeSession = false; int step = 4; - SessionData sessionData = FamilyVisaApplicationValidationD8.execute(step); + SessionData sessionData = FamilyVisaApplicationValidationOO.execute(step); assertOnlyVisaApplication10isMarkedInvalid(sessionData.invalidFamilyVisaApplications); assertVisasForEmilyAndJamesWereIssued(sessionData.visas); @@ -99,7 +99,7 @@ void testStep5_jamesIsSelectedAsGroupLeader() { Common.disposeSession = false; int step = 5; - SessionData sessionData = FamilyVisaApplicationValidationD8.execute(step); + SessionData sessionData = FamilyVisaApplicationValidationOO.execute(step); assertOnlyVisaApplication10isMarkedInvalid(sessionData.invalidFamilyVisaApplications); assertVisasForEmilyAndJamesWereIssued(sessionData.visas);