Skip to content

Commit

Permalink
rename "drools8" package to "droolsoopath"
Browse files Browse the repository at this point in the history
  • Loading branch information
aasaru committed Dec 1, 2023
1 parent 054b09b commit e6094a6
Show file tree
Hide file tree
Showing 120 changed files with 266 additions and 262 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<java.module.name>io.github.aasaru.drools-training</java.module.name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<drools.version>8.45.0-SNAPSHOT</drools.version>
<maven.compiler.release>11</maven.compiler.release>
</properties>

<repositories>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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<T extends RuleUnitData> {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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<T extends RuleUnitData> {

public T getRuleUnit(Class<T> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
* work. If not, see <http://creativecommons.org/licenses/by-nc-nd/4.0/>.
*/

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));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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));
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
* work. If not, see <http://creativecommons.org/licenses/by-nc-nd/4.0/>.
*/

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));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
* work. If not, see <http://creativecommons.org/licenses/by-nc-nd/4.0/>.
*/

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;

import java.util.Collection;
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));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading

0 comments on commit e6094a6

Please sign in to comment.