diff --git a/.ci/buildchain-config.yaml b/.ci/buildchain-config.yaml
index 497197ebff6..10d4943f11f 100644
--- a/.ci/buildchain-config.yaml
+++ b/.ci/buildchain-config.yaml
@@ -28,7 +28,7 @@ default:
docker system prune -f
build:
- - project: kiegroup/drools
+ - project: apache/incubator-kie-drools
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.DROOLS_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
@@ -36,15 +36,15 @@ build:
upstream: |
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.DROOLS_BUILD_MVN_OPTS_UPSTREAM }}
- - project: kiegroup/kogito-runtimes
+ - project: apache/incubator-kie-kogito-runtimes
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_RUNTIMES_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
- mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS }}
+ mvn clean ${{ env.MVN_CMD }} -Dfull ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS }}
upstream: |
- mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM }}
+ mvn clean install -Dquickly -Dfull ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM }}
- - project: kiegroup/kogito-apps
+ - project: apache/incubator-kie-kogito-apps
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_APPS_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
@@ -57,7 +57,7 @@ build:
**/cypress/screenshots/**
**/cypress/videos/**
- - project: kiegroup/kogito-examples
+ - project: apache/incubator-kie-kogito-examples
build-command:
# First install the main pom
# Then build the required submodule pom
@@ -66,4 +66,12 @@ build:
mvn -pl :kogito-examples clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS }}
mvn -f ${{ env.KOGITO_EXAMPLES_SUBFOLDER_POM }}pom.xml clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS }}
upstream: |
- mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS_UPSTREAM }}
+ mvn clean install -DskipTests -DskipITs ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS_UPSTREAM }}
+
+ # - project: kiegroup/kie-jpmml-integration
+ # build-command:
+ # current: |
+ # export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KIE_JPMML_INTEGRATION_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
+ # mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KIE_JPMML_INTEGRATION_BUILD_MVN_OPTS }}
+ # upstream: |
+ # mvn clean install -DskipTests ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KIE_JPMML_INTEGRATION_BUILD_MVN_OPTS_UPSTREAM }}
diff --git a/.ci/buildchain-project-dependencies.yaml b/.ci/buildchain-project-dependencies.yaml
index 31d0afcc939..7d1bfb80cf9 100644
--- a/.ci/buildchain-project-dependencies.yaml
+++ b/.ci/buildchain-project-dependencies.yaml
@@ -1,61 +1,68 @@
version: "2.1"
dependencies:
- - project: kiegroup/drools
+ - project: apache/incubator-kie-drools
mapping:
dependencies:
default:
- - source: (\d*)\.(.*)\.(.*)
- targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)"
+ - source: (\d*)\.(.*)
+ targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)"
dependant:
default:
- - source: (\d*)\.(.*)\.(.*)
- targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)"
+ - source: (\d*)\.(.*)
+ targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1+7}.${n2}`)"
+ # exclude:
+ # - kiegroup/kie-jpmml-integration
- - project: kiegroup/kogito-runtimes
+ - project: apache/incubator-kie-kogito-runtimes
dependencies:
- - project: kiegroup/drools
+ - project: apache/incubator-kie-drools
mapping:
dependencies:
default:
- - source: (\d*)\.(.*)\.(.*)
- targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)"
+ - source: (\d*)\.(.*)
+ targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1+7}.${n2}`)"
dependant:
default:
- - source: (\d*)\.(.*)\.(.*)
- targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)"
+ - source: (\d*)\.(.*)
+ targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)"
exclude:
- - kiegroup/kogito-examples
- - kiegroup/kogito-apps
+ - apache/incubator-kie-kogito-examples
+ - apache/incubator-kie-kogito-apps
- - project: kiegroup/kogito-apps
+ - project: apache/incubator-kie-kogito-apps
dependencies:
- - project: kiegroup/kogito-runtimes
+ - project: apache/incubator-kie-kogito-runtimes
mapping:
dependencies:
default:
- - source: (\d*)\.(.*)\.(.*)
- targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)"
+ - source: (\d*)\.(.*)
+ targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1+7}.${n2}`)"
dependant:
default:
- - source: (\d*)\.(.*)\.(.*)
- targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)"
+ - source: (\d*)\.(.*)
+ targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)"
exclude:
- - kiegroup/kogito-examples
- - kiegroup/kogito-runtimes
+ - apache/incubator-kie-kogito-examples
+ - apache/incubator-kie-kogito-runtimes
- - project: kiegroup/kogito-examples
+ - project: apache/incubator-kie-kogito-examples
dependencies:
- - project: kiegroup/kogito-runtimes
- - project: kiegroup/kogito-apps
+ - project: apache/incubator-kie-kogito-runtimes
+ - project: apache/incubator-kie-kogito-apps
mapping:
dependencies:
default:
- - source: (\d*)\.(.*)\.(.*)
- targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)"
+ - source: (\d*)\.(.*)
+ targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1+7}.${n2}`)"
dependant:
default:
- - source: (\d*)\.(.*)\.(.*)
- targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)"
+ - source: (\d*)\.(.*)
+ targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)"
exclude:
- - kiegroup/kogito-apps
- - kiegroup/kogito-runtimes
+ - apache/incubator-kie-kogito-apps
+ - apache/incubator-kie-kogito-runtimes
+
+ # - project: kiegroup/kie-jpmml-integration
+ # dependencies:
+ # - project: apache/incubator-kie-drools
+ # no mapping needed
diff --git a/.ci/environments/common/update_quarkus.sh b/.ci/environments/common/update_quarkus.sh
index dc187436ad9..2dbf3ac7bd8 100755
--- a/.ci/environments/common/update_quarkus.sh
+++ b/.ci/environments/common/update_quarkus.sh
@@ -3,7 +3,7 @@ set -euo pipefail
mvn_cmd="mvn ${BUILD_MVN_OPTS:-} ${BUILD_MVN_OPTS_QUARKUS_UPDATE:-}"
-source <(curl -s https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh)
+source <(curl -s https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh)
echo "Update project with Quarkus version ${QUARKUS_VERSION}"
diff --git a/.ci/environments/quarkus-3/after.sh b/.ci/environments/quarkus-3/after.sh
index d7c87614a45..30e1c0209cd 100755
--- a/.ci/environments/quarkus-3/after.sh
+++ b/.ci/environments/quarkus-3/after.sh
@@ -10,4 +10,4 @@ project_version=$(mvn -q -Dexpression=project.version -DforceStdout help:evaluat
new_version=$(echo ${project_version} | awk -F. -v OFS=. '{$1 += 1 ; print}')
# Change version
-${mvn_cmd} -e -N -Dfull -DnewVersion=${new_version} -DallowSnapshots=true -DgenerateBackupPoms=false versions:set
\ No newline at end of file
+${mvn_cmd} -e -N -DnewVersion=${new_version} -DallowSnapshots=true -DgenerateBackupPoms=false versions:set
\ No newline at end of file
diff --git a/.ci/environments/quarkus-3/before.sh b/.ci/environments/quarkus-3/before.sh
index 87a5a0d30d2..14e515aa973 100755
--- a/.ci/environments/quarkus-3/before.sh
+++ b/.ci/environments/quarkus-3/before.sh
@@ -74,10 +74,13 @@ if [ "$(git status --porcelain ${patch_file})" != '' ]; then
git add "${patch_file}"
git commit -m '[Quarkus 3] Updated rewrite data'
+ git reset --hard
if [ "${behavior}" = 'push_changes' ]; then
git_remote="${GIT_REMOTE:-origin}"
branch=$(git branch --show-current)
- echo "Pushing changes to ${git_remote}/${branch}"
+ echo "Pushing changes to ${git_remote}/${branch} after rebase "
+ git fetch ${git_remote}
+ git rebase ${git_remote}/${branch}
git push ${git_remote} ${branch}
fi
fi
diff --git a/.ci/environments/quarkus-3/patches/0001_before_sh.patch b/.ci/environments/quarkus-3/patches/0001_before_sh.patch
index 8d76aa977f0..78db1ae9864 100644
--- a/.ci/environments/quarkus-3/patches/0001_before_sh.patch
+++ b/.ci/environments/quarkus-3/patches/0001_before_sh.patch
@@ -1,13 +1,30 @@
diff --git a/build-parent/pom.xml b/build-parent/pom.xml
-index a01370282c..6b5c85115c 100644
+index 0758c53eef..312d76a4f5 100644
--- a/build-parent/pom.xml
+++ b/build-parent/pom.xml
-@@ -55,9 +55,9 @@
+@@ -60,22 +60,22 @@
+ 1.1.1
+ 2.11.0
+ 1.10.0
+- 2.15.2
+- 2.15.2
+- 2.15.2
++ 2.14.2
++ 2.14.2
++ 2.14.2
+ 4.31.0
+ 3.7.4
+ 1.0.1
+ 3.22.0
+- 2.2.220
++ 2.1.214
+ 1.0.86
+ 2.3.01.4.200.18.04.7.1
- 1.10.2
-- 2.16.6.Final
+- 2.16.10.Final
- 3.1.1
+ 1.10.5
+ 3.0.0.Final
@@ -15,25 +32,27 @@ index a01370282c..6b5c85115c 100644
8.5.114.13.11.8.0
-@@ -70,40 +70,40 @@
+@@ -88,42 +88,42 @@
4.4.153.8.61.7.3
- 3.5.1
+ 3.5.3
+ 2.0.285.1.0
- 9.0.21
+ 10.1.73.23.1
- 3.18.0
+ 3.33.02.3.32
- 2.3.6
-+ 4.0.2
++ 4.0.31.3
- 5.6.12.Final
+ 6.2.0.Final2.3.0
+ 14.0.13.Final3.26.0-GA
- 5.13.1.Final
+ 6.0.0.Final
@@ -75,9 +94,9 @@ index a01370282c..6b5c85115c 100644
+ 2.1.1
+ 1.6.45.9.2
- 2.4.15.Final
+ 2.5.0.Final2.0.7
-@@ -132,7 +132,7 @@
+@@ -152,7 +152,7 @@
2.2.01.5.02.3.0-jaxb-1.0.6
@@ -86,7 +105,7 @@ index a01370282c..6b5c85115c 100644
1.21
-@@ -151,10 +151,10 @@
+@@ -171,10 +171,10 @@
2.22.13.6.4
@@ -99,7 +118,7 @@ index a01370282c..6b5c85115c 100644
1.3
-@@ -182,14 +182,14 @@
+@@ -202,16 +202,16 @@
1.12.18
@@ -115,9 +134,12 @@ index a01370282c..6b5c85115c 100644
- 3.24.2
+ 3.25.1
+- 32.0.1-jre
++ 31.1-jre
+
-@@ -265,7 +265,7 @@
+@@ -287,7 +287,7 @@
com.fasterxml.jackson.module
@@ -126,7 +148,7 @@ index a01370282c..6b5c85115c 100644
${version.com.fasterxml.jackson.annotations}
-@@ -274,8 +274,8 @@
+@@ -296,8 +296,8 @@
${version.com.fasterxml.jackson}
@@ -137,7 +159,7 @@ index a01370282c..6b5c85115c 100644
${version.com.fasterxml.jackson}
-@@ -362,9 +362,9 @@
+@@ -371,9 +371,9 @@
${version.com.sun.xml.bind}
@@ -150,7 +172,7 @@ index a01370282c..6b5c85115c 100644
com.sun.xml.bind
-@@ -414,8 +414,8 @@
+@@ -423,8 +423,8 @@
@@ -161,7 +183,7 @@ index a01370282c..6b5c85115c 100644
${version.jakarta.json}
-@@ -450,8 +450,8 @@
+@@ -459,8 +459,8 @@
@@ -172,7 +194,7 @@ index a01370282c..6b5c85115c 100644
${version.jakarta.activation}
-@@ -782,12 +782,12 @@
+@@ -795,12 +795,12 @@
@@ -187,7 +209,7 @@ index a01370282c..6b5c85115c 100644
hibernate-jpamodelgen${version.org.hibernate}
-@@ -1106,7 +1106,7 @@
+@@ -1119,7 +1119,7 @@
@@ -196,7 +218,7 @@ index a01370282c..6b5c85115c 100644
hibernate-core${version.org.hibernate}
-@@ -1128,31 +1128,16 @@
+@@ -1141,31 +1141,16 @@
@@ -234,12 +256,29 @@ index a01370282c..6b5c85115c 100644
sources
+diff --git a/drools-base/pom.xml b/drools-base/pom.xml
+index 68468e2a45..8773e29d79 100644
+--- a/drools-base/pom.xml
++++ b/drools-base/pom.xml
+@@ -83,9 +83,10 @@
+ provided
+
+
+- com.sun.xml.bind
+- jaxb-impl
++ org.glassfish.jaxb
++ jaxb-runtime
+ provided
++ 4.0.3
+
+
+ jakarta.xml.bind
diff --git a/drools-commands/src/main/java/org/drools/commands/GetVariableCommand.java b/drools-commands/src/main/java/org/drools/commands/GetVariableCommand.java
-index 281582bfd3..800ec105c3 100644
+index 5fc6fea50e..55f012280b 100644
--- a/drools-commands/src/main/java/org/drools/commands/GetVariableCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/GetVariableCommand.java
-@@ -16,11 +16,11 @@
-
+@@ -18,11 +18,11 @@
+ */
package org.drools.commands;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -256,10 +295,10 @@ index 281582bfd3..800ec105c3 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbListAdapter.java b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbListAdapter.java
-index 90fbda1b37..0578da7313 100644
+index 2ef2899704..102e011254 100644
--- a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbListAdapter.java
+++ b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbListAdapter.java
-@@ -24,7 +24,7 @@ import java.util.HashSet;
+@@ -26,7 +26,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -269,11 +308,11 @@ index 90fbda1b37..0578da7313 100644
import org.drools.commands.jaxb.JaxbListWrapper.JaxbWrapperType;
import org.slf4j.Logger;
diff --git a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbListWrapper.java b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbListWrapper.java
-index 92d5dd6811..5e89a69b7f 100644
+index 3731c9cedf..fab61b1b75 100644
--- a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbListWrapper.java
+++ b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbListWrapper.java
-@@ -16,11 +16,11 @@
-
+@@ -18,11 +18,11 @@
+ */
package org.drools.commands.jaxb;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -290,10 +329,10 @@ index 92d5dd6811..5e89a69b7f 100644
/**
* This is actually a wrapper for the following collections:
diff --git a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbMapAdapter.java b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbMapAdapter.java
-index 544431b350..5fb0c9edd5 100644
+index 0086b7b657..413d2595b4 100644
--- a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbMapAdapter.java
+++ b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbMapAdapter.java
-@@ -21,7 +21,7 @@ import java.util.LinkedHashMap;
+@@ -23,7 +23,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -303,11 +342,11 @@ index 544431b350..5fb0c9edd5 100644
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbObjectObjectPair.java b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbObjectObjectPair.java
-index 292a2dfd92..b0ad67a888 100644
+index 4eed12a05b..3d76ab5f2a 100644
--- a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbObjectObjectPair.java
+++ b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbObjectObjectPair.java
-@@ -16,11 +16,11 @@
-
+@@ -18,11 +18,11 @@
+ */
package org.drools.commands.jaxb;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -324,11 +363,11 @@ index 292a2dfd92..b0ad67a888 100644
@XmlAccessorType(XmlAccessType.NONE)
public class JaxbObjectObjectPair {
diff --git a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbStringObjectPair.java b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbStringObjectPair.java
-index 97c1d42a5e..6f4eb3df3d 100644
+index cdbd169168..0b95499a29 100644
--- a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbStringObjectPair.java
+++ b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbStringObjectPair.java
-@@ -16,12 +16,12 @@
-
+@@ -18,12 +18,12 @@
+ */
package org.drools.commands.jaxb;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -347,10 +386,10 @@ index 97c1d42a5e..6f4eb3df3d 100644
@XmlAccessorType(XmlAccessType.NONE)
@XmlSeeAlso({JaxbListWrapper.class})
diff --git a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbUnknownAdapter.java b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbUnknownAdapter.java
-index 79b902ab82..f9c59dac37 100644
+index 176f5a6e0f..3c28fa5670 100644
--- a/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbUnknownAdapter.java
+++ b/drools-commands/src/main/java/org/drools/commands/jaxb/JaxbUnknownAdapter.java
-@@ -29,7 +29,7 @@ import java.util.Map;
+@@ -31,7 +31,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
@@ -360,11 +399,11 @@ index 79b902ab82..f9c59dac37 100644
import org.drools.core.QueryResultsImpl;
import org.drools.core.common.DisconnectedFactHandle;
diff --git a/drools-commands/src/main/java/org/drools/commands/jaxb/ObjectFactory.java b/drools-commands/src/main/java/org/drools/commands/jaxb/ObjectFactory.java
-index b76eb0770f..12a3ee104b 100644
+index 6406f23fe1..b243b5191a 100644
--- a/drools-commands/src/main/java/org/drools/commands/jaxb/ObjectFactory.java
+++ b/drools-commands/src/main/java/org/drools/commands/jaxb/ObjectFactory.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.drools.commands.jaxb;
-import javax.xml.bind.annotation.XmlRegistry;
@@ -373,10 +412,10 @@ index b76eb0770f..12a3ee104b 100644
@XmlRegistry
public class ObjectFactory {
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/AdvanceSessionTimeCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/AdvanceSessionTimeCommand.java
-index c757b616b8..c61788017d 100644
+index 38df33a7f8..56276dd5c5 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/AdvanceSessionTimeCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/AdvanceSessionTimeCommand.java
-@@ -17,10 +17,10 @@
+@@ -19,10 +19,10 @@
package org.drools.commands.runtime;
import java.util.concurrent.TimeUnit;
@@ -392,10 +431,10 @@ index c757b616b8..c61788017d 100644
import org.drools.commands.IdentifiableResult;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/BatchExecutionCommandImpl.java b/drools-commands/src/main/java/org/drools/commands/runtime/BatchExecutionCommandImpl.java
-index d40c218877..5ed7409a8b 100644
+index 4970214a04..e11edabef1 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/BatchExecutionCommandImpl.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/BatchExecutionCommandImpl.java
-@@ -18,13 +18,13 @@ package org.drools.commands.runtime;
+@@ -20,13 +20,13 @@ package org.drools.commands.runtime;
import java.util.ArrayList;
import java.util.List;
@@ -417,11 +456,11 @@ index d40c218877..5ed7409a8b 100644
import org.drools.commands.fluent.Batch;
import org.drools.commands.runtime.pmml.ApplyPmmlModelCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/DisposeCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/DisposeCommand.java
-index b8e8c07365..a0fdcf64d9 100644
+index be75a9796a..62154e0afb 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/DisposeCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/DisposeCommand.java
-@@ -16,9 +16,9 @@
-
+@@ -18,9 +18,9 @@
+ */
package org.drools.commands.runtime;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -434,10 +473,10 @@ index b8e8c07365..a0fdcf64d9 100644
import org.drools.commands.impl.NotTransactionalCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/ExecutionResultImpl.java b/drools-commands/src/main/java/org/drools/commands/runtime/ExecutionResultImpl.java
-index 0a0b17d9fa..86868a62e2 100644
+index 7bd405dc16..4b3b07309e 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/ExecutionResultImpl.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/ExecutionResultImpl.java
-@@ -20,11 +20,11 @@ import java.io.Serializable;
+@@ -22,11 +22,11 @@ import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@@ -455,10 +494,10 @@ index 0a0b17d9fa..86868a62e2 100644
import org.drools.commands.jaxb.JaxbMapAdapter;
import org.kie.api.runtime.ExecutionResults;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/ExecutionResultsMap.java b/drools-commands/src/main/java/org/drools/commands/runtime/ExecutionResultsMap.java
-index d0295f1f1c..1c8cd6376a 100644
+index 0056413ec4..7d4be781ab 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/ExecutionResultsMap.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/ExecutionResultsMap.java
-@@ -19,7 +19,7 @@ package org.drools.commands.runtime;
+@@ -21,7 +21,7 @@ package org.drools.commands.runtime;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@@ -468,10 +507,10 @@ index d0295f1f1c..1c8cd6376a 100644
import org.drools.commands.jaxb.JaxbMapAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/FlatQueryResults.java b/drools-commands/src/main/java/org/drools/commands/runtime/FlatQueryResults.java
-index 6440f4a885..9313115fe4 100644
+index d853414697..997333593a 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/FlatQueryResults.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/FlatQueryResults.java
-@@ -23,13 +23,13 @@ import java.util.HashSet;
+@@ -25,13 +25,13 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
@@ -493,11 +532,11 @@ index 6440f4a885..9313115fe4 100644
import org.drools.commands.jaxb.JaxbListAdapter;
import org.drools.commands.jaxb.JaxbListWrapper;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/GetFactCountCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/GetFactCountCommand.java
-index 71053ae9aa..3fb3666d0f 100644
+index cab731bc8f..29063bbc69 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/GetFactCountCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/GetFactCountCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -512,11 +551,11 @@ index 71053ae9aa..3fb3666d0f 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/GetGlobalCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/GetGlobalCommand.java
-index cba80658f7..1602e121b7 100644
+index 27b4865b69..71c9b28373 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/GetGlobalCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/GetGlobalCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -531,11 +570,11 @@ index cba80658f7..1602e121b7 100644
import org.drools.commands.IdentifiableResult;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/GetIdCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/GetIdCommand.java
-index 5ac74b60bf..5e1942717e 100644
+index 983a6bcfce..c0972f2fa8 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/GetIdCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/GetIdCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -550,11 +589,11 @@ index 5ac74b60bf..5e1942717e 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/GetSessionTimeCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/GetSessionTimeCommand.java
-index fd4f9744a8..539d98af9d 100644
+index 032e7b4eb9..87b0b3d821 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/GetSessionTimeCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/GetSessionTimeCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -569,11 +608,11 @@ index fd4f9744a8..539d98af9d 100644
import org.drools.commands.IdentifiableResult;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/ObjectFactory.java b/drools-commands/src/main/java/org/drools/commands/runtime/ObjectFactory.java
-index 39592aabb1..00a069a690 100644
+index 458b82e164..c78c199adc 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/ObjectFactory.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/ObjectFactory.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.drools.commands.runtime;
-import javax.xml.bind.annotation.XmlRegistry;
@@ -582,11 +621,11 @@ index 39592aabb1..00a069a690 100644
@XmlRegistry
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/QueryResultsJaxbAdapter.java b/drools-commands/src/main/java/org/drools/commands/runtime/QueryResultsJaxbAdapter.java
-index d0ef1d951c..8fcfb4074b 100644
+index b89d48c644..bb4631870b 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/QueryResultsJaxbAdapter.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/QueryResultsJaxbAdapter.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.drools.commands.runtime;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
@@ -595,11 +634,11 @@ index d0ef1d951c..8fcfb4074b 100644
import org.drools.core.QueryResultsImpl;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/SetGlobalCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/SetGlobalCommand.java
-index 08e5d4a98c..267164b8ff 100644
+index 986a392085..21c5b0b9f5 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/SetGlobalCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/SetGlobalCommand.java
-@@ -16,12 +16,12 @@
-
+@@ -18,12 +18,12 @@
+ */
package org.drools.commands.runtime;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -618,10 +657,10 @@ index 08e5d4a98c..267164b8ff 100644
import org.drools.commands.IdentifiableResult;
import org.drools.commands.jaxb.JaxbUnknownAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/pmml/ApplyPmmlModelCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/pmml/ApplyPmmlModelCommand.java
-index 1e91f79151..660a4886da 100644
+index 45487d20b1..0afdc97077 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/pmml/ApplyPmmlModelCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/pmml/ApplyPmmlModelCommand.java
-@@ -18,12 +18,12 @@ package org.drools.commands.runtime.pmml;
+@@ -21,12 +21,12 @@ package org.drools.commands.runtime.pmml;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@@ -641,11 +680,11 @@ index 1e91f79151..660a4886da 100644
import org.drools.commands.IdentifiableResult;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/AbortProcessInstanceCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/AbortProcessInstanceCommand.java
-index 6b40c5f256..d94d08f719 100644
+index b198432940..e08edd6530 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/AbortProcessInstanceCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/AbortProcessInstanceCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.process;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -660,11 +699,11 @@ index 6b40c5f256..d94d08f719 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/AbortWorkItemCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/AbortWorkItemCommand.java
-index 5b4bcfa3d8..ee4edad76b 100644
+index 8a1acc9175..20617cda7a 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/AbortWorkItemCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/AbortWorkItemCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.process;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -679,10 +718,10 @@ index 5b4bcfa3d8..ee4edad76b 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/CompleteWorkItemCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/CompleteWorkItemCommand.java
-index 833fb1bb0e..e5d289f5d7 100644
+index 5f063d2cc9..5e770ecfc0 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/CompleteWorkItemCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/CompleteWorkItemCommand.java
-@@ -19,12 +19,12 @@ package org.drools.commands.runtime.process;
+@@ -21,12 +21,12 @@ package org.drools.commands.runtime.process;
import java.util.HashMap;
import java.util.Map;
@@ -702,10 +741,10 @@ index 833fb1bb0e..e5d289f5d7 100644
import org.drools.commands.jaxb.JaxbMapAdapter;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/CreateCorrelatedProcessInstanceCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/CreateCorrelatedProcessInstanceCommand.java
-index c71fb3bf36..e42439fd6e 100644
+index 28df02f2bd..088a6dce46 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/CreateCorrelatedProcessInstanceCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/CreateCorrelatedProcessInstanceCommand.java
-@@ -19,12 +19,12 @@ package org.drools.commands.runtime.process;
+@@ -21,12 +21,12 @@ package org.drools.commands.runtime.process;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -725,10 +764,10 @@ index c71fb3bf36..e42439fd6e 100644
import org.drools.commands.IdentifiableResult;
import org.drools.commands.jaxb.JaxbMapAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/CreateProcessInstanceCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/CreateProcessInstanceCommand.java
-index 6757e315f7..12618cd571 100644
+index 4b6249c07d..aea9aa29d9 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/CreateProcessInstanceCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/CreateProcessInstanceCommand.java
-@@ -19,12 +19,12 @@ package org.drools.commands.runtime.process;
+@@ -21,12 +21,12 @@ package org.drools.commands.runtime.process;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -748,10 +787,10 @@ index 6757e315f7..12618cd571 100644
import org.drools.commands.IdentifiableResult;
import org.drools.commands.jaxb.JaxbMapAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessEventListenersCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessEventListenersCommand.java
-index 47f0b5ea64..b643f04f33 100644
+index 718504c30e..1d96fd6fdc 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessEventListenersCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessEventListenersCommand.java
-@@ -17,9 +17,9 @@
+@@ -19,9 +19,9 @@
package org.drools.commands.runtime.process;
import java.util.Collection;
@@ -765,10 +804,10 @@ index 47f0b5ea64..b643f04f33 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.event.process.ProcessEventListener;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessIdsCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessIdsCommand.java
-index 893fec0e55..321e751f68 100644
+index f3b25ddfe7..fc1c8196b9 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessIdsCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessIdsCommand.java
-@@ -18,10 +18,10 @@ package org.drools.commands.runtime.process;
+@@ -20,10 +20,10 @@ package org.drools.commands.runtime.process;
import java.util.ArrayList;
import java.util.List;
@@ -784,11 +823,11 @@ index 893fec0e55..321e751f68 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.definition.process.Process;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstanceByCorrelationKeyCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstanceByCorrelationKeyCommand.java
-index f04f897b55..1db39272e8 100644
+index 57e4771a89..7cc196e4b4 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstanceByCorrelationKeyCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstanceByCorrelationKeyCommand.java
-@@ -16,12 +16,12 @@
-
+@@ -18,12 +18,12 @@
+ */
package org.drools.commands.runtime.process;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -807,11 +846,11 @@ index f04f897b55..1db39272e8 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstanceCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstanceCommand.java
-index 5884fb86a5..e897b05d4c 100644
+index 04359a2174..116b6c8a36 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstanceCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstanceCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.process;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -826,10 +865,10 @@ index 5884fb86a5..e897b05d4c 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstancesCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstancesCommand.java
-index ea9550c78f..b0a3b876e8 100644
+index 81eea32909..32c6e91af2 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstancesCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetProcessInstancesCommand.java
-@@ -18,10 +18,10 @@ package org.drools.commands.runtime.process;
+@@ -20,10 +20,10 @@ package org.drools.commands.runtime.process;
import java.util.ArrayList;
import java.util.Collection;
@@ -845,11 +884,11 @@ index ea9550c78f..b0a3b876e8 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetWorkItemCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetWorkItemCommand.java
-index 2aef697a60..a699cbc342 100644
+index cdebb4536e..8edc6eb7bd 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetWorkItemCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetWorkItemCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.process;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -864,10 +903,10 @@ index 2aef697a60..a699cbc342 100644
import org.drools.core.process.WorkItem;
import org.drools.core.process.WorkItemManager;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetWorkItemIdsCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetWorkItemIdsCommand.java
-index 08d5b3dc8c..8b767ffd06 100644
+index 52d3faf9f5..e13dad8421 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/GetWorkItemIdsCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/GetWorkItemIdsCommand.java
-@@ -19,10 +19,10 @@ package org.drools.commands.runtime.process;
+@@ -21,10 +21,10 @@ package org.drools.commands.runtime.process;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -883,10 +922,10 @@ index 08d5b3dc8c..8b767ffd06 100644
import org.drools.core.process.WorkItem;
import org.drools.core.process.WorkItemManager;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/ObjectFactory.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/ObjectFactory.java
-index 930a531761..d32ce592e7 100644
+index 3e56206305..33bf5f1239 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/ObjectFactory.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/ObjectFactory.java
-@@ -17,7 +17,7 @@
+@@ -19,7 +19,7 @@
package org.drools.commands.runtime.process;
@@ -896,10 +935,10 @@ index 930a531761..d32ce592e7 100644
@XmlRegistry
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/ReTryWorkItemCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/ReTryWorkItemCommand.java
-index aaf8c067f7..5e95c7456b 100644
+index f1092a1f36..a98b83314f 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/ReTryWorkItemCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/ReTryWorkItemCommand.java
-@@ -19,11 +19,11 @@ package org.drools.commands.runtime.process;
+@@ -21,11 +21,11 @@ package org.drools.commands.runtime.process;
import java.util.HashMap;
import java.util.Map;
@@ -917,11 +956,11 @@ index aaf8c067f7..5e95c7456b 100644
import org.drools.core.process.WorkItemManager;
import org.drools.commands.jaxb.JaxbMapAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/RegisterWorkItemHandlerCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/RegisterWorkItemHandlerCommand.java
-index c82fbefe24..c143e422e7 100644
+index efa4b6c9b9..d30993a3e8 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/RegisterWorkItemHandlerCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/RegisterWorkItemHandlerCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.process;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -936,10 +975,10 @@ index c82fbefe24..c143e422e7 100644
import org.drools.commands.jaxb.JaxbUnknownAdapter;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/SetProcessInstanceVariablesCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/SetProcessInstanceVariablesCommand.java
-index 7e56dd5259..68624da634 100644
+index 853bdf5626..96d113d426 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/SetProcessInstanceVariablesCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/SetProcessInstanceVariablesCommand.java
-@@ -19,12 +19,12 @@ package org.drools.commands.runtime.process;
+@@ -21,12 +21,12 @@ package org.drools.commands.runtime.process;
import java.util.HashMap;
import java.util.Map;
@@ -959,11 +998,11 @@ index 7e56dd5259..68624da634 100644
import org.drools.commands.jaxb.JaxbMapAdapter;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/SignalEventCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/SignalEventCommand.java
-index 3da07dc90d..f7c0e8f44c 100644
+index 927298a7c2..b5867b5636 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/SignalEventCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/SignalEventCommand.java
-@@ -16,12 +16,12 @@
-
+@@ -18,12 +18,12 @@
+ */
package org.drools.commands.runtime.process;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -982,10 +1021,10 @@ index 3da07dc90d..f7c0e8f44c 100644
import org.drools.commands.jaxb.JaxbUnknownAdapter;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/StartCorrelatedProcessCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/StartCorrelatedProcessCommand.java
-index 105e02086b..baba637fb5 100644
+index f96051e049..37140e853b 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/StartCorrelatedProcessCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/StartCorrelatedProcessCommand.java
-@@ -19,13 +19,13 @@ package org.drools.commands.runtime.process;
+@@ -21,13 +21,13 @@ package org.drools.commands.runtime.process;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -1007,10 +1046,10 @@ index 105e02086b..baba637fb5 100644
import org.drools.commands.IdentifiableResult;
import org.drools.commands.jaxb.JaxbMapAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessCommand.java
-index c4c40115ee..ec4136106a 100644
+index 7d60ff3ab8..2aa2fa1fe5 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessCommand.java
-@@ -19,14 +19,14 @@ package org.drools.commands.runtime.process;
+@@ -21,14 +21,14 @@ package org.drools.commands.runtime.process;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -1034,10 +1073,10 @@ index c4c40115ee..ec4136106a 100644
import org.drools.commands.IdentifiableResult;
import org.drools.commands.jaxb.JaxbMapAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessFromNodeIdsCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessFromNodeIdsCommand.java
-index 76fb682351..bac224ebf7 100644
+index 69cd161651..99f96c11b9 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessFromNodeIdsCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessFromNodeIdsCommand.java
-@@ -18,12 +18,12 @@ package org.drools.commands.runtime.process;
+@@ -20,12 +20,12 @@ package org.drools.commands.runtime.process;
import java.util.List;
import java.util.Map;
@@ -1057,11 +1096,11 @@ index 76fb682351..bac224ebf7 100644
import org.kie.api.runtime.Context;
import org.kie.api.runtime.ExecutionResults;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessInstanceCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessInstanceCommand.java
-index 447c57795b..b6ecbb32dd 100644
+index 5a7239447d..24598b5605 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessInstanceCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/process/StartProcessInstanceCommand.java
-@@ -16,9 +16,9 @@
-
+@@ -18,9 +18,9 @@
+ */
package org.drools.commands.runtime.process;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1074,11 +1113,11 @@ index 447c57795b..b6ecbb32dd 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/AgendaGroupSetFocusCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/AgendaGroupSetFocusCommand.java
-index d511668f89..7d213ad9b0 100644
+index cc8d5328e9..0ada06b0a7 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/AgendaGroupSetFocusCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/AgendaGroupSetFocusCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1093,11 +1132,11 @@ index d511668f89..7d213ad9b0 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearActivationGroupCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearActivationGroupCommand.java
-index 7c034b26a1..7d6b75348c 100644
+index 0a3ac21740..ab62bd194a 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearActivationGroupCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearActivationGroupCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1112,11 +1151,11 @@ index 7c034b26a1..7d6b75348c 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearAgendaCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearAgendaCommand.java
-index 0f09bf1434..1ca4445886 100644
+index 7fa3ec0720..c75db60817 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearAgendaCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearAgendaCommand.java
-@@ -16,9 +16,9 @@
-
+@@ -18,9 +18,9 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1129,11 +1168,11 @@ index 0f09bf1434..1ca4445886 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearAgendaGroupCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearAgendaGroupCommand.java
-index 86b7f492c0..edeb786eb5 100644
+index 59ff66b145..f894f9ca16 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearAgendaGroupCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearAgendaGroupCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1148,11 +1187,11 @@ index 86b7f492c0..edeb786eb5 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearRuleFlowGroupCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearRuleFlowGroupCommand.java
-index 70dec44eb7..f68322ccfe 100644
+index 75aa16956d..3c3b31461c 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearRuleFlowGroupCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ClearRuleFlowGroupCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1167,11 +1206,11 @@ index 70dec44eb7..f68322ccfe 100644
import org.drools.core.common.ReteEvaluator;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteCommand.java
-index 7523dcf517..ea80c2578b 100644
+index e7b813a991..2671b4521d 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1186,11 +1225,11 @@ index 7523dcf517..ea80c2578b 100644
import org.drools.core.common.DisconnectedFactHandle;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteFromEntryPointCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteFromEntryPointCommand.java
-index a19f4abb70..4f96b0b3bc 100644
+index dbdb2275b5..c93c83b1c8 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteFromEntryPointCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteFromEntryPointCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1205,11 +1244,11 @@ index a19f4abb70..4f96b0b3bc 100644
import org.drools.core.common.DisconnectedFactHandle;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteObjectCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteObjectCommand.java
-index 63ebc428b5..caf18188c4 100644
+index 6e2d286e42..88f585b200 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteObjectCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/DeleteObjectCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1224,10 +1263,11 @@ index 63ebc428b5..caf18188c4 100644
import org.drools.util.StringUtils;
import org.drools.commands.jaxb.JaxbUnknownAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/EnableAuditLogCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/EnableAuditLogCommand.java
-index 1c1918de85..664049dd87 100644
+index 812fc30baf..5055346beb 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/EnableAuditLogCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/EnableAuditLogCommand.java
-@@ -1,9 +1,9 @@
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1242,11 +1282,11 @@ index 1c1918de85..664049dd87 100644
import org.kie.api.KieServices;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/FireAllRulesCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/FireAllRulesCommand.java
-index 9fcd43364f..422697929a 100644
+index 4d41b24de6..6ed31da31d 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/FireAllRulesCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/FireAllRulesCommand.java
-@@ -16,12 +16,12 @@
-
+@@ -18,12 +18,12 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1265,11 +1305,11 @@ index 9fcd43364f..422697929a 100644
import org.drools.commands.IdentifiableResult;
import org.drools.commands.jaxb.JaxbUnknownAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/FireUntilHaltCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/FireUntilHaltCommand.java
-index ba9c3be15a..64dfba8874 100644
+index bc4545d39b..d4fb71df07 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/FireUntilHaltCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/FireUntilHaltCommand.java
-@@ -16,11 +16,11 @@
-
+@@ -18,11 +18,11 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1286,10 +1326,10 @@ index ba9c3be15a..64dfba8874 100644
import org.drools.core.common.InternalWorkingMemory;
import org.drools.commands.jaxb.JaxbUnknownAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetAgendaEventListenersCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetAgendaEventListenersCommand.java
-index 64c41a7e9f..2c471a3fd4 100644
+index d138313dcb..787878bf6d 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetAgendaEventListenersCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetAgendaEventListenersCommand.java
-@@ -17,7 +17,7 @@
+@@ -19,7 +19,7 @@
package org.drools.commands.runtime.rule;
import java.util.Collection;
@@ -1299,11 +1339,11 @@ index 64c41a7e9f..2c471a3fd4 100644
import org.kie.api.command.ExecutableCommand;
import org.kie.api.event.rule.AgendaEventListener;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetEntryPointCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetEntryPointCommand.java
-index 81e14c3bac..60c3d79964 100644
+index 55b5fa7ecb..6c0b549a26 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetEntryPointCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetEntryPointCommand.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAttribute;
@@ -1312,10 +1352,10 @@ index 81e14c3bac..60c3d79964 100644
import org.drools.commands.EntryPointCreator;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetEntryPointsCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetEntryPointsCommand.java
-index 7351059acc..ae0dd5500a 100644
+index d0667678ea..4f6cb06d74 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetEntryPointsCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetEntryPointsCommand.java
-@@ -18,7 +18,7 @@ package org.drools.commands.runtime.rule;
+@@ -20,7 +20,7 @@ package org.drools.commands.runtime.rule;
import java.util.ArrayList;
import java.util.Collection;
@@ -1325,11 +1365,11 @@ index 7351059acc..ae0dd5500a 100644
import org.drools.commands.EntryPointCreator;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandleCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandleCommand.java
-index 279c626671..1d44d1568e 100644
+index 4e3f871dc9..05b34f4423 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandleCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandleCommand.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAttribute;
@@ -1338,11 +1378,11 @@ index 279c626671..1d44d1568e 100644
import org.drools.core.common.InternalFactHandle;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandleInEntryPointCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandleInEntryPointCommand.java
-index 7ac7c37063..bd699452dd 100644
+index 419e108ba3..cddfbf37d2 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandleInEntryPointCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandleInEntryPointCommand.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAttribute;
@@ -1351,10 +1391,10 @@ index 7ac7c37063..bd699452dd 100644
import org.drools.core.common.InternalFactHandle;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandlesCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandlesCommand.java
-index cf6b2e5576..bac17fecc9 100644
+index 8507d5836e..9b4373b2f0 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandlesCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetFactHandlesCommand.java
-@@ -18,9 +18,9 @@ package org.drools.commands.runtime.rule;
+@@ -20,9 +20,9 @@ package org.drools.commands.runtime.rule;
import java.util.ArrayList;
import java.util.Collection;
@@ -1368,11 +1408,11 @@ index cf6b2e5576..bac17fecc9 100644
import org.drools.core.common.InternalFactHandle;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectCommand.java
-index 9bd16c9616..bc075adb16 100644
+index 0c42b31768..a9e78c4bd0 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectCommand.java
-@@ -16,12 +16,12 @@
-
+@@ -18,12 +18,12 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1391,11 +1431,11 @@ index 9bd16c9616..bc075adb16 100644
import org.drools.commands.IdentifiableResult;
import org.drools.core.common.DefaultFactHandle;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectInEntryPointCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectInEntryPointCommand.java
-index c48f435a01..6f14ac93bb 100644
+index bcead60ab8..09429c6000 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectInEntryPointCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectInEntryPointCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1410,10 +1450,10 @@ index c48f435a01..6f14ac93bb 100644
import org.drools.commands.IdentifiableResult;
import org.drools.core.common.DefaultFactHandle;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectsCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectsCommand.java
-index 282b1dbb74..2f907120a2 100644
+index 5f0df58eae..41214fcccf 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectsCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectsCommand.java
-@@ -19,10 +19,10 @@ package org.drools.commands.runtime.rule;
+@@ -21,10 +21,10 @@ package org.drools.commands.runtime.rule;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -1429,10 +1469,10 @@ index 282b1dbb74..2f907120a2 100644
import org.drools.commands.IdentifiableResult;
import org.drools.core.ClassObjectSerializationFilter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectsInEntryPointCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectsInEntryPointCommand.java
-index 81de706c88..68a5f8ed29 100644
+index fdd9184caf..add47b6171 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectsInEntryPointCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/GetObjectsInEntryPointCommand.java
-@@ -19,9 +19,9 @@ package org.drools.commands.runtime.rule;
+@@ -21,9 +21,9 @@ package org.drools.commands.runtime.rule;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -1446,10 +1486,10 @@ index 81de706c88..68a5f8ed29 100644
import org.drools.commands.IdentifiableResult;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertElementsCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertElementsCommand.java
-index db23b36827..574f4efa2c 100644
+index d310d5b770..f7d42e08bc 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertElementsCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertElementsCommand.java
-@@ -19,11 +19,11 @@ package org.drools.commands.runtime.rule;
+@@ -21,11 +21,11 @@ package org.drools.commands.runtime.rule;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -1467,11 +1507,11 @@ index db23b36827..574f4efa2c 100644
import org.drools.commands.IdentifiableResult;
import org.drools.commands.runtime.ExecutionResultImpl;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertObjectCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertObjectCommand.java
-index c23a0d5cfe..12e737d408 100644
+index f6712f538d..40c21a187f 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertObjectCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertObjectCommand.java
-@@ -16,12 +16,12 @@
-
+@@ -18,12 +18,12 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1490,11 +1530,11 @@ index c23a0d5cfe..12e737d408 100644
import org.drools.commands.IdentifiableResult;
import org.drools.core.common.DefaultFactHandle;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertObjectInEntryPointCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertObjectInEntryPointCommand.java
-index 461a05f632..44131cfe6f 100644
+index 682f17534a..bf0226eb34 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertObjectInEntryPointCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/InsertObjectInEntryPointCommand.java
-@@ -16,10 +16,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1509,10 +1549,10 @@ index 461a05f632..44131cfe6f 100644
import org.drools.commands.IdentifiableResult;
import org.drools.core.common.DefaultFactHandle;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ModifyCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ModifyCommand.java
-index e86c357756..fc5433d98b 100644
+index 19eb642aed..d437e09b76 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ModifyCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ModifyCommand.java
-@@ -19,11 +19,11 @@ package org.drools.commands.runtime.rule;
+@@ -21,11 +21,11 @@ package org.drools.commands.runtime.rule;
import java.util.ArrayList;
import java.util.List;
@@ -1526,15 +1566,15 @@ index e86c357756..fc5433d98b 100644
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlRootElement;
- import org.drools.core.base.CoreComponentsBuilder;
+ import org.drools.base.base.CoreComponentsBuilder;
import org.drools.core.common.DisconnectedFactHandle;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ObjectFactory.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ObjectFactory.java
-index 44a4e47881..097d1def2c 100644
+index 43dc943295..e58a43fe69 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/ObjectFactory.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/ObjectFactory.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.drools.commands.runtime.rule;
-import javax.xml.bind.annotation.XmlRegistry;
@@ -1543,10 +1583,10 @@ index 44a4e47881..097d1def2c 100644
import org.drools.commands.runtime.rule.ModifyCommand.SetterImpl;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/QueryCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/QueryCommand.java
-index fed6d919b9..054191425e 100644
+index f1393f83aa..888d0bf5af 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/QueryCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/QueryCommand.java
-@@ -19,10 +19,10 @@ package org.drools.commands.runtime.rule;
+@@ -21,10 +21,10 @@ package org.drools.commands.runtime.rule;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -1562,10 +1602,10 @@ index fed6d919b9..054191425e 100644
import org.drools.commands.IdentifiableResult;
import org.drools.commands.runtime.FlatQueryResults;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/UpdateCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/UpdateCommand.java
-index c427ffc270..5e0f2ab414 100644
+index 59e46cce81..d14df73251 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/UpdateCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/UpdateCommand.java
-@@ -18,12 +18,12 @@ package org.drools.commands.runtime.rule;
+@@ -20,12 +20,12 @@ package org.drools.commands.runtime.rule;
import java.util.Arrays;
@@ -1585,10 +1625,10 @@ index c427ffc270..5e0f2ab414 100644
import org.drools.core.common.DisconnectedFactHandle;
import org.drools.commands.jaxb.JaxbUnknownAdapter;
diff --git a/drools-commands/src/main/java/org/drools/commands/runtime/rule/UpdateInEntryPointCommand.java b/drools-commands/src/main/java/org/drools/commands/runtime/rule/UpdateInEntryPointCommand.java
-index 19c566794f..984f218d5f 100644
+index 752e90bb27..ab29649f32 100644
--- a/drools-commands/src/main/java/org/drools/commands/runtime/rule/UpdateInEntryPointCommand.java
+++ b/drools-commands/src/main/java/org/drools/commands/runtime/rule/UpdateInEntryPointCommand.java
-@@ -18,8 +18,8 @@ package org.drools.commands.runtime.rule;
+@@ -20,8 +20,8 @@ package org.drools.commands.runtime.rule;
import java.util.Arrays;
@@ -1600,10 +1640,10 @@ index 19c566794f..984f218d5f 100644
import org.drools.core.common.DisconnectedFactHandle;
import org.kie.api.command.ExecutableCommand;
diff --git a/drools-compiler/pom.xml b/drools-compiler/pom.xml
-index 93813a6253..36245b6a4a 100644
+index 5e08c4dbc8..8c58653b77 100644
--- a/drools-compiler/pom.xml
+++ b/drools-compiler/pom.xml
-@@ -104,9 +104,10 @@
+@@ -128,9 +128,10 @@
provided
@@ -1612,15 +1652,15 @@ index 93813a6253..36245b6a4a 100644
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3jakarta.xml.bind
diff --git a/drools-compiler/src/main/java/org/drools/compiler/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java b/drools-compiler/src/main/java/org/drools/compiler/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java
-index 9b15d3e9d7..e195ed0c0a 100644
+index e6f93ed5ec..f7a32d89de 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java
-@@ -28,8 +28,8 @@ import java.util.LinkedHashMap;
+@@ -30,8 +30,8 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -1632,10 +1672,10 @@ index 9b15d3e9d7..e195ed0c0a 100644
import com.sun.codemodel.CodeWriter;
import com.sun.codemodel.JCodeModel;
diff --git a/drools-core/pom.xml b/drools-core/pom.xml
-index 530fa03d83..502ee278a9 100644
+index 42092de797..08beb7b1f4 100644
--- a/drools-core/pom.xml
+++ b/drools-core/pom.xml
-@@ -72,9 +72,10 @@
+@@ -96,9 +96,10 @@
provided
@@ -1644,15 +1684,16 @@ index 530fa03d83..502ee278a9 100644
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3jakarta.xml.bind
diff --git a/drools-core/src/main/java/org/drools/core/ClassObjectSerializationFilter.java b/drools-core/src/main/java/org/drools/core/ClassObjectSerializationFilter.java
-index 9f0e1fadf9..136270b9f8 100644
+index 1dbb032c7e..8330b82548 100644
--- a/drools-core/src/main/java/org/drools/core/ClassObjectSerializationFilter.java
+++ b/drools-core/src/main/java/org/drools/core/ClassObjectSerializationFilter.java
-@@ -1,9 +1,9 @@
+@@ -18,10 +18,10 @@
+ */
package org.drools.core;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1667,10 +1708,10 @@ index 9f0e1fadf9..136270b9f8 100644
import org.kie.api.runtime.ClassObjectFilter;
import org.kie.api.runtime.ObjectFilter;
diff --git a/drools-core/src/main/java/org/drools/core/base/ArrayElements.java b/drools-core/src/main/java/org/drools/core/base/ArrayElements.java
-index 2318d25e54..aa3e359f76 100644
+index 6c17e910f7..99d3531bc2 100644
--- a/drools-core/src/main/java/org/drools/core/base/ArrayElements.java
+++ b/drools-core/src/main/java/org/drools/core/base/ArrayElements.java
-@@ -17,10 +17,10 @@
+@@ -19,10 +19,10 @@
package org.drools.core.base;
import java.util.Arrays;
@@ -1686,10 +1727,10 @@ index 2318d25e54..aa3e359f76 100644
@XmlType(name="array-elements")
@XmlAccessorType(XmlAccessType.NONE)
diff --git a/drools-core/src/main/java/org/drools/core/base/RuleNameEndsWithAgendaFilter.java b/drools-core/src/main/java/org/drools/core/base/RuleNameEndsWithAgendaFilter.java
-index cb579b9530..a3288d92b5 100644
+index 6b5556a52c..09590dd508 100644
--- a/drools-core/src/main/java/org/drools/core/base/RuleNameEndsWithAgendaFilter.java
+++ b/drools-core/src/main/java/org/drools/core/base/RuleNameEndsWithAgendaFilter.java
-@@ -18,10 +18,10 @@ package org.drools.core.base;
+@@ -20,10 +20,10 @@ package org.drools.core.base;
import java.io.Serializable;
@@ -1705,10 +1746,10 @@ index cb579b9530..a3288d92b5 100644
import org.kie.api.runtime.rule.Match;
diff --git a/drools-core/src/main/java/org/drools/core/base/RuleNameEqualsAgendaFilter.java b/drools-core/src/main/java/org/drools/core/base/RuleNameEqualsAgendaFilter.java
-index 74e86b8f30..1457cfc0d0 100644
+index 3401e22816..d8baa266dc 100644
--- a/drools-core/src/main/java/org/drools/core/base/RuleNameEqualsAgendaFilter.java
+++ b/drools-core/src/main/java/org/drools/core/base/RuleNameEqualsAgendaFilter.java
-@@ -18,10 +18,10 @@ package org.drools.core.base;
+@@ -20,10 +20,10 @@ package org.drools.core.base;
import java.io.Serializable;
@@ -1724,10 +1765,10 @@ index 74e86b8f30..1457cfc0d0 100644
import org.kie.api.runtime.rule.Match;
diff --git a/drools-core/src/main/java/org/drools/core/base/RuleNameMatchesAgendaFilter.java b/drools-core/src/main/java/org/drools/core/base/RuleNameMatchesAgendaFilter.java
-index 6003fb3fbf..b52dd7053d 100644
+index d535a3be94..c3c0a75b42 100644
--- a/drools-core/src/main/java/org/drools/core/base/RuleNameMatchesAgendaFilter.java
+++ b/drools-core/src/main/java/org/drools/core/base/RuleNameMatchesAgendaFilter.java
-@@ -20,10 +20,10 @@ import java.io.Serializable;
+@@ -22,10 +22,10 @@ import java.io.Serializable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -1743,10 +1784,10 @@ index 6003fb3fbf..b52dd7053d 100644
import org.kie.api.runtime.rule.Match;
diff --git a/drools-core/src/main/java/org/drools/core/base/RuleNameStartsWithAgendaFilter.java b/drools-core/src/main/java/org/drools/core/base/RuleNameStartsWithAgendaFilter.java
-index c5f6384f43..fea26fb7bc 100644
+index 53047b62f3..ad510a5643 100644
--- a/drools-core/src/main/java/org/drools/core/base/RuleNameStartsWithAgendaFilter.java
+++ b/drools-core/src/main/java/org/drools/core/base/RuleNameStartsWithAgendaFilter.java
-@@ -18,10 +18,10 @@ package org.drools.core.base;
+@@ -20,10 +20,10 @@ package org.drools.core.base;
import java.io.Serializable;
@@ -1762,13 +1803,13 @@ index c5f6384f43..fea26fb7bc 100644
import org.kie.api.runtime.rule.Match;
diff --git a/drools-core/src/main/java/org/drools/core/common/DefaultFactHandle.java b/drools-core/src/main/java/org/drools/core/common/DefaultFactHandle.java
-index f7d14914f2..a40e0a5c32 100644
+index c3a8820eec..7be2b8f319 100644
--- a/drools-core/src/main/java/org/drools/core/common/DefaultFactHandle.java
+++ b/drools-core/src/main/java/org/drools/core/common/DefaultFactHandle.java
-@@ -20,10 +20,10 @@ import java.util.Objects;
- import java.util.function.Consumer;
- import java.util.function.Predicate;
- import java.util.stream.Stream;
+@@ -31,10 +31,10 @@ import org.drools.core.util.AbstractBaseLinkedListNode;
+ import org.drools.util.StringUtils;
+ import org.kie.api.runtime.rule.FactHandle;
+
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
@@ -1777,17 +1818,17 @@ index f7d14914f2..a40e0a5c32 100644
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlRootElement;
-
- import org.drools.core.WorkingMemoryEntryPoint;
- import org.drools.core.factmodel.traits.TraitTypeEnum;
+ import java.util.Objects;
+ import java.util.function.Consumer;
+ import java.util.function.Predicate;
diff --git a/drools-core/src/main/java/org/drools/core/common/DisconnectedFactHandle.java b/drools-core/src/main/java/org/drools/core/common/DisconnectedFactHandle.java
-index e1e365627c..e9a82ec886 100644
+index 2710924f63..2b0cb81678 100644
--- a/drools-core/src/main/java/org/drools/core/common/DisconnectedFactHandle.java
+++ b/drools-core/src/main/java/org/drools/core/common/DisconnectedFactHandle.java
-@@ -21,13 +21,13 @@ import java.io.ObjectInput;
- import java.io.ObjectOutput;
- import java.util.function.Consumer;
- import java.util.function.Predicate;
+@@ -28,13 +28,13 @@ import org.drools.core.reteoo.RightTuple;
+ import org.drools.core.reteoo.Tuple;
+ import org.kie.api.runtime.rule.FactHandle;
+
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
@@ -1802,15 +1843,15 @@ index e1e365627c..e9a82ec886 100644
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlSchemaType;
+import jakarta.xml.bind.annotation.XmlSeeAlso;
-
- import org.drools.core.WorkingMemoryEntryPoint;
- import org.drools.core.base.ArrayElements;
+ import java.io.Externalizable;
+ import java.io.IOException;
+ import java.io.ObjectInput;
diff --git a/drools-core/src/main/java/org/drools/core/common/ObjectFactory.java b/drools-core/src/main/java/org/drools/core/common/ObjectFactory.java
-index 236d78023e..cb378ad082 100644
+index d3c1b5d3e7..52799274d7 100644
--- a/drools-core/src/main/java/org/drools/core/common/ObjectFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/ObjectFactory.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.drools.core.common;
-import javax.xml.bind.annotation.XmlRegistry;
@@ -1819,12 +1860,12 @@ index 236d78023e..cb378ad082 100644
@XmlRegistry
public class ObjectFactory {
diff --git a/drools-core/src/main/java/org/drools/core/common/QueryElementFactHandle.java b/drools-core/src/main/java/org/drools/core/common/QueryElementFactHandle.java
-index d6b72a241c..ae1fb6d096 100644
+index 7bbb6e16bc..dd47f2a724 100644
--- a/drools-core/src/main/java/org/drools/core/common/QueryElementFactHandle.java
+++ b/drools-core/src/main/java/org/drools/core/common/QueryElementFactHandle.java
-@@ -20,9 +20,9 @@ import java.util.Arrays;
- import java.util.function.Consumer;
- import java.util.function.Predicate;
+@@ -25,9 +25,9 @@ import org.drools.core.reteoo.LeftTuple;
+ import org.drools.core.reteoo.RightTuple;
+ import org.drools.core.reteoo.Tuple;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
@@ -1832,15 +1873,15 @@ index d6b72a241c..ae1fb6d096 100644
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
- import org.drools.core.WorkingMemoryEntryPoint;
- import org.drools.core.factmodel.traits.TraitTypeEnum;
- import org.drools.core.reteoo.LeftTuple;
+ import java.util.Arrays;
+ import java.util.function.Consumer;
+ import java.util.function.Predicate;
diff --git a/drools-core/src/main/java/org/drools/core/util/AbstractBaseLinkedListNode.java b/drools-core/src/main/java/org/drools/core/util/AbstractBaseLinkedListNode.java
-index 5cd6e541a5..b38cf3801b 100644
+index e37c37fc31..a9aec456b6 100644
--- a/drools-core/src/main/java/org/drools/core/util/AbstractBaseLinkedListNode.java
+++ b/drools-core/src/main/java/org/drools/core/util/AbstractBaseLinkedListNode.java
-@@ -16,9 +16,9 @@
-
+@@ -18,9 +18,9 @@
+ */
package org.drools.core.util;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -1853,10 +1894,10 @@ index 5cd6e541a5..b38cf3801b 100644
/**
* Provides a abstract base implementation that an object can extend so that it can be used in a LinkedList.
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-deployment/src/main/java/org/drools/drl/quarkus/deployment/DroolsAssetsProcessor.java b/drools-drl-quarkus-extension/drools-drl-quarkus-deployment/src/main/java/org/drools/drl/quarkus/deployment/DroolsAssetsProcessor.java
-index 75848ee1fe..9b879819ef 100644
+index c679cb7bcd..5a19341206 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-deployment/src/main/java/org/drools/drl/quarkus/deployment/DroolsAssetsProcessor.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-deployment/src/main/java/org/drools/drl/quarkus/deployment/DroolsAssetsProcessor.java
-@@ -23,7 +23,7 @@ import java.util.Optional;
+@@ -26,7 +26,7 @@ import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
@@ -1866,10 +1907,10 @@ index 75848ee1fe..9b879819ef 100644
import io.quarkus.arc.deployment.GeneratedBeanBuildItem;
import io.quarkus.deployment.annotations.BuildProducer;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-multiunit/src/test/java/org/drools/quarkus/ruleunit/examples/multiunit/RuntimeTest.java b/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-multiunit/src/test/java/org/drools/quarkus/ruleunit/examples/multiunit/RuntimeTest.java
-index 728bf58c32..f8d77a3717 100644
+index 532ee58bf1..4122df9325 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-multiunit/src/test/java/org/drools/quarkus/ruleunit/examples/multiunit/RuntimeTest.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-multiunit/src/test/java/org/drools/quarkus/ruleunit/examples/multiunit/RuntimeTest.java
-@@ -16,7 +16,7 @@
+@@ -19,7 +19,7 @@
package org.drools.quarkus.ruleunit.examples.multiunit;
import java.util.concurrent.atomic.AtomicReference;
@@ -1879,10 +1920,10 @@ index 728bf58c32..f8d77a3717 100644
import io.quarkus.test.junit.QuarkusTest;
import org.drools.ruleunits.api.DataHandle;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/main/java/org/drools/quarkus/ruleunit/examples/reactive/Adaptor.java b/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/main/java/org/drools/quarkus/ruleunit/examples/reactive/Adaptor.java
-index bf39868231..8d6faa6145 100644
+index ff8e3f9091..799f21622a 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/main/java/org/drools/quarkus/ruleunit/examples/reactive/Adaptor.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/main/java/org/drools/quarkus/ruleunit/examples/reactive/Adaptor.java
-@@ -15,10 +15,10 @@
+@@ -18,10 +18,10 @@
*/
package org.drools.quarkus.ruleunit.examples.reactive;
@@ -1897,10 +1938,10 @@ index bf39868231..8d6faa6145 100644
import org.eclipse.microprofile.reactive.messaging.Emitter;
import org.eclipse.microprofile.reactive.messaging.Incoming;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/KafkaTestResourceLifecycleManager.java b/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/KafkaTestResourceLifecycleManager.java
-index 14e6615a21..e1daf6033d 100644
+index bbed58452e..da927c5ab0 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/KafkaTestResourceLifecycleManager.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/KafkaTestResourceLifecycleManager.java
-@@ -19,7 +19,7 @@ import java.util.HashMap;
+@@ -22,7 +22,7 @@ import java.util.HashMap;
import java.util.Map;
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
@@ -1910,10 +1951,10 @@ index 14e6615a21..e1daf6033d 100644
public class KafkaTestResourceLifecycleManager implements QuarkusTestResourceLifecycleManager {
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/RuntimeTest.java b/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/RuntimeTest.java
-index 6e1f058eef..79b6bb074c 100644
+index 52f998f55f..9771b03d80 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/RuntimeTest.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-examples/drools-drl-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/RuntimeTest.java
-@@ -15,13 +15,13 @@
+@@ -18,13 +18,13 @@
*/
package org.drools.quarkus.ruleunit.examples.reactive;
@@ -1932,10 +1973,10 @@ index 6e1f058eef..79b6bb074c 100644
import org.junit.jupiter.api.Test;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test-hotreload/src/main/java/org/drools/quarkus/test/hotreload/FindAdultEndpoint.java b/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test-hotreload/src/main/java/org/drools/quarkus/test/hotreload/FindAdultEndpoint.java
-index 8d34b05084..9043abe090 100644
+index 28cd4eb6d1..8cea5670cf 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test-hotreload/src/main/java/org/drools/quarkus/test/hotreload/FindAdultEndpoint.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test-hotreload/src/main/java/org/drools/quarkus/test/hotreload/FindAdultEndpoint.java
-@@ -17,12 +17,12 @@ package org.drools.quarkus.test.hotreload;
+@@ -20,12 +20,12 @@ package org.drools.quarkus.test.hotreload;
import java.util.ArrayList;
import java.util.List;
@@ -1955,12 +1996,12 @@ index 8d34b05084..9043abe090 100644
import org.kie.api.runtime.KieRuntimeBuilder;
import org.kie.api.runtime.KieSession;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test/src/main/java/org/drools/quarkus/test/TestableResource.java b/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test/src/main/java/org/drools/quarkus/test/TestableResource.java
-index f1008d7c1a..14c0de94bb 100644
+index cc47c1a1e3..cd52e85e0f 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test/src/main/java/org/drools/quarkus/test/TestableResource.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test/src/main/java/org/drools/quarkus/test/TestableResource.java
-@@ -22,10 +22,10 @@ import java.util.List;
- import java.util.concurrent.TimeUnit;
- import java.util.stream.Collectors;
+@@ -25,10 +25,10 @@ import org.kie.api.runtime.KieSession;
+ import org.kie.api.runtime.rule.FactHandle;
+ import org.kie.api.time.SessionPseudoClock;
-import javax.inject.Inject;
-import javax.ws.rs.GET;
@@ -1970,14 +2011,14 @@ index f1008d7c1a..14c0de94bb 100644
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Response;
-
- import org.kie.api.KieBase;
- import org.kie.api.definition.KiePackage;
+ import java.util.Collection;
+ import java.util.List;
+ import java.util.concurrent.TimeUnit;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test/src/test/java/org/drools/quarkus/test/RuntimeTest.java b/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test/src/test/java/org/drools/quarkus/test/RuntimeTest.java
-index 541d798fb4..c8aff28b7b 100644
+index 76cedc9fb6..203de60e6b 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test/src/test/java/org/drools/quarkus/test/RuntimeTest.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-integration-test/src/test/java/org/drools/quarkus/test/RuntimeTest.java
-@@ -21,7 +21,7 @@ import org.kie.api.definition.KiePackage;
+@@ -24,7 +24,7 @@ import org.kie.api.definition.KiePackage;
import org.kie.api.runtime.KieRuntimeBuilder;
import org.kie.api.runtime.KieSession;
@@ -1987,11 +2028,11 @@ index 541d798fb4..c8aff28b7b 100644
import java.util.stream.Collectors;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/main/java/org/drools/quarkus/quickstart/test/HomeAlertsBean.java b/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/main/java/org/drools/quarkus/quickstart/test/HomeAlertsBean.java
-index f93f6ed055..0c671401fc 100644
+index a58bbabd5c..8f8ecf910c 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/main/java/org/drools/quarkus/quickstart/test/HomeAlertsBean.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/main/java/org/drools/quarkus/quickstart/test/HomeAlertsBean.java
-@@ -19,8 +19,8 @@ import java.util.Collection;
- import java.util.List;
+@@ -21,8 +21,8 @@ package org.drools.quarkus.quickstart.test;
+ import java.util.Collection;
import java.util.stream.Collectors;
-import javax.enterprise.context.ApplicationScoped;
@@ -2002,10 +2043,10 @@ index f93f6ed055..0c671401fc 100644
import org.drools.quarkus.quickstart.test.model.Alert;
import org.drools.quarkus.quickstart.test.model.CCTV;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/test/java/org/drools/quarkus/quickstart/test/BeanTest.java b/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/test/java/org/drools/quarkus/quickstart/test/BeanTest.java
-index 2029f09c59..1fccb052af 100644
+index 4896b42524..0aa6285eb0 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/test/java/org/drools/quarkus/quickstart/test/BeanTest.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/test/java/org/drools/quarkus/quickstart/test/BeanTest.java
-@@ -15,7 +15,7 @@
+@@ -18,7 +18,7 @@
*/
package org.drools.quarkus.quickstart.test;
@@ -2015,10 +2056,10 @@ index 2029f09c59..1fccb052af 100644
import io.quarkus.test.junit.QuarkusTest;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/test/java/org/drools/quarkus/quickstart/test/RuntimeIT.java b/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/test/java/org/drools/quarkus/quickstart/test/RuntimeIT.java
-index 1eef910ed3..637bc75cf5 100644
+index 6bcc7afc17..21ce175faa 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/test/java/org/drools/quarkus/quickstart/test/RuntimeIT.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-quickstart-test/src/test/java/org/drools/quarkus/quickstart/test/RuntimeIT.java
-@@ -15,7 +15,7 @@
+@@ -18,7 +18,7 @@
*/
package org.drools.quarkus.quickstart.test;
@@ -2028,10 +2069,10 @@ index 1eef910ed3..637bc75cf5 100644
import io.quarkus.test.junit.QuarkusTest;
import org.drools.quarkus.quickstart.test.model.Alert;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/main/java/org/drools/quarkus/ruleunit/test/TestableResource.java b/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/main/java/org/drools/quarkus/ruleunit/test/TestableResource.java
-index e956f4e318..29a8932f7f 100644
+index 471c3c33a9..99e2c9da1b 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/main/java/org/drools/quarkus/ruleunit/test/TestableResource.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/main/java/org/drools/quarkus/ruleunit/test/TestableResource.java
-@@ -17,10 +17,10 @@ package org.drools.quarkus.ruleunit.test;
+@@ -20,10 +20,10 @@ package org.drools.quarkus.ruleunit.test;
import static org.assertj.core.api.Assertions.assertThat;
@@ -2047,10 +2088,10 @@ index e956f4e318..29a8932f7f 100644
import org.drools.ruleunits.api.RuleUnit;
import org.drools.ruleunits.api.RuleUnitInstance;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/test/java/org/drools/quarkus/ruleunit/test/RuntimeDslRuleUnitTest.java b/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/test/java/org/drools/quarkus/ruleunit/test/RuntimeDslRuleUnitTest.java
-index b5c0335a67..eb2582f0ae 100644
+index e3b9d48e5a..ba13c358f3 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/test/java/org/drools/quarkus/ruleunit/test/RuntimeDslRuleUnitTest.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/test/java/org/drools/quarkus/ruleunit/test/RuntimeDslRuleUnitTest.java
-@@ -5,7 +5,7 @@ import org.drools.ruleunits.api.RuleUnit;
+@@ -23,7 +23,7 @@ import org.drools.ruleunits.api.RuleUnit;
import org.drools.ruleunits.api.RuleUnitInstance;
import org.junit.jupiter.api.Test;
@@ -2060,10 +2101,10 @@ index b5c0335a67..eb2582f0ae 100644
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/test/java/org/drools/quarkus/ruleunit/test/RuntimeTest.java b/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/test/java/org/drools/quarkus/ruleunit/test/RuntimeTest.java
-index b683dcef38..5e7d100d4c 100644
+index 48aaf17201..873e112e29 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/test/java/org/drools/quarkus/ruleunit/test/RuntimeTest.java
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus-ruleunit-integration-test/src/test/java/org/drools/quarkus/ruleunit/test/RuntimeTest.java
-@@ -20,7 +20,7 @@ import org.drools.ruleunits.api.RuleUnit;
+@@ -23,7 +23,7 @@ import org.drools.ruleunits.api.RuleUnit;
import org.drools.ruleunits.api.RuleUnitInstance;
import org.junit.jupiter.api.Test;
@@ -2073,10 +2114,10 @@ index b683dcef38..5e7d100d4c 100644
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/drools-drl-quarkus-extension/drools-drl-quarkus/pom.xml b/drools-drl-quarkus-extension/drools-drl-quarkus/pom.xml
-index 61d43070ed..58406ae103 100644
+index 8205e8d898..84c941d52b 100644
--- a/drools-drl-quarkus-extension/drools-drl-quarkus/pom.xml
+++ b/drools-drl-quarkus-extension/drools-drl-quarkus/pom.xml
-@@ -83,7 +83,7 @@
+@@ -103,7 +103,7 @@
io.quarkus
@@ -2085,67 +2126,13 @@ index 61d43070ed..58406ae103 100644
${version.io.quarkus}
-diff --git a/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext-deployment/src/main/java/org/drools/drl/quarkus/testext/deployment/DroolsTestExtAssetsProcessor.java b/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext-deployment/src/main/java/org/drools/drl/quarkus/testext/deployment/DroolsTestExtAssetsProcessor.java
-index 7912b11dda..9d79d13914 100644
---- a/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext-deployment/src/main/java/org/drools/drl/quarkus/testext/deployment/DroolsTestExtAssetsProcessor.java
-+++ b/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext-deployment/src/main/java/org/drools/drl/quarkus/testext/deployment/DroolsTestExtAssetsProcessor.java
-@@ -22,7 +22,7 @@ import java.util.Optional;
- import java.util.Set;
- import java.util.stream.Collectors;
-
--import javax.inject.Inject;
-+import jakarta.inject.Inject;
-
- import org.drools.drl.quarkus.util.deployment.KmoduleKieBaseModelsBuiltItem;
- import org.drools.drl.quarkus.util.deployment.PatternsTypesBuildItem;
-diff --git a/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext-deployment/src/test/java/org/drools/quarkus/testext/test/ExtensionTest.java b/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext-deployment/src/test/java/org/drools/quarkus/testext/test/ExtensionTest.java
-index be6385b9ac..b67a1b17ac 100644
---- a/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext-deployment/src/test/java/org/drools/quarkus/testext/test/ExtensionTest.java
-+++ b/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext-deployment/src/test/java/org/drools/quarkus/testext/test/ExtensionTest.java
-@@ -17,7 +17,7 @@ package org.drools.quarkus.testext.test;
-
- import static org.assertj.core.api.Assertions.assertThat;
-
--import javax.inject.Inject;
-+import jakarta.inject.Inject;
-
- import org.drools.drl.quarkus.testext.deployment.OtnClassesSingleton;
- import org.drools.quarkus.examples.otn.model.ASubclassOfMeasurement;
-diff --git a/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext/pom.xml b/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext/pom.xml
-index 84853c8a22..29751dabb2 100644
---- a/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext/pom.xml
-+++ b/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext/pom.xml
-@@ -37,7 +37,7 @@
-
-
- io.quarkus
-- quarkus-bootstrap-maven-plugin
-+ quarkus-extension-maven-plugin
- ${version.io.quarkus}
-
-
-diff --git a/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext/src/main/java/org/drools/drl/quarkus/testext/deployment/OtnClassesSingleton.java b/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext/src/main/java/org/drools/drl/quarkus/testext/deployment/OtnClassesSingleton.java
-index 21a9a01650..8860daacad 100644
---- a/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext/src/main/java/org/drools/drl/quarkus/testext/deployment/OtnClassesSingleton.java
-+++ b/drools-drl-quarkus-extension/example-drools-drl-quarkus-testext/src/main/java/org/drools/drl/quarkus/testext/deployment/OtnClassesSingleton.java
-@@ -19,8 +19,8 @@ package org.drools.drl.quarkus.testext.deployment;
- import java.util.Map;
- import java.util.Set;
-
--import javax.enterprise.event.Observes;
--import javax.inject.Singleton;
-+import jakarta.enterprise.event.Observes;
-+import jakarta.inject.Singleton;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
diff --git a/drools-legacy-test-util/src/test/java/org/drools/mvel/compiler/Person.java b/drools-legacy-test-util/src/test/java/org/drools/mvel/compiler/Person.java
-index 5a84459c4d..51a3bfa074 100644
+index 64eb8809ad..dc8e7e8d69 100644
--- a/drools-legacy-test-util/src/test/java/org/drools/mvel/compiler/Person.java
+++ b/drools-legacy-test-util/src/test/java/org/drools/mvel/compiler/Person.java
-@@ -18,8 +18,8 @@ package org.drools.mvel.compiler;
+@@ -20,8 +20,8 @@ package org.drools.mvel.compiler;
- import org.drools.core.factmodel.traits.Traitable;
+ import org.drools.base.factmodel.traits.Traitable;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
@@ -2155,10 +2142,10 @@ index 5a84459c4d..51a3bfa074 100644
import java.math.BigDecimal;
import java.math.BigInteger;
diff --git a/drools-mvel/pom.xml b/drools-mvel/pom.xml
-index 5c932d41d9..db230eb9d2 100644
+index 32920b00fc..755633ec43 100644
--- a/drools-mvel/pom.xml
+++ b/drools-mvel/pom.xml
-@@ -70,9 +70,10 @@
+@@ -90,9 +90,10 @@
provided
@@ -2167,17 +2154,17 @@ index 5c932d41d9..db230eb9d2 100644
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3jakarta.xml.bind
diff --git a/drools-mvel/src/test/java/org/drools/mvel/compiler/Person.java b/drools-mvel/src/test/java/org/drools/mvel/compiler/Person.java
-index a356782f80..77d00fc4fa 100644
+index 13641acfe0..a1b4bda3fb 100644
--- a/drools-mvel/src/test/java/org/drools/mvel/compiler/Person.java
+++ b/drools-mvel/src/test/java/org/drools/mvel/compiler/Person.java
-@@ -18,8 +18,8 @@ package org.drools.mvel.compiler;
+@@ -20,8 +20,8 @@ package org.drools.mvel.compiler;
- import org.drools.core.factmodel.traits.Traitable;
+ import org.drools.base.factmodel.traits.Traitable;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
@@ -2187,10 +2174,10 @@ index a356782f80..77d00fc4fa 100644
import java.math.BigDecimal;
import java.math.BigInteger;
diff --git a/drools-persistence/drools-persistence-api/pom.xml b/drools-persistence/drools-persistence-api/pom.xml
-index d8e0d7af5b..98aa7cc44f 100644
+index c5b6465541..6387089e97 100644
--- a/drools-persistence/drools-persistence-api/pom.xml
+++ b/drools-persistence/drools-persistence-api/pom.xml
-@@ -41,9 +41,10 @@
+@@ -61,9 +61,10 @@
drools-commands
@@ -2199,15 +2186,15 @@ index d8e0d7af5b..98aa7cc44f 100644
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3com.sun.xml.bind
diff --git a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/api/PersistenceContextManager.java b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/api/PersistenceContextManager.java
-index d64ee3b8e3..1c988e07cc 100644
+index 1037ab3c35..5a20fa88f6 100644
--- a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/api/PersistenceContextManager.java
+++ b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/api/PersistenceContextManager.java
-@@ -19,7 +19,7 @@ import org.kie.api.runtime.ExecutableRunner;
+@@ -22,7 +22,7 @@ import org.kie.api.runtime.ExecutableRunner;
import org.kie.api.command.Command;
import org.kie.api.runtime.KieSession;
@@ -2217,11 +2204,11 @@ index d64ee3b8e3..1c988e07cc 100644
public interface PersistenceContextManager {
diff --git a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/api/TransactionSynchronizationRegistryHelper.java b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/api/TransactionSynchronizationRegistryHelper.java
-index 5d4a3b36d4..d567816171 100644
+index 647c178f2b..74654794cf 100644
--- a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/api/TransactionSynchronizationRegistryHelper.java
+++ b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/api/TransactionSynchronizationRegistryHelper.java
-@@ -15,7 +15,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.drools.persistence.api;
-import javax.transaction.TransactionSynchronizationRegistry;
@@ -2230,10 +2217,10 @@ index 5d4a3b36d4..d567816171 100644
import org.drools.persistence.jta.JtaTransactionSynchronizationAdapter;
import org.slf4j.Logger;
diff --git a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionManager.java b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionManager.java
-index 9ed3486b10..08d3957504 100644
+index 967365339f..8f08330a74 100644
--- a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionManager.java
+++ b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionManager.java
-@@ -20,10 +20,10 @@ import java.util.HashMap;
+@@ -23,10 +23,10 @@ import java.util.HashMap;
import java.util.Map;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -2248,7 +2235,7 @@ index 9ed3486b10..08d3957504 100644
import org.drools.persistence.api.TransactionManager;
import org.drools.persistence.api.TransactionSynchronization;
-@@ -69,7 +69,7 @@ public class JtaTransactionManager
+@@ -72,7 +72,7 @@ public class JtaTransactionManager
UserTransaction ut;
Object tsr;
@@ -2257,7 +2244,7 @@ index 9ed3486b10..08d3957504 100644
public JtaTransactionManager(Object ut,
Object tsr,
-@@ -80,20 +80,20 @@ public class JtaTransactionManager
+@@ -83,20 +83,20 @@ public class JtaTransactionManager
this.ut = ( UserTransaction ) ( (ut != null) ? ut : findUserTransaction() );
}
@@ -2284,7 +2271,7 @@ index 9ed3486b10..08d3957504 100644
}
InitialContext context;
-@@ -112,7 +112,7 @@ public class JtaTransactionManager
+@@ -115,7 +115,7 @@ public class JtaTransactionManager
continue;
}
try {
@@ -2293,7 +2280,7 @@ index 9ed3486b10..08d3957504 100644
logger.debug( "JTA TransactionManager found at fallback JNDI location [{}]",
jndiName );
return tm;
-@@ -146,7 +146,7 @@ public class JtaTransactionManager
+@@ -149,7 +149,7 @@ public class JtaTransactionManager
}
protected Object findTransactionSynchronizationRegistry(UserTransaction ut,
@@ -2303,10 +2290,10 @@ index 9ed3486b10..08d3957504 100644
if ( transactionSynchronizationRegistryClass == null ) {
// JTA 1.1 API not present - skip.
diff --git a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionManagerFactory.java b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionManagerFactory.java
-index 7572b105d1..7cfb68b514 100644
+index e7c3b5eb52..e99fe58afd 100644
--- a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionManagerFactory.java
+++ b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionManagerFactory.java
-@@ -32,8 +32,8 @@ public class JtaTransactionManagerFactory extends TransactionManagerFactory {
+@@ -36,8 +36,8 @@ public class JtaTransactionManagerFactory extends TransactionManagerFactory {
}
/**
@@ -2318,11 +2305,11 @@ index 7572b105d1..7cfb68b514 100644
*
* @param env
diff --git a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionSynchronizationAdapter.java b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionSynchronizationAdapter.java
-index d1d8dcc3a9..ba7001e629 100644
+index fa387cd3a4..79247df16e 100644
--- a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionSynchronizationAdapter.java
+++ b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/JtaTransactionSynchronizationAdapter.java
-@@ -15,8 +15,8 @@
-
+@@ -18,8 +18,8 @@
+ */
package org.drools.persistence.jta;
-import javax.transaction.Status;
@@ -2333,10 +2320,10 @@ index d1d8dcc3a9..ba7001e629 100644
import org.drools.persistence.api.TransactionManager;
import org.drools.persistence.api.TransactionSynchronization;
diff --git a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/TransactionLockInterceptor.java b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/TransactionLockInterceptor.java
-index 228078eec7..267c2fca72 100644
+index 7673604692..e1dc0b573f 100644
--- a/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/TransactionLockInterceptor.java
+++ b/drools-persistence/drools-persistence-api/src/main/java/org/drools/persistence/jta/TransactionLockInterceptor.java
-@@ -19,7 +19,7 @@ package org.drools.persistence.jta;
+@@ -21,7 +21,7 @@ package org.drools.persistence.jta;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.locks.ReentrantLock;
@@ -2346,10 +2333,10 @@ index 228078eec7..267c2fca72 100644
import org.drools.commands.impl.AbstractInterceptor;
import org.drools.persistence.api.OrderedTransactionSynchronization;
diff --git a/drools-persistence/drools-persistence-jpa/pom.xml b/drools-persistence/drools-persistence-jpa/pom.xml
-index a694f0fabd..9961785cdf 100644
+index 7706d4c655..1cfd38fa65 100644
--- a/drools-persistence/drools-persistence-jpa/pom.xml
+++ b/drools-persistence/drools-persistence-jpa/pom.xml
-@@ -103,9 +103,10 @@
+@@ -123,9 +123,10 @@
drools-mvel
@@ -2358,11 +2345,11 @@ index a694f0fabd..9961785cdf 100644
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3com.sun.xml.bind
-@@ -147,13 +148,8 @@
+@@ -167,13 +168,8 @@
@@ -2379,10 +2366,10 @@ index a694f0fabd..9961785cdf 100644
test
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/TriggerUpdateTransactionSynchronization.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/TriggerUpdateTransactionSynchronization.java
-index d71fbda727..aaeb023cb3 100644
+index 82114ee564..71bc7749ff 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/TriggerUpdateTransactionSynchronization.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/TriggerUpdateTransactionSynchronization.java
-@@ -16,7 +16,7 @@
+@@ -19,7 +19,7 @@
package org.drools.persistence;
import java.util.Set;
@@ -2392,10 +2379,10 @@ index d71fbda727..aaeb023cb3 100644
import org.drools.persistence.api.TransactionManager;
import org.drools.persistence.api.TransactionManagerHelper;
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/info/SessionInfo.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/info/SessionInfo.java
-index 52cc91c136..b5da3259b2 100644
+index ec5069ad65..54fd6cc38a 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/info/SessionInfo.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/info/SessionInfo.java
-@@ -17,15 +17,15 @@ package org.drools.persistence.info;
+@@ -20,15 +20,15 @@ package org.drools.persistence.info;
import java.util.Date;
@@ -2421,10 +2408,10 @@ index 52cc91c136..b5da3259b2 100644
import org.drools.persistence.api.PersistentSession;
import org.drools.persistence.SessionMarshallingHelper;
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/info/WorkItemInfo.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/info/WorkItemInfo.java
-index 65e07c870c..3308128753 100644
+index 3db72569d3..ce26c9d2f8 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/info/WorkItemInfo.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/info/WorkItemInfo.java
-@@ -20,15 +20,15 @@ import java.io.ByteArrayOutputStream;
+@@ -23,15 +23,15 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.Date;
@@ -2450,10 +2437,10 @@ index 65e07c870c..3308128753 100644
import org.drools.core.marshalling.MarshallerReaderContext;
import org.drools.core.marshalling.MarshallerWriteContext;
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/AbstractPersistenceContextManager.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/AbstractPersistenceContextManager.java
-index a36e1b4843..abf285eb0d 100644
+index 0e2bf94fd7..415ce0724c 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/AbstractPersistenceContextManager.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/AbstractPersistenceContextManager.java
-@@ -15,8 +15,8 @@
+@@ -18,8 +18,8 @@
*/
package org.drools.persistence.jpa;
@@ -2465,10 +2452,10 @@ index a36e1b4843..abf285eb0d 100644
import org.drools.persistence.api.TransactionManager;
import org.kie.api.runtime.Environment;
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/JpaPersistenceContext.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/JpaPersistenceContext.java
-index 9cf810eef7..ee7012c495 100644
+index 08c24f246f..4ae16e7ed5 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/JpaPersistenceContext.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/JpaPersistenceContext.java
-@@ -17,8 +17,8 @@ package org.drools.persistence.jpa;
+@@ -20,8 +20,8 @@ package org.drools.persistence.jpa;
import java.lang.reflect.Field;
@@ -2480,10 +2467,10 @@ index 9cf810eef7..ee7012c495 100644
import org.drools.persistence.api.PersistenceContext;
import org.drools.persistence.api.PersistentSession;
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/JpaPersistenceContextManager.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/JpaPersistenceContextManager.java
-index 407ff42b02..6baa92cf50 100644
+index 2663169c07..7dc6f58be9 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/JpaPersistenceContextManager.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/JpaPersistenceContextManager.java
-@@ -15,7 +15,7 @@
+@@ -18,7 +18,7 @@
*/
package org.drools.persistence.jpa;
@@ -2493,10 +2480,10 @@ index 407ff42b02..6baa92cf50 100644
import org.drools.persistence.api.PersistenceContext;
import org.drools.persistence.api.PersistenceContextManager;
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/OptimisticLockRetryInterceptor.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/OptimisticLockRetryInterceptor.java
-index b5bea39c66..5e64f56dea 100644
+index ec5e1d68a5..9148566757 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/OptimisticLockRetryInterceptor.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/OptimisticLockRetryInterceptor.java
-@@ -22,7 +22,7 @@ import org.kie.api.runtime.RequestContext;
+@@ -24,7 +24,7 @@ import org.kie.api.runtime.RequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -2506,10 +2493,10 @@ index b5bea39c66..5e64f56dea 100644
/**
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/EntityPersister.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/EntityPersister.java
-index 231e8e2ee9..c05ec10dea 100644
+index 31c97addfb..80544087bd 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/EntityPersister.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/EntityPersister.java
-@@ -19,7 +19,7 @@ package org.drools.persistence.jpa.marshaller;
+@@ -21,7 +21,7 @@ package org.drools.persistence.jpa.marshaller;
import java.util.ArrayList;
import java.util.List;
@@ -2519,10 +2506,10 @@ index 231e8e2ee9..c05ec10dea 100644
public class EntityPersister {
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/JPAPlaceholderResolverStrategy.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/JPAPlaceholderResolverStrategy.java
-index 062523d9f1..717941f5f6 100644
+index 9e4b4469f6..98c9a5b745 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/JPAPlaceholderResolverStrategy.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/JPAPlaceholderResolverStrategy.java
-@@ -25,11 +25,11 @@ import java.io.Serializable;
+@@ -27,11 +27,11 @@ import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
@@ -2536,14 +2523,14 @@ index 062523d9f1..717941f5f6 100644
+import jakarta.persistence.Persistence;
+import jakarta.persistence.metamodel.EntityType;
+import jakarta.persistence.metamodel.Metamodel;
- import org.drools.core.common.DroolsObjectInputStream;
+ import org.drools.base.common.DroolsObjectInputStream;
import org.drools.persistence.api.TransactionAware;
import org.drools.persistence.api.TransactionManager;
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/MappedVariable.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/MappedVariable.java
-index 604fe48cea..5edb5d9e1d 100644
+index 5448b4c2eb..7f9072b9fc 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/MappedVariable.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/MappedVariable.java
-@@ -17,13 +17,13 @@
+@@ -19,13 +19,13 @@
package org.drools.persistence.jpa.marshaller;
import java.io.Serializable;
@@ -2565,10 +2552,10 @@ index 604fe48cea..5edb5d9e1d 100644
@Entity
@SequenceGenerator(name="mappedVarIdSeq", sequenceName="MAPPED_VAR_ID_SEQ")
diff --git a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/VariableEntity.java b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/VariableEntity.java
-index 445d9eb17f..f35762181d 100644
+index 1cbe51e322..abc061e965 100644
--- a/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/VariableEntity.java
+++ b/drools-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/jpa/marshaller/VariableEntity.java
-@@ -19,11 +19,11 @@ package org.drools.persistence.jpa.marshaller;
+@@ -21,11 +21,11 @@ package org.drools.persistence.jpa.marshaller;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
@@ -2586,11 +2573,13 @@ index 445d9eb17f..f35762181d 100644
@MappedSuperclass
public abstract class VariableEntity implements Serializable {
diff --git a/drools-persistence/drools-persistence-jpa/src/test/filtered-resources/META-INF/persistence.xml b/drools-persistence/drools-persistence-jpa/src/test/filtered-resources/META-INF/persistence.xml
-index 6c29cb4771..027943ebcc 100644
+index 36800ba01f..845fcc9f72 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/filtered-resources/META-INF/persistence.xml
+++ b/drools-persistence/drools-persistence-jpa/src/test/filtered-resources/META-INF/persistence.xml
-@@ -1,8 +1,8 @@
-
+@@ -19,10 +19,10 @@
+ under the License.
+
+ -->
-org.hibernate.jpa.HibernatePersistenceProvider
diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/JtaTransactionManagerFactoryTest.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/JtaTransactionManagerFactoryTest.java
-index c21e072745..ec16582dbf 100644
+index 137814bbcf..d8d57b2d3c 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/JtaTransactionManagerFactoryTest.java
+++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/JtaTransactionManagerFactoryTest.java
-@@ -16,13 +16,13 @@ package org.drools.persistence.jta;
+@@ -20,13 +20,13 @@ package org.drools.persistence.jta;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -2627,10 +2616,10 @@ index c21e072745..ec16582dbf 100644
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/JtaTransactionManagerTest.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/JtaTransactionManagerTest.java
-index 2ed2d81ebd..fd02afeba9 100644
+index 399a743730..449fc7759a 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/JtaTransactionManagerTest.java
+++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/JtaTransactionManagerTest.java
-@@ -20,10 +20,10 @@ import java.util.HashMap;
+@@ -23,10 +23,10 @@ import java.util.HashMap;
import java.util.Map;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -2646,10 +2635,10 @@ index 2ed2d81ebd..fd02afeba9 100644
import org.drools.commands.impl.CommandBasedStatefulKnowledgeSessionImpl;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/TransactionTestCommand.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/TransactionTestCommand.java
-index 3c04feca2e..08c264c012 100644
+index 973d928459..42df2e5504 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/TransactionTestCommand.java
+++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/TransactionTestCommand.java
-@@ -16,8 +16,8 @@
+@@ -19,8 +19,8 @@
package org.drools.persistence.jta;
import java.util.HashMap;
@@ -2661,10 +2650,10 @@ index 3c04feca2e..08c264c012 100644
import com.arjuna.ats.jta.TransactionManager;
import org.drools.core.base.MapGlobalResolver;
diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/TransactionTestObject.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/TransactionTestObject.java
-index e3f3f3d8a3..5ed617ea17 100644
+index b06c96053c..c9930291c8 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/TransactionTestObject.java
+++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/jta/TransactionTestObject.java
-@@ -17,13 +17,13 @@ package org.drools.persistence.jta;
+@@ -20,13 +20,13 @@ package org.drools.persistence.jta;
import java.io.Serializable;
@@ -2686,10 +2675,10 @@ index e3f3f3d8a3..5ed617ea17 100644
/**
* This class is used to test transactions.
diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/kie/persistence/session/JpaPersistentStatefulSessionTest.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/kie/persistence/session/JpaPersistentStatefulSessionTest.java
-index c23b5361db..28babfedb9 100644
+index 0f5b11a2b2..0863d2fdfa 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/kie/persistence/session/JpaPersistentStatefulSessionTest.java
+++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/kie/persistence/session/JpaPersistentStatefulSessionTest.java
-@@ -26,7 +26,7 @@ import java.util.Properties;
+@@ -29,7 +29,7 @@ import java.util.Properties;
import java.util.concurrent.atomic.AtomicInteger;
import javax.naming.InitialContext;
@@ -2699,10 +2688,10 @@ index c23b5361db..28babfedb9 100644
import org.drools.core.FlowSessionConfiguration;
import org.drools.core.SessionConfiguration;
diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/map/impl/JpaBasedPersistenceTest.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/map/impl/JpaBasedPersistenceTest.java
-index ba7dd5109d..6e7e5432c6 100644
+index 6a001acc5c..730575a1a4 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/map/impl/JpaBasedPersistenceTest.java
+++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/map/impl/JpaBasedPersistenceTest.java
-@@ -31,7 +31,7 @@ import org.kie.internal.persistence.jpa.JPAKnowledgeService;
+@@ -34,7 +34,7 @@ import org.kie.internal.persistence.jpa.JPAKnowledgeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -2712,10 +2701,10 @@ index ba7dd5109d..6e7e5432c6 100644
import java.util.Collection;
import java.util.Map;
diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/JpaPersistentStatefulSessionTest.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/JpaPersistentStatefulSessionTest.java
-index 438650b714..566285a37a 100644
+index d7e3a61ae4..f61559f90b 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/JpaPersistentStatefulSessionTest.java
+++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/JpaPersistentStatefulSessionTest.java
-@@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicInteger;
+@@ -29,7 +29,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.IntStream;
import javax.naming.InitialContext;
@@ -2725,10 +2714,10 @@ index 438650b714..566285a37a 100644
import org.drools.commands.ChainableRunner;
import org.drools.commands.impl.CommandBasedStatefulKnowledgeSessionImpl;
diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/ReloadSessionTest.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/ReloadSessionTest.java
-index fada845fc1..2b8e3a8b3a 100644
+index 67d4e42d62..b49aff7838 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/ReloadSessionTest.java
+++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/session/ReloadSessionTest.java
-@@ -20,8 +20,8 @@ import java.util.Arrays;
+@@ -23,8 +23,8 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import java.util.Random;
@@ -2740,10 +2729,10 @@ index fada845fc1..2b8e3a8b3a 100644
import org.drools.core.common.DefaultFactHandle;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
diff --git a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/util/DroolsPersistenceUtil.java b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/util/DroolsPersistenceUtil.java
-index 31038d2afa..775f3f19dc 100644
+index 563b210269..a61ec15cbe 100644
--- a/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/util/DroolsPersistenceUtil.java
+++ b/drools-persistence/drools-persistence-jpa/src/test/java/org/drools/persistence/util/DroolsPersistenceUtil.java
-@@ -19,7 +19,7 @@ import static org.kie.api.runtime.EnvironmentName.GLOBALS;
+@@ -22,7 +22,7 @@ import static org.kie.api.runtime.EnvironmentName.GLOBALS;
import static org.kie.api.runtime.EnvironmentName.TRANSACTION;
import java.util.Map;
@@ -2753,10 +2742,10 @@ index 31038d2afa..775f3f19dc 100644
import org.drools.core.impl.EnvironmentFactory;
import org.kie.api.runtime.Environment;
diff --git a/drools-reliability/drools-reliability-infinispan/pom.xml b/drools-reliability/drools-reliability-infinispan/pom.xml
-index c60b638498..1ed4497bf1 100644
+index 1e735e0b82..e3703b0a77 100644
--- a/drools-reliability/drools-reliability-infinispan/pom.xml
+++ b/drools-reliability/drools-reliability-infinispan/pom.xml
-@@ -34,7 +34,7 @@
+@@ -52,7 +52,7 @@
org.infinispan
@@ -2765,7 +2754,7 @@ index c60b638498..1ed4497bf1 100644
org.infinispan.protostream
-@@ -43,7 +43,7 @@
+@@ -61,7 +61,7 @@
org.infinispan
@@ -2775,12 +2764,12 @@ index c60b638498..1ed4497bf1 100644
org.drools
diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/Person.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/Person.java
-index a356782f80..77d00fc4fa 100644
+index 13641acfe0..a1b4bda3fb 100644
--- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/Person.java
+++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/Person.java
-@@ -18,8 +18,8 @@ package org.drools.mvel.compiler;
+@@ -20,8 +20,8 @@ package org.drools.mvel.compiler;
- import org.drools.core.factmodel.traits.Traitable;
+ import org.drools.base.factmodel.traits.Traitable;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
@@ -2790,23 +2779,23 @@ index a356782f80..77d00fc4fa 100644
import java.math.BigDecimal;
import java.math.BigInteger;
diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/QueryTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/QueryTest.java
-index 89b51fcb2b..3c35815740 100644
+index fa47533cfe..008f664410 100644
--- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/QueryTest.java
+++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/QueryTest.java
-@@ -29,7 +29,7 @@ import java.util.Set;
- import java.util.TreeSet;
- import java.util.stream.Collectors;
- import java.util.stream.StreamSupport;
+@@ -58,7 +58,7 @@ import org.kie.api.runtime.rule.Row;
+ import org.kie.api.runtime.rule.Variable;
+ import org.kie.api.runtime.rule.ViewChangedEventListener;
+
-import javax.xml.bind.JAXBContext;
+import jakarta.xml.bind.JAXBContext;
-
- import org.drools.core.QueryResultsImpl;
- import org.drools.core.base.ClassObjectType;
+ import java.io.ByteArrayInputStream;
+ import java.io.IOException;
+ import java.io.StringWriter;
diff --git a/drools-test-coverage/test-integration-nomvel/pom.xml b/drools-test-coverage/test-integration-nomvel/pom.xml
-index 7d9f51e8a0..37d3c8b126 100644
+index 5ff7b47f21..e7dc861938 100644
--- a/drools-test-coverage/test-integration-nomvel/pom.xml
+++ b/drools-test-coverage/test-integration-nomvel/pom.xml
-@@ -102,9 +102,10 @@
+@@ -107,9 +107,10 @@
test
@@ -2815,15 +2804,15 @@ index 7d9f51e8a0..37d3c8b126 100644
+ org.glassfish.jaxb
+ jaxb-runtimetest
-+ 4.0.2
++ 4.0.3jakarta.xml.bind
diff --git a/drools-traits/pom.xml b/drools-traits/pom.xml
-index baa0ea53db..ceb8129c5f 100644
+index 4f4a128fc4..e64e44949b 100644
--- a/drools-traits/pom.xml
+++ b/drools-traits/pom.xml
-@@ -138,8 +138,8 @@
+@@ -158,8 +158,8 @@
@@ -2834,7 +2823,7 @@ index baa0ea53db..ceb8129c5f 100644
hibernate-coretest
-@@ -158,11 +158,6 @@
+@@ -178,11 +178,6 @@
jandextest
@@ -2847,11 +2836,13 @@ index baa0ea53db..ceb8129c5f 100644
com.sun.xml.bind
diff --git a/drools-traits/src/test/filtered-resources/META-INF/persistence.xml b/drools-traits/src/test/filtered-resources/META-INF/persistence.xml
-index 6c29cb4771..027943ebcc 100644
+index 36800ba01f..845fcc9f72 100644
--- a/drools-traits/src/test/filtered-resources/META-INF/persistence.xml
+++ b/drools-traits/src/test/filtered-resources/META-INF/persistence.xml
-@@ -1,8 +1,8 @@
-
+@@ -19,10 +19,10 @@
+ under the License.
+
+ -->
-org.hibernate.jpa.HibernatePersistenceProvider
diff --git a/drools-traits/src/test/java/org/drools/traits/persistence/DroolsPersistenceUtil.java b/drools-traits/src/test/java/org/drools/traits/persistence/DroolsPersistenceUtil.java
-index aaf01f00a2..9d634ec94c 100644
+index 2adf906eee..126aa6a7bf 100644
--- a/drools-traits/src/test/java/org/drools/traits/persistence/DroolsPersistenceUtil.java
+++ b/drools-traits/src/test/java/org/drools/traits/persistence/DroolsPersistenceUtil.java
-@@ -17,7 +17,7 @@ package org.drools.traits.persistence;
+@@ -20,7 +20,7 @@ package org.drools.traits.persistence;
import java.util.Map;
@@ -2876,10 +2867,10 @@ index aaf01f00a2..9d634ec94c 100644
import org.drools.core.base.MapGlobalResolver;
import org.drools.core.impl.EnvironmentFactory;
diff --git a/drools-wiring/drools-wiring-dynamic/pom.xml b/drools-wiring/drools-wiring-dynamic/pom.xml
-index 447e660a2d..675ac0965e 100755
+index b207771d95..e654092670 100755
--- a/drools-wiring/drools-wiring-dynamic/pom.xml
+++ b/drools-wiring/drools-wiring-dynamic/pom.xml
-@@ -34,9 +34,10 @@
+@@ -54,9 +54,10 @@
provided
@@ -2888,15 +2879,15 @@ index 447e660a2d..675ac0965e 100755
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3jakarta.xml.bind
diff --git a/drools-xml-support/src/test/java/org/drools/xml/support/CommandSerializationTest.java b/drools-xml-support/src/test/java/org/drools/xml/support/CommandSerializationTest.java
-index 0599915ec9..41b607324f 100644
+index 8f867a445d..eb2f89ed19 100644
--- a/drools-xml-support/src/test/java/org/drools/xml/support/CommandSerializationTest.java
+++ b/drools-xml-support/src/test/java/org/drools/xml/support/CommandSerializationTest.java
-@@ -31,9 +31,9 @@ import java.util.Random;
+@@ -34,9 +34,9 @@ import java.util.Random;
import java.util.UUID;
import java.util.regex.Pattern;
@@ -2910,10 +2901,10 @@ index 0599915ec9..41b607324f 100644
import org.drools.core.ClassObjectFilter;
import org.drools.core.ClassObjectSerializationFilter;
diff --git a/kie-api/src/main/java/org/kie/api/pmml/AbstractOutput.java b/kie-api/src/main/java/org/kie/api/pmml/AbstractOutput.java
-index cb33ba3dc3..5748494ac9 100644
+index 9c727454ac..6c41a29dfb 100644
--- a/kie-api/src/main/java/org/kie/api/pmml/AbstractOutput.java
+++ b/kie-api/src/main/java/org/kie/api/pmml/AbstractOutput.java
-@@ -15,11 +15,11 @@
+@@ -18,11 +18,11 @@
*/
package org.kie.api.pmml;
@@ -2931,10 +2922,10 @@ index cb33ba3dc3..5748494ac9 100644
@XmlRootElement(name="pmmlOutput")
@XmlAccessorType(XmlAccessType.FIELD)
diff --git a/kie-api/src/main/java/org/kie/api/pmml/DoubleFieldOutput.java b/kie-api/src/main/java/org/kie/api/pmml/DoubleFieldOutput.java
-index 413db4a8fd..d6c5f18648 100644
+index 54fbc05305..73a2b9ce6e 100644
--- a/kie-api/src/main/java/org/kie/api/pmml/DoubleFieldOutput.java
+++ b/kie-api/src/main/java/org/kie/api/pmml/DoubleFieldOutput.java
-@@ -15,9 +15,9 @@
+@@ -18,9 +18,9 @@
*/
package org.kie.api.pmml;
@@ -2948,10 +2939,10 @@ index 413db4a8fd..d6c5f18648 100644
@XmlRootElement(name="value")
@XmlAccessorType(XmlAccessType.FIELD)
diff --git a/kie-api/src/main/java/org/kie/api/pmml/IntegerFieldOutput.java b/kie-api/src/main/java/org/kie/api/pmml/IntegerFieldOutput.java
-index 0de625b8f2..37b5d8317c 100644
+index eebb975416..82d2a1fb5c 100644
--- a/kie-api/src/main/java/org/kie/api/pmml/IntegerFieldOutput.java
+++ b/kie-api/src/main/java/org/kie/api/pmml/IntegerFieldOutput.java
-@@ -15,9 +15,9 @@
+@@ -18,9 +18,9 @@
*/
package org.kie.api.pmml;
@@ -2965,10 +2956,10 @@ index 0de625b8f2..37b5d8317c 100644
@XmlRootElement(name="value")
@XmlAccessorType(XmlAccessType.FIELD)
diff --git a/kie-api/src/main/java/org/kie/api/pmml/PMML4DataField.java b/kie-api/src/main/java/org/kie/api/pmml/PMML4DataField.java
-index 5294014700..f7ea76fedb 100644
+index 63515db55a..ebe972d861 100644
--- a/kie-api/src/main/java/org/kie/api/pmml/PMML4DataField.java
+++ b/kie-api/src/main/java/org/kie/api/pmml/PMML4DataField.java
-@@ -15,10 +15,10 @@
+@@ -18,10 +18,10 @@
*/
package org.kie.api.pmml;
@@ -2984,10 +2975,10 @@ index 5294014700..f7ea76fedb 100644
import org.kie.api.definition.type.Role;
import org.kie.api.definition.type.Role.Type;
diff --git a/kie-api/src/main/java/org/kie/api/pmml/PMML4OutputField.java b/kie-api/src/main/java/org/kie/api/pmml/PMML4OutputField.java
-index f795d3a5b0..b001d86df1 100644
+index cf5a119103..8424cea547 100644
--- a/kie-api/src/main/java/org/kie/api/pmml/PMML4OutputField.java
+++ b/kie-api/src/main/java/org/kie/api/pmml/PMML4OutputField.java
-@@ -15,11 +15,11 @@
+@@ -18,11 +18,11 @@
*/
package org.kie.api.pmml;
@@ -3005,10 +2996,10 @@ index f795d3a5b0..b001d86df1 100644
import org.kie.api.definition.type.Role;
import org.kie.api.definition.type.Role.Type;
diff --git a/kie-api/src/main/java/org/kie/api/pmml/PMML4Result.java b/kie-api/src/main/java/org/kie/api/pmml/PMML4Result.java
-index 49728c846f..0bb619813d 100644
+index d3421b3bff..530096a9fe 100644
--- a/kie-api/src/main/java/org/kie/api/pmml/PMML4Result.java
+++ b/kie-api/src/main/java/org/kie/api/pmml/PMML4Result.java
-@@ -21,13 +21,13 @@ import java.util.HashMap;
+@@ -24,13 +24,13 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
@@ -3030,10 +3021,10 @@ index 49728c846f..0bb619813d 100644
import org.kie.api.definition.type.PropertyReactive;
import org.slf4j.Logger;
diff --git a/kie-api/src/main/java/org/kie/api/pmml/PMMLRequestData.java b/kie-api/src/main/java/org/kie/api/pmml/PMMLRequestData.java
-index b39d168f63..4ad5e23862 100644
+index 235999635f..88cef27806 100644
--- a/kie-api/src/main/java/org/kie/api/pmml/PMMLRequestData.java
+++ b/kie-api/src/main/java/org/kie/api/pmml/PMMLRequestData.java
-@@ -22,12 +22,12 @@ import java.util.List;
+@@ -25,12 +25,12 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -3053,10 +3044,10 @@ index b39d168f63..4ad5e23862 100644
/**
* This class provides a vanilla mechanism for sending data to
diff --git a/kie-api/src/main/java/org/kie/api/pmml/ParameterInfo.java b/kie-api/src/main/java/org/kie/api/pmml/ParameterInfo.java
-index 677a93b394..7fcf52c98d 100644
+index 2f83078daa..9bea0c17b2 100644
--- a/kie-api/src/main/java/org/kie/api/pmml/ParameterInfo.java
+++ b/kie-api/src/main/java/org/kie/api/pmml/ParameterInfo.java
-@@ -15,12 +15,12 @@
+@@ -18,12 +18,12 @@
*/
package org.kie.api.pmml;
@@ -3076,10 +3067,10 @@ index 677a93b394..7fcf52c98d 100644
@XmlType(name="ParameterInfo")
@XmlAccessorType(XmlAccessType.NONE)
diff --git a/kie-api/src/main/java/org/kie/api/pmml/StringFieldOutput.java b/kie-api/src/main/java/org/kie/api/pmml/StringFieldOutput.java
-index 1d59e1de4d..adf7419718 100644
+index f21eb8951a..d52c9a9e3f 100644
--- a/kie-api/src/main/java/org/kie/api/pmml/StringFieldOutput.java
+++ b/kie-api/src/main/java/org/kie/api/pmml/StringFieldOutput.java
-@@ -15,9 +15,9 @@
+@@ -18,9 +18,9 @@
*/
package org.kie.api.pmml;
@@ -3093,10 +3084,10 @@ index 1d59e1de4d..adf7419718 100644
@XmlRootElement(name="value")
@XmlAccessorType(XmlAccessType.FIELD)
diff --git a/kie-api/src/main/java/org/kie/api/runtime/query/QueryContext.java b/kie-api/src/main/java/org/kie/api/runtime/query/QueryContext.java
-index 970c21fafd..e461e4857d 100644
+index 024a918763..77968f77a3 100644
--- a/kie-api/src/main/java/org/kie/api/runtime/query/QueryContext.java
+++ b/kie-api/src/main/java/org/kie/api/runtime/query/QueryContext.java
-@@ -18,11 +18,11 @@ package org.kie.api.runtime.query;
+@@ -20,11 +20,11 @@ package org.kie.api.runtime.query;
import java.io.Serializable;
@@ -3114,11 +3105,11 @@ index 970c21fafd..e461e4857d 100644
@XmlType(name="kieQueryContext")
@XmlAccessorType(XmlAccessType.FIELD)
diff --git a/kie-api/src/main/java/org/kie/api/task/model/Status.java b/kie-api/src/main/java/org/kie/api/task/model/Status.java
-index f37ba2607c..737985a4db 100644
+index 57a6b11146..7dc485aa7d 100644
--- a/kie-api/src/main/java/org/kie/api/task/model/Status.java
+++ b/kie-api/src/main/java/org/kie/api/task/model/Status.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.kie.api.task.model;
-import javax.xml.bind.annotation.XmlType;
@@ -3127,10 +3118,10 @@ index f37ba2607c..737985a4db 100644
@XmlType
diff --git a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/pmml/DMNImportPMMLInfo.java b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/pmml/DMNImportPMMLInfo.java
-index 7c3bb1c197..d7053e68a3 100644
+index cf32659cdc..bf47f624c0 100644
--- a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/pmml/DMNImportPMMLInfo.java
+++ b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/pmml/DMNImportPMMLInfo.java
-@@ -62,7 +62,7 @@ public class DMNImportPMMLInfo extends PMMLInfo {
+@@ -64,7 +64,7 @@ public class DMNImportPMMLInfo extends PMMLInfo {
final PMML pmml = org.jpmml.model.PMMLUtil.unmarshal(is);
PMMLHeaderInfo h = PMMLInfo.pmmlToHeaderInfo(pmml, pmml.getHeader());
for (DataField df : pmml.getDataDictionary().getDataFields()) {
@@ -3139,7 +3130,7 @@ index 7c3bb1c197..d7053e68a3 100644
BuiltInType ft = getBuiltInTypeByDataType(df.getDataType());
List helperFEELProfiles = cc.getFeelProfiles();
DMNFEELHelper feel = new DMNFEELHelper(cc.getRootClassLoader(), helperFEELProfiles);
-@@ -118,7 +118,7 @@ public class DMNImportPMMLInfo extends PMMLInfo {
+@@ -120,7 +120,7 @@ public class DMNImportPMMLInfo extends PMMLInfo {
// register ., being a composite type of the different model outputs fields
Map typeMap = new HashMap<>();
outputFields.stream().forEach(field -> {
@@ -3149,10 +3140,10 @@ index 7c3bb1c197..d7053e68a3 100644
DMNType type = new SimpleTypeImpl(i.getNamespace(), fieldName, null, false, null, dmnModel.getTypeRegistry().resolveType(dmnModel.getDefinitions().getURIFEEL(), ft.getName()), ft);
typeMap.put(fieldName, type);
diff --git a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/pmml/PMMLInfo.java b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/pmml/PMMLInfo.java
-index e272189c00..a2cc46881c 100644
+index e51f9a16ce..179cbf1d2a 100644
--- a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/pmml/PMMLInfo.java
+++ b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/pmml/PMMLInfo.java
-@@ -24,7 +24,7 @@ import java.util.HashMap;
+@@ -26,7 +26,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -3161,7 +3152,7 @@ index e272189c00..a2cc46881c 100644
import org.dmg.pmml.Extension;
import org.dmg.pmml.Header;
-@@ -73,15 +73,15 @@ public class PMMLInfo {
+@@ -75,15 +75,15 @@ public class PMMLInfo {
miningSchema.getMiningFields()
.stream()
.filter(mf -> mf.getUsageType() == UsageType.ACTIVE)
@@ -3181,10 +3172,10 @@ index e272189c00..a2cc46881c 100644
return new PMMLModelInfo(pm.getModelName(), pm.getClass().getSimpleName(), inputFields, targetFields, outputFields);
}
diff --git a/kie-dmn/kie-dmn-feel/src/test/java/org/kie/dmn/feel/jandex/AbstractJandexTest.java b/kie-dmn/kie-dmn-feel/src/test/java/org/kie/dmn/feel/jandex/AbstractJandexTest.java
-index 1e4a002044..0f043b9da0 100644
+index d5bc785f51..046555611e 100644
--- a/kie-dmn/kie-dmn-feel/src/test/java/org/kie/dmn/feel/jandex/AbstractJandexTest.java
+++ b/kie-dmn/kie-dmn-feel/src/test/java/org/kie/dmn/feel/jandex/AbstractJandexTest.java
-@@ -29,9 +29,9 @@ import java.util.Map;
+@@ -31,9 +31,9 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
@@ -3198,10 +3189,10 @@ index 1e4a002044..0f043b9da0 100644
import org.jboss.jandex.ClassInfo;
import org.jboss.jandex.DotName;
diff --git a/kie-dmn/kie-dmn-legacy-tests/pom.xml b/kie-dmn/kie-dmn-legacy-tests/pom.xml
-index e525713c19..12de41670a 100644
+index d8fd3fb209..3494e8924e 100644
--- a/kie-dmn/kie-dmn-legacy-tests/pom.xml
+++ b/kie-dmn/kie-dmn-legacy-tests/pom.xml
-@@ -100,9 +100,10 @@
+@@ -120,9 +120,10 @@
provided
@@ -3210,15 +3201,15 @@ index e525713c19..12de41670a 100644
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3jakarta.xml.bind
diff --git a/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDiagram.java b/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDiagram.java
-index 0667ee8e9e..f89f066949 100644
+index 73c6e9a0dc..5afed613ea 100644
--- a/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDiagram.java
+++ b/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDiagram.java
-@@ -19,7 +19,7 @@ package org.kie.dmn.model.v1_2.dmndi;
+@@ -21,7 +21,7 @@ package org.kie.dmn.model.v1_2.dmndi;
import java.util.ArrayList;
import java.util.List;
@@ -3228,10 +3219,10 @@ index 0667ee8e9e..f89f066949 100644
public class DMNDiagram extends Diagram implements org.kie.dmn.model.api.dmndi.DMNDiagram {
diff --git a/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DiagramElement.java b/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DiagramElement.java
-index f13fcb5275..6d6950fb5f 100644
+index 6c7d93324b..7d0166c1cf 100644
--- a/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DiagramElement.java
+++ b/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DiagramElement.java
-@@ -19,7 +19,7 @@ package org.kie.dmn.model.v1_2.dmndi;
+@@ -21,7 +21,7 @@ package org.kie.dmn.model.v1_2.dmndi;
import java.util.ArrayList;
import java.util.List;
@@ -3241,10 +3232,10 @@ index f13fcb5275..6d6950fb5f 100644
import org.kie.dmn.model.v1_2.KieDMNModelInstrumentedBase;
diff --git a/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_3/dmndi/DMNDiagram.java b/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_3/dmndi/DMNDiagram.java
-index a1c3bda6f5..b2332ca6e8 100644
+index 07d10ee3b7..56c12fed1f 100644
--- a/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_3/dmndi/DMNDiagram.java
+++ b/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_3/dmndi/DMNDiagram.java
-@@ -19,7 +19,7 @@ package org.kie.dmn.model.v1_3.dmndi;
+@@ -21,7 +21,7 @@ package org.kie.dmn.model.v1_3.dmndi;
import java.util.ArrayList;
import java.util.List;
@@ -3254,10 +3245,10 @@ index a1c3bda6f5..b2332ca6e8 100644
public class DMNDiagram extends Diagram implements org.kie.dmn.model.api.dmndi.DMNDiagram {
diff --git a/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_3/dmndi/DiagramElement.java b/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_3/dmndi/DiagramElement.java
-index 37f68faf85..7720ab80ed 100644
+index 3a1d68e30e..a05148e753 100644
--- a/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_3/dmndi/DiagramElement.java
+++ b/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_3/dmndi/DiagramElement.java
-@@ -19,7 +19,7 @@ package org.kie.dmn.model.v1_3.dmndi;
+@@ -21,7 +21,7 @@ package org.kie.dmn.model.v1_3.dmndi;
import java.util.ArrayList;
import java.util.List;
@@ -3267,10 +3258,10 @@ index 37f68faf85..7720ab80ed 100644
import org.kie.dmn.model.v1_3.KieDMNModelInstrumentedBase;
diff --git a/kie-dmn/kie-dmn-model/src/test/java/org/kie/dmn/model/jandex/KieDMNModelJandexTest.java b/kie-dmn/kie-dmn-model/src/test/java/org/kie/dmn/model/jandex/KieDMNModelJandexTest.java
-index 14c47f65e8..4004e43729 100644
+index fec094247e..44999d32c3 100644
--- a/kie-dmn/kie-dmn-model/src/test/java/org/kie/dmn/model/jandex/KieDMNModelJandexTest.java
+++ b/kie-dmn/kie-dmn-model/src/test/java/org/kie/dmn/model/jandex/KieDMNModelJandexTest.java
-@@ -29,9 +29,9 @@ import java.util.Map;
+@@ -31,9 +31,9 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
@@ -3284,10 +3275,10 @@ index 14c47f65e8..4004e43729 100644
import org.jboss.jandex.ClassInfo;
import org.jboss.jandex.DotName;
diff --git a/kie-dmn/kie-dmn-openapi/pom.xml b/kie-dmn/kie-dmn-openapi/pom.xml
-index fa47437585..d860b60d5e 100644
+index 9f0f46d211..d282dc46c3 100644
--- a/kie-dmn/kie-dmn-openapi/pom.xml
+++ b/kie-dmn/kie-dmn-openapi/pom.xml
-@@ -62,9 +62,10 @@
+@@ -82,9 +82,10 @@
provided
@@ -3296,15 +3287,15 @@ index fa47437585..d860b60d5e 100644
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3jakarta.xml.bind
diff --git a/kie-dmn/kie-dmn-pmml-tests-parent/kie-dmn-pmml-tests/pom.xml b/kie-dmn/kie-dmn-pmml-tests-parent/kie-dmn-pmml-tests/pom.xml
-index f5c60e5a89..528df9e79c 100644
+index 5c3b3ebe87..2c5331a1f4 100644
--- a/kie-dmn/kie-dmn-pmml-tests-parent/kie-dmn-pmml-tests/pom.xml
+++ b/kie-dmn/kie-dmn-pmml-tests-parent/kie-dmn-pmml-tests/pom.xml
-@@ -62,9 +62,10 @@
+@@ -82,9 +82,10 @@
provided
@@ -3313,15 +3304,15 @@ index f5c60e5a89..528df9e79c 100644
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3jakarta.xml.bind
diff --git a/kie-dmn/kie-dmn-ruleset2dmn-parent/kie-dmn-ruleset2dmn/src/main/java/org/kie/dmn/ruleset2dmn/Converter.java b/kie-dmn/kie-dmn-ruleset2dmn-parent/kie-dmn-ruleset2dmn/src/main/java/org/kie/dmn/ruleset2dmn/Converter.java
-index 17887354ff..97309c1dda 100644
+index fcfde77a26..06dd73a239 100644
--- a/kie-dmn/kie-dmn-ruleset2dmn-parent/kie-dmn-ruleset2dmn/src/main/java/org/kie/dmn/ruleset2dmn/Converter.java
+++ b/kie-dmn/kie-dmn-ruleset2dmn-parent/kie-dmn-ruleset2dmn/src/main/java/org/kie/dmn/ruleset2dmn/Converter.java
-@@ -36,7 +36,6 @@ import javax.xml.namespace.QName;
+@@ -38,7 +38,6 @@ import javax.xml.namespace.QName;
import org.dmg.pmml.DataDictionary;
import org.dmg.pmml.DataField;
import org.dmg.pmml.DataType;
@@ -3329,7 +3320,7 @@ index 17887354ff..97309c1dda 100644
import org.dmg.pmml.Model;
import org.dmg.pmml.PMML;
import org.dmg.pmml.SimplePredicate;
-@@ -143,7 +142,7 @@ public class Converter {
+@@ -145,7 +144,7 @@ public class Converter {
for (String input : usedPredictors) {
List predicatesForInput = r.map.get(input);
if (predicatesForInput != null && !predicatesForInput.isEmpty()) {
@@ -3338,7 +3329,7 @@ index 17887354ff..97309c1dda 100644
Optional df = pmml.getDataDictionary().getDataFields().stream().filter(x-> x.getName().equals(fnLookup)).findFirst();
UnaryTests ut = processSimplePredicateUnaryOrBinary(predicatesForInput, df);
if (ut.getText().startsWith("\"") && ut.getText().endsWith("\"")) {
-@@ -195,9 +194,9 @@ public class Converter {
+@@ -197,9 +196,9 @@ public class Converter {
}
for (DataField df : pmml.getDataDictionary().getDataFields()) {
@@ -3350,7 +3341,7 @@ index 17887354ff..97309c1dda 100644
}
}
}
-@@ -476,7 +475,7 @@ public class Converter {
+@@ -478,7 +477,7 @@ public class Converter {
}
private static String feelTypeFromDD(DataDictionary dd, String id) {
@@ -3360,10 +3351,10 @@ index 17887354ff..97309c1dda 100644
if (opt.isEmpty()) {
return "Any";
diff --git a/kie-dmn/kie-dmn-ruleset2dmn-parent/kie-dmn-ruleset2dmn/src/main/java/org/kie/dmn/ruleset2dmn/SimpleRuleRow.java b/kie-dmn/kie-dmn-ruleset2dmn-parent/kie-dmn-ruleset2dmn/src/main/java/org/kie/dmn/ruleset2dmn/SimpleRuleRow.java
-index f5b19f4e05..25171444d1 100644
+index b5fd23ed65..9d789df4a4 100644
--- a/kie-dmn/kie-dmn-ruleset2dmn-parent/kie-dmn-ruleset2dmn/src/main/java/org/kie/dmn/ruleset2dmn/SimpleRuleRow.java
+++ b/kie-dmn/kie-dmn-ruleset2dmn-parent/kie-dmn-ruleset2dmn/src/main/java/org/kie/dmn/ruleset2dmn/SimpleRuleRow.java
-@@ -37,7 +37,7 @@ public class SimpleRuleRow {
+@@ -39,7 +39,7 @@ public class SimpleRuleRow {
Predicate rootPredicate = r.getPredicate();
if (rootPredicate instanceof SimplePredicate) {
SimplePredicate sp = (SimplePredicate) rootPredicate;
@@ -3372,7 +3363,7 @@ index f5b19f4e05..25171444d1 100644
} else {
if (!(rootPredicate instanceof CompoundPredicate)) {
throw new UnsupportedOperationException("Was expecting a CompoundPredicate, found: "+rootPredicate.getClass());
-@@ -48,7 +48,7 @@ public class SimpleRuleRow {
+@@ -50,7 +50,7 @@ public class SimpleRuleRow {
}
for (Predicate c : cPredicate.getPredicates()) {
SimplePredicate sp = (SimplePredicate) c;
@@ -3382,10 +3373,10 @@ index f5b19f4e05..25171444d1 100644
}
}
diff --git a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/MCDC2TCKGenerator.java b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/MCDC2TCKGenerator.java
-index 17147f54a7..4a32d87f94 100644
+index c9ef7d523d..a33228f2c2 100644
--- a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/MCDC2TCKGenerator.java
+++ b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/MCDC2TCKGenerator.java
-@@ -21,10 +21,10 @@ import java.util.LinkedHashSet;
+@@ -23,10 +23,10 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
@@ -3401,10 +3392,10 @@ index 17147f54a7..4a32d87f94 100644
import org.kie.dmn.model.api.DecisionTable;
import org.kie.dmn.validation.dtanalysis.mcdc.MCDCAnalyser.PosNegBlock;
diff --git a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/ObjectFactory.java b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/ObjectFactory.java
-index 48a48628e4..e5e128f026 100644
+index 2bf017df45..096c084b79 100644
--- a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/ObjectFactory.java
+++ b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/ObjectFactory.java
-@@ -2,9 +2,9 @@
+@@ -20,9 +20,9 @@
package org.kie.dmn.validation.dtanalysis.mcdc.dmntck;
import org.kie.dmn.feel.util.Generated;
@@ -3418,10 +3409,10 @@ index 48a48628e4..e5e128f026 100644
diff --git a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/TestCaseType.java b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/TestCaseType.java
-index b2006fd5a2..cd387bc2f6 100644
+index cbed707d7f..8d47bb9773 100644
--- a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/TestCaseType.java
+++ b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/TestCaseType.java
-@@ -2,9 +2,9 @@
+@@ -20,9 +20,9 @@
package org.kie.dmn.validation.dtanalysis.mcdc.dmntck;
import org.kie.dmn.feel.util.Generated;
@@ -3435,10 +3426,10 @@ index b2006fd5a2..cd387bc2f6 100644
/**
diff --git a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/TestCases.java b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/TestCases.java
-index 45caf032e2..138efc4c08 100644
+index bad57fe70d..963513552e 100644
--- a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/TestCases.java
+++ b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/TestCases.java
-@@ -7,16 +7,16 @@ import java.util.HashMap;
+@@ -25,16 +25,16 @@ import java.util.HashMap;
import java.util.Map;
import org.kie.dmn.feel.util.Generated;
@@ -3466,10 +3457,10 @@ index 45caf032e2..138efc4c08 100644
import org.w3c.dom.Element;
diff --git a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/ValueType.java b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/ValueType.java
-index 30254ad028..0f02b4ce32 100644
+index 4d9b58d9a1..e06798a5f0 100644
--- a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/ValueType.java
+++ b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/ValueType.java
-@@ -7,17 +7,17 @@ import java.util.HashMap;
+@@ -25,17 +25,17 @@ import java.util.HashMap;
import java.util.Map;
import org.kie.dmn.feel.util.Generated;
@@ -3499,20 +3490,20 @@ index 30254ad028..0f02b4ce32 100644
import org.w3c.dom.Element;
diff --git a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/package-info.java b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/package-info.java
-index f6c8310e3a..9b27fa3be2 100644
+index feed0d6196..8c9014422e 100644
--- a/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/package-info.java
+++ b/kie-dmn/kie-dmn-validation/src/main/java/org/kie/dmn/validation/dtanalysis/mcdc/dmntck/package-info.java
-@@ -4,4 +4,4 @@
+@@ -22,4 +22,4 @@
xmlns = {@XmlNs(prefix = "tc", namespaceURI = "http://www.omg.org/spec/DMN/20160719/testcase")})
package org.kie.dmn.validation.dtanalysis.mcdc.dmntck;
-import javax.xml.bind.annotation.XmlNs;
+import jakarta.xml.bind.annotation.XmlNs;
diff --git a/kie-internal/pom.xml b/kie-internal/pom.xml
-index 3d950d6699..b57830aded 100644
+index b73b247766..2c20438303 100644
--- a/kie-internal/pom.xml
+++ b/kie-internal/pom.xml
-@@ -76,9 +76,10 @@
+@@ -96,9 +96,10 @@
provided
@@ -3521,15 +3512,15 @@ index 3d950d6699..b57830aded 100644
+ org.glassfish.jaxb
+ jaxb-runtimeprovided
-+ 4.0.2
++ 4.0.3
diff --git a/kie-internal/src/main/java/org/kie/internal/builder/help/DroolsJaxbHelperProvider.java b/kie-internal/src/main/java/org/kie/internal/builder/help/DroolsJaxbHelperProvider.java
-index 398a8ca6b2..708942c667 100644
+index 5a70bf3a03..63f6154f20 100644
--- a/kie-internal/src/main/java/org/kie/internal/builder/help/DroolsJaxbHelperProvider.java
+++ b/kie-internal/src/main/java/org/kie/internal/builder/help/DroolsJaxbHelperProvider.java
-@@ -19,8 +19,8 @@ package org.kie.internal.builder.help;
+@@ -21,8 +21,8 @@ package org.kie.internal.builder.help;
import java.io.IOException;
import java.util.Map;
@@ -3541,10 +3532,10 @@ index 398a8ca6b2..708942c667 100644
import com.sun.tools.xjc.Options;
import org.kie.api.KieBase;
diff --git a/kie-internal/src/main/java/org/kie/internal/builder/help/KnowledgeBuilderHelper.java b/kie-internal/src/main/java/org/kie/internal/builder/help/KnowledgeBuilderHelper.java
-index 5bc9fb6176..aef8a66011 100644
+index d60aa2bccc..7772825081 100644
--- a/kie-internal/src/main/java/org/kie/internal/builder/help/KnowledgeBuilderHelper.java
+++ b/kie-internal/src/main/java/org/kie/internal/builder/help/KnowledgeBuilderHelper.java
-@@ -20,8 +20,8 @@ import java.io.IOException;
+@@ -22,8 +22,8 @@ import java.io.IOException;
import java.util.Collections;
import java.util.Map;
@@ -3556,10 +3547,10 @@ index 5bc9fb6176..aef8a66011 100644
import com.sun.tools.xjc.Options;
import org.kie.api.KieBase;
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/CorrelationKeyXmlAdapter.java b/kie-internal/src/main/java/org/kie/internal/jaxb/CorrelationKeyXmlAdapter.java
-index 78b83922f0..7b3f93bf2b 100644
+index a66ab3e155..c859e47bf8 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/CorrelationKeyXmlAdapter.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/CorrelationKeyXmlAdapter.java
-@@ -21,7 +21,7 @@ import java.util.Collections;
+@@ -24,7 +24,7 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -3569,10 +3560,10 @@ index 78b83922f0..7b3f93bf2b 100644
import org.kie.internal.KieInternalServices;
import org.kie.internal.process.CorrelationKey;
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/LocalDateTimeXmlAdapter.java b/kie-internal/src/main/java/org/kie/internal/jaxb/LocalDateTimeXmlAdapter.java
-index 1a8848a4ff..281e5e1823 100644
+index b74e99d2f5..880169eef4 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/LocalDateTimeXmlAdapter.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/LocalDateTimeXmlAdapter.java
-@@ -21,7 +21,7 @@ import java.time.format.DateTimeFormatter;
+@@ -24,7 +24,7 @@ import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.temporal.ChronoField;
@@ -3582,10 +3573,10 @@ index 1a8848a4ff..281e5e1823 100644
public class LocalDateTimeXmlAdapter extends XmlAdapter {
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/LocalDateXmlAdapter.java b/kie-internal/src/main/java/org/kie/internal/jaxb/LocalDateXmlAdapter.java
-index c41076f7a5..bdcc613daf 100644
+index fb733055ac..4ae10ef641 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/LocalDateXmlAdapter.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/LocalDateXmlAdapter.java
-@@ -18,7 +18,7 @@ package org.kie.internal.jaxb;
+@@ -21,7 +21,7 @@ package org.kie.internal.jaxb;
import java.time.DateTimeException;
import java.time.LocalDate;
@@ -3595,10 +3586,10 @@ index c41076f7a5..bdcc613daf 100644
public class LocalDateXmlAdapter extends XmlAdapter {
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/LocalTimeXmlAdapter.java b/kie-internal/src/main/java/org/kie/internal/jaxb/LocalTimeXmlAdapter.java
-index 184f65b0f2..6894454118 100644
+index 9c9f66d618..b269f3fd6c 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/LocalTimeXmlAdapter.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/LocalTimeXmlAdapter.java
-@@ -21,7 +21,7 @@ import java.time.format.DateTimeFormatter;
+@@ -24,7 +24,7 @@ import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.temporal.ChronoField;
@@ -3608,10 +3599,10 @@ index 184f65b0f2..6894454118 100644
public class LocalTimeXmlAdapter extends XmlAdapter {
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/OffsetDateTimeXmlAdapter.java b/kie-internal/src/main/java/org/kie/internal/jaxb/OffsetDateTimeXmlAdapter.java
-index 7774380f71..d2cf1a1c93 100644
+index 705641b07c..52e5d2933c 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/OffsetDateTimeXmlAdapter.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/OffsetDateTimeXmlAdapter.java
-@@ -21,7 +21,7 @@ import java.time.format.DateTimeFormatter;
+@@ -24,7 +24,7 @@ import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.temporal.ChronoField;
@@ -3621,10 +3612,10 @@ index 7774380f71..d2cf1a1c93 100644
public class OffsetDateTimeXmlAdapter extends XmlAdapter {
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueEntry.java b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueEntry.java
-index 6cb8412e19..9bdfb6c0e5 100644
+index f74cfffc61..967d0070a4 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueEntry.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueEntry.java
-@@ -17,12 +17,12 @@ package org.kie.internal.jaxb;
+@@ -20,12 +20,12 @@ package org.kie.internal.jaxb;
import java.util.Map.Entry;
@@ -3644,10 +3635,10 @@ index 6cb8412e19..9bdfb6c0e5 100644
@XmlType
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueMap.java b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueMap.java
-index 7cbab15791..db46e1e033 100644
+index df560c3a85..6436952334 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueMap.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueMap.java
-@@ -23,10 +23,10 @@ import java.util.List;
+@@ -26,10 +26,10 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -3663,10 +3654,10 @@ index 7cbab15791..db46e1e033 100644
import static org.kie.internal.jaxb.StringKeyObjectValueMapXmlAdapter.createJaxbStringObjectMapEntry;
import static org.kie.internal.jaxb.StringKeyObjectValueMapXmlAdapter.deserializeObject;
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueMapXmlAdapter.java b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueMapXmlAdapter.java
-index 0f8326be2f..3a0fd51b2d 100644
+index bb2aa1f32a..34807c6d2a 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueMapXmlAdapter.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyObjectValueMapXmlAdapter.java
-@@ -25,7 +25,7 @@ import java.util.HashMap;
+@@ -28,7 +28,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
@@ -3676,11 +3667,11 @@ index 0f8326be2f..3a0fd51b2d 100644
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueEntry.java b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueEntry.java
-index 07ac95248f..d22ef755e3 100644
+index 88c9abcd74..6a3bc0a122 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueEntry.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueEntry.java
-@@ -15,10 +15,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.kie.internal.jaxb;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -3695,10 +3686,10 @@ index 07ac95248f..d22ef755e3 100644
@XmlType
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueMap.java b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueMap.java
-index d05c3b3606..d84990d6f3 100644
+index 8561a4f266..cac273d126 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueMap.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueMap.java
-@@ -23,10 +23,10 @@ import java.util.List;
+@@ -26,10 +26,10 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -3714,10 +3705,10 @@ index d05c3b3606..d84990d6f3 100644
/**
* This implements {@link Map} in order to fool JSON..
diff --git a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueMapXmlAdapter.java b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueMapXmlAdapter.java
-index caf41ec85a..ccf5431e32 100644
+index e996b22b08..ec05798634 100644
--- a/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueMapXmlAdapter.java
+++ b/kie-internal/src/main/java/org/kie/internal/jaxb/StringKeyStringValueMapXmlAdapter.java
-@@ -19,7 +19,7 @@ import java.util.HashMap;
+@@ -22,7 +22,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
@@ -3727,11 +3718,11 @@ index caf41ec85a..ccf5431e32 100644
/**
* This is a {@link XmlAdapter} for mapping Map<String, String> instances
diff --git a/kie-internal/src/main/java/org/kie/internal/query/QueryContext.java b/kie-internal/src/main/java/org/kie/internal/query/QueryContext.java
-index c8d54837c2..e0b739007b 100644
+index de305a5d93..125af0455a 100644
--- a/kie-internal/src/main/java/org/kie/internal/query/QueryContext.java
+++ b/kie-internal/src/main/java/org/kie/internal/query/QueryContext.java
-@@ -16,9 +16,9 @@
-
+@@ -18,9 +18,9 @@
+ */
package org.kie.internal.query;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -3744,10 +3735,10 @@ index c8d54837c2..e0b739007b 100644
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
diff --git a/kie-internal/src/main/java/org/kie/internal/query/QueryFilter.java b/kie-internal/src/main/java/org/kie/internal/query/QueryFilter.java
-index 21a3b82277..52ef85b198 100644
+index 2e514b2534..5967f78393 100644
--- a/kie-internal/src/main/java/org/kie/internal/query/QueryFilter.java
+++ b/kie-internal/src/main/java/org/kie/internal/query/QueryFilter.java
-@@ -20,9 +20,9 @@ import java.util.HashMap;
+@@ -22,9 +22,9 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
@@ -3761,11 +3752,11 @@ index 21a3b82277..52ef85b198 100644
import org.kie.internal.jaxb.StringKeyObjectValueMapXmlAdapter;
diff --git a/kie-internal/src/main/java/org/kie/internal/query/data/QueryData.java b/kie-internal/src/main/java/org/kie/internal/query/data/QueryData.java
-index a07910db94..04acf1f1ab 100644
+index 3196813c53..6460e83543 100644
--- a/kie-internal/src/main/java/org/kie/internal/query/data/QueryData.java
+++ b/kie-internal/src/main/java/org/kie/internal/query/data/QueryData.java
-@@ -15,10 +15,10 @@
-
+@@ -18,10 +18,10 @@
+ */
package org.kie.internal.query.data;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -3780,10 +3771,10 @@ index a07910db94..04acf1f1ab 100644
import org.kie.internal.query.QueryContext;
diff --git a/kie-internal/src/main/java/org/kie/internal/query/data/QueryParameters.java b/kie-internal/src/main/java/org/kie/internal/query/data/QueryParameters.java
-index 3c22fb6b7f..c31fd5bbbb 100644
+index c68575a784..b6d2272d67 100644
--- a/kie-internal/src/main/java/org/kie/internal/query/data/QueryParameters.java
+++ b/kie-internal/src/main/java/org/kie/internal/query/data/QueryParameters.java
-@@ -21,12 +21,12 @@ import java.util.HashMap;
+@@ -24,12 +24,12 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -3803,10 +3794,10 @@ index 3c22fb6b7f..c31fd5bbbb 100644
import org.kie.internal.jaxb.StringKeyObjectValueMapXmlAdapter;
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/conf/DeploymentDescriptor.java b/kie-internal/src/main/java/org/kie/internal/runtime/conf/DeploymentDescriptor.java
-index 4f0cf1ebb8..68fdf05e9b 100644
+index 65a8711225..1a893de336 100644
--- a/kie-internal/src/main/java/org/kie/internal/runtime/conf/DeploymentDescriptor.java
+++ b/kie-internal/src/main/java/org/kie/internal/runtime/conf/DeploymentDescriptor.java
-@@ -18,8 +18,8 @@ package org.kie.internal.runtime.conf;
+@@ -20,8 +20,8 @@ package org.kie.internal.runtime.conf;
import java.util.List;
@@ -3818,11 +3809,11 @@ index 4f0cf1ebb8..68fdf05e9b 100644
import org.kie.api.remote.Remotable;
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/conf/MergeMode.java b/kie-internal/src/main/java/org/kie/internal/runtime/conf/MergeMode.java
-index 2ca6a37da3..d1829b33e7 100644
+index 1ac2d744d3..97c512830d 100644
--- a/kie-internal/src/main/java/org/kie/internal/runtime/conf/MergeMode.java
+++ b/kie-internal/src/main/java/org/kie/internal/runtime/conf/MergeMode.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.kie.internal.runtime.conf;
-import javax.xml.bind.annotation.XmlType;
@@ -3831,11 +3822,11 @@ index 2ca6a37da3..d1829b33e7 100644
/**
* Defines merging strategy of two descriptors
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/conf/NamedObjectModel.java b/kie-internal/src/main/java/org/kie/internal/runtime/conf/NamedObjectModel.java
-index 22f0573bb5..cfdef63ab4 100644
+index 8421eeda8e..6e7d6ebfb3 100644
--- a/kie-internal/src/main/java/org/kie/internal/runtime/conf/NamedObjectModel.java
+++ b/kie-internal/src/main/java/org/kie/internal/runtime/conf/NamedObjectModel.java
-@@ -16,11 +16,11 @@
-
+@@ -18,11 +18,11 @@
+ */
package org.kie.internal.runtime.conf;
-import javax.xml.bind.annotation.XmlAccessType;
@@ -3852,10 +3843,10 @@ index 22f0573bb5..cfdef63ab4 100644
/**
* Extension of ObjectModel that provides unique name for the object model
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/conf/ObjectModel.java b/kie-internal/src/main/java/org/kie/internal/runtime/conf/ObjectModel.java
-index 5d8ffe8134..2ae91cff15 100644
+index 71306f0345..6268d19d31 100644
--- a/kie-internal/src/main/java/org/kie/internal/runtime/conf/ObjectModel.java
+++ b/kie-internal/src/main/java/org/kie/internal/runtime/conf/ObjectModel.java
-@@ -21,12 +21,12 @@ import java.util.ArrayList;
+@@ -23,12 +23,12 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -3875,11 +3866,11 @@ index 5d8ffe8134..2ae91cff15 100644
* Object model that defines how and of what type the object instance should be created.
* The how is actually delegated to resolved implementation ObjectModelResolver
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/conf/RuntimeStrategy.java b/kie-internal/src/main/java/org/kie/internal/runtime/conf/RuntimeStrategy.java
-index a70f3100d0..415a2c5388 100644
+index 7356288e5e..3389c78f73 100644
--- a/kie-internal/src/main/java/org/kie/internal/runtime/conf/RuntimeStrategy.java
+++ b/kie-internal/src/main/java/org/kie/internal/runtime/conf/RuntimeStrategy.java
-@@ -15,7 +15,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.kie.internal.runtime.conf;
-import javax.xml.bind.annotation.XmlType;
@@ -3888,10 +3879,10 @@ index a70f3100d0..415a2c5388 100644
@XmlType
public enum RuntimeStrategy {
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/DeploymentDescriptorIO.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/DeploymentDescriptorIO.java
-index aeeef03797..cb31932264 100644
+index 87ff5dd215..d9917b3d1b 100644
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/DeploymentDescriptorIO.java
+++ b/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/DeploymentDescriptorIO.java
-@@ -21,10 +21,10 @@ import java.io.StringWriter;
+@@ -23,10 +23,10 @@ import java.io.StringWriter;
import java.net.URL;
import javax.xml.XMLConstants;
@@ -3907,10 +3898,10 @@ index aeeef03797..cb31932264 100644
import javax.xml.validation.SchemaFactory;
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/DeploymentDescriptorImpl.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/DeploymentDescriptorImpl.java
-index c2907e3a7e..a8d8dd299e 100644
+index a93615ec76..d5281d43e9 100644
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/DeploymentDescriptorImpl.java
+++ b/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/DeploymentDescriptorImpl.java
-@@ -27,13 +27,13 @@ import java.util.List;
+@@ -29,13 +29,13 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -3932,11 +3923,11 @@ index c2907e3a7e..a8d8dd299e 100644
import org.kie.internal.runtime.conf.AuditMode;
import org.kie.internal.runtime.conf.BuilderHandler;
diff --git a/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/TransientObjectModel.java b/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/TransientObjectModel.java
-index eb2e3dcbf9..89d6b93d31 100644
+index 572cc4412a..9026d35f5d 100644
--- a/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/TransientObjectModel.java
+++ b/kie-internal/src/main/java/org/kie/internal/runtime/manager/deploy/TransientObjectModel.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.kie.internal.runtime.manager.deploy;
-import javax.xml.bind.annotation.XmlTransient;
@@ -3945,10 +3936,10 @@ index eb2e3dcbf9..89d6b93d31 100644
import org.kie.internal.runtime.conf.ObjectModel;
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/AccessType.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/AccessType.java
-index e892aba698..12420b0f79 100644
+index 406ddf4e70..3caaedb165 100644
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/AccessType.java
+++ b/kie-internal/src/main/java/org/kie/internal/task/api/model/AccessType.java
-@@ -19,7 +19,7 @@
+@@ -21,7 +21,7 @@
*/
package org.kie.internal.task.api.model;
@@ -3958,11 +3949,11 @@ index e892aba698..12420b0f79 100644
@XmlType
public enum AccessType {
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/SubTasksStrategy.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/SubTasksStrategy.java
-index 86cf39d196..982920d369 100644
+index b79d5bc55c..209a283f4f 100644
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/SubTasksStrategy.java
+++ b/kie-internal/src/main/java/org/kie/internal/task/api/model/SubTasksStrategy.java
-@@ -16,7 +16,7 @@
-
+@@ -18,7 +18,7 @@
+ */
package org.kie.internal.task.api.model;
-import javax.xml.bind.annotation.XmlType;
@@ -3971,10 +3962,10 @@ index 86cf39d196..982920d369 100644
@XmlType
public enum SubTasksStrategy{
diff --git a/kie-internal/src/test/java/org/kie/internal/runtime/manager/deploy/JaxbMarshalingTest.java b/kie-internal/src/test/java/org/kie/internal/runtime/manager/deploy/JaxbMarshalingTest.java
-index 29f8b7e2f8..65e66814a9 100644
+index 4cbd3f3192..5038a1806f 100644
--- a/kie-internal/src/test/java/org/kie/internal/runtime/manager/deploy/JaxbMarshalingTest.java
+++ b/kie-internal/src/test/java/org/kie/internal/runtime/manager/deploy/JaxbMarshalingTest.java
-@@ -18,9 +18,9 @@ package org.kie.internal.runtime.manager.deploy;
+@@ -20,9 +20,9 @@ package org.kie.internal.runtime.manager.deploy;
import java.io.StringWriter;
@@ -3988,10 +3979,10 @@ index 29f8b7e2f8..65e66814a9 100644
import org.junit.Test;
import org.kie.internal.runtime.conf.DeploymentDescriptor;
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/main/java/org/kie/pmml/compiler/api/dto/CommonCompilationDTO.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/main/java/org/kie/pmml/compiler/api/dto/CommonCompilationDTO.java
-index faeebf018f..ab667a71c9 100644
+index b4d12b531b..505d54d07a 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/main/java/org/kie/pmml/compiler/api/dto/CommonCompilationDTO.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/main/java/org/kie/pmml/compiler/api/dto/CommonCompilationDTO.java
-@@ -116,7 +116,7 @@ public class CommonCompilationDTO implements CompilationDTO
+@@ -119,7 +119,7 @@ public class CommonCompilationDTO implements CompilationDTO
targetDataField = this.fields.stream()
.filter(DataField.class::isInstance)
.map(DataField.class::cast)
@@ -4001,10 +3992,10 @@ index faeebf018f..ab667a71c9 100644
} else {
targetDataField = null;
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/main/java/org/kie/pmml/compiler/api/utils/ModelUtils.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/main/java/org/kie/pmml/compiler/api/utils/ModelUtils.java
-index 8f99b7d8c8..b4e5e7069f 100644
+index 45015d4b37..6a404100e9 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/main/java/org/kie/pmml/compiler/api/utils/ModelUtils.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/main/java/org/kie/pmml/compiler/api/utils/ModelUtils.java
-@@ -48,8 +48,8 @@ import org.dmg.pmml.TargetValue;
+@@ -51,8 +51,8 @@ import org.dmg.pmml.TargetValue;
import org.dmg.pmml.Targets;
import org.dmg.pmml.TransformationDictionary;
import org.dmg.pmml.Value;
@@ -4015,7 +4006,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
import org.kie.pmml.api.enums.CAST_INTEGER;
import org.kie.pmml.api.enums.DATA_TYPE;
import org.kie.pmml.api.enums.FIELD_USAGE_TYPE;
-@@ -120,8 +120,8 @@ public class ModelUtils {
+@@ -123,8 +123,8 @@ public class ModelUtils {
if (model.getMiningSchema() != null && model.getMiningSchema().getMiningFields() != null) {
for (MiningField miningField : model.getMiningSchema().getMiningFields()) {
if (MiningField.UsageType.TARGET.equals(miningField.getUsageType()) || MiningField.UsageType.PREDICTED.equals(miningField.getUsageType())) {
@@ -4026,7 +4017,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
}
}
}
-@@ -142,8 +142,7 @@ public class ModelUtils {
+@@ -145,8 +145,7 @@ public class ModelUtils {
if (model.getMiningSchema() != null && model.getMiningSchema().getMiningFields() != null) {
for (MiningField miningField : model.getMiningSchema().getMiningFields()) {
if (MiningField.UsageType.TARGET.equals(miningField.getUsageType()) || MiningField.UsageType.PREDICTED.equals(miningField.getUsageType())) {
@@ -4036,7 +4027,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
}
}
}
-@@ -179,7 +178,7 @@ public class ModelUtils {
+@@ -182,7 +181,7 @@ public class ModelUtils {
final String fieldName) {
return fields == null ? Optional.empty() :
fields.stream()
@@ -4045,7 +4036,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
.map(dataField -> OP_TYPE.byName(dataField.getOpType().value()))
.findFirst();
}
-@@ -193,7 +192,7 @@ public class ModelUtils {
+@@ -196,7 +195,7 @@ public class ModelUtils {
public static Optional getOpTypeFromMiningFields(MiningSchema miningSchema, String fieldName) {
if (miningSchema != null && miningSchema.getMiningFields() != null) {
return miningSchema.getMiningFields().stream()
@@ -4054,7 +4045,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
.findFirst()
.map(dataField -> OP_TYPE.byName(dataField.getOpType().value()));
} else {
-@@ -210,7 +209,7 @@ public class ModelUtils {
+@@ -213,7 +212,7 @@ public class ModelUtils {
public static Optional getOpTypeFromTargets(Targets targets, String fieldName) {
if (targets != null && targets.getTargets() != null) {
return targets.getTargets().stream()
@@ -4063,7 +4054,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
.findFirst()
.map(dataField -> OP_TYPE.byName(dataField.getOpType().value()));
} else {
-@@ -228,7 +227,7 @@ public class ModelUtils {
+@@ -231,7 +230,7 @@ public class ModelUtils {
public static DataType getDataType(final List> fields,
final String fieldName) {
return fields.stream()
@@ -4072,7 +4063,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
.map(Field::getDataType)
.findFirst()
.orElseThrow(() -> new KiePMMLInternalException(String.format("Failed to find DataType for " +
-@@ -244,7 +243,7 @@ public class ModelUtils {
+@@ -247,7 +246,7 @@ public class ModelUtils {
*/
public static DATA_TYPE getDATA_TYPE(final List> fields, String fieldName) {
Optional toReturn = fields.stream()
@@ -4081,7 +4072,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
.findFirst()
.map(dataField -> DATA_TYPE.byName(dataField.getDataType().value()));
return toReturn.orElseThrow(() -> new KiePMMLInternalException(String.format("Failed to find DATA_TYPE for " +
-@@ -328,7 +327,7 @@ public class ModelUtils {
+@@ -331,7 +330,7 @@ public class ModelUtils {
*/
public static org.kie.pmml.api.models.MiningField convertToKieMiningField(final MiningField toConvert,
final Field> field) {
@@ -4090,7 +4081,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
final FIELD_USAGE_TYPE fieldUsageType = toConvert.getUsageType() != null ?
FIELD_USAGE_TYPE.byName(toConvert.getUsageType().value()) : null;
final OP_TYPE opType = toConvert.getOpType() != null ? OP_TYPE.byName(toConvert.getOpType().value()) : null;
-@@ -405,13 +404,13 @@ public class ModelUtils {
+@@ -408,13 +407,13 @@ public class ModelUtils {
*/
public static org.kie.pmml.api.models.OutputField convertToKieOutputField(final OutputField toConvert,
final Field> field) {
@@ -4106,7 +4097,7 @@ index 8f99b7d8c8..b4e5e7069f 100644
final RESULT_FEATURE resultFeature = toConvert.getResultFeature() != null ?
RESULT_FEATURE.byName(toConvert.getResultFeature().value()) : null;
final List allowedValues = field instanceof DataField ?
-@@ -456,8 +455,7 @@ public class ModelUtils {
+@@ -459,8 +458,7 @@ public class ModelUtils {
toConvert.getRescaleConstant().doubleValue() : null;
final Double rescaleFactor = toConvert.getRescaleFactor() != null ? toConvert.getRescaleFactor().doubleValue() : null;
return new TargetField(targetValues,
@@ -4117,10 +4108,10 @@ index 8f99b7d8c8..b4e5e7069f 100644
min,
max,
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/mocks/TestModel.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/mocks/TestModel.java
-index 29e0f7b7d0..606759ffdc 100644
+index 32c3b862ca..aab45ac852 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/mocks/TestModel.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/mocks/TestModel.java
-@@ -122,4 +122,14 @@ public class TestModel extends Model {
+@@ -125,4 +125,14 @@ public class TestModel extends Model {
public VisitorAction accept(Visitor visitor) {
return null;
}
@@ -4136,10 +4127,10 @@ index 29e0f7b7d0..606759ffdc 100644
+ }
}
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/testutils/PMMLModelTestUtils.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/testutils/PMMLModelTestUtils.java
-index 9c855e91bc..dd1de2f0d4 100644
+index c668e1a6ff..8f919c3e92 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/testutils/PMMLModelTestUtils.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/testutils/PMMLModelTestUtils.java
-@@ -28,6 +28,7 @@ import org.dmg.pmml.Apply;
+@@ -31,6 +31,7 @@ import org.dmg.pmml.Apply;
import org.dmg.pmml.Array;
import org.dmg.pmml.CompareFunction;
import org.dmg.pmml.ComparisonMeasure;
@@ -4147,7 +4138,7 @@ index 9c855e91bc..dd1de2f0d4 100644
import org.dmg.pmml.CompoundPredicate;
import org.dmg.pmml.Constant;
import org.dmg.pmml.DataDictionary;
-@@ -40,7 +41,6 @@ import org.dmg.pmml.DiscretizeBin;
+@@ -43,7 +44,6 @@ import org.dmg.pmml.DiscretizeBin;
import org.dmg.pmml.Euclidean;
import org.dmg.pmml.Field;
import org.dmg.pmml.FieldColumnPair;
@@ -4155,7 +4146,7 @@ index 9c855e91bc..dd1de2f0d4 100644
import org.dmg.pmml.FieldRef;
import org.dmg.pmml.InlineTable;
import org.dmg.pmml.Interval;
-@@ -86,8 +86,8 @@ import org.dmg.pmml.regression.NumericPredictor;
+@@ -89,8 +89,8 @@ import org.dmg.pmml.regression.NumericPredictor;
import org.dmg.pmml.regression.PredictorTerm;
import org.dmg.pmml.regression.RegressionModel;
import org.dmg.pmml.regression.RegressionTable;
@@ -4166,7 +4157,7 @@ index 9c855e91bc..dd1de2f0d4 100644
import org.kie.pmml.api.enums.DATA_TYPE;
import org.kie.pmml.api.enums.Named;
import org.kie.pmml.api.enums.RESULT_FEATURE;
-@@ -191,7 +191,7 @@ public class PMMLModelTestUtils {
+@@ -194,7 +194,7 @@ public class PMMLModelTestUtils {
miningSchema.addMiningFields(predictedMiningField);
Output output = new Output();
OutputField outputField = new OutputField();
@@ -4175,7 +4166,7 @@ index 9c855e91bc..dd1de2f0d4 100644
outputField.setDataType(lastDataField.getDataType());
outputField.setOpType(getRandomOpType());
toReturn.setModelName(RandomStringUtils.random(6, true, false));
-@@ -219,7 +219,7 @@ public class PMMLModelTestUtils {
+@@ -222,7 +222,7 @@ public class PMMLModelTestUtils {
miningSchema.addMiningFields(predictedMiningField);
Output output = new Output();
OutputField outputField = new OutputField();
@@ -4184,7 +4175,7 @@ index 9c855e91bc..dd1de2f0d4 100644
outputField.setDataType(lastDataField.getDataType());
outputField.setOpType(getRandomOpType());
toReturn.setModelName(RandomStringUtils.random(6, true, false));
-@@ -279,7 +279,7 @@ public class PMMLModelTestUtils {
+@@ -282,7 +282,7 @@ public class PMMLModelTestUtils {
public static CategoricalPredictor getCategoricalPredictor(String name, double value, double coefficient) {
CategoricalPredictor toReturn = new CategoricalPredictor();
@@ -4193,7 +4184,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setValue(value);
toReturn.setCoefficient(coefficient);
return toReturn;
-@@ -287,7 +287,7 @@ public class PMMLModelTestUtils {
+@@ -290,7 +290,7 @@ public class PMMLModelTestUtils {
public static NumericPredictor getNumericPredictor(String name, int exponent, double coefficient) {
NumericPredictor toReturn = new NumericPredictor();
@@ -4202,7 +4193,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setExponent(exponent);
toReturn.setCoefficient(coefficient);
return toReturn;
-@@ -295,7 +295,7 @@ public class PMMLModelTestUtils {
+@@ -298,7 +298,7 @@ public class PMMLModelTestUtils {
public static PredictorTerm getPredictorTerm(String name, double coefficient, List fieldRefNames) {
PredictorTerm toReturn = new PredictorTerm();
@@ -4211,7 +4202,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setCoefficient(coefficient);
toReturn.addFieldRefs(fieldRefNames.stream().map(PMMLModelTestUtils::getFieldRef).toArray(FieldRef[]::new));
return toReturn;
-@@ -320,7 +320,7 @@ public class PMMLModelTestUtils {
+@@ -323,7 +323,7 @@ public class PMMLModelTestUtils {
public static DataField getDataField(String fieldName, OpType opType) {
DataField toReturn = new DataField();
@@ -4220,7 +4211,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setOpType(opType);
return toReturn;
}
-@@ -333,14 +333,14 @@ public class PMMLModelTestUtils {
+@@ -336,14 +336,14 @@ public class PMMLModelTestUtils {
public static MiningField getMiningField(String fieldName, MiningField.UsageType usageType) {
MiningField toReturn = getRandomMiningField();
@@ -4237,7 +4228,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setOpType(opType);
return toReturn;
}
-@@ -359,7 +359,7 @@ public class PMMLModelTestUtils {
+@@ -362,7 +362,7 @@ public class PMMLModelTestUtils {
public static DerivedField getDerivedField(String fieldName) {
DerivedField toReturn = new DerivedField();
@@ -4246,7 +4237,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setDataType(getRandomDataType());
toReturn.setOpType(getRandomOpType());
Constant expression = new Constant(5);
-@@ -383,7 +383,7 @@ public class PMMLModelTestUtils {
+@@ -386,7 +386,7 @@ public class PMMLModelTestUtils {
public static DataField getRandomDataField() {
DataField toReturn = new DataField();
@@ -4255,7 +4246,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setDataType(getRandomDataType());
toReturn.setOpType(getRandomOpType());
IntStream.range(0, 3).forEach(i -> {
-@@ -410,7 +410,7 @@ public class PMMLModelTestUtils {
+@@ -413,7 +413,7 @@ public class PMMLModelTestUtils {
public static MiningField getRandomMiningField() {
Random random = new Random();
@@ -4264,7 +4255,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setInvalidValueTreatment(getRandomInvalidValueTreatmentMethod());
toReturn.setMissingValueTreatment(getRandomMissingValueTreatmentMethod());
toReturn.setOutlierTreatment(getRandomOutlierTreatmentMethod());
-@@ -433,13 +433,13 @@ public class PMMLModelTestUtils {
+@@ -436,13 +436,13 @@ public class PMMLModelTestUtils {
}
public static OutputField getRandomOutputField() {
@@ -4280,7 +4271,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setTargetField(fieldName);
toReturn.setResultFeature(getRandomResultFeature());
toReturn.setExpression(getRandomConstant());
-@@ -449,7 +449,7 @@ public class PMMLModelTestUtils {
+@@ -452,7 +452,7 @@ public class PMMLModelTestUtils {
public static Target getRandomTarget() {
Random random = new Random();
Target toReturn = new Target();
@@ -4289,7 +4280,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setOpType(getRandomOpType());
toReturn.setMax(random.nextInt(234));
toReturn.setMin(random.nextInt(23));
-@@ -473,7 +473,7 @@ public class PMMLModelTestUtils {
+@@ -476,7 +476,7 @@ public class PMMLModelTestUtils {
public static FieldColumnPair getRandomFieldColumnPair() {
FieldColumnPair toReturn = new FieldColumnPair();
@@ -4298,7 +4289,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setColumn(RandomStringUtils.random(6, true, false));
return toReturn;
}
-@@ -490,7 +490,7 @@ public class PMMLModelTestUtils {
+@@ -493,7 +493,7 @@ public class PMMLModelTestUtils {
Random random = new Random();
ClusteringField toReturn = new ClusteringField();
toReturn.setCenterField(getRandomClusteringFieldCenterField());
@@ -4307,7 +4298,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setCompareFunction(getRandomCompareFunction());
toReturn.setFieldWeight(random.nextDouble());
toReturn.setComparisons(getRandomComparisons());
-@@ -528,7 +528,7 @@ public class PMMLModelTestUtils {
+@@ -531,7 +531,7 @@ public class PMMLModelTestUtils {
Discretize toReturn = new Discretize();
toReturn.setDataType(getRandomDataType());
toReturn.setDefaultValue(RandomStringUtils.random(6, true, false));
@@ -4316,7 +4307,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setMapMissingTo(RandomStringUtils.random(6, true, false));
IntStream.range(0, 3).forEach(i -> toReturn.addDiscretizeBins(getRandomDiscretizeBin()));
return toReturn;
-@@ -536,7 +536,7 @@ public class PMMLModelTestUtils {
+@@ -539,7 +539,7 @@ public class PMMLModelTestUtils {
public static FieldRef getRandomFieldRef() {
FieldRef toReturn = new FieldRef();
@@ -4325,7 +4316,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setMapMissingTo(RandomStringUtils.random(6, true, false));
return toReturn;
}
-@@ -562,7 +562,7 @@ public class PMMLModelTestUtils {
+@@ -565,7 +565,7 @@ public class PMMLModelTestUtils {
double mapMissingTo = random.nextInt(100) / 10;
NormContinuous toReturn = new NormContinuous();
IntStream.range(0, 3).forEach(i -> toReturn.addLinearNorms(getRandomLinearNorm()));
@@ -4334,7 +4325,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setOutliers(getRandomOutlierTreatmentMethod());
toReturn.setMapMissingTo(mapMissingTo);
return toReturn;
-@@ -570,7 +570,7 @@ public class PMMLModelTestUtils {
+@@ -573,7 +573,7 @@ public class PMMLModelTestUtils {
public static NormDiscrete getRandomNormDiscrete() {
NormDiscrete toReturn = new NormDiscrete();
@@ -4343,7 +4334,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setValue(getRandomObject(DataType.INTEGER));
toReturn.setMapMissingTo((Number) getRandomObject(DataType.INTEGER));
toReturn.setMethod(getRandomMethod());
-@@ -580,14 +580,14 @@ public class PMMLModelTestUtils {
+@@ -583,14 +583,14 @@ public class PMMLModelTestUtils {
public static TextIndex getRandomTextIndex() {
Random random = new Random();
TextIndex toReturn = new TextIndex();
@@ -4360,7 +4351,7 @@ index 9c855e91bc..dd1de2f0d4 100644
IntStream.range(0, 3).forEach(i -> toReturn.addTextIndexNormalizations(getRandomTextIndexNormalization()));
return toReturn;
}
-@@ -600,7 +600,7 @@ public class PMMLModelTestUtils {
+@@ -603,7 +603,7 @@ public class PMMLModelTestUtils {
}
public static ParameterField getParameterField(String fieldName) {
@@ -4369,7 +4360,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setDataType(getRandomDataType());
toReturn.setOpType(getRandomOpType());
toReturn.setDisplayName("Display-" + fieldName);
-@@ -608,7 +608,7 @@ public class PMMLModelTestUtils {
+@@ -611,7 +611,7 @@ public class PMMLModelTestUtils {
}
public static ParameterField getParameterField(String fieldName, DataType dataType) {
@@ -4378,7 +4369,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setDataType(dataType);
return toReturn;
}
-@@ -635,7 +635,7 @@ public class PMMLModelTestUtils {
+@@ -638,7 +638,7 @@ public class PMMLModelTestUtils {
public static SimplePredicate getSimplePredicate(final String predicateName,
final Object value,
final SimplePredicate.Operator operator) {
@@ -4387,7 +4378,7 @@ index 9c855e91bc..dd1de2f0d4 100644
SimplePredicate toReturn = new SimplePredicate();
toReturn.setField(fieldName);
toReturn.setOperator(operator);
-@@ -654,7 +654,7 @@ public class PMMLModelTestUtils {
+@@ -657,7 +657,7 @@ public class PMMLModelTestUtils {
final Array.Type arrayType,
final List values,
final SimpleSetPredicate.BooleanOperator booleanOperator) {
@@ -4396,7 +4387,7 @@ index 9c855e91bc..dd1de2f0d4 100644
SimpleSetPredicate toReturn = new SimpleSetPredicate();
toReturn.setField(fieldName);
toReturn.setBooleanOperator(booleanOperator);
-@@ -671,7 +671,7 @@ public class PMMLModelTestUtils {
+@@ -674,7 +674,7 @@ public class PMMLModelTestUtils {
}
public static FieldRef getFieldRef(final String fieldName) {
@@ -4405,7 +4396,7 @@ index 9c855e91bc..dd1de2f0d4 100644
}
public static Object getRandomObject(DataType dataType) {
-@@ -873,7 +873,7 @@ public class PMMLModelTestUtils {
+@@ -876,7 +876,7 @@ public class PMMLModelTestUtils {
public static ScoreDistribution getRandomPMMLScoreDistribution(Double probability) {
Random random = new Random();
@@ -4414,7 +4405,7 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setValue(RandomStringUtils.random(6, true, false));
toReturn.setRecordCount(random.nextInt(100));
toReturn.setConfidence((double) random.nextInt(1) / 100);
-@@ -925,7 +925,7 @@ public class PMMLModelTestUtils {
+@@ -928,7 +928,7 @@ public class PMMLModelTestUtils {
}
public static SimplePredicate getRandomSimplePredicate() {
@@ -4423,7 +4414,7 @@ index 9c855e91bc..dd1de2f0d4 100644
SimplePredicate toReturn = new SimplePredicate();
toReturn.setField(fieldName);
toReturn.setOperator(getRandomSimplePredicateOperator());
-@@ -945,7 +945,7 @@ public class PMMLModelTestUtils {
+@@ -948,7 +948,7 @@ public class PMMLModelTestUtils {
}
public static SimpleSetPredicate getRandomSimpleSetPredicate() {
@@ -4433,10 +4424,10 @@ index 9c855e91bc..dd1de2f0d4 100644
toReturn.setField(fieldName);
toReturn.setBooleanOperator(getRandomSimpleSetPredicateOperator());
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/utils/ModelUtilsTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/utils/ModelUtilsTest.java
-index 8dd030ef3d..28334005b7 100644
+index cbf3518fac..a5ee7e7868 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/utils/ModelUtilsTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-api/src/test/java/org/kie/pmml/compiler/api/utils/ModelUtilsTest.java
-@@ -34,7 +34,6 @@ import org.dmg.pmml.DataField;
+@@ -36,7 +36,6 @@ import org.dmg.pmml.DataField;
import org.dmg.pmml.DataType;
import org.dmg.pmml.DerivedField;
import org.dmg.pmml.Field;
@@ -4444,7 +4435,7 @@ index 8dd030ef3d..28334005b7 100644
import org.dmg.pmml.MiningField;
import org.dmg.pmml.MiningSchema;
import org.dmg.pmml.Model;
-@@ -45,8 +44,8 @@ import org.dmg.pmml.Row;
+@@ -47,8 +46,8 @@ import org.dmg.pmml.Row;
import org.dmg.pmml.Target;
import org.dmg.pmml.Targets;
import org.dmg.pmml.regression.RegressionModel;
@@ -4455,7 +4446,7 @@ index 8dd030ef3d..28334005b7 100644
import org.junit.jupiter.api.Test;
import org.kie.pmml.api.enums.DATA_TYPE;
import org.kie.pmml.api.enums.FIELD_USAGE_TYPE;
-@@ -196,10 +195,10 @@ public class ModelUtilsTest {
+@@ -198,10 +197,10 @@ public class ModelUtilsTest {
retrieved.forEach(kiePMMLNameOpType -> {
assertThat(miningSchema.getMiningFields()
.stream()
@@ -4468,7 +4459,7 @@ index 8dd030ef3d..28334005b7 100644
.findFirst();
assertThat(optionalDataField).isPresent();
DataField dataField = optionalDataField.get();
-@@ -228,7 +227,7 @@ public class ModelUtilsTest {
+@@ -230,7 +229,7 @@ public class ModelUtilsTest {
retrieved.forEach(kiePMMLNameOpType -> {
Optional optionalMiningField = miningSchema.getMiningFields()
.stream()
@@ -4477,7 +4468,7 @@ index 8dd030ef3d..28334005b7 100644
.findFirst();
assertThat(optionalMiningField).isPresent();
MiningField miningField = optionalMiningField.get();
-@@ -261,7 +260,7 @@ public class ModelUtilsTest {
+@@ -263,7 +262,7 @@ public class ModelUtilsTest {
retrieved.forEach(kiePMMLNameOpType -> {
Optional optionalMiningField = miningSchema.getMiningFields()
.stream()
@@ -4486,7 +4477,7 @@ index 8dd030ef3d..28334005b7 100644
.findFirst();
assertThat(optionalMiningField).isPresent();
MiningField miningField = optionalMiningField.get();
-@@ -294,7 +293,7 @@ public class ModelUtilsTest {
+@@ -296,7 +295,7 @@ public class ModelUtilsTest {
retrieved.forEach(kiePMMLNameOpType -> {
Optional optionalTarget = targets.getTargets()
.stream()
@@ -4495,7 +4486,7 @@ index 8dd030ef3d..28334005b7 100644
.findFirst();
assertThat(optionalTarget).isPresent();
Target target = optionalTarget.get();
-@@ -311,7 +310,7 @@ public class ModelUtilsTest {
+@@ -313,7 +312,7 @@ public class ModelUtilsTest {
IntStream.range(0, 3).forEach(i -> {
final DataField dataField = getRandomDataField();
dataDictionary.addDataFields(dataField);
@@ -4504,7 +4495,7 @@ index 8dd030ef3d..28334005b7 100644
MiningField.UsageType.PREDICTED);
miningSchema.addMiningFields(miningField);
});
-@@ -341,7 +340,7 @@ public class ModelUtilsTest {
+@@ -343,7 +342,7 @@ public class ModelUtilsTest {
IntStream.range(0, 3).forEach(i -> {
final DataField dataField = getRandomDataField();
dataDictionary.addDataFields(dataField);
@@ -4513,7 +4504,7 @@ index 8dd030ef3d..28334005b7 100644
MiningField.UsageType.ACTIVE);
miningSchema.addMiningFields(miningField);
});
-@@ -360,10 +359,10 @@ public class ModelUtilsTest {
+@@ -362,10 +361,10 @@ public class ModelUtilsTest {
IntStream.range(0, 3).forEach(i -> {
final DataField dataField = getRandomDataField();
dataDictionary.addDataFields(dataField);
@@ -4526,7 +4517,7 @@ index 8dd030ef3d..28334005b7 100644
targets.addTargets(targetField);
});
model.setMiningSchema(miningSchema);
-@@ -386,8 +385,7 @@ public class ModelUtilsTest {
+@@ -388,8 +387,7 @@ public class ModelUtilsTest {
dataDictionary.getDataFields().forEach(dataField -> {
OP_TYPE retrieved =
org.kie.pmml.compiler.api.utils.ModelUtils.getOpType(getFieldsFromDataDictionary(dataDictionary),
@@ -4536,7 +4527,7 @@ index 8dd030ef3d..28334005b7 100644
assertThat(retrieved).isNotNull();
OP_TYPE expected = OP_TYPE.byName(dataField.getOpType().value());
assertThat(retrieved).isEqualTo(expected);
-@@ -402,7 +400,7 @@ public class ModelUtilsTest {
+@@ -404,7 +402,7 @@ public class ModelUtilsTest {
IntStream.range(0, 3).forEach(i -> {
String fieldName = "field" + i;
final DataField dataField = getRandomDataField();
@@ -4545,7 +4536,7 @@ index 8dd030ef3d..28334005b7 100644
dataDictionary.addDataFields(dataField);
});
org.kie.pmml.compiler.api.utils.ModelUtils.getOpType(getFieldsFromDataDictionary(dataDictionary), model,
-@@ -426,8 +424,7 @@ public class ModelUtilsTest {
+@@ -428,8 +426,7 @@ public class ModelUtilsTest {
miningSchema.getMiningFields().forEach(miningField -> {
OP_TYPE retrieved =
org.kie.pmml.compiler.api.utils.ModelUtils.getOpType(getFieldsFromDataDictionary(dataDictionary),
@@ -4555,7 +4546,7 @@ index 8dd030ef3d..28334005b7 100644
assertThat(retrieved).isNotNull();
OP_TYPE expected = OP_TYPE.byName(miningField.getOpType().value());
assertThat(retrieved).isEqualTo(expected);
-@@ -443,7 +440,7 @@ public class ModelUtilsTest {
+@@ -445,7 +442,7 @@ public class ModelUtilsTest {
IntStream.range(0, 3).forEach(i -> {
String fieldName = "field" + i;
final DataField dataField = getRandomDataField();
@@ -4564,7 +4555,7 @@ index 8dd030ef3d..28334005b7 100644
dataDictionary.addDataFields(dataField);
final MiningField miningField = getRandomMiningField();
miningField.setName(dataField.getName());
-@@ -477,8 +474,7 @@ public class ModelUtilsTest {
+@@ -479,8 +476,7 @@ public class ModelUtilsTest {
targets.getTargets().forEach(target -> {
OP_TYPE retrieved =
org.kie.pmml.compiler.api.utils.ModelUtils.getOpType(getFieldsFromDataDictionary(dataDictionary),
@@ -4574,7 +4565,7 @@ index 8dd030ef3d..28334005b7 100644
assertThat(retrieved).isNotNull();
OP_TYPE expected = OP_TYPE.byName(target.getOpType().value());
assertThat(retrieved).isEqualTo(expected);
-@@ -495,7 +491,7 @@ public class ModelUtilsTest {
+@@ -497,7 +493,7 @@ public class ModelUtilsTest {
IntStream.range(0, 3).forEach(i -> {
String fieldName = "field" + i;
final DataField dataField = getRandomDataField();
@@ -4583,7 +4574,7 @@ index 8dd030ef3d..28334005b7 100644
dataDictionary.addDataFields(dataField);
final MiningField miningField = getRandomMiningField();
miningField.setName(dataField.getName());
-@@ -528,8 +524,7 @@ public class ModelUtilsTest {
+@@ -530,8 +526,7 @@ public class ModelUtilsTest {
fields.clear();
fields.addAll(getFieldsFromDataDictionary(dataDictionary));
dataDictionary.getDataFields().forEach(dataField -> {
@@ -4593,7 +4584,7 @@ index 8dd030ef3d..28334005b7 100644
assertThat(retrieved).isNotNull();
assertThat(retrieved).isPresent();
OP_TYPE expected = OP_TYPE.byName(dataField.getOpType().value());
-@@ -552,8 +547,7 @@ public class ModelUtilsTest {
+@@ -554,8 +549,7 @@ public class ModelUtilsTest {
});
miningSchema.getMiningFields().forEach(miningField -> {
Optional retrieved =
@@ -4603,7 +4594,7 @@ index 8dd030ef3d..28334005b7 100644
assertThat(retrieved).isNotNull();
assertThat(retrieved).isPresent();
OP_TYPE expected = OP_TYPE.byName(miningField.getOpType().value());
-@@ -575,8 +569,7 @@ public class ModelUtilsTest {
+@@ -577,8 +571,7 @@ public class ModelUtilsTest {
targets.addTargets(target);
});
targets.getTargets().forEach(target -> {
@@ -4613,7 +4604,7 @@ index 8dd030ef3d..28334005b7 100644
assertThat(retrieved).isNotNull();
assertThat(retrieved).isPresent();
OP_TYPE expected = OP_TYPE.byName(target.getOpType().value());
-@@ -595,7 +588,7 @@ public class ModelUtilsTest {
+@@ -597,7 +590,7 @@ public class ModelUtilsTest {
.stream()
.map(dataField -> {
DerivedField toReturn = new DerivedField();
@@ -4622,7 +4613,7 @@ index 8dd030ef3d..28334005b7 100644
DataType dataType = getRandomDataType();
while (dataType.equals(dataField.getDataType())) {
dataType = getRandomDataType();
-@@ -612,14 +605,14 @@ public class ModelUtilsTest {
+@@ -614,14 +607,14 @@ public class ModelUtilsTest {
.map(Field.class::cast)
.forEach(fields::add);
dataDictionary.getDataFields().forEach(dataField -> {
@@ -4639,7 +4630,7 @@ index 8dd030ef3d..28334005b7 100644
DataType retrieved = org.kie.pmml.compiler.api.utils.ModelUtils.getDataType(fields, fieldName);
assertThat(retrieved).isNotNull();
DataType expected = derivedField.getDataType();
-@@ -636,7 +629,7 @@ public class ModelUtilsTest {
+@@ -638,7 +631,7 @@ public class ModelUtilsTest {
});
dataDictionary.getDataFields().forEach(dataField -> {
DATA_TYPE retrieved =
@@ -4648,7 +4639,7 @@ index 8dd030ef3d..28334005b7 100644
assertThat(retrieved).isNotNull();
DATA_TYPE expected = DATA_TYPE.byName(dataField.getDataType().value());
assertThat(retrieved).isEqualTo(expected);
-@@ -650,7 +643,7 @@ public class ModelUtilsTest {
+@@ -652,7 +645,7 @@ public class ModelUtilsTest {
IntStream.range(0, 3).forEach(i -> {
String fieldName = "field" + i;
final DataField dataField = getRandomDataField();
@@ -4657,7 +4648,7 @@ index 8dd030ef3d..28334005b7 100644
dataDictionary.addDataFields(dataField);
});
org.kie.pmml.compiler.api.utils.ModelUtils.getDATA_TYPE(getFieldsFromDataDictionary(dataDictionary),
-@@ -716,12 +709,12 @@ public class ModelUtilsTest {
+@@ -718,12 +711,12 @@ public class ModelUtilsTest {
org.kie.pmml.api.models.OutputField retrieved =
org.kie.pmml.compiler.api.utils.ModelUtils.convertToKieOutputField(toConvert, null);
assertThat(retrieved).isNotNull();
@@ -4673,10 +4664,10 @@ index 8dd030ef3d..28334005b7 100644
assertThat(retrieved.getResultFeature()).isEqualTo(expectedResultFeature);
toConvert.setOpType(null);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDerivedFieldFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDerivedFieldFactory.java
-index b0a57eebda..4aee65cbc7 100644
+index 0267b4f905..4cc3591f28 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDerivedFieldFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDerivedFieldFactory.java
-@@ -81,7 +81,7 @@ public class KiePMMLDerivedFieldFactory {
+@@ -84,7 +84,7 @@ public class KiePMMLDerivedFieldFactory {
final MethodCallExpr builder = getChainedMethodCallExprFrom("builder", initializer);
final Expression dataTypeExpression = getExpressionForDataType(derivedField.getDataType());
final Expression opTypeExpression = getExpressionForOpType(derivedField.getOpType());
@@ -4686,10 +4677,10 @@ index b0a57eebda..4aee65cbc7 100644
builder.setArgument(3, opTypeExpression);
builder.setArgument(4, new NameExpr(nestedVariableName));
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDiscretizeFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDiscretizeFactory.java
-index f740a025ab..276205279d 100644
+index 302047678f..0a3e7e371f 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDiscretizeFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDiscretizeFactory.java
-@@ -85,7 +85,7 @@ public class KiePMMLDiscretizeFactory {
+@@ -88,7 +88,7 @@ public class KiePMMLDiscretizeFactory {
.orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_INITIALIZER_TEMPLATE,
DISCRETIZE, toReturn)))
.asObjectCreationExpr();
@@ -4699,10 +4690,10 @@ index f740a025ab..276205279d 100644
final Expression defaultValueExpr = getExpressionForObject(discretize.getDefaultValue());
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldColumnPairFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldColumnPairFactory.java
-index 1a6854dc37..d0c9299e4f 100644
+index 727090cd0b..d948a4bc93 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldColumnPairFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldColumnPairFactory.java
-@@ -67,7 +67,7 @@ public class KiePMMLFieldColumnPairFactory {
+@@ -70,7 +70,7 @@ public class KiePMMLFieldColumnPairFactory {
final ObjectCreationExpr objectCreationExpr = variableDeclarator.getInitializer()
.orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_INITIALIZER_TEMPLATE, FIELDCOLUMNPAIR, toReturn)))
.asObjectCreationExpr();
@@ -4712,10 +4703,10 @@ index 1a6854dc37..d0c9299e4f 100644
return toReturn;
}
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldRefFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldRefFactory.java
-index 8404131f4d..2fe5206fe1 100644
+index 33b40939dc..11276c4ce6 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldRefFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldRefFactory.java
-@@ -70,7 +70,7 @@ public class KiePMMLFieldRefFactory {
+@@ -73,7 +73,7 @@ public class KiePMMLFieldRefFactory {
FIELD_REF, toReturn)))
.asObjectCreationExpr();
@@ -4725,10 +4716,10 @@ index 8404131f4d..2fe5206fe1 100644
objectCreationExpr.getArguments().set(0, nameExpr);
objectCreationExpr.getArguments().set(2, mapMissingToExpr);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMiningFieldFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMiningFieldFactory.java
-index 5a1026b9be..409f799bb4 100644
+index 9f68eeeba6..7e9865ed1d 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMiningFieldFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMiningFieldFactory.java
-@@ -85,7 +85,7 @@ public class KiePMMLMiningFieldFactory {
+@@ -88,7 +88,7 @@ public class KiePMMLMiningFieldFactory {
MININGFIELD, toReturn)))
.asMethodCallExpr();
final MethodCallExpr builder = getChainedMethodCallExprFrom("builder", initializer);
@@ -4737,7 +4728,7 @@ index 5a1026b9be..409f799bb4 100644
Expression fieldUsageTypeExpr;
if (miningField.getUsageType() != null) {
final FIELD_USAGE_TYPE fieldUsageType = FIELD_USAGE_TYPE.byName(miningField.getUsageType().value());
-@@ -100,8 +100,8 @@ public class KiePMMLMiningFieldFactory {
+@@ -103,8 +103,8 @@ public class KiePMMLMiningFieldFactory {
} else {
opTypeExpr = new NullLiteralExpr();
}
@@ -4748,7 +4739,7 @@ index 5a1026b9be..409f799bb4 100644
final DATA_TYPE data_TYPE = DATA_TYPE.byName(dataType.value());
Expression dataTypeExpr = new NameExpr(DATA_TYPE.class.getName() + "." + data_TYPE.name());
Expression missingValueTreatmentMethodExpr;
-@@ -169,7 +169,7 @@ public class KiePMMLMiningFieldFactory {
+@@ -172,7 +172,7 @@ public class KiePMMLMiningFieldFactory {
private static List> getMappedFields(final List> fields,
final String fieldName) {
return fields.stream()
@@ -4758,10 +4749,10 @@ index 5a1026b9be..409f799bb4 100644
}
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLModelFactoryUtils.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLModelFactoryUtils.java
-index 41b5b046af..d3b6513707 100644
+index 32b0378c4d..ae7296e360 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLModelFactoryUtils.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLModelFactoryUtils.java
-@@ -611,7 +611,7 @@ public class KiePMMLModelFactoryUtils {
+@@ -614,7 +614,7 @@ public class KiePMMLModelFactoryUtils {
BlockStmt body = new BlockStmt();
NodeList arguments = new NodeList<>();
for (org.dmg.pmml.MiningField miningField : miningFields) {
@@ -4770,7 +4761,7 @@ index 41b5b046af..d3b6513707 100644
BlockStmt toAdd = getMiningFieldVariableDeclaration(miningFieldVariableName, miningField, fields);
toAdd.getStatements().forEach(body::addStatement);
arguments.add(new NameExpr(miningFieldVariableName));
-@@ -631,7 +631,7 @@ public class KiePMMLModelFactoryUtils {
+@@ -634,7 +634,7 @@ public class KiePMMLModelFactoryUtils {
BlockStmt body = new BlockStmt();
NodeList arguments = new NodeList<>();
for (org.dmg.pmml.OutputField outputField : outputFields) {
@@ -4780,10 +4771,10 @@ index 41b5b046af..d3b6513707 100644
toAdd.getStatements().forEach(body::addStatement);
arguments.add(new NameExpr(outputFieldVariableName));
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormContinuousFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormContinuousFactory.java
-index 41b6d2292b..fe96b29fae 100644
+index c060b2b834..5dbee1419c 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormContinuousFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormContinuousFactory.java
-@@ -77,7 +77,7 @@ public class KiePMMLNormContinuousFactory {
+@@ -80,7 +80,7 @@ public class KiePMMLNormContinuousFactory {
NORM_CONTINUOUS, toReturn)))
.asObjectCreationExpr();
@@ -4793,10 +4784,10 @@ index 41b6d2292b..fe96b29fae 100644
OUTLIER_TREATMENT_METHOD.byName(normContinuous.getOutliers().value());
final NameExpr outlierTreatmentMethodExpr =
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormDiscreteFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormDiscreteFactory.java
-index a3dfadc05b..ce6dfdf09b 100644
+index 4db24f7ac2..c3aa7ee0cb 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormDiscreteFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormDiscreteFactory.java
-@@ -71,7 +71,7 @@ public class KiePMMLNormDiscreteFactory {
+@@ -74,7 +74,7 @@ public class KiePMMLNormDiscreteFactory {
NORM_DISCRETE, toReturn)))
.asObjectCreationExpr();
@@ -4806,10 +4797,10 @@ index a3dfadc05b..ce6dfdf09b 100644
final Expression mapMissingToExpr = getExpressionForObject(normDiscrete.getMapMissingTo());
objectCreationExpr.getArguments().set(0, nameExpr);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLOutputFieldFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLOutputFieldFactory.java
-index 03ac64ec84..5dc5a651fc 100644
+index 3f375480d1..e14ccbce9b 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLOutputFieldFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLOutputFieldFactory.java
-@@ -78,10 +78,10 @@ public class KiePMMLOutputFieldFactory {
+@@ -81,10 +81,10 @@ public class KiePMMLOutputFieldFactory {
.orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_INITIALIZER_TEMPLATE, OUTPUTFIELD, toReturn)))
.asMethodCallExpr();
final MethodCallExpr builder = getChainedMethodCallExprFrom("builder", initializer);
@@ -4823,10 +4814,10 @@ index 03ac64ec84..5dc5a651fc 100644
final Expression dataTypeExpression = getExpressionForDataType(outputField.getDataType());
final Expression rankExpr = outputField.getRank() != null ? getExpressionForObject(outputField.getRank()) : new NullLiteralExpr();
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLParameterFieldFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLParameterFieldFactory.java
-index 364a781216..0c40c78ee6 100644
+index c7d22413fa..b99982cd7b 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLParameterFieldFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLParameterFieldFactory.java
-@@ -70,7 +70,7 @@ public class KiePMMLParameterFieldFactory {
+@@ -73,7 +73,7 @@ public class KiePMMLParameterFieldFactory {
.orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_INITIALIZER_TEMPLATE, PARAMETER_FIELD, toReturn)))
.asMethodCallExpr();
final MethodCallExpr builder = getChainedMethodCallExprFrom("builder", initializer);
@@ -4836,10 +4827,10 @@ index 364a781216..0c40c78ee6 100644
final Expression opTypeExpression = getExpressionForOpType(parameterField.getOpType());
getChainedMethodCallExprFrom("withDataType", initializer).setArgument(0, dataTypeExpression);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimplePredicateFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimplePredicateFactory.java
-index acbd5765a4..61cbf6b8b2 100644
+index 544619f337..1c45d74aa2 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimplePredicateFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimplePredicateFactory.java
-@@ -82,9 +82,9 @@ public class KiePMMLSimplePredicateFactory {
+@@ -85,9 +85,9 @@ public class KiePMMLSimplePredicateFactory {
.orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_INITIALIZER_TEMPLATE, SIMPLE_PREDICATE, simplePredicateBody)))
.asMethodCallExpr();
final MethodCallExpr builder = getChainedMethodCallExprFrom("builder", initializer);
@@ -4852,10 +4843,10 @@ index acbd5765a4..61cbf6b8b2 100644
getChainedMethodCallExprFrom("withValue", initializer).setArgument(0, getExpressionForObject(actualValue));
simplePredicateBody.getStatements().forEach(toReturn::addStatement);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimpleSetPredicateFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimpleSetPredicateFactory.java
-index 078b865fb1..5cb84d6694 100644
+index d8e41815bd..b70c5d89e3 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimpleSetPredicateFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimpleSetPredicateFactory.java
-@@ -87,7 +87,7 @@ public class KiePMMLSimpleSetPredicateFactory {
+@@ -90,7 +90,7 @@ public class KiePMMLSimpleSetPredicateFactory {
.orElseThrow(() -> new KiePMMLException(String.format(MISSING_VARIABLE_INITIALIZER_TEMPLATE, SIMPLESET_PREDICATE, simpleSetPredicateBody)))
.asMethodCallExpr();
final MethodCallExpr builder = getChainedMethodCallExprFrom("builder", initializer);
@@ -4865,10 +4856,10 @@ index 078b865fb1..5cb84d6694 100644
builder.setArgument(3, inNotInExpr);
getChainedMethodCallExprFrom("asList", initializer).setArguments(arguments);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTextIndexFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTextIndexFactory.java
-index 1f8247c345..c94064c6da 100644
+index 45d387b36f..a9121d02fe 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTextIndexFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTextIndexFactory.java
-@@ -98,7 +98,7 @@ public class KiePMMLTextIndexFactory {
+@@ -101,7 +101,7 @@ public class KiePMMLTextIndexFactory {
TEXTINDEX, toReturn)))
.asMethodCallExpr();
final MethodCallExpr builder = getChainedMethodCallExprFrom("builder", initializer);
@@ -4878,10 +4869,10 @@ index 1f8247c345..c94064c6da 100644
builder.setArgument(0, nameExpr);
builder.setArgument(2, expressionExpr);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLDerivedFieldInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLDerivedFieldInstanceFactory.java
-index 5d2d2d8d57..cdafde8db9 100644
+index 836c102204..a25397bd89 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLDerivedFieldInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLDerivedFieldInstanceFactory.java
-@@ -49,10 +49,9 @@ public class KiePMMLDerivedFieldInstanceFactory {
+@@ -52,10 +52,9 @@ public class KiePMMLDerivedFieldInstanceFactory {
static KiePMMLDerivedField getKiePMMLDerivedField(final DerivedField derivedField,
final List> fields) {
@@ -4895,10 +4886,10 @@ index 5d2d2d8d57..cdafde8db9 100644
DATA_TYPE.byName(dataType.value()),
opType,
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLDiscretizeInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLDiscretizeInstanceFactory.java
-index 5ee6792fcb..9d6de34f7f 100644
+index 43cbb224b8..2f862a685d 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLDiscretizeInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLDiscretizeInstanceFactory.java
-@@ -43,7 +43,7 @@ public class KiePMMLDiscretizeInstanceFactory {
+@@ -46,7 +46,7 @@ public class KiePMMLDiscretizeInstanceFactory {
String defaultValue = discretize.getDefaultValue() != null ? discretize.getDefaultValue().toString() : null;
DATA_TYPE dataType = discretize.getDataType() != null ? DATA_TYPE.byName(discretize.getDataType().value()) :
null;
@@ -4908,10 +4899,10 @@ index 5ee6792fcb..9d6de34f7f 100644
discretizeBins,
mapMissingTo,
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLFieldColumnPairInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLFieldColumnPairInstanceFactory.java
-index a659b870fa..7741a23b4a 100644
+index 5ba7d7924d..d70badd561 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLFieldColumnPairInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLFieldColumnPairInstanceFactory.java
-@@ -38,7 +38,7 @@ public class KiePMMLFieldColumnPairInstanceFactory {
+@@ -41,7 +41,7 @@ public class KiePMMLFieldColumnPairInstanceFactory {
}
static KiePMMLFieldColumnPair getKiePMMLFieldColumnPair(final FieldColumnPair fieldColumnPair) {
@@ -4921,10 +4912,10 @@ index a659b870fa..7741a23b4a 100644
fieldColumnPair.getColumn());
}
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLFieldRefInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLFieldRefInstanceFactory.java
-index a1cd31b3c5..eea09d4075 100644
+index a7d5881828..6c856f6cab 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLFieldRefInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLFieldRefInstanceFactory.java
-@@ -29,7 +29,7 @@ public class KiePMMLFieldRefInstanceFactory {
+@@ -32,7 +32,7 @@ public class KiePMMLFieldRefInstanceFactory {
}
static KiePMMLFieldRef getKiePMMLFieldRef(final FieldRef fieldRef) {
@@ -4934,10 +4925,10 @@ index a1cd31b3c5..eea09d4075 100644
fieldRef.getMapMissingTo());
}
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLMiningFieldInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLMiningFieldInstanceFactory.java
-index 1958cda8b4..dc67da9eca 100644
+index 30e28dfe79..93f626718d 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLMiningFieldInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLMiningFieldInstanceFactory.java
-@@ -42,7 +42,7 @@ public class KiePMMLMiningFieldInstanceFactory {
+@@ -45,7 +45,7 @@ public class KiePMMLMiningFieldInstanceFactory {
}
public static KiePMMLMiningField getKiePMMLMiningField(final MiningField toConvert, final Field> field) {
@@ -4947,10 +4938,10 @@ index 1958cda8b4..dc67da9eca 100644
FIELD_USAGE_TYPE.byName(toConvert.getUsageType().value()) : null;
final OP_TYPE opType = toConvert.getOpType() != null ? OP_TYPE.byName(toConvert.getOpType().value()) : null;
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLNormContinuousInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLNormContinuousInstanceFactory.java
-index a393a96644..cbcaf48c94 100644
+index d659f76aae..1fd3cb11cd 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLNormContinuousInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLNormContinuousInstanceFactory.java
-@@ -40,7 +40,7 @@ public class KiePMMLNormContinuousInstanceFactory {
+@@ -43,7 +43,7 @@ public class KiePMMLNormContinuousInstanceFactory {
final List linearNorms = normContinuous.hasLinearNorms() ?
getKiePMMLLinearNorms(normContinuous.getLinearNorms()) : Collections.emptyList();
final OUTLIER_TREATMENT_METHOD outlierTreatmentMethod = normContinuous.getOutliers() != null ? OUTLIER_TREATMENT_METHOD.byName(normContinuous.getOutliers().value()) : null;
@@ -4960,10 +4951,10 @@ index a393a96644..cbcaf48c94 100644
}
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLNormDiscreteInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLNormDiscreteInstanceFactory.java
-index 875056d14f..80c5f58f6c 100644
+index f887761703..2c63c82f3f 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLNormDiscreteInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLNormDiscreteInstanceFactory.java
-@@ -35,7 +35,7 @@ public class KiePMMLNormDiscreteInstanceFactory {
+@@ -38,7 +38,7 @@ public class KiePMMLNormDiscreteInstanceFactory {
static KiePMMLNormDiscrete getKiePMMLNormDiscrete(final NormDiscrete normDiscrete) {
List extensions = getKiePMMLExtensions(normDiscrete.getExtensions());
@@ -4973,10 +4964,10 @@ index 875056d14f..80c5f58f6c 100644
normDiscrete.getValue().toString(),
normDiscrete.getMapMissingTo());
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLOutputFieldInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLOutputFieldInstanceFactory.java
-index adf65610e8..7e85bfe54b 100644
+index 91804ffa9e..21f7080d22 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLOutputFieldInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLOutputFieldInstanceFactory.java
-@@ -35,8 +35,8 @@ public class KiePMMLOutputFieldInstanceFactory {
+@@ -38,8 +38,8 @@ public class KiePMMLOutputFieldInstanceFactory {
}
public static KiePMMLOutputField getKiePMMLOutputField(final OutputField outputField) {
@@ -4988,10 +4979,10 @@ index adf65610e8..7e85bfe54b 100644
final RESULT_FEATURE resultFeature = outputField.getResultFeature() != null ?
RESULT_FEATURE.byName(outputField.getResultFeature().value()) : null;
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLParameterFieldInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLParameterFieldInstanceFactory.java
-index 71e65adf8e..4a5527eeac 100644
+index 5b946d1d61..a2abeb7306 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLParameterFieldInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLParameterFieldInstanceFactory.java
-@@ -44,7 +44,7 @@ public class KiePMMLParameterFieldInstanceFactory {
+@@ -47,7 +47,7 @@ public class KiePMMLParameterFieldInstanceFactory {
DATA_TYPE dataType = parameterField.getDataType() != null ?
DATA_TYPE.byName(parameterField.getDataType().value()) : null;
OP_TYPE opType = parameterField.getOpType() != null ? OP_TYPE.byName(parameterField.getOpType().value()) : null;
@@ -5001,10 +4992,10 @@ index 71e65adf8e..4a5527eeac 100644
.withDataType(dataType)
.withOpType(opType)
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLSimplePredicateInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLSimplePredicateInstanceFactory.java
-index 60d10d26e3..94e7f67abb 100644
+index 922bbbc043..8ce616753d 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLSimplePredicateInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLSimplePredicateInstanceFactory.java
-@@ -41,9 +41,9 @@ public class KiePMMLSimplePredicateInstanceFactory {
+@@ -44,9 +44,9 @@ public class KiePMMLSimplePredicateInstanceFactory {
static KiePMMLSimplePredicate getKiePMMLSimplePredicate(final SimplePredicate simplePredicate,
final List> fields) {
final List kiePMMLExtensions = getKiePMMLExtensions(simplePredicate.getExtensions());
@@ -5017,10 +5008,10 @@ index 60d10d26e3..94e7f67abb 100644
OPERATOR.byName(simplePredicate.getOperator().value()))
.withValue(value)
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLSimpleSetPredicateInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLSimpleSetPredicateInstanceFactory.java
-index 70871ada4f..cfeeb80dde 100644
+index b5bec302aa..9d23fb0b55 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLSimpleSetPredicateInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLSimpleSetPredicateInstanceFactory.java
-@@ -34,7 +34,7 @@ public class KiePMMLSimpleSetPredicateInstanceFactory {
+@@ -37,7 +37,7 @@ public class KiePMMLSimpleSetPredicateInstanceFactory {
}
static KiePMMLSimpleSetPredicate getKiePMMLSimpleSetPredicate(final SimpleSetPredicate simpleSetPredicate) {
@@ -5030,10 +5021,10 @@ index 70871ada4f..cfeeb80dde 100644
ARRAY_TYPE.byName(simpleSetPredicate.getArray().getType().value()),
IN_NOTIN.byName(simpleSetPredicate.getBooleanOperator().value()))
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLTargetInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLTargetInstanceFactory.java
-index 40ae1e73c9..088b09c975 100644
+index 5aa4483c38..fae20d1f3c 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLTargetInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLTargetInstanceFactory.java
-@@ -42,7 +42,7 @@ public class KiePMMLTargetInstanceFactory {
+@@ -45,7 +45,7 @@ public class KiePMMLTargetInstanceFactory {
.map(KiePMMLTargetInstanceFactory::getKieTargetValue)
.collect(Collectors.toList()) : Collections.emptyList();
final OP_TYPE opType = target.getOpType() != null ? OP_TYPE.byName(target.getOpType().value()) : null;
@@ -5043,10 +5034,10 @@ index 40ae1e73c9..088b09c975 100644
CAST_INTEGER.byName(target.getCastInteger().value()) : null;
TargetField targetField = new TargetField(targetValues,
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLTextIndexInstanceFactory.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLTextIndexInstanceFactory.java
-index a2efd17595..9e133499b7 100644
+index e946b3b40a..3a814d5209 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLTextIndexInstanceFactory.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/factories/KiePMMLTextIndexInstanceFactory.java
-@@ -42,7 +42,7 @@ public class KiePMMLTextIndexInstanceFactory {
+@@ -45,7 +45,7 @@ public class KiePMMLTextIndexInstanceFactory {
COUNT_HITS.byName(textIndex.getCountHits().value()) : null;
final String wordSeparatorCharacterRE = textIndex.getWordSeparatorCharacterRE() != null ?
StringEscapeUtils.escapeJava(textIndex.getWordSeparatorCharacterRE()) : null;
@@ -5056,10 +5047,10 @@ index a2efd17595..9e133499b7 100644
getKiePMMLExpression(textIndex.getExpression()))
.withTextIndexNormalizations(getKiePMMLTextIndexNormalizations(textIndex.getTextIndexNormalizations()))
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/utils/KiePMMLUtil.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/utils/KiePMMLUtil.java
-index 7bee48918d..0bca6aa64f 100644
+index ee967bc5c3..62bc2580d7 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/utils/KiePMMLUtil.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/main/java/org/kie/pmml/compiler/commons/utils/KiePMMLUtil.java
-@@ -21,11 +21,10 @@ import java.util.List;
+@@ -24,11 +24,10 @@ import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@@ -5072,7 +5063,7 @@ index 7bee48918d..0bca6aa64f 100644
import org.dmg.pmml.MathContext;
import org.dmg.pmml.MiningField;
import org.dmg.pmml.MiningFunction;
-@@ -166,7 +165,7 @@ public class KiePMMLUtil {
+@@ -169,7 +168,7 @@ public class KiePMMLUtil {
String cleanedName = model.getModelName().replaceAll("[^A-Za-z0-9]", "");
String fieldName = String.format(TARGETFIELD_TEMPLATE, cleanedName);
DataField toReturn = new DataField();
@@ -5081,7 +5072,7 @@ index 7bee48918d..0bca6aa64f 100644
toReturn.setOpType(targetOpType);
toReturn.setDataType(targetDataType);
return Optional.of(toReturn);
-@@ -338,7 +337,7 @@ public class KiePMMLUtil {
+@@ -341,7 +340,7 @@ public class KiePMMLUtil {
.filter(targetField -> outputField.getTargetField().equals(targetField.getName()))
.findFirst()
.orElseThrow(() -> new KiePMMLException("Failed to find a target field for OutputField "
@@ -5090,7 +5081,7 @@ index 7bee48918d..0bca6aa64f 100644
}
if (referencedField == null && (outputField.getResultFeature() == null || outputField.getResultFeature().equals(ResultFeature.PREDICTED_VALUE))) { // default predictedValue
referencedField = targetFields.stream()
-@@ -351,7 +350,7 @@ public class KiePMMLUtil {
+@@ -354,7 +353,7 @@ public class KiePMMLUtil {
return;
}
if (referencedField != null) {
@@ -5100,10 +5091,10 @@ index 7bee48918d..0bca6aa64f 100644
.filter(df -> df.getName().equals(targetFieldName))
.findFirst()
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLApplyFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLApplyFactoryTest.java
-index 3d9f631222..52db2a9ae3 100644
+index 6ff7acc2c1..d9c225cee1 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLApplyFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLApplyFactoryTest.java
-@@ -25,7 +25,6 @@ import com.github.javaparser.ast.stmt.BlockStmt;
+@@ -27,7 +27,6 @@ import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.Statement;
import org.dmg.pmml.Apply;
import org.dmg.pmml.Constant;
@@ -5111,7 +5102,7 @@ index 3d9f631222..52db2a9ae3 100644
import org.dmg.pmml.FieldRef;
import org.dmg.pmml.InvalidValueTreatmentMethod;
import org.junit.jupiter.api.Test;
-@@ -89,9 +88,9 @@ public class KiePMMLApplyFactoryTest {
+@@ -91,9 +90,9 @@ public class KiePMMLApplyFactoryTest {
InvalidValueTreatmentMethod invalidValueTreatmentMethod = InvalidValueTreatmentMethod.AS_MISSING;
apply.setInvalidValueTreatment(invalidValueTreatmentMethod);
FieldRef fieldRef1 = new FieldRef();
@@ -5123,7 +5114,7 @@ index 3d9f631222..52db2a9ae3 100644
apply.addExpressions(fieldRef1, fieldRef2);
BlockStmt retrieved =
org.kie.pmml.compiler.commons.codegenfactories.KiePMMLApplyFactory.getApplyVariableDeclaration(variableName, apply);
-@@ -117,9 +116,9 @@ public class KiePMMLApplyFactoryTest {
+@@ -119,9 +118,9 @@ public class KiePMMLApplyFactoryTest {
InvalidValueTreatmentMethod nestedInvalidValueTreatmentMethod = InvalidValueTreatmentMethod.AS_MISSING;
nestedApply.setInvalidValueTreatment(nestedInvalidValueTreatmentMethod);
FieldRef fieldRef1 = new FieldRef();
@@ -5136,10 +5127,10 @@ index 3d9f631222..52db2a9ae3 100644
Apply apply = new Apply();
apply.setFunction(function);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDefineFunctionFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDefineFunctionFactoryTest.java
-index 81541acf23..1f65911c7a 100644
+index d136aa7b63..b54f075e5c 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDefineFunctionFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDefineFunctionFactoryTest.java
-@@ -27,7 +27,6 @@ import org.dmg.pmml.Apply;
+@@ -29,7 +29,6 @@ import org.dmg.pmml.Apply;
import org.dmg.pmml.Constant;
import org.dmg.pmml.DataType;
import org.dmg.pmml.DefineFunction;
@@ -5147,7 +5138,7 @@ index 81541acf23..1f65911c7a 100644
import org.dmg.pmml.FieldRef;
import org.dmg.pmml.OpType;
import org.dmg.pmml.ParameterField;
-@@ -55,18 +54,18 @@ public class KiePMMLDefineFunctionFactoryTest {
+@@ -57,18 +56,18 @@ public class KiePMMLDefineFunctionFactoryTest {
@Test
void getDefineFunctionVariableDeclaration() throws IOException {
@@ -5169,7 +5160,7 @@ index 81541acf23..1f65911c7a 100644
Apply apply = new Apply();
apply.setFunction("/");
apply.addExpressions(constant, fieldRef);
-@@ -85,17 +84,14 @@ public class KiePMMLDefineFunctionFactoryTest {
+@@ -87,17 +86,14 @@ public class KiePMMLDefineFunctionFactoryTest {
BlockStmt retrieved = KiePMMLDefineFunctionFactory.getDefineFunctionVariableDeclaration(defineFunction);
String text = getFileContent(TEST_01_SOURCE);
Statement expected = JavaParserUtils
@@ -5191,10 +5182,10 @@ index 81541acf23..1f65911c7a 100644
apply.getInvalidValueTreatment().value(),
dataType3,
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDerivedFieldFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDerivedFieldFactoryTest.java
-index 9c0deb97cc..5c0de1d0d0 100644
+index 83cf1f84aa..4bd5621a83 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDerivedFieldFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDerivedFieldFactoryTest.java
-@@ -27,7 +27,6 @@ import org.dmg.pmml.Apply;
+@@ -29,7 +29,6 @@ import org.dmg.pmml.Apply;
import org.dmg.pmml.Constant;
import org.dmg.pmml.DataType;
import org.dmg.pmml.DerivedField;
@@ -5202,7 +5193,7 @@ index 9c0deb97cc..5c0de1d0d0 100644
import org.dmg.pmml.FieldRef;
import org.dmg.pmml.OpType;
import org.junit.jupiter.api.Test;
-@@ -59,7 +58,7 @@ public class KiePMMLDerivedFieldFactoryTest {
+@@ -61,7 +60,7 @@ public class KiePMMLDerivedFieldFactoryTest {
Constant constant = new Constant();
constant.setValue(value1);
DerivedField derivedField = new DerivedField();
@@ -5211,7 +5202,7 @@ index 9c0deb97cc..5c0de1d0d0 100644
derivedField.setDataType(DataType.DOUBLE);
derivedField.setOpType(OpType.CONTINUOUS);
derivedField.setExpression(constant);
-@@ -70,8 +69,7 @@ public class KiePMMLDerivedFieldFactoryTest {
+@@ -72,8 +71,7 @@ public class KiePMMLDerivedFieldFactoryTest {
String text = getFileContent(TEST_01_SOURCE);
Statement expected = JavaParserUtils
.parseBlock(String.format(text, constant.getValue(),
@@ -5221,7 +5212,7 @@ index 9c0deb97cc..5c0de1d0d0 100644
dataType,
opType));
assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
-@@ -85,9 +83,9 @@ public class KiePMMLDerivedFieldFactoryTest {
+@@ -87,9 +85,9 @@ public class KiePMMLDerivedFieldFactoryTest {
void getDerivedFieldVariableDeclarationWithFieldRef() throws IOException {
final String variableName = "variableName";
FieldRef fieldRef = new FieldRef();
@@ -5233,7 +5224,7 @@ index 9c0deb97cc..5c0de1d0d0 100644
derivedField.setDataType(DataType.DOUBLE);
derivedField.setOpType(OpType.CONTINUOUS);
derivedField.setExpression(fieldRef);
-@@ -97,9 +95,8 @@ public class KiePMMLDerivedFieldFactoryTest {
+@@ -99,9 +97,8 @@ public class KiePMMLDerivedFieldFactoryTest {
org.kie.pmml.compiler.commons.codegenfactories.KiePMMLDerivedFieldFactory.getDerivedFieldVariableDeclaration(variableName, derivedField);
String text = getFileContent(TEST_02_SOURCE);
Statement expected = JavaParserUtils
@@ -5245,7 +5236,7 @@ index 9c0deb97cc..5c0de1d0d0 100644
dataType,
opType));
assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
-@@ -115,12 +112,12 @@ public class KiePMMLDerivedFieldFactoryTest {
+@@ -117,12 +114,12 @@ public class KiePMMLDerivedFieldFactoryTest {
Constant constant = new Constant();
constant.setValue(value1);
FieldRef fieldRef = new FieldRef();
@@ -5260,7 +5251,7 @@ index 9c0deb97cc..5c0de1d0d0 100644
derivedField.setDataType(DataType.DOUBLE);
derivedField.setOpType(OpType.CONTINUOUS);
derivedField.setExpression(apply);
-@@ -130,12 +127,10 @@ public class KiePMMLDerivedFieldFactoryTest {
+@@ -132,12 +129,10 @@ public class KiePMMLDerivedFieldFactoryTest {
String text = getFileContent(TEST_03_SOURCE);
Statement expected = JavaParserUtils
.parseBlock(String.format(text,
@@ -5276,10 +5267,10 @@ index 9c0deb97cc..5c0de1d0d0 100644
opType));
assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDiscretizeFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDiscretizeFactoryTest.java
-index 7d6783f932..8323b93d5c 100644
+index 3bb53dc323..414ae4fc3e 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDiscretizeFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLDiscretizeFactoryTest.java
-@@ -26,7 +26,6 @@ import com.github.javaparser.ast.stmt.Statement;
+@@ -28,7 +28,6 @@ import com.github.javaparser.ast.stmt.Statement;
import org.dmg.pmml.DataType;
import org.dmg.pmml.Discretize;
import org.dmg.pmml.DiscretizeBin;
@@ -5287,7 +5278,7 @@ index 7d6783f932..8323b93d5c 100644
import org.dmg.pmml.Interval;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
-@@ -64,7 +63,7 @@ public class KiePMMLDiscretizeFactoryTest {
+@@ -66,7 +65,7 @@ public class KiePMMLDiscretizeFactoryTest {
void getDiscretizeVariableDeclaration() throws IOException {
String variableName = "variableName";
Discretize discretize = new Discretize();
@@ -5297,10 +5288,10 @@ index 7d6783f932..8323b93d5c 100644
discretize.setMapMissingTo(MAP_MISSING_TO);
discretize.setDefaultValue(DEFAULTVALUE);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldColumnPairFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldColumnPairFactoryTest.java
-index 9be27ab139..7db1e1472e 100644
+index f361583818..7e5c892ebe 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldColumnPairFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldColumnPairFactoryTest.java
-@@ -24,7 +24,6 @@ import java.util.List;
+@@ -26,7 +26,6 @@ import java.util.List;
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.Statement;
import org.dmg.pmml.FieldColumnPair;
@@ -5308,7 +5299,7 @@ index 9be27ab139..7db1e1472e 100644
import org.junit.jupiter.api.Test;
import org.kie.pmml.commons.model.expressions.KiePMMLFieldColumnPair;
import org.kie.pmml.compiler.commons.utils.JavaParserUtils;
-@@ -43,7 +42,7 @@ public class KiePMMLFieldColumnPairFactoryTest {
+@@ -45,7 +44,7 @@ public class KiePMMLFieldColumnPairFactoryTest {
String fieldName = "fieldName";
String column = "column";
FieldColumnPair fieldColumnPair = new FieldColumnPair();
@@ -5318,10 +5309,10 @@ index 9be27ab139..7db1e1472e 100644
BlockStmt retrieved = KiePMMLFieldColumnPairFactory.getFieldColumnPairVariableDeclaration(variableName,
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldRefFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldRefFactoryTest.java
-index 74a0a47a19..b25133c0f9 100644
+index d7231b5780..359e3e36df 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldRefFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLFieldRefFactoryTest.java
-@@ -23,7 +23,6 @@ import java.util.List;
+@@ -25,7 +25,6 @@ import java.util.List;
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.Statement;
@@ -5329,7 +5320,7 @@ index 74a0a47a19..b25133c0f9 100644
import org.dmg.pmml.FieldRef;
import org.junit.jupiter.api.Test;
import org.kie.pmml.commons.model.expressions.KiePMMLFieldRef;
-@@ -43,7 +42,7 @@ public class KiePMMLFieldRefFactoryTest {
+@@ -45,7 +44,7 @@ public class KiePMMLFieldRefFactoryTest {
String fieldName = "fieldName";
String mapMissingTo = "mapMissingTo";
FieldRef fieldRef = new FieldRef();
@@ -5339,10 +5330,10 @@ index 74a0a47a19..b25133c0f9 100644
BlockStmt retrieved = KiePMMLFieldRefFactory.getFieldRefVariableDeclaration(variableName, fieldRef);
String text = getFileContent(TEST_01_SOURCE);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLInlineTableFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLInlineTableFactoryTest.java
-index 7363100b0c..66457e4833 100644
+index 4fb84d0b43..a86e50c013 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLInlineTableFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLInlineTableFactoryTest.java
-@@ -55,7 +55,7 @@ public class KiePMMLInlineTableFactoryTest {
+@@ -57,7 +57,7 @@ public class KiePMMLInlineTableFactoryTest {
DerivedField mapValued = pmmlModel.getTransformationDictionary()
.getDerivedFields()
.stream()
@@ -5352,10 +5343,10 @@ index 7363100b0c..66457e4833 100644
.orElseThrow(() -> new RuntimeException("Missing derived field " + MAPVALUED));
INLINETABLE = ((MapValues) mapValued.getExpression()).getInlineTable();
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLLocalTransformationsFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLLocalTransformationsFactoryTest.java
-index bd93f31de7..b71bd94743 100644
+index 12bf81ccb8..2660518d6b 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLLocalTransformationsFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLLocalTransformationsFactoryTest.java
-@@ -27,7 +27,6 @@ import com.github.javaparser.ast.stmt.Statement;
+@@ -29,7 +29,6 @@ import com.github.javaparser.ast.stmt.Statement;
import org.dmg.pmml.Constant;
import org.dmg.pmml.DataType;
import org.dmg.pmml.DerivedField;
@@ -5363,7 +5354,7 @@ index bd93f31de7..b71bd94743 100644
import org.dmg.pmml.LocalTransformations;
import org.dmg.pmml.OpType;
import org.junit.jupiter.api.Test;
-@@ -78,7 +77,7 @@ public class KiePMMLLocalTransformationsFactoryTest {
+@@ -80,7 +79,7 @@ public class KiePMMLLocalTransformationsFactoryTest {
Constant constant = new Constant();
constant.setValue(value1);
DerivedField toReturn = new DerivedField();
@@ -5373,10 +5364,10 @@ index bd93f31de7..b71bd94743 100644
toReturn.setOpType(OpType.CONTINUOUS);
toReturn.setExpression(constant);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMapValuesFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMapValuesFactoryTest.java
-index aba744b193..4607c85989 100644
+index b01a9b7a97..c3221ab11d 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMapValuesFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMapValuesFactoryTest.java
-@@ -56,7 +56,7 @@ public class KiePMMLMapValuesFactoryTest {
+@@ -58,7 +58,7 @@ public class KiePMMLMapValuesFactoryTest {
DerivedField mapValued = pmmlModel.getTransformationDictionary()
.getDerivedFields()
.stream()
@@ -5386,10 +5377,10 @@ index aba744b193..4607c85989 100644
.orElseThrow(() -> new RuntimeException("Missing derived field " + MAPVALUED));
MAPVALUES = ((MapValues) mapValued.getExpression());
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMiningFieldFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMiningFieldFactoryTest.java
-index dfed066bf4..543bd74ff0 100644
+index e3d14fc03b..141a7a2240 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMiningFieldFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLMiningFieldFactoryTest.java
-@@ -57,8 +57,7 @@ public class KiePMMLMiningFieldFactoryTest {
+@@ -59,8 +59,7 @@ public class KiePMMLMiningFieldFactoryTest {
String dataTypeString =
DATA_TYPE.class.getName() + "." + DATA_TYPE.byName(dataField.getDataType().value()).name();
String text = getFileContent(TEST_01_SOURCE);
@@ -5399,7 +5390,7 @@ index dfed066bf4..543bd74ff0 100644
dataTypeString));
assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
List> imports = Arrays.asList(Arrays.class, Collections.class, KiePMMLInterval.class,
-@@ -79,8 +78,7 @@ public class KiePMMLMiningFieldFactoryTest {
+@@ -81,8 +80,7 @@ public class KiePMMLMiningFieldFactoryTest {
String dataTypeString =
DATA_TYPE.class.getName() + "." + DATA_TYPE.byName(dataField.getDataType().value()).name();
String text = getFileContent(TEST_02_SOURCE);
@@ -5409,7 +5400,7 @@ index dfed066bf4..543bd74ff0 100644
dataTypeString,
dataField.getValues().get(0).getValue(),
dataField.getValues().get(1).getValue(),
-@@ -102,8 +100,7 @@ public class KiePMMLMiningFieldFactoryTest {
+@@ -104,8 +102,7 @@ public class KiePMMLMiningFieldFactoryTest {
String dataTypeString =
DATA_TYPE.class.getName() + "." + DATA_TYPE.byName(dataField.getDataType().value()).name();
String text = getFileContent(TEST_03_SOURCE);
@@ -5420,10 +5411,10 @@ index dfed066bf4..543bd74ff0 100644
dataField.getValues().get(0).getValue(),
dataField.getValues().get(1).getValue(),
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormContinuousFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormContinuousFactoryTest.java
-index 8c2652e561..1c6cd52d74 100644
+index 3c0d1aa142..56f78bdd17 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormContinuousFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormContinuousFactoryTest.java
-@@ -55,8 +55,7 @@ public class KiePMMLNormContinuousFactoryTest {
+@@ -57,8 +57,7 @@ public class KiePMMLNormContinuousFactoryTest {
String outlierString =
OUTLIER_TREATMENT_METHOD.class.getName() + "." + OUTLIER_TREATMENT_METHOD.byName(normContinuous.getOutliers().value()).name();
String text = getFileContent(TEST_01_SOURCE);
@@ -5434,10 +5425,10 @@ index 8c2652e561..1c6cd52d74 100644
linearNorms.get(0).getNorm(),
linearNorms.get(1).getOrig(),
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormDiscreteFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormDiscreteFactoryTest.java
-index f86b124884..e76bdd00a1 100644
+index fc0fe288b8..25be272ac8 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormDiscreteFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLNormDiscreteFactoryTest.java
-@@ -23,7 +23,6 @@ import java.util.List;
+@@ -25,7 +25,6 @@ import java.util.List;
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.Statement;
@@ -5445,7 +5436,7 @@ index f86b124884..e76bdd00a1 100644
import org.dmg.pmml.NormDiscrete;
import org.junit.jupiter.api.Test;
import org.kie.pmml.commons.model.expressions.KiePMMLNormDiscrete;
-@@ -45,7 +44,7 @@ public class KiePMMLNormDiscreteFactoryTest {
+@@ -47,7 +46,7 @@ public class KiePMMLNormDiscreteFactoryTest {
double mapMissingTo = 45.32;
NormDiscrete normDiscrete = new NormDiscrete();
@@ -5455,10 +5446,10 @@ index f86b124884..e76bdd00a1 100644
normDiscrete.setMapMissingTo(mapMissingTo);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLParameterFieldFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLParameterFieldFactoryTest.java
-index c123f9d16e..df4a6f50cc 100644
+index 62d6b45392..05831bc068 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLParameterFieldFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLParameterFieldFactoryTest.java
-@@ -24,7 +24,6 @@ import java.util.List;
+@@ -26,7 +26,6 @@ import java.util.List;
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.Statement;
import org.dmg.pmml.DataType;
@@ -5466,7 +5457,7 @@ index c123f9d16e..df4a6f50cc 100644
import org.dmg.pmml.OpType;
import org.dmg.pmml.ParameterField;
import org.junit.jupiter.api.Test;
-@@ -44,7 +43,7 @@ public class KiePMMLParameterFieldFactoryTest {
+@@ -46,7 +45,7 @@ public class KiePMMLParameterFieldFactoryTest {
@Test
void getParameterFieldVariableDeclaration() throws IOException {
String variableName = "variableName";
@@ -5476,10 +5467,10 @@ index c123f9d16e..df4a6f50cc 100644
parameterField.setOpType(OpType.CONTINUOUS);
parameterField.setDisplayName("displayName");
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLRowFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLRowFactoryTest.java
-index 2ebfa7b462..86e72a5cc2 100644
+index 4315879f7b..d999c4c36b 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLRowFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLRowFactoryTest.java
-@@ -56,14 +56,14 @@ public class KiePMMLRowFactoryTest {
+@@ -58,14 +58,14 @@ public class KiePMMLRowFactoryTest {
DerivedField mapValued = pmmlModel.getTransformationDictionary()
.getDerivedFields()
.stream()
@@ -5497,10 +5488,10 @@ index 2ebfa7b462..86e72a5cc2 100644
.orElseThrow(() -> new RuntimeException("Missing derived field " + MAPVALUED));
DATAENCODED_ROW = ((MapValues) dataEncoded.getExpression()).getInlineTable().getRows().get(0);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimplePredicateFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimplePredicateFactoryTest.java
-index cbb71e2707..2ccf1a9b91 100644
+index ef278cbe93..23d5d30c4a 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimplePredicateFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimplePredicateFactoryTest.java
-@@ -26,7 +26,6 @@ import com.github.javaparser.ast.stmt.Statement;
+@@ -28,7 +28,6 @@ import com.github.javaparser.ast.stmt.Statement;
import org.dmg.pmml.DataDictionary;
import org.dmg.pmml.DataField;
import org.dmg.pmml.DataType;
@@ -5508,7 +5499,7 @@ index cbb71e2707..2ccf1a9b91 100644
import org.dmg.pmml.SimplePredicate;
import org.junit.jupiter.api.Test;
import org.kie.pmml.api.enums.OPERATOR;
-@@ -46,7 +45,7 @@ public class KiePMMLSimplePredicateFactoryTest {
+@@ -48,7 +47,7 @@ public class KiePMMLSimplePredicateFactoryTest {
void getSimplePredicateVariableDeclaration() throws IOException {
String variableName = "variableName";
final SimplePredicate simplePredicate = new SimplePredicate();
@@ -5517,7 +5508,7 @@ index cbb71e2707..2ccf1a9b91 100644
simplePredicate.setValue("235.435");
simplePredicate.setOperator(SimplePredicate.Operator.EQUAL);
String operatorString = OPERATOR.class.getName() + "." + OPERATOR.byName(simplePredicate.getOperator().value());
-@@ -58,8 +57,7 @@ public class KiePMMLSimplePredicateFactoryTest {
+@@ -60,8 +59,7 @@ public class KiePMMLSimplePredicateFactoryTest {
BlockStmt retrieved = KiePMMLSimplePredicateFactory.getSimplePredicateVariableDeclaration(variableName, simplePredicate, getFieldsFromDataDictionary(dataDictionary));
String text = getFileContent(TEST_01_SOURCE);
@@ -5528,10 +5519,10 @@ index cbb71e2707..2ccf1a9b91 100644
simplePredicate.getValue()));
assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimpleSetPredicateFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimpleSetPredicateFactoryTest.java
-index 70ab189ceb..3ec3f1ef8f 100644
+index ed4c46efff..3ee849e0e5 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimpleSetPredicateFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLSimpleSetPredicateFactoryTest.java
-@@ -28,7 +28,6 @@ import org.dmg.pmml.Array;
+@@ -30,7 +30,6 @@ import org.dmg.pmml.Array;
import org.dmg.pmml.DataDictionary;
import org.dmg.pmml.DataField;
import org.dmg.pmml.DataType;
@@ -5539,7 +5530,7 @@ index 70ab189ceb..3ec3f1ef8f 100644
import org.dmg.pmml.SimpleSetPredicate;
import org.junit.jupiter.api.Test;
import org.kie.pmml.api.enums.ARRAY_TYPE;
-@@ -71,8 +70,7 @@ public class KiePMMLSimpleSetPredicateFactoryTest {
+@@ -73,8 +72,7 @@ public class KiePMMLSimpleSetPredicateFactoryTest {
BlockStmt retrieved = KiePMMLSimpleSetPredicateFactory.getSimpleSetPredicateVariableDeclaration(variableName,
simpleSetPredicate);
String text = getFileContent(TEST_01_SOURCE);
@@ -5549,7 +5540,7 @@ index 70ab189ceb..3ec3f1ef8f 100644
arrayTypeString,
booleanOperatorString,
valuesString));
-@@ -85,7 +83,7 @@ public class KiePMMLSimpleSetPredicateFactoryTest {
+@@ -87,7 +85,7 @@ public class KiePMMLSimpleSetPredicateFactoryTest {
final SimpleSetPredicate.BooleanOperator inNotIn) {
Array array = getArray(arrayType, values);
SimpleSetPredicate toReturn = new SimpleSetPredicate();
@@ -5559,10 +5550,10 @@ index 70ab189ceb..3ec3f1ef8f 100644
toReturn.setArray(array);
return toReturn;
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTextIndexFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTextIndexFactoryTest.java
-index 2e0b815573..a806d34045 100644
+index e9874f34d6..938a29d9c8 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTextIndexFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTextIndexFactoryTest.java
-@@ -69,8 +69,7 @@ public class KiePMMLTextIndexFactoryTest {
+@@ -71,8 +71,7 @@ public class KiePMMLTextIndexFactoryTest {
BlockStmt retrieved = KiePMMLTextIndexFactory.getTextIndexVariableDeclaration(variableName,
TEXTINDEX);
String text = getFileContent(TEST_01_SOURCE);
@@ -5573,10 +5564,10 @@ index 2e0b815573..a806d34045 100644
List> imports = Arrays.asList(Arrays.class, Collections.class, Collectors.class,
KiePMMLFieldRef.class, KiePMMLInlineTable.class,
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTransformationDictionaryFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTransformationDictionaryFactoryTest.java
-index 8cb7786184..e1b152a939 100644
+index bd4374a478..d78a9ced33 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTransformationDictionaryFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLTransformationDictionaryFactoryTest.java
-@@ -29,7 +29,6 @@ import org.dmg.pmml.Constant;
+@@ -31,7 +31,6 @@ import org.dmg.pmml.Constant;
import org.dmg.pmml.DataType;
import org.dmg.pmml.DefineFunction;
import org.dmg.pmml.DerivedField;
@@ -5584,7 +5575,7 @@ index 8cb7786184..e1b152a939 100644
import org.dmg.pmml.FieldRef;
import org.dmg.pmml.OpType;
import org.dmg.pmml.ParameterField;
-@@ -86,18 +85,18 @@ public class KiePMMLTransformationDictionaryFactoryTest {
+@@ -88,18 +87,18 @@ public class KiePMMLTransformationDictionaryFactoryTest {
}
private DefineFunction getDefineFunction(int counter) {
@@ -5606,7 +5597,7 @@ index 8cb7786184..e1b152a939 100644
Apply apply = new Apply();
apply.setFunction("/");
apply.addExpressions(constant, fieldRef);
-@@ -120,7 +119,7 @@ public class KiePMMLTransformationDictionaryFactoryTest {
+@@ -122,7 +121,7 @@ public class KiePMMLTransformationDictionaryFactoryTest {
Constant constant = new Constant();
constant.setValue(value1);
DerivedField toReturn = new DerivedField();
@@ -5616,10 +5607,10 @@ index 8cb7786184..e1b152a939 100644
toReturn.setOpType(OpType.CONTINUOUS);
toReturn.setExpression(constant);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/InstanceFactoriesTestCommon.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/InstanceFactoriesTestCommon.java
-index 39a0971352..3a36790356 100644
+index 23927ed5e4..cb339230e0 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/InstanceFactoriesTestCommon.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/InstanceFactoriesTestCommon.java
-@@ -109,7 +109,7 @@ public class InstanceFactoriesTestCommon {
+@@ -112,7 +112,7 @@ public class InstanceFactoriesTestCommon {
assertThat(toVerifyList).hasSameSizeAs(sourcesParameterFields);
sourcesParameterFields.forEach(paramSource -> {
Optional parameterToVerify =
@@ -5628,7 +5619,7 @@ index 39a0971352..3a36790356 100644
.findFirst();
assertThat(parameterToVerify).isPresent();
commonVerifyKiePMMLParameterField(parameterToVerify.get(), paramSource);
-@@ -119,24 +119,24 @@ public class InstanceFactoriesTestCommon {
+@@ -122,24 +122,24 @@ public class InstanceFactoriesTestCommon {
static void commonVerifyKiePMMLDerivedField(KiePMMLDerivedField toVerify,
DerivedField source) {
assertThat(toVerify).isNotNull();
@@ -5657,7 +5648,7 @@ index 39a0971352..3a36790356 100644
assertThat(toVerify.getDisplayName()).isEqualTo(expectedDisplayName);
}
-@@ -181,20 +181,20 @@ public class InstanceFactoriesTestCommon {
+@@ -184,20 +184,20 @@ public class InstanceFactoriesTestCommon {
DataField dataField) {
assertThat(toVerify).isNotNull();
Object value = DATA_TYPE.byName(dataField.getDataType().value()).getActualValue(source.getValue());
@@ -5681,7 +5672,7 @@ index 39a0971352..3a36790356 100644
Array array = source.getArray();
assertThat(toVerify.getArrayType().getName()).isEqualTo(array.getType().value());
assertThat(toVerify.getInNotIn().getName()).isEqualTo(source.getBooleanOperator().value());
-@@ -273,7 +273,7 @@ public class InstanceFactoriesTestCommon {
+@@ -276,7 +276,7 @@ public class InstanceFactoriesTestCommon {
static void commonVerifyKiePMMLDiscretize(KiePMMLDiscretize toVerify, Discretize source) {
assertThat(toVerify).isNotNull();
@@ -5690,7 +5681,7 @@ index 39a0971352..3a36790356 100644
assertThat(toVerify.getMapMissingTo()).isEqualTo(source.getMapMissingTo());
assertThat(toVerify.getDefaultValue()).isEqualTo(source.getDefaultValue());
assertThat(toVerify.getDataType().getName()).isEqualTo(source.getDataType().value());
-@@ -283,7 +283,7 @@ public class InstanceFactoriesTestCommon {
+@@ -286,7 +286,7 @@ public class InstanceFactoriesTestCommon {
static void commonVerifyKiePMMLFieldRef(KiePMMLFieldRef toVerify, FieldRef source) {
assertThat(toVerify).isNotNull();
@@ -5699,7 +5690,7 @@ index 39a0971352..3a36790356 100644
assertThat(toVerify.getMapMissingTo()).isEqualTo(source.getMapMissingTo());
}
-@@ -311,7 +311,7 @@ public class InstanceFactoriesTestCommon {
+@@ -314,7 +314,7 @@ public class InstanceFactoriesTestCommon {
static void commonVerifyKiePMMLNormDiscrete(KiePMMLNormDiscrete toVerify, NormDiscrete source) {
assertThat(toVerify).isNotNull();
@@ -5708,7 +5699,7 @@ index 39a0971352..3a36790356 100644
assertThat(toVerify.getMapMissingTo()).isEqualTo(source.getMapMissingTo());
assertThat(toVerify.getValue()).isEqualTo(source.getValue().toString());
}
-@@ -347,7 +347,7 @@ public class InstanceFactoriesTestCommon {
+@@ -350,7 +350,7 @@ public class InstanceFactoriesTestCommon {
static void commonVerifyKiePMMLFieldColumnPair(KiePMMLFieldColumnPair toVerify, FieldColumnPair source) {
assertThat(toVerify).isNotNull();
@@ -5717,7 +5708,7 @@ index 39a0971352..3a36790356 100644
assertThat(toVerify.getColumn()).isEqualTo(source.getColumn());
}
-@@ -366,7 +366,7 @@ public class InstanceFactoriesTestCommon {
+@@ -369,7 +369,7 @@ public class InstanceFactoriesTestCommon {
static void commonVerifyKiePMMLMiningField(KiePMMLMiningField toVerify, MiningField source, DataField dataField) {
assertThat(toVerify).isNotNull();
@@ -5726,7 +5717,7 @@ index 39a0971352..3a36790356 100644
assertThat(toVerify.getOpType().getName()).isEqualTo(source.getOpType().value());
assertThat(toVerify.getFieldUsageType().getName()).isEqualTo(source.getUsageType().value());
assertThat(toVerify.getInvalidValueTreatmentMethod().getName()).isEqualTo(source.getInvalidValueTreatment().value());
-@@ -380,10 +380,10 @@ public class InstanceFactoriesTestCommon {
+@@ -383,10 +383,10 @@ public class InstanceFactoriesTestCommon {
static void commonVerifyKiePMMLOutputField(KiePMMLOutputField toVerify, OutputField source) {
assertThat(toVerify).isNotNull();
@@ -5739,7 +5730,7 @@ index 39a0971352..3a36790356 100644
assertThat(toVerify.getResultFeature().getName()).isEqualTo(source.getResultFeature().value());
assertThat(toVerify.getRank()).isEqualTo(source.getRank());
assertThat(toVerify.getValue()).isEqualTo(source.getValue());
-@@ -395,7 +395,7 @@ public class InstanceFactoriesTestCommon {
+@@ -398,7 +398,7 @@ public class InstanceFactoriesTestCommon {
assertThat(source.getTargetValues()).hasSameSizeAs(toVerify.getTargetValues());
OP_TYPE expectedOpType = OP_TYPE.byName(source.getOpType().value());
assertThat(toVerify.getOpType()).isEqualTo(expectedOpType);
@@ -5749,10 +5740,10 @@ index 39a0971352..3a36790356 100644
assertThat(toVerify.getCastInteger()).isEqualTo(expectedCastInteger);
assertThat(toVerify.getMin()).isCloseTo(source.getMin().doubleValue(), Offset.offset(0.0));
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/KiePMMLLocalTransformationsInstanceFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/KiePMMLLocalTransformationsInstanceFactoryTest.java
-index 7769f9d331..d6008be920 100644
+index 1d55b0229e..4f1b09f22f 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/KiePMMLLocalTransformationsInstanceFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/KiePMMLLocalTransformationsInstanceFactoryTest.java
-@@ -44,7 +44,7 @@ public class KiePMMLLocalTransformationsInstanceFactoryTest {
+@@ -47,7 +47,7 @@ public class KiePMMLLocalTransformationsInstanceFactoryTest {
assertThat(derivedFieldsToVerify).hasSameSizeAs(derivedFields);
derivedFields.forEach(derivedFieldSource -> {
Optional derivedFieldToVerify =
@@ -5762,10 +5753,10 @@ index 7769f9d331..d6008be920 100644
assertThat(derivedFieldToVerify).isPresent();
commonVerifyKiePMMLDerivedField(derivedFieldToVerify.get(), derivedFieldSource);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/KiePMMLTransformationDictionaryInstanceFactoryTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/KiePMMLTransformationDictionaryInstanceFactoryTest.java
-index 4082c4c622..bd9737cf9a 100644
+index ed87c68309..df58cc39f9 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/KiePMMLTransformationDictionaryInstanceFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/factories/KiePMMLTransformationDictionaryInstanceFactoryTest.java
-@@ -47,7 +47,7 @@ public class KiePMMLTransformationDictionaryInstanceFactoryTest {
+@@ -50,7 +50,7 @@ public class KiePMMLTransformationDictionaryInstanceFactoryTest {
assertThat(derivedFieldsToVerify).hasSameSizeAs(derivedFields);
derivedFields.forEach(derivedFieldSource -> {
Optional derivedFieldToVerify =
@@ -5775,10 +5766,10 @@ index 4082c4c622..bd9737cf9a 100644
assertThat(derivedFieldToVerify).isPresent();
commonVerifyKiePMMLDerivedField(derivedFieldToVerify.get(), derivedFieldSource);
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/utils/KiePMMLUtilTest.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/utils/KiePMMLUtilTest.java
-index d27ff4c447..aab94e8f8c 100644
+index 46ce5d7bee..df844bcf3a 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/utils/KiePMMLUtilTest.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/utils/KiePMMLUtilTest.java
-@@ -30,12 +30,11 @@ import java.util.Random;
+@@ -32,12 +32,11 @@ import java.util.Random;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@@ -5792,7 +5783,7 @@ index d27ff4c447..aab94e8f8c 100644
import org.dmg.pmml.MathContext;
import org.dmg.pmml.MiningField;
import org.dmg.pmml.MiningFunction;
-@@ -140,7 +139,7 @@ public class KiePMMLUtilTest {
+@@ -142,7 +141,7 @@ public class KiePMMLUtilTest {
assertThat(optionalDataField).isPresent();
DataField retrieved = optionalDataField.get();
String expected = String.format(TARGETFIELD_TEMPLATE, "golfing");
@@ -5801,7 +5792,7 @@ index d27ff4c447..aab94e8f8c 100644
}
@Test
-@@ -188,23 +187,23 @@ public class KiePMMLUtilTest {
+@@ -190,23 +189,23 @@ public class KiePMMLUtilTest {
@Test
void getTargetMiningField() {
final DataField dataField = new DataField();
@@ -5830,7 +5821,7 @@ index d27ff4c447..aab94e8f8c 100644
assertThat(unnamedTarget.getField()).isEqualTo(miningField.getName());
}
-@@ -290,7 +289,7 @@ public class KiePMMLUtilTest {
+@@ -292,7 +291,7 @@ public class KiePMMLUtilTest {
List dataFields = fieldNames.stream()
.map(fieldName -> {
DataField toReturn = new DataField();
@@ -5839,7 +5830,7 @@ index d27ff4c447..aab94e8f8c 100644
DataType dataType = DataType.values()[random.nextInt(DataType.values().length)];
toReturn.setDataType(dataType);
return toReturn;
-@@ -300,40 +299,40 @@ public class KiePMMLUtilTest {
+@@ -302,40 +301,40 @@ public class KiePMMLUtilTest {
.mapToObj(dataFields::get)
.map(dataField -> {
MiningField toReturn = new MiningField();
@@ -5887,7 +5878,7 @@ index d27ff4c447..aab94e8f8c 100644
DataType dataType = DataType.values()[random.nextInt(DataType.values().length)];
toAdd.setDataType(dataType);
outputFields.add(toAdd);
-@@ -368,7 +367,7 @@ public class KiePMMLUtilTest {
+@@ -370,7 +369,7 @@ public class KiePMMLUtilTest {
assertThat(retrieved).isNotNull();
assertThat(retrieved).hasSize(1);
MiningField targetField = retrieved.get(0);
@@ -5896,7 +5887,7 @@ index d27ff4c447..aab94e8f8c 100644
assertThat(targetField.getUsageType().value()).isEqualTo("target");
}
-@@ -381,7 +380,7 @@ public class KiePMMLUtilTest {
+@@ -383,7 +382,7 @@ public class KiePMMLUtilTest {
assertThat(retrieved).isNotNull();
assertThat(retrieved).hasSize(1);
MiningField targetField = retrieved.get(0);
@@ -5906,10 +5897,10 @@ index d27ff4c447..aab94e8f8c 100644
}
diff --git a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-core/src/test/java/org/kie/pmml/compiler/testingutils/TestingModel.java b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-core/src/test/java/org/kie/pmml/compiler/testingutils/TestingModel.java
-index 626fd4316e..7470fe4047 100644
+index feb38f91b9..4d7c7c5834 100644
--- a/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-core/src/test/java/org/kie/pmml/compiler/testingutils/TestingModel.java
+++ b/kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-core/src/test/java/org/kie/pmml/compiler/testingutils/TestingModel.java
-@@ -104,5 +104,15 @@ public class TestingModel extends Model {
+@@ -107,5 +107,15 @@ public class TestingModel extends Model {
return modelName;
}
@@ -5926,10 +5917,10 @@ index 626fd4316e..7470fe4047 100644
}
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-clustering/kie-pmml-models-clustering-compiler/src/main/java/org/kie/pmml/models/clustering/compiler/factories/KiePMMLClusteringModelFactory.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-clustering/kie-pmml-models-clustering-compiler/src/main/java/org/kie/pmml/models/clustering/compiler/factories/KiePMMLClusteringModelFactory.java
-index 7b7ca55b9e..e760d10cfb 100644
+index 5570464de9..fd2bfeaab6 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-clustering/kie-pmml-models-clustering-compiler/src/main/java/org/kie/pmml/models/clustering/compiler/factories/KiePMMLClusteringModelFactory.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-clustering/kie-pmml-models-clustering-compiler/src/main/java/org/kie/pmml/models/clustering/compiler/factories/KiePMMLClusteringModelFactory.java
-@@ -170,7 +170,7 @@ public class KiePMMLClusteringModelFactory {
+@@ -173,7 +173,7 @@ public class KiePMMLClusteringModelFactory {
boolean isCenterField =
clusteringField.getCenterField() == null || clusteringField.getCenterField() == ClusteringField.CenterField.TRUE;
KiePMMLCompareFunction kiePMMLCompareFunction = clusteringField.getCompareFunction() != null ? compareFunctionFrom(clusteringField.getCompareFunction()) : null;
@@ -5938,7 +5929,7 @@ index 7b7ca55b9e..e760d10cfb 100644
kiePMMLCompareFunction, null);
}
-@@ -250,7 +250,7 @@ public class KiePMMLClusteringModelFactory {
+@@ -253,7 +253,7 @@ public class KiePMMLClusteringModelFactory {
clusteringField.getCenterField() == null || clusteringField.getCenterField() == ClusteringField.CenterField.TRUE;
NodeList arguments = new NodeList<>();
@@ -5948,10 +5939,10 @@ index 7b7ca55b9e..e760d10cfb 100644
arguments.add(new BooleanLiteralExpr(isCenterField));
arguments.add(clusteringField.getCompareFunction() == null ? new NullLiteralExpr() :
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-clustering/kie-pmml-models-clustering-compiler/src/test/java/org/kie/pmml/models/clustering/compiler/factories/KiePMMLClusteringModelFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-clustering/kie-pmml-models-clustering-compiler/src/test/java/org/kie/pmml/models/clustering/compiler/factories/KiePMMLClusteringModelFactoryTest.java
-index 5fbfa7f31d..8f102e47c4 100644
+index a8b06c8f09..23f30fe19f 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-clustering/kie-pmml-models-clustering-compiler/src/test/java/org/kie/pmml/models/clustering/compiler/factories/KiePMMLClusteringModelFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-clustering/kie-pmml-models-clustering-compiler/src/test/java/org/kie/pmml/models/clustering/compiler/factories/KiePMMLClusteringModelFactoryTest.java
-@@ -35,7 +35,6 @@ import org.dmg.pmml.DataDictionary;
+@@ -38,7 +38,6 @@ import org.dmg.pmml.DataDictionary;
import org.dmg.pmml.DataField;
import org.dmg.pmml.DataType;
import org.dmg.pmml.Euclidean;
@@ -5959,7 +5950,7 @@ index 5fbfa7f31d..8f102e47c4 100644
import org.dmg.pmml.MiningField;
import org.dmg.pmml.MiningFunction;
import org.dmg.pmml.MiningSchema;
-@@ -105,7 +104,7 @@ public class KiePMMLClusteringModelFactoryTest {
+@@ -108,7 +107,7 @@ public class KiePMMLClusteringModelFactoryTest {
IntStream.range(0, 3).forEach(i -> {
ClusteringField clusteringField = getRandomClusteringField();
clusteringFields.add(clusteringField);
@@ -5968,7 +5959,7 @@ index 5fbfa7f31d..8f102e47c4 100644
clusters.add(getRandomCluster());
});
-@@ -190,7 +189,7 @@ public class KiePMMLClusteringModelFactoryTest {
+@@ -193,7 +192,7 @@ public class KiePMMLClusteringModelFactoryTest {
void getKiePMMLClusteringField() {
ClusteringField clusteringField = new ClusteringField();
final Random random = new Random();
@@ -5977,7 +5968,7 @@ index 5fbfa7f31d..8f102e47c4 100644
clusteringField.setFieldWeight(random.nextDouble());
clusteringField.setCenterField(getRandomEnum(ClusteringField.CenterField.values()));
clusteringField.setCompareFunction(getRandomEnum(CompareFunction.values()));
-@@ -253,7 +252,7 @@ public class KiePMMLClusteringModelFactoryTest {
+@@ -256,7 +255,7 @@ public class KiePMMLClusteringModelFactoryTest {
String expectedCompareFunction =
KiePMMLCompareFunction.class.getCanonicalName() + "." + comparisonMeasure.getCompareFunction().name();
@@ -5986,7 +5977,7 @@ index 5fbfa7f31d..8f102e47c4 100644
KiePMMLClusteringModelFactory.setStaticGetter(compilationDTO,
modelTemplate);
-@@ -282,7 +281,7 @@ public class KiePMMLClusteringModelFactoryTest {
+@@ -285,7 +284,7 @@ public class KiePMMLClusteringModelFactoryTest {
ClusteringField clusteringField) {
assertThat(retrieved).isNotNull();
boolean isCenterField = clusteringField.getCenterField() == ClusteringField.CenterField.TRUE;
@@ -5996,10 +5987,10 @@ index 5fbfa7f31d..8f102e47c4 100644
assertThat(retrieved.getCenterField()).isEqualTo(isCenterField);
assertThat(retrieved.getCompareFunction()).isPresent();
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDataDictionaryASTFactory.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDataDictionaryASTFactory.java
-index 06274037a0..4719245241 100644
+index a748a0e59c..9e27e0e0f2 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDataDictionaryASTFactory.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDataDictionaryASTFactory.java
-@@ -63,8 +63,8 @@ public class KiePMMLDataDictionaryASTFactory {
+@@ -66,8 +66,8 @@ public class KiePMMLDataDictionaryASTFactory {
* @param field
*/
public KiePMMLDroolsType declareType(Field field) {
@@ -6011,10 +6002,10 @@ index 06274037a0..4719245241 100644
fieldTypeMap.put(fieldName, new KiePMMLOriginalTypeGeneratedType(fieldType, generatedType));
return new KiePMMLDroolsType(generatedType, DATA_TYPE.byName(fieldType).getMappedClass().getSimpleName());
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDerivedFieldASTFactory.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDerivedFieldASTFactory.java
-index e66d696e1c..f267248495 100644
+index 84de887ede..492dfe0f89 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDerivedFieldASTFactory.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDerivedFieldASTFactory.java
-@@ -60,8 +60,8 @@ public class KiePMMLDerivedFieldASTFactory {
+@@ -63,8 +63,8 @@ public class KiePMMLDerivedFieldASTFactory {
* @param derivedField
*/
public KiePMMLDroolsType declareType(DerivedField derivedField) {
@@ -6026,10 +6017,10 @@ index e66d696e1c..f267248495 100644
fieldTypeMap.put(fieldName, new KiePMMLOriginalTypeGeneratedType(fieldType, generatedType));
return new KiePMMLDroolsType(generatedType, DATA_TYPE.byName(fieldType).getMappedClass().getSimpleName());
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimplePredicateASTFactory.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimplePredicateASTFactory.java
-index 45091cb9c4..0ca5223391 100644
+index 83d01f66f0..48eb2adbb0 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimplePredicateASTFactory.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimplePredicateASTFactory.java
-@@ -55,7 +55,7 @@ public class KiePMMLSimplePredicateASTFactory extends KiePMMLAbstractPredicateAS
+@@ -58,7 +58,7 @@ public class KiePMMLSimplePredicateASTFactory extends KiePMMLAbstractPredicateAS
final KiePMMLReasonCodeAndValue reasonCodeAndValue,
final boolean isLastCharacteristic) {
logger.trace("declareRuleFromSimplePredicateSurrogate {} {} {} {}", agendaActivationGroup, toAccumulate, statusToSet, isLastCharacteristic);
@@ -6038,7 +6029,7 @@ index 45091cb9c4..0ca5223391 100644
String surrogateCurrentRule = String.format(KiePMMLAbstractModelASTFactory.SURROGATE_RULENAME_PATTERN, predicateASTFactoryData.getCurrentRule(), fieldName);
final List constraints = Collections.singletonList(KiePMMLASTFactoryUtils.getConstraintEntryFromSimplePredicates(fieldName, BOOLEAN_OPERATOR.SURROGATE, Collections.singletonList((SimplePredicate) predicateASTFactoryData.getPredicate()), predicateASTFactoryData.getFieldTypeMap()));
// Create "TRUE" matcher
-@@ -79,7 +79,7 @@ public class KiePMMLSimplePredicateASTFactory extends KiePMMLAbstractPredicateAS
+@@ -82,7 +82,7 @@ public class KiePMMLSimplePredicateASTFactory extends KiePMMLAbstractPredicateAS
final Object result,
boolean isFinalLeaf) {
logger.trace("declareRuleFromSimplePredicateSurrogate {} {} {}", agendaActivationGroup, result, isFinalLeaf);
@@ -6047,7 +6038,7 @@ index 45091cb9c4..0ca5223391 100644
String surrogateCurrentRule = String.format(KiePMMLAbstractModelASTFactory.SURROGATE_RULENAME_PATTERN, predicateASTFactoryData.getCurrentRule(), fieldName);
final List constraints = Collections.singletonList(KiePMMLASTFactoryUtils.getConstraintEntryFromSimplePredicates(fieldName, BOOLEAN_OPERATOR.SURROGATE, Collections.singletonList((SimplePredicate) predicateASTFactoryData.getPredicate()), predicateASTFactoryData.getFieldTypeMap()));
String statusToSet = isFinalLeaf ? DONE : predicateASTFactoryData.getCurrentRule();
-@@ -215,7 +215,7 @@ public class KiePMMLSimplePredicateASTFactory extends KiePMMLAbstractPredicateAS
+@@ -218,7 +218,7 @@ public class KiePMMLSimplePredicateASTFactory extends KiePMMLAbstractPredicateAS
protected KiePMMLDroolsRule.Builder getBuilderForSimplePredicate(final String statusToSet) {
logger.trace("getBuilderForSimplePredicate {}", statusToSet);
String statusConstraint = StringUtils.isEmpty(predicateASTFactoryData.getParentPath()) ? KiePMMLAbstractModelASTFactory.STATUS_NULL : String.format(STATUS_PATTERN, predicateASTFactoryData.getParentPath());
@@ -6057,10 +6048,10 @@ index 45091cb9c4..0ca5223391 100644
Object value = KiePMMLASTFactoryUtils.getCorrectlyFormattedObject(((SimplePredicate) predicateASTFactoryData.getPredicate()), predicateASTFactoryData.getFieldTypeMap());
List andConstraints = Collections.singletonList(new KiePMMLFieldOperatorValue(key, BOOLEAN_OPERATOR.AND, Collections.singletonList(new KiePMMLOperatorValue(operator, value)), null));
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimpleSetPredicateASTFactory.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimpleSetPredicateASTFactory.java
-index 3cd8657705..6f7028f782 100644
+index 10656ad316..0e9a561efb 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimpleSetPredicateASTFactory.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimpleSetPredicateASTFactory.java
-@@ -72,11 +72,11 @@ public class KiePMMLSimpleSetPredicateASTFactory extends KiePMMLAbstractPredicat
+@@ -75,11 +75,11 @@ public class KiePMMLSimpleSetPredicateASTFactory extends KiePMMLAbstractPredicat
logger.trace("declareRuleFromSimpleSetPredicate {}", statusToSet);
String statusConstraint = StringUtils.isEmpty(predicateASTFactoryData.getParentPath()) ? STATUS_NULL : String.format(STATUS_PATTERN, predicateASTFactoryData.getParentPath());
SimpleSetPredicate simpleSetPredicate = (SimpleSetPredicate) predicateASTFactoryData.getPredicate();
@@ -6075,10 +6066,10 @@ index 3cd8657705..6f7028f782 100644
case "string":
return "\"" + rawValue + "\"";
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/utils/KiePMMLASTFactoryUtils.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/utils/KiePMMLASTFactoryUtils.java
-index 491df26632..35b5ffa32e 100644
+index b8b150adce..b36131729b 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/utils/KiePMMLASTFactoryUtils.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/utils/KiePMMLASTFactoryUtils.java
-@@ -55,7 +55,7 @@ public class KiePMMLASTFactoryUtils {
+@@ -58,7 +58,7 @@ public class KiePMMLASTFactoryUtils {
}
final Map> predicatesByField = simplePredicates.stream()
.map(child -> (SimplePredicate) child)
@@ -6087,7 +6078,7 @@ index 491df26632..35b5ffa32e 100644
final List toReturn = new LinkedList<>();
populateKiePMMLFieldOperatorValueListWithSimplePredicates(toReturn, compoundPredicate.getBooleanOperator(), predicatesByField, fieldTypeMap);
final List compoundPredicates = compoundPredicate.getPredicates().stream()
-@@ -113,7 +113,7 @@ public class KiePMMLASTFactoryUtils {
+@@ -116,7 +116,7 @@ public class KiePMMLASTFactoryUtils {
.filter(predicate -> predicate instanceof SimplePredicate)
.map(predicate -> {
SimplePredicate simplePredicate = (SimplePredicate) predicate;
@@ -6096,7 +6087,7 @@ index 491df26632..35b5ffa32e 100644
OPERATOR operator = OPERATOR.byName(simplePredicate.getOperator().value());
Object value = getCorrectlyFormattedObject(simplePredicate, fieldTypeMap);
return new KiePMMLFieldOperatorValue(fieldName, null, Collections.singletonList(new KiePMMLOperatorValue(operator, value)), null);
-@@ -121,7 +121,7 @@ public class KiePMMLASTFactoryUtils {
+@@ -124,7 +124,7 @@ public class KiePMMLASTFactoryUtils {
}
public static Object getCorrectlyFormattedObject(final SimplePredicate simplePredicate, final Map fieldTypeMap) {
@@ -6106,10 +6097,10 @@ index 491df26632..35b5ffa32e 100644
}
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLCompoundPredicateASTFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLCompoundPredicateASTFactoryTest.java
-index 7f39b545f3..874ffd5b6b 100644
+index 22ffee44d5..0fed2e969f 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLCompoundPredicateASTFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLCompoundPredicateASTFactoryTest.java
-@@ -170,7 +170,7 @@ public class KiePMMLCompoundPredicateASTFactoryTest {
+@@ -172,7 +172,7 @@ public class KiePMMLCompoundPredicateASTFactoryTest {
.findFirst();
if (fieldName.isPresent()) {
SimplePredicate mappedPredicate = predicates.stream()
@@ -6118,7 +6109,7 @@ index 7f39b545f3..874ffd5b6b 100644
.findFirst()
.orElse(null);
assertThat(mappedPredicate).isNotNull();
-@@ -235,7 +235,7 @@ public class KiePMMLCompoundPredicateASTFactoryTest {
+@@ -237,7 +237,7 @@ public class KiePMMLCompoundPredicateASTFactoryTest {
.findFirst();
if (fieldName.isPresent()) {
SimplePredicate mappedPredicate = predicates.stream()
@@ -6128,10 +6119,10 @@ index 7f39b545f3..874ffd5b6b 100644
assertThat(retrieved.getStatusConstraint()).isNull();
assertThat(retrieved.getActivationGroup()).isEqualTo(agendaActivationGroup);
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDataDictionaryASTFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDataDictionaryASTFactoryTest.java
-index 7425a8e4d1..5b4d3250df 100644
+index 5b3642abbc..3d222c3bf2 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDataDictionaryASTFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDataDictionaryASTFactoryTest.java
-@@ -40,7 +40,7 @@ public class KiePMMLDataDictionaryASTFactoryTest {
+@@ -42,7 +42,7 @@ public class KiePMMLDataDictionaryASTFactoryTest {
@Test
void declareTypes() {
List dataFields = Arrays.asList(getTypeDataField(), getDottedTypeDataField(), getTypeDataField(), getDottedTypeDataField());
@@ -6140,7 +6131,7 @@ index 7425a8e4d1..5b4d3250df 100644
final Map fieldTypeMap = new HashMap<>();
List retrieved = KiePMMLDataDictionaryASTFactory.factory(fieldTypeMap).declareTypes(getFieldsFromDataDictionary(dataDictionary));
assertThat(retrieved).isNotNull();
-@@ -58,12 +58,12 @@ public class KiePMMLDataDictionaryASTFactoryTest {
+@@ -60,12 +60,12 @@ public class KiePMMLDataDictionaryASTFactoryTest {
}
private void commonVerifyTypeDeclarationDescr(DataField dataField, Map fieldTypeMap, final KiePMMLDroolsType kiePMMLDroolsType) {
@@ -6157,10 +6148,10 @@ index 7425a8e4d1..5b4d3250df 100644
assertThat(kiePMMLOriginalTypeGeneratedType.getGeneratedType()).startsWith(expectedGeneratedType);
}
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDerivedFieldASTFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDerivedFieldASTFactoryTest.java
-index cb32a1c418..9694394d76 100644
+index 4f7b725f82..f83d4f22dd 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDerivedFieldASTFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLDerivedFieldASTFactoryTest.java
-@@ -25,7 +25,6 @@ import java.util.stream.IntStream;
+@@ -27,7 +27,6 @@ import java.util.stream.IntStream;
import org.dmg.pmml.DataType;
import org.dmg.pmml.DerivedField;
@@ -6168,7 +6159,7 @@ index cb32a1c418..9694394d76 100644
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.kie.pmml.api.enums.DATA_TYPE;
-@@ -67,7 +66,7 @@ public class KiePMMLDerivedFieldASTFactoryTest {
+@@ -69,7 +68,7 @@ public class KiePMMLDerivedFieldASTFactoryTest {
}
private void commonValidateKiePMMLDroolsType(KiePMMLDroolsType toValidate, DerivedField derivedField) {
@@ -6177,7 +6168,7 @@ index cb32a1c418..9694394d76 100644
String expectedName = getSanitizedClassName(derivedFieldName.toUpperCase());
assertThat(toValidate.getName()).isEqualTo(expectedName);
String expectedType = DATA_TYPE.byName(derivedField.getDataType().value()).getMappedClass().getSimpleName();
-@@ -80,7 +79,7 @@ public class KiePMMLDerivedFieldASTFactoryTest {
+@@ -82,7 +81,7 @@ public class KiePMMLDerivedFieldASTFactoryTest {
private DerivedField getDerivedField(String fieldName) {
DerivedField toReturn = new DerivedField();
@@ -6187,10 +6178,10 @@ index cb32a1c418..9694394d76 100644
int rndInt = new Random().nextInt(values.length - 1);
DATA_TYPE dataType = values[rndInt];
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimplePredicateASTFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimplePredicateASTFactoryTest.java
-index eda072a71e..08fbb62ee3 100644
+index ebc557fb9b..0ec409c52d 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimplePredicateASTFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/ast/factories/KiePMMLSimplePredicateASTFactoryTest.java
-@@ -65,7 +65,7 @@ public class KiePMMLSimplePredicateASTFactoryTest {
+@@ -67,7 +67,7 @@ public class KiePMMLSimplePredicateASTFactoryTest {
assertThat(retrieved).isNotNull();
String baseExpectedRule = String.format(KiePMMLAbstractModelASTFactory.SURROGATE_RULENAME_PATTERN,
currentRule,
@@ -6199,7 +6190,7 @@ index eda072a71e..08fbb62ee3 100644
String expectedRule = baseExpectedRule + "_TRUE";
assertThat(retrieved.getName()).isEqualTo(expectedRule);
assertThat(retrieved.getStatusToSet()).isEqualTo(DONE);
-@@ -133,7 +133,7 @@ public class KiePMMLSimplePredicateASTFactoryTest {
+@@ -135,7 +135,7 @@ public class KiePMMLSimplePredicateASTFactoryTest {
assertThat(retrieved).isNotNull();
String baseExpectedRule = String.format(KiePMMLAbstractModelASTFactory.SURROGATE_RULENAME_PATTERN,
currentRule,
@@ -6209,10 +6200,10 @@ index eda072a71e..08fbb62ee3 100644
assertThat(retrieved.getName()).isEqualTo(expectedRule);
assertThat(retrieved.getStatusToSet()).isEqualTo(currentRule);
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/commons/factories/KiePMMLDescrRhsFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/commons/factories/KiePMMLDescrRhsFactoryTest.java
-index 1c5c90e631..1d3192f47b 100644
+index 013f6edf63..86261e8153 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/commons/factories/KiePMMLDescrRhsFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/commons/factories/KiePMMLDescrRhsFactoryTest.java
-@@ -20,7 +20,6 @@ import java.util.Collections;
+@@ -22,7 +22,6 @@ import java.util.Collections;
import java.util.List;
import java.util.StringJoiner;
@@ -6220,7 +6211,7 @@ index 1c5c90e631..1d3192f47b 100644
import org.dmg.pmml.OutputField;
import org.dmg.pmml.ResultFeature;
import org.drools.drl.ast.dsl.DescrFactory;
-@@ -164,7 +163,7 @@ public class KiePMMLDescrRhsFactoryTest {
+@@ -166,7 +165,7 @@ public class KiePMMLDescrRhsFactoryTest {
String outputFieldName = "OUTPUTFIELDNAME";
Object result = "RESULT";
OutputField outputField = new OutputField();
@@ -6229,7 +6220,7 @@ index 1c5c90e631..1d3192f47b 100644
outputField.setResultFeature(ResultFeature.PREDICTED_VALUE);
List outputFields = Collections.singletonList(outputField);
KiePMMLDroolsRule.Builder builder = KiePMMLDroolsRule.builder(ruleName, statusToSet, outputFields);
-@@ -209,7 +208,7 @@ public class KiePMMLDescrRhsFactoryTest {
+@@ -211,7 +210,7 @@ public class KiePMMLDescrRhsFactoryTest {
String outputFieldName = "OUTPUTFIELDNAME";
Object result = "RESULT";
OutputField outputField = new OutputField();
@@ -6239,10 +6230,10 @@ index 1c5c90e631..1d3192f47b 100644
List outputFields = Collections.singletonList(outputField);
StringJoiner joiner = new StringJoiner("");
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/provider/DroolsModelProviderTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/provider/DroolsModelProviderTest.java
-index 5d2096f1d8..4461cfb39e 100644
+index 666154816d..232e38f76b 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/provider/DroolsModelProviderTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/provider/DroolsModelProviderTest.java
-@@ -181,7 +181,7 @@ public class DroolsModelProviderTest {
+@@ -183,7 +183,7 @@ public class DroolsModelProviderTest {
private void commonVerifyTypesList(Field> toVerify, final List types) {
assertThat(types.stream()
.anyMatch(type -> {
@@ -6251,7 +6242,7 @@ index 5d2096f1d8..4461cfb39e 100644
if (!type.getName().startsWith(expectedName)) {
return false;
}
-@@ -206,13 +206,13 @@ public class DroolsModelProviderTest {
+@@ -208,13 +208,13 @@ public class DroolsModelProviderTest {
final Map fieldTypeMap) {
assertThat(fieldTypeMap.entrySet().stream()
.anyMatch(entry -> {
@@ -6268,10 +6259,10 @@ index 5d2096f1d8..4461cfb39e 100644
return true;
})).isTrue();
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLASTFactoryUtilsTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLASTFactoryUtilsTest.java
-index e0c824f1d3..ddfa79ee1b 100644
+index 7fd20b7b30..5dd81dc878 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLASTFactoryUtilsTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLASTFactoryUtilsTest.java
-@@ -195,7 +195,7 @@ public class KiePMMLASTFactoryUtilsTest {
+@@ -197,7 +197,7 @@ public class KiePMMLASTFactoryUtilsTest {
kiePMMLFieldOperatorValue.getKiePMMLOperatorValues().get(0);
SimplePredicate simplePredicate = nestedPredicates.stream()
.map(predicate -> (SimplePredicate) predicate)
@@ -6280,7 +6271,7 @@ index e0c824f1d3..ddfa79ee1b 100644
.findFirst()
.orElseThrow(() -> new RuntimeException("Failed to find SimplePredicate for " + kiePMMLFieldOperatorValue.getName()));
commonVerifyKiePMMLOperatorValue(kiePMMLOperatorValue, simplePredicate);
-@@ -208,7 +208,7 @@ public class KiePMMLASTFactoryUtilsTest {
+@@ -210,7 +210,7 @@ public class KiePMMLASTFactoryUtilsTest {
private void commonPopulateKiePMMLFieldOperatorValueListWithSimplePredicates(CompoundPredicate.BooleanOperator compoundBooleanOperator, BOOLEAN_OPERATOR booleanOperator) {
final Map> predicatesByField = simplePredicates.stream()
@@ -6289,7 +6280,7 @@ index e0c824f1d3..ddfa79ee1b 100644
final List toPopulate = new ArrayList<>();
KiePMMLASTFactoryUtils.populateKiePMMLFieldOperatorValueListWithSimplePredicates(toPopulate,
compoundBooleanOperator,
-@@ -258,7 +258,7 @@ public class KiePMMLASTFactoryUtilsTest {
+@@ -260,7 +260,7 @@ public class KiePMMLASTFactoryUtilsTest {
private SimplePredicate getSimplePredicate(String generatedType) {
String predicateName = getOriginalPredicateName(generatedType);
return simplePredicates.stream()
@@ -6299,10 +6290,10 @@ index e0c824f1d3..ddfa79ee1b 100644
.orElseThrow(() -> new RuntimeException("Failed to find SimplePredicate for " + predicateName));
}
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLASTTestUtils.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLASTTestUtils.java
-index 3e160ea62a..488c28cc07 100644
+index b5ec2ce14d..e18a931351 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLASTTestUtils.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLASTTestUtils.java
-@@ -22,7 +22,6 @@ import java.util.Map;
+@@ -25,7 +25,6 @@ import java.util.Map;
import org.dmg.pmml.DataDictionary;
import org.dmg.pmml.DataField;
import org.dmg.pmml.DataType;
@@ -6310,7 +6301,7 @@ index 3e160ea62a..488c28cc07 100644
import org.dmg.pmml.LocalTransformations;
import org.dmg.pmml.OpType;
import org.dmg.pmml.OutputField;
-@@ -67,7 +66,7 @@ public class KiePMMLASTTestUtils {
+@@ -70,7 +69,7 @@ public class KiePMMLASTTestUtils {
DataField toReturn = new DataField();
toReturn.setOpType(OpType.CONTINUOUS);
toReturn.setDataType(DataType.DATE);
@@ -6319,7 +6310,7 @@ index 3e160ea62a..488c28cc07 100644
return toReturn;
}
-@@ -75,7 +74,7 @@ public class KiePMMLASTTestUtils {
+@@ -78,7 +77,7 @@ public class KiePMMLASTTestUtils {
DataField toReturn = new DataField();
toReturn.setOpType(OpType.CONTINUOUS);
toReturn.setDataType(DataType.BOOLEAN);
@@ -6329,10 +6320,10 @@ index 3e160ea62a..488c28cc07 100644
}
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLDroolsModelFactoryUtilsTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLDroolsModelFactoryUtilsTest.java
-index 28fdafd02a..d9955b6c0e 100644
+index 18d6ac33f7..d74bd8f7a5 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLDroolsModelFactoryUtilsTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/test/java/org/kie/pmml/models/drools/utils/KiePMMLDroolsModelFactoryUtilsTest.java
-@@ -42,7 +42,6 @@ import com.github.javaparser.ast.stmt.Statement;
+@@ -44,7 +44,6 @@ import com.github.javaparser.ast.stmt.Statement;
import org.dmg.pmml.DataDictionary;
import org.dmg.pmml.DataField;
import org.dmg.pmml.DataType;
@@ -6340,7 +6331,7 @@ index 28fdafd02a..d9955b6c0e 100644
import org.dmg.pmml.MiningField;
import org.dmg.pmml.MiningFunction;
import org.dmg.pmml.MiningSchema;
-@@ -84,7 +83,7 @@ public class KiePMMLDroolsModelFactoryUtilsTest {
+@@ -86,7 +85,7 @@ public class KiePMMLDroolsModelFactoryUtilsTest {
void getKiePMMLModelCompilationUnit() {
DataDictionary dataDictionary = new DataDictionary();
String targetFieldString = "target.field";
@@ -6350,10 +6341,10 @@ index 28fdafd02a..d9955b6c0e 100644
String modelName = "ModelName";
TreeModel model = new TreeModel();
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-scorecard/kie-pmml-models-drools-scorecard-compiler/src/test/java/org/kie/pmml/models/drools/scorecard/compiler/factories/KiePMMLScorecardModelCharacteristicASTFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-scorecard/kie-pmml-models-drools-scorecard-compiler/src/test/java/org/kie/pmml/models/drools/scorecard/compiler/factories/KiePMMLScorecardModelCharacteristicASTFactoryTest.java
-index 16d50cd211..af24a2d2f8 100644
+index 486f873b80..0823492a5b 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-scorecard/kie-pmml-models-drools-scorecard-compiler/src/test/java/org/kie/pmml/models/drools/scorecard/compiler/factories/KiePMMLScorecardModelCharacteristicASTFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-scorecard/kie-pmml-models-drools-scorecard-compiler/src/test/java/org/kie/pmml/models/drools/scorecard/compiler/factories/KiePMMLScorecardModelCharacteristicASTFactoryTest.java
-@@ -368,7 +368,7 @@ public class KiePMMLScorecardModelCharacteristicASTFactoryTest {
+@@ -370,7 +370,7 @@ public class KiePMMLScorecardModelCharacteristicASTFactoryTest {
DATA_TYPE dataType = dataDictionary.getDataFields().stream().filter(dataField -> dataField.getName().equals(simplePredicate.getField()))
.map(dataField -> DATA_TYPE.byName(dataField.getDataType().value()))
.findFirst()
@@ -6363,10 +6354,10 @@ index 16d50cd211..af24a2d2f8 100644
}
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-tree/kie-pmml-models-drools-tree-compiler/src/test/java/org/kie/pmml/models/drools/tree/compiler/factories/KiePMMLTreeModelFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-tree/kie-pmml-models-drools-tree-compiler/src/test/java/org/kie/pmml/models/drools/tree/compiler/factories/KiePMMLTreeModelFactoryTest.java
-index 22d3cb65c1..d48aff5c66 100644
+index e5e1a37343..6f9f7f833c 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-tree/kie-pmml-models-drools-tree-compiler/src/test/java/org/kie/pmml/models/drools/tree/compiler/factories/KiePMMLTreeModelFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-tree/kie-pmml-models-drools-tree-compiler/src/test/java/org/kie/pmml/models/drools/tree/compiler/factories/KiePMMLTreeModelFactoryTest.java
-@@ -98,7 +98,7 @@ public class KiePMMLTreeModelFactoryTest {
+@@ -100,7 +100,7 @@ public class KiePMMLTreeModelFactoryTest {
assertThat(retrieved).isNotNull();
List dataFields = dataDictionary.getDataFields();
assertThat(fieldTypeMap).hasSameSizeAs(dataFields);
@@ -6376,10 +6367,10 @@ index 22d3cb65c1..d48aff5c66 100644
@Test
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/AbstractKiePMMLFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/AbstractKiePMMLFactoryTest.java
-index 01fd1ef0c7..393c4f4343 100644
+index 2bbd9df084..d6cadfc321 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/AbstractKiePMMLFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/AbstractKiePMMLFactoryTest.java
-@@ -20,7 +20,7 @@ import java.io.FileInputStream;
+@@ -22,7 +22,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
@@ -6389,10 +6380,10 @@ index 01fd1ef0c7..393c4f4343 100644
import org.dmg.pmml.DataDictionary;
import org.dmg.pmml.DerivedField;
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLMiningModelFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLMiningModelFactoryTest.java
-index a01f6ba83f..2316de9503 100644
+index 16c99b6297..935a576397 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLMiningModelFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLMiningModelFactoryTest.java
-@@ -22,7 +22,7 @@ import java.util.HashMap;
+@@ -24,7 +24,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -6402,10 +6393,10 @@ index a01f6ba83f..2316de9503 100644
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLSegmentFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLSegmentFactoryTest.java
-index cc2616fdef..f4ecab705b 100644
+index df6b84623a..0ff476d12f 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLSegmentFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLSegmentFactoryTest.java
-@@ -22,7 +22,7 @@ import java.util.HashMap;
+@@ -24,7 +24,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -6415,10 +6406,10 @@ index cc2616fdef..f4ecab705b 100644
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLSegmentationFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLSegmentationFactoryTest.java
-index 87c89db11f..bbd01cae21 100644
+index 413c7bfec9..05b1117e15 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLSegmentationFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-mining/kie-pmml-models-mining-compiler/src/test/java/org/kie/pmml/models/mining/compiler/factories/KiePMMLSegmentationFactoryTest.java
-@@ -21,7 +21,7 @@ import java.util.ArrayList;
+@@ -23,7 +23,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -6428,10 +6419,10 @@ index 87c89db11f..bbd01cae21 100644
import org.dmg.pmml.mining.MiningModel;
import org.junit.jupiter.api.BeforeAll;
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/main/java/org/kie/pmml/models/regression/compiler/executor/RegressionModelImplementationProvider.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/main/java/org/kie/pmml/models/regression/compiler/executor/RegressionModelImplementationProvider.java
-index d843728fb0..7de61d608c 100644
+index a74071da45..3630b255e1 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/main/java/org/kie/pmml/models/regression/compiler/executor/RegressionModelImplementationProvider.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/main/java/org/kie/pmml/models/regression/compiler/executor/RegressionModelImplementationProvider.java
-@@ -191,7 +191,7 @@ public class RegressionModelImplementationProvider implements ModelImplementatio
+@@ -194,7 +194,7 @@ public class RegressionModelImplementationProvider implements ModelImplementatio
if (targetFields.size() != 1) {
throw new KiePMMLException("Expected one target field, retrieved " + targetFields.size());
}
@@ -6440,7 +6431,7 @@ index d843728fb0..7de61d608c 100644
targetFields.get(0).getName()))) {
throw new KiePMMLException(String.format("Not-matching target fields: %s %s", toValidate.getTargetField()
, targetFields.get(0).getName()));
-@@ -206,7 +206,7 @@ public class RegressionModelImplementationProvider implements ModelImplementatio
+@@ -209,7 +209,7 @@ public class RegressionModelImplementationProvider implements ModelImplementatio
return fields.stream()
.filter(DataField.class::isInstance)
.map(DataField.class::cast)
@@ -6449,7 +6440,7 @@ index d843728fb0..7de61d608c 100644
.findFirst().orElse(0) == 2;
}
-@@ -214,7 +214,7 @@ public class RegressionModelImplementationProvider implements ModelImplementatio
+@@ -217,7 +217,7 @@ public class RegressionModelImplementationProvider implements ModelImplementatio
List targetFields = getTargetFields(fields, toValidate);
final List categoricalFields = fields.stream()
.filter(dataField -> OpType.CATEGORICAL.equals(dataField.getOpType()))
@@ -6459,10 +6450,10 @@ index d843728fb0..7de61d608c 100644
final List categoricalNameTypes =
targetFields.stream().filter(targetField -> categoricalFields.contains(targetField.getName())).collect(Collectors.toList());
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/main/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionTableFactory.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/main/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionTableFactory.java
-index fcffd3bb09..2721ba7383 100644
+index 131e786ce6..c24e4bf06a 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/main/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionTableFactory.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/main/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionTableFactory.java
-@@ -203,7 +203,7 @@ public class KiePMMLRegressionTableFactory {
+@@ -206,7 +206,7 @@ public class KiePMMLRegressionTableFactory {
*/
static Map> getNumericPredictorsMap(final List numericPredictors) {
return numericPredictors.stream()
@@ -6471,7 +6462,7 @@ index fcffd3bb09..2721ba7383 100644
KiePMMLRegressionTableFactory::getNumericPredictorEntry));
}
-@@ -232,7 +232,7 @@ public class KiePMMLRegressionTableFactory {
+@@ -235,7 +235,7 @@ public class KiePMMLRegressionTableFactory {
*/
static Map> getCategoricalPredictorsMap(final List categoricalPredictors) {
final Map> groupedCollectors = categoricalPredictors.stream()
@@ -6480,7 +6471,7 @@ index fcffd3bb09..2721ba7383 100644
return groupedCollectors.entrySet().stream()
.map(entry -> {
Map groupedCategoricalPredictorMap =
-@@ -273,7 +273,7 @@ public class KiePMMLRegressionTableFactory {
+@@ -276,7 +276,7 @@ public class KiePMMLRegressionTableFactory {
return predictorTerms.stream()
.map(predictorTerm -> {
int arity = predictorsArity.addAndGet(1);
@@ -6489,7 +6480,7 @@ index fcffd3bb09..2721ba7383 100644
"predictorTermFunction" + arity;
return new AbstractMap.SimpleEntry<>(variableName,
getPredictorTermSerializableFunction(predictorTerm));
-@@ -292,7 +292,7 @@ public class KiePMMLRegressionTableFactory {
+@@ -295,7 +295,7 @@ public class KiePMMLRegressionTableFactory {
return resultMap -> {
final AtomicReference result = new AtomicReference<>(1.0);
final List fieldRefs = predictorTerm.getFieldRefs().stream()
@@ -6498,7 +6489,7 @@ index fcffd3bb09..2721ba7383 100644
.collect(Collectors.toList());
for (Map.Entry entry : resultMap.entrySet()) {
if (fieldRefs.contains(entry.getKey())) {
-@@ -440,7 +440,7 @@ public class KiePMMLRegressionTableFactory {
+@@ -443,7 +443,7 @@ public class KiePMMLRegressionTableFactory {
*/
static Map getNumericPredictorsExpressions(final List numericPredictors) {
return numericPredictors.stream()
@@ -6507,7 +6498,7 @@ index fcffd3bb09..2721ba7383 100644
KiePMMLRegressionTableFactory::getNumericPredictorExpression));
}
-@@ -489,7 +489,7 @@ public class KiePMMLRegressionTableFactory {
+@@ -492,7 +492,7 @@ public class KiePMMLRegressionTableFactory {
*/
static Map getCategoricalPredictorsExpressions(final List categoricalPredictors, final BlockStmt body, final String variableName) {
final Map> groupedCollectors = categoricalPredictors.stream()
@@ -6516,7 +6507,7 @@ index fcffd3bb09..2721ba7383 100644
final String categoricalPredictorMapNameBase = getSanitizedVariableName(String.format("%sMap", variableName));
final AtomicInteger counter = new AtomicInteger();
return groupedCollectors.entrySet().stream()
-@@ -578,7 +578,7 @@ public class KiePMMLRegressionTableFactory {
+@@ -581,7 +581,7 @@ public class KiePMMLRegressionTableFactory {
return predictorTerms.stream()
.map(predictorTerm -> {
int arity = predictorsArity.addAndGet(1);
@@ -6525,7 +6516,7 @@ index fcffd3bb09..2721ba7383 100644
"predictorTermFunction" + arity;
return new AbstractMap.SimpleEntry<>(variableName,
getPredictorTermFunction(predictorTerm));
-@@ -627,7 +627,7 @@ public class KiePMMLRegressionTableFactory {
+@@ -630,7 +630,7 @@ public class KiePMMLRegressionTableFactory {
.orElseThrow(() -> new KiePMMLInternalException(String.format(MISSING_VARIABLE_IN_BODY,
"fieldRefs", body)));
final List nodeList = predictorTerm.getFieldRefs().stream()
@@ -6535,10 +6526,10 @@ index fcffd3bb09..2721ba7383 100644
NodeList expressions = NodeList.nodeList(nodeList);
MethodCallExpr methodCallExpr = new MethodCallExpr(new NameExpr("Arrays"), "asList", expressions);
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/AbstractKiePMMLRegressionTableRegressionFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/AbstractKiePMMLRegressionTableRegressionFactoryTest.java
-index 3e609be3e3..58707e6f2f 100644
+index a2d17ca5d0..2d3983495d 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/AbstractKiePMMLRegressionTableRegressionFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/AbstractKiePMMLRegressionTableRegressionFactoryTest.java
-@@ -64,8 +64,7 @@ public abstract class AbstractKiePMMLRegressionTableRegressionFactoryTest {
+@@ -66,8 +66,7 @@ public abstract class AbstractKiePMMLRegressionTableRegressionFactoryTest {
IntStream.range(0, 2).forEach(j -> categoricalPredictors.add(getCategoricalPredictor("CatPred-" + i, 27.12, 3.46)));
numericPredictors.add(getNumericPredictor("NumPred-" + i, 2, 13.11));
predictorTerms.add(getPredictorTerm("PredTerm-" + i, 32.29,
@@ -6549,10 +6540,10 @@ index 3e609be3e3..58707e6f2f 100644
return PMMLModelTestUtils.getRegressionTable(categoricalPredictors, numericPredictors, predictorTerms, intercept, targetCategory);
}
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLClassificationTableFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLClassificationTableFactoryTest.java
-index 20c679fb09..f49fff8e01 100644
+index 9d9d2172f7..950c91cb91 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLClassificationTableFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLClassificationTableFactoryTest.java
-@@ -28,7 +28,6 @@ import com.github.javaparser.ast.expr.Expression;
+@@ -30,7 +30,6 @@ import com.github.javaparser.ast.expr.Expression;
import com.github.javaparser.ast.expr.MethodReferenceExpr;
import org.dmg.pmml.DataDictionary;
import org.dmg.pmml.DataField;
@@ -6560,7 +6551,7 @@ index 20c679fb09..f49fff8e01 100644
import org.dmg.pmml.MiningField;
import org.dmg.pmml.MiningSchema;
import org.dmg.pmml.OpType;
-@@ -88,7 +87,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
+@@ -90,7 +89,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
String targetField = "targetField";
DataField dataField = new DataField();
@@ -6569,7 +6560,7 @@ index 20c679fb09..f49fff8e01 100644
dataField.setOpType(OpType.CATEGORICAL);
DataDictionary dataDictionary = new DataDictionary();
dataDictionary.addDataFields(dataField);
-@@ -129,7 +128,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
+@@ -131,7 +130,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
boolean isBinary = regressionModel.getRegressionTables().size() == 2;
assertThat(retrieved.isBinary()).isEqualTo(isBinary);
assertThat(retrieved.isBinary()).isEqualTo(isBinary);
@@ -6578,7 +6569,7 @@ index 20c679fb09..f49fff8e01 100644
}
@Test
-@@ -142,7 +141,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
+@@ -144,7 +143,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
String targetField = "targetField";
DataField dataField = new DataField();
@@ -6587,7 +6578,7 @@ index 20c679fb09..f49fff8e01 100644
dataField.setOpType(OpType.CATEGORICAL);
DataDictionary dataDictionary = new DataDictionary();
dataDictionary.addDataFields(dataField);
-@@ -193,7 +192,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
+@@ -195,7 +194,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
String targetField = "targetField";
DataField dataField = new DataField();
@@ -6596,7 +6587,7 @@ index 20c679fb09..f49fff8e01 100644
dataField.setOpType(OpType.CATEGORICAL);
DataDictionary dataDictionary = new DataDictionary();
dataDictionary.addDataFields(dataField);
-@@ -279,7 +278,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
+@@ -281,7 +280,7 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
String targetField = "targetField";
DataField dataField = new DataField();
@@ -6605,7 +6596,7 @@ index 20c679fb09..f49fff8e01 100644
dataField.setOpType(OpType.CATEGORICAL);
DataDictionary dataDictionary = new DataDictionary();
dataDictionary.addDataFields(dataField);
-@@ -371,10 +370,10 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
+@@ -373,10 +372,10 @@ public class KiePMMLClassificationTableFactoryTest extends AbstractKiePMMLRegres
private OutputField getOutputField(String name, ResultFeature resultFeature, String targetField) {
OutputField toReturn = new OutputField();
@@ -6619,10 +6610,10 @@ index 20c679fb09..f49fff8e01 100644
return toReturn;
}
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionModelFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionModelFactoryTest.java
-index c5ef91a5eb..2bd3a8a9dc 100644
+index fa15492aca..715d8fcb36 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionModelFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionModelFactoryTest.java
-@@ -164,7 +164,7 @@ public class KiePMMLRegressionModelFactoryTest {
+@@ -166,7 +166,7 @@ public class KiePMMLRegressionModelFactoryTest {
assertThat(retrieved).isNotNull();
assertThat(retrieved.getName()).isEqualTo(regressionModel.getModelName());
assertThat(retrieved.getMiningFunction()).isEqualTo(MINING_FUNCTION.byName(regressionModel.getMiningFunction().value()));
@@ -6631,7 +6622,7 @@ index c5ef91a5eb..2bd3a8a9dc 100644
final AbstractKiePMMLTable regressionTable = retrieved.getRegressionTable();
assertThat(regressionTable).isNotNull();
assertThat(regressionTable).isInstanceOf(KiePMMLClassificationTable.class);
-@@ -225,7 +225,7 @@ public class KiePMMLRegressionModelFactoryTest {
+@@ -227,7 +227,7 @@ public class KiePMMLRegressionModelFactoryTest {
Map superInvocationExpressionsMap = new HashMap<>();
superInvocationExpressionsMap.put(0, new NameExpr(String.format("\"%s\"", regressionModel.getModelName())));
Map assignExpressionMap = new HashMap<>();
@@ -6640,7 +6631,7 @@ index c5ef91a5eb..2bd3a8a9dc 100644
assignExpressionMap.put("miningFunction",
new NameExpr(miningFunction.getClass().getName() + "." + miningFunction.name()));
assignExpressionMap.put("pmmlMODEL",
-@@ -258,17 +258,17 @@ public class KiePMMLRegressionModelFactoryTest {
+@@ -260,17 +260,17 @@ public class KiePMMLRegressionModelFactoryTest {
final Map> numericFunctionMap =
regressionTable.getNumericFunctionMap();
for (NumericPredictor numericPredictor : originalRegressionTable.getNumericPredictors()) {
@@ -6663,10 +6654,10 @@ index c5ef91a5eb..2bd3a8a9dc 100644
}
\ No newline at end of file
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionTableFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionTableFactoryTest.java
-index ba88fb6bd1..2ef89a689d 100644
+index a856508042..def6548dc5 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionTableFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-regression/kie-pmml-models-regression-compiler/src/test/java/org/kie/pmml/models/regression/compiler/factories/KiePMMLRegressionTableFactoryTest.java
-@@ -41,7 +41,6 @@ import com.github.javaparser.ast.stmt.ExpressionStmt;
+@@ -43,7 +43,6 @@ import com.github.javaparser.ast.stmt.ExpressionStmt;
import org.assertj.core.data.Offset;
import org.dmg.pmml.DataDictionary;
import org.dmg.pmml.DataField;
@@ -6674,7 +6665,7 @@ index ba88fb6bd1..2ef89a689d 100644
import org.dmg.pmml.MiningField;
import org.dmg.pmml.MiningSchema;
import org.dmg.pmml.OpType;
-@@ -111,7 +110,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -113,7 +112,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
regressionModel.setModelName(getGeneratedClassName("RegressionModel"));
String targetField = "targetField";
DataField dataField = new DataField();
@@ -6683,7 +6674,7 @@ index ba88fb6bd1..2ef89a689d 100644
dataField.setOpType(OpType.CATEGORICAL);
DataDictionary dataDictionary = new DataDictionary();
dataDictionary.addDataFields(dataField);
-@@ -154,7 +153,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -156,7 +155,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
regressionModel.setModelName(getGeneratedClassName("RegressionModel"));
String targetField = "targetField";
DataField dataField = new DataField();
@@ -6692,7 +6683,7 @@ index ba88fb6bd1..2ef89a689d 100644
dataField.setOpType(OpType.CATEGORICAL);
DataDictionary dataDictionary = new DataDictionary();
dataDictionary.addDataFields(dataField);
-@@ -192,7 +191,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -194,7 +193,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
regressionModel.setModelName(getGeneratedClassName("RegressionModel"));
String targetField = "targetField";
DataField dataField = new DataField();
@@ -6701,7 +6692,7 @@ index ba88fb6bd1..2ef89a689d 100644
dataField.setOpType(OpType.CATEGORICAL);
DataDictionary dataDictionary = new DataDictionary();
dataDictionary.addDataFields(dataField);
-@@ -231,7 +230,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -233,7 +232,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
regressionModel.setModelName(getGeneratedClassName("RegressionModel"));
String targetField = "targetField";
DataField dataField = new DataField();
@@ -6710,7 +6701,7 @@ index ba88fb6bd1..2ef89a689d 100644
dataField.setOpType(OpType.CATEGORICAL);
DataDictionary dataDictionary = new DataDictionary();
dataDictionary.addDataFields(dataField);
-@@ -316,7 +315,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -318,7 +317,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
Map> retrieved =
KiePMMLRegressionTableFactory.getCategoricalPredictorsMap(categoricalPredictors);
final Map> groupedCollectors = categoricalPredictors.stream()
@@ -6719,7 +6710,7 @@ index ba88fb6bd1..2ef89a689d 100644
assertThat(retrieved).hasSameSizeAs(groupedCollectors);
groupedCollectors.keySet().forEach(predictName -> assertThat(retrieved).containsKey(predictName));
}
-@@ -355,7 +354,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -357,7 +356,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
assertThat(retrieved).hasSameSizeAs(predictorTerms);
IntStream.range(0, predictorTerms.size()).forEach(index -> {
PredictorTerm predictorTerm = predictorTerms.get(index);
@@ -6728,7 +6719,7 @@ index ba88fb6bd1..2ef89a689d 100644
});
}
-@@ -392,7 +391,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -394,7 +393,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
regressionModel.setModelName(getGeneratedClassName("RegressionModel"));
String targetField = "targetField";
DataField dataField = new DataField();
@@ -6737,7 +6728,7 @@ index ba88fb6bd1..2ef89a689d 100644
dataField.setOpType(OpType.CATEGORICAL);
DataDictionary dataDictionary = new DataDictionary();
dataDictionary.addDataFields(dataField);
-@@ -531,7 +530,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -533,7 +532,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
"variableName");
assertThat(retrieved).hasSize(3);
final Map> groupedCollectors = categoricalPredictors.stream()
@@ -6746,7 +6737,7 @@ index ba88fb6bd1..2ef89a689d 100644
groupedCollectors.values().forEach(categoricalPredictors12 -> commonEvaluateCategoryPredictors(body,
categoricalPredictors12, "variableName"));
-@@ -586,7 +585,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -588,7 +587,7 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
assertThat(retrieved).hasSameSizeAs(predictorTerms);
IntStream.range(0, predictorTerms.size()).forEach(index -> {
PredictorTerm predictorTerm = predictorTerms.get(index);
@@ -6755,7 +6746,7 @@ index ba88fb6bd1..2ef89a689d 100644
});
}
-@@ -607,17 +606,17 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
+@@ -609,17 +608,17 @@ public class KiePMMLRegressionTableFactoryTest extends AbstractKiePMMLRegression
private void commonEvaluateRegressionTable(KiePMMLRegressionTable retrieved, RegressionTable source) {
Map> numericFunctionMap = retrieved.getNumericFunctionMap();
assertThat(numericFunctionMap).hasSameSizeAs(source.getNumericPredictors());
@@ -6777,10 +6768,10 @@ index ba88fb6bd1..2ef89a689d 100644
private void commonEvaluateCategoryPredictors(final BlockStmt toVerify,
diff --git a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-scorecard/kie-pmml-models-scorecard-compiler/src/test/java/org/kie/pmml/models/scorecard/compiler/factories/KiePMMLComplexPartialScoreFactoryTest.java b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-scorecard/kie-pmml-models-scorecard-compiler/src/test/java/org/kie/pmml/models/scorecard/compiler/factories/KiePMMLComplexPartialScoreFactoryTest.java
-index f39bd5ffe9..e9f3daa345 100644
+index 5ca0f0c5c4..7e162bec99 100644
--- a/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-scorecard/kie-pmml-models-scorecard-compiler/src/test/java/org/kie/pmml/models/scorecard/compiler/factories/KiePMMLComplexPartialScoreFactoryTest.java
+++ b/kie-pmml-trusty/kie-pmml-models/kie-pmml-models-scorecard/kie-pmml-models-scorecard-compiler/src/test/java/org/kie/pmml/models/scorecard/compiler/factories/KiePMMLComplexPartialScoreFactoryTest.java
-@@ -24,7 +24,6 @@ import com.github.javaparser.ast.stmt.BlockStmt;
+@@ -27,7 +27,6 @@ import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.Statement;
import org.dmg.pmml.Apply;
import org.dmg.pmml.Constant;
@@ -6788,7 +6779,7 @@ index f39bd5ffe9..e9f3daa345 100644
import org.dmg.pmml.FieldRef;
import org.dmg.pmml.scorecard.ComplexPartialScore;
import org.junit.jupiter.api.Test;
-@@ -69,14 +68,14 @@ public class KiePMMLComplexPartialScoreFactoryTest {
+@@ -72,14 +71,14 @@ public class KiePMMLComplexPartialScoreFactoryTest {
void getComplexPartialScoreVariableDeclarationWithFieldRef() throws IOException {
final String variableName = "variableName";
FieldRef fieldRef = new FieldRef();
@@ -6805,7 +6796,7 @@ index f39bd5ffe9..e9f3daa345 100644
variableName));
assertThat(retrieved).isEqualTo(expected);
List> imports = Arrays.asList(KiePMMLFieldRef.class,
-@@ -91,7 +90,7 @@ public class KiePMMLComplexPartialScoreFactoryTest {
+@@ -94,7 +93,7 @@ public class KiePMMLComplexPartialScoreFactoryTest {
Constant constant = new Constant();
constant.setValue(value1);
FieldRef fieldRef = new FieldRef();
@@ -6814,7 +6805,7 @@ index f39bd5ffe9..e9f3daa345 100644
Apply apply = new Apply();
apply.setFunction("/");
apply.addExpressions(constant, fieldRef);
-@@ -102,8 +101,7 @@ public class KiePMMLComplexPartialScoreFactoryTest {
+@@ -105,8 +104,7 @@ public class KiePMMLComplexPartialScoreFactoryTest {
complexPartialScore);
String text = getFileContent(TEST_03_SOURCE);
Statement expected = JavaParserUtils.parseBlock(String.format(text,
@@ -6825,10 +6816,10 @@ index f39bd5ffe9..e9f3daa345 100644
apply.getInvalidValueTreatment().value(),
variableName));
diff --git a/kie-test-util/src/main/java/org/kie/test/util/db/PersistenceUtil.java b/kie-test-util/src/main/java/org/kie/test/util/db/PersistenceUtil.java
-index ed1536f056..b939672ad0 100644
+index 121d08ea24..dd77595701 100644
--- a/kie-test-util/src/main/java/org/kie/test/util/db/PersistenceUtil.java
+++ b/kie-test-util/src/main/java/org/kie/test/util/db/PersistenceUtil.java
-@@ -22,8 +22,8 @@ import java.util.HashMap;
+@@ -25,8 +25,8 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@@ -6840,10 +6831,10 @@ index ed1536f056..b939672ad0 100644
import org.h2.tools.DeleteDbFiles;
import org.h2.tools.Server;
diff --git a/kie-test-util/src/main/java/org/kie/test/util/db/internal/PoolingDataSourceFactory.java b/kie-test-util/src/main/java/org/kie/test/util/db/internal/PoolingDataSourceFactory.java
-index eee5f49aed..26d202d2f7 100644
+index 8e9f686db3..5332680489 100644
--- a/kie-test-util/src/main/java/org/kie/test/util/db/internal/PoolingDataSourceFactory.java
+++ b/kie-test-util/src/main/java/org/kie/test/util/db/internal/PoolingDataSourceFactory.java
-@@ -26,9 +26,9 @@ import javax.sql.ConnectionEventListener;
+@@ -28,9 +28,9 @@ import javax.sql.ConnectionEventListener;
import javax.sql.DataSource;
import javax.sql.XAConnection;
import javax.sql.XADataSource;
@@ -6857,10 +6848,10 @@ index eee5f49aed..26d202d2f7 100644
import com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule;
import com.arjuna.ats.jta.recovery.XAResourceRecoveryHelper;
diff --git a/kie-test-util/src/main/java/org/kie/test/util/db/internal/PoolingDataSourceWrapperImpl.java b/kie-test-util/src/main/java/org/kie/test/util/db/internal/PoolingDataSourceWrapperImpl.java
-index 1a396881d8..3e2b39fd96 100755
+index 71d6cf6b9e..1e194adeaa 100755
--- a/kie-test-util/src/main/java/org/kie/test/util/db/internal/PoolingDataSourceWrapperImpl.java
+++ b/kie-test-util/src/main/java/org/kie/test/util/db/internal/PoolingDataSourceWrapperImpl.java
-@@ -27,8 +27,8 @@ import java.util.logging.Logger;
+@@ -29,8 +29,8 @@ import java.util.logging.Logger;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.XADataSource;
diff --git a/.ci/environments/quarkus-3/patches/0007_replace-javax-jakarta-in-template.patch b/.ci/environments/quarkus-3/patches/0007_replace-javax-jakarta-in-template.patch
index 9d545613632..e87059b800b 100644
--- a/.ci/environments/quarkus-3/patches/0007_replace-javax-jakarta-in-template.patch
+++ b/.ci/environments/quarkus-3/patches/0007_replace-javax-jakarta-in-template.patch
@@ -1,47 +1,37 @@
-Subject: [PATCH] [fix_pmml_test] Add patch to change javax -> jakarta in template
----
-Index: drools-model/drools-model-codegen/src/main/resources/class-templates/ruleunits/RuleUnitQuarkusTemplate.java
-IDEA additional info:
-Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
-<+>UTF-8
-===================================================================
+diff --git a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java
+index 86624b74e3..ec5c238bb6 100644
+--- a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java
++++ b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java
+@@ -23,7 +23,7 @@ import org.kie.api.runtime.KieSession;
+ import org.kie.api.runtime.KieRuntimeBuilder;
+ import org.drools.modelcompiler.KieBaseBuilder;
+
+-@javax.enterprise.context.ApplicationScoped
++@jakarta.enterprise.context.ApplicationScoped
+ public class ProjectRuntime implements KieRuntimeBuilder {
+
+ private static final ProjectModel model = new ProjectModel();
diff --git a/drools-model/drools-model-codegen/src/main/resources/class-templates/ruleunits/RuleUnitQuarkusTemplate.java b/drools-model/drools-model-codegen/src/main/resources/class-templates/ruleunits/RuleUnitQuarkusTemplate.java
---- a/drools-model/drools-model-codegen/src/main/resources/class-templates/ruleunits/RuleUnitQuarkusTemplate.java (revision 1ab119fc25590caf49c7c476c346bf117fb56646)
-+++ b/drools-model/drools-model-codegen/src/main/resources/class-templates/ruleunits/RuleUnitQuarkusTemplate.java (date 1678362274098)
-@@ -12,7 +12,7 @@
+index 35e6387505..ec89fb8a04 100644
+--- a/drools-model/drools-model-codegen/src/main/resources/class-templates/ruleunits/RuleUnitQuarkusTemplate.java
++++ b/drools-model/drools-model-codegen/src/main/resources/class-templates/ruleunits/RuleUnitQuarkusTemplate.java
+@@ -10,7 +10,7 @@ import org.drools.ruleunits.impl.factory.AbstractRuleUnits;
import org.drools.ruleunits.impl.ReteEvaluatorBasedRuleUnitInstance;
import org.drools.ruleunits.impl.sessions.RuleUnitExecutorImpl;
-
+
-@javax.enterprise.context.ApplicationScoped
+@jakarta.enterprise.context.ApplicationScoped
public class CLASS_NAME extends AbstractRuleUnit {
-
- private static final RuleBase ruleBase = KieBaseBuilder.createKieBaseFromModel( new RULE_UNIT_MODEL(), $KieBaseOptions$ );
-@@ -27,8 +27,8 @@
+
+ private static final InternalRuleBase ruleBase = KieBaseBuilder.createKieBaseFromModel(new RULE_UNIT_MODEL(), $KieBaseOptions$);
+@@ -25,8 +25,8 @@ public class CLASS_NAME extends AbstractRuleUnit {
this((RuleUnits) null);
}
-
+
- @javax.inject.Inject
- public CLASS_NAME(javax.enterprise.inject.Instance ruleUnits) {
+ @jakarta.inject.Inject
-+ public CLASS_NAME(jakarta.enterprise.inject.Instance ruleUnits) {
++ public CLASS_NA(jakarta.enterprise.inject.Instance ruleUnits) {
this(ruleUnits == null || ruleUnits.isUnsatisfied() ? AbstractRuleUnits.DummyRuleUnits.INSTANCE : ruleUnits.get());
}
-
-Index: drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java
-IDEA additional info:
-Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
-<+>UTF-8
-===================================================================
-diff --git a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java
---- a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java (revision 4766094314288e7d1b4335d789374d7cc05cea74)
-+++ b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java (date 1679061647250)
-@@ -23,7 +23,7 @@
- import org.kie.api.runtime.KieRuntimeBuilder;
- import org.drools.modelcompiler.KieBaseBuilder;
-
--@javax.enterprise.context.ApplicationScoped
-+@jakarta.enterprise.context.ApplicationScoped
- public class ProjectRuntime implements KieRuntimeBuilder {
-
- private static final ProjectModel model = new ProjectModel();
+
diff --git a/.ci/environments/quarkus-3/patches/0010_infinispan_reliability_tests_javax.patch b/.ci/environments/quarkus-3/patches/0010_infinispan_reliability_tests_javax.patch
deleted file mode 100644
index b1209bfb4bd..00000000000
--- a/.ci/environments/quarkus-3/patches/0010_infinispan_reliability_tests_javax.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/drools-reliability/drools-reliability-infinispan/pom.xml b/drools-reliability/drools-reliability-infinispan/pom.xml
-index d47847e602..14501ab4c3 100644
---- a/drools-reliability/drools-reliability-infinispan/pom.xml
-+++ b/drools-reliability/drools-reliability-infinispan/pom.xml
-@@ -105,6 +105,13 @@
-
-
-
-+
-+
-+ javax.transaction
-+ javax.transaction-api
-+ 1.3
-+ test
-+
-
- org.infinispan
- infinispan-component-annotations
diff --git a/.ci/environments/quarkus-3/patches/0011_remaining_javax_jakarta.patch b/.ci/environments/quarkus-3/patches/0010_remaining_javax_jakarta.patch
similarity index 95%
rename from .ci/environments/quarkus-3/patches/0011_remaining_javax_jakarta.patch
rename to .ci/environments/quarkus-3/patches/0010_remaining_javax_jakarta.patch
index 690529889de..1ee291c7174 100644
--- a/.ci/environments/quarkus-3/patches/0011_remaining_javax_jakarta.patch
+++ b/.ci/environments/quarkus-3/patches/0010_remaining_javax_jakarta.patch
@@ -90,19 +90,6 @@ index 0c8c51edb1..15913f8772 100644
// reinitialize all fields
this.ut = findUserTransaction();
this.tm = findTransactionManager(this.ut);
-diff --git a/drools-reliability/drools-reliability-infinispan/pom.xml b/drools-reliability/drools-reliability-infinispan/pom.xml
-index 557e01c443..d47847e602 100644
---- a/drools-reliability/drools-reliability-infinispan/pom.xml
-+++ b/drools-reliability/drools-reliability-infinispan/pom.xml
-@@ -16,7 +16,7 @@
-
-
- org.drools.reliability.infinispan
-- 14.0.6.Final
-+ 14.0.7.Final
-
-
-
diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/KieBuilderTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/KieBuilderTest.java
index d2949bf1df..3726116e3b 100644
--- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/KieBuilderTest.java
diff --git a/.ci/environments/quarkus-3/quarkus3.yml b/.ci/environments/quarkus-3/quarkus3.yml
index 93dfa27db23..a2664acb7c5 100644
--- a/.ci/environments/quarkus-3/quarkus3.yml
+++ b/.ci/environments/quarkus-3/quarkus3.yml
@@ -3,8 +3,8 @@ description: Update Quarkus version and refactor imports and resources if needed
type: specs.openrewrite.org/v1beta/recipe
recipeList:
- org.openrewrite.maven.ChangePropertyValue: {
- key: version.io.quarkus,
- newValue: 3.0.0.Final
+ newValue: 3.0.0.Final,
+ key: version.io.quarkus
}
- org.kie.drools.Quarkus3Migration
- org.kie.ManagedDependencies
@@ -117,9 +117,7 @@ recipeList:
}
- org.kie.openrewrite.recipe.jpmml.JPMMLRecipe
---
-name: org.kie.ManagedDependencies
-description: Update all managed dependencies based on dependency updates from Quarkus.
-type: specs.openrewrite.org/v1beta/recipe
+displayName: Update Managed Dependencies
recipeList:
- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: {
oldGroupId: javax.activation,
@@ -504,7 +502,9 @@ recipeList:
newGroupId: org.keycloak,
newArtifactId: keycloak-admin-client-jakarta
}
-displayName: Update Managed Dependencies
+type: specs.openrewrite.org/v1beta/recipe
+description: Update all managed dependencies based on dependency updates from Quarkus.
+name: org.kie.ManagedDependencies
---
type: specs.openrewrite.org/v1beta/recipe
name: io.quarkus.updates.core.quarkus30.UpgradeQuarkiverse
diff --git a/.ci/environments/update.sh b/.ci/environments/update.sh
index bda16c4ef81..0ee06957644 100755
--- a/.ci/environments/update.sh
+++ b/.ci/environments/update.sh
@@ -45,4 +45,4 @@ if [ -f "${env_path}/after.sh" ]; then
fi
# Download `setup_integration_branch` script and execute
-curl -s https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash
\ No newline at end of file
+curl -s https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash
\ No newline at end of file
diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile
new file mode 100644
index 00000000000..a8c4bd6e8de
--- /dev/null
+++ b/.ci/jenkins/Jenkinsfile
@@ -0,0 +1,44 @@
+@Library('jenkins-pipeline-shared-libraries')_
+
+pr_check_script = null
+
+pipeline {
+ agent {
+ label 'ubuntu'
+ }
+ options {
+ timestamps()
+ timeout(time: 480, unit: 'MINUTES')
+ disableConcurrentBuilds(abortPrevious: true)
+ }
+ environment {
+ BUILDCHAIN_PROJECT = 'apache/incubator-kie-drools'
+ BUILDCHAIN_CONFIG_REPO = 'incubator-kie-drools'
+ BUILDCHAIN_CONFIG_FILE_PATH = '.ci/buildchain-config.yaml'
+
+ ENABLE_SONARCLOUD = 'true'
+ DROOLS_BUILD_MVN_OPTS = '-Prun-code-coverage'
+ }
+ stages {
+ stage('Initialize') {
+ steps {
+ script {
+ // load `pr_check.groovy` file from kogito-pipelines:main
+ dir('kogito-pipelines') {
+ checkout(githubscm.resolveRepository('kogito-pipelines', 'jstastny-cz', 'GH_comment', false, 'ASF_Cloudbees_Jenkins_ci-builds'))
+ pr_check_script = load 'dsl/scripts/pr_check.groovy'
+ }
+ }
+ }
+ }
+ stage('PR check') {
+ steps {
+ script {
+ dir('kogito-pipelines') {
+ pr_check_script.launch()
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index 169dbbd2338..12b11ea345c 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -6,16 +6,12 @@ import org.kie.jenkins.MavenStagingHelper
deployProperties = [:]
-droolsRepository = 'drools'
-
pipeline {
agent {
- label 'kie-rhel7 && kie-mem16g && !built-in'
- }
-
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -23,20 +19,11 @@ pipeline {
timeout(time: 180, unit: 'MINUTES')
}
- // parameters {
- // For parameters, check into ./dsl/jobs.groovy file
- // }
-
environment {
- // Static env is defined into ./dsl/jobs.groovy file
-
- KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
-
- // Keep here for visitibility
- MAVEN_OPTS = '-Xms1024m -Xmx4g'
+ DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
PR_BRANCH_HASH = "${util.generateHash(10)}"
- MAVEN_DEPLOY_LOCAL_DIR = "${WORKSPACE}/maven_deploy_dir"
+ MAVEN_DEPLOY_LOCAL_DIR = "/tmp/maven_deploy_dir"
}
stages {
@@ -82,7 +69,10 @@ pipeline {
steps {
script {
dir(getRepoName()) {
- prepareForPR()
+ if (githubscm.isBranchExist('origin',getPRBranch())) {
+ githubscm.removeRemoteBranch('origin', getPRBranch())
+ }
+ githubscm.createBranch(getPRBranch())
}
}
}
@@ -100,7 +90,12 @@ pipeline {
stage('Build & Test') {
steps {
script {
- getMavenCommand().withProperty('maven.test.failure.ignore', true).skipTests(params.SKIP_TESTS).run('clean install')
+ getMavenCommand()
+ .withOptions(env.DROOLS_BUILD_MVN_OPTS ? [ env.DROOLS_BUILD_MVN_OPTS ] : [])
+ .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
+ .withProperty('maven.test.failure.ignore', true)
+ .skipTests(params.SKIP_TESTS)
+ .run('clean install')
}
}
post {
@@ -112,20 +107,7 @@ pipeline {
}
}
}
- stage('Deploy to repository') {
- when {
- expression { return !shouldStageArtifacts() && shouldDeployToRepository() }
- }
- steps {
- script {
- runMavenDeploy()
- }
- }
- }
stage('Deploy locally') {
- when {
- expression { return shouldStageArtifacts() }
- }
steps {
script {
runMavenDeploy(true)
@@ -162,7 +144,7 @@ pipeline {
success {
script {
setDeployPropertyIfNeeded("${getRepoName()}.pr.source.uri", "https://github.com/${getGitAuthor()}/${getRepoName()}")
- setDeployPropertyIfNeeded("${getRepoName()}.pr.source.ref", getBuildBranch())
+ setDeployPropertyIfNeeded("${getRepoName()}.pr.source.ref", getPRBranch())
setDeployPropertyIfNeeded("${getRepoName()}.pr.target.uri", "https://github.com/${getGitAuthor()}/${getRepoName()}")
setDeployPropertyIfNeeded("${getRepoName()}.pr.target.ref", getBuildBranch())
}
@@ -200,10 +182,6 @@ void checkoutRepo() {
sh "git checkout ${getBuildBranch()}"
}
-void prepareForPR() {
- githubscm.createBranch(getPRBranch())
-}
-
void commitAndCreatePR() {
def commitMsg = "[${getBuildBranch()}] Update version to ${getProjectVersion()}"
def prBody = "Generated by build ${BUILD_TAG}: ${BUILD_URL}.\nPlease do not merge, it should be merged automatically."
@@ -218,18 +196,18 @@ void commitAndCreatePR() {
void sendNotification() {
if (params.SEND_NOTIFICATION) {
- mailer.sendMarkdownTestSummaryNotification('Deploy', "[${getBuildBranch()}] Drools", [env.KOGITO_CI_EMAIL_TO])
+ mailer.sendMarkdownTestSummaryNotification('Deploy', "[${getBuildBranch()}] Drools", [env.DROOLS_CI_EMAIL_TO])
} else {
echo 'No notification sent per configuration'
}
}
boolean shouldStageArtifacts() {
- return isRelease() && !env.MAVEN_DEPLOY_REPOSITORY
+ return isRelease()
}
boolean shouldDeployToRepository() {
- return env.MAVEN_DEPLOY_REPOSITORY || getGitAuthor() == 'kiegroup'
+ return env.MAVEN_DEPLOY_REPOSITORY || getGitAuthor() == 'apache'
}
boolean isRelease() {
@@ -258,7 +236,7 @@ String getProjectVersion() {
}
String getPRBranch() {
- return "${getProjectVersion()}-${env.PR_BRANCH_HASH}"
+ return params.DROOLS_PR_BRANCH
}
String getGitAuthorCredsID() {
@@ -273,10 +251,16 @@ void setDeployPropertyIfNeeded(String key, def value) {
MavenCommand getMavenCommand(String directory = '') {
directory = directory ?: getRepoName()
- return new MavenCommand(this, ['-fae', '-ntp'])
+ def mvnCmd = new MavenCommand(this, ['-fae', '-ntp'])
.withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
+ .withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
.inDirectory(directory)
- .withProperty('full')
+ if (!isMainStream()) { // Workaround as enforcer rules may not be fixed on other streams
+ mvnCmd.withProperty('enforcer.skip')
+ } else {
+ mvnCmd.withProperty('full')
+ }
+ return mvnCmd
}
void runMavenDeploy(boolean localDeployment = false) {
@@ -288,7 +272,10 @@ void runMavenDeploy(boolean localDeployment = false) {
mvnCmd.withDeployRepository(env.MAVEN_DEPLOY_REPOSITORY)
}
- mvnCmd.skipTests(true).run('clean deploy')
+ mvnCmd.skipTests(true)
+ .withOptions(env.DROOLS_BUILD_MVN_OPTS ? [ env.DROOLS_BUILD_MVN_OPTS ] : [])
+ .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
+ .run('clean deploy')
}
void runMavenStage() {
@@ -307,3 +294,6 @@ String getLocalDeploymentFolder() {
return "${env.MAVEN_DEPLOY_LOCAL_DIR}/${getRepoName()}"
}
+boolean isMainStream() {
+ return env.DROOLS_STREAM == 'main'
+}
\ No newline at end of file
diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote
index 3d1f146131d..2b027750cfe 100644
--- a/.ci/jenkins/Jenkinsfile.promote
+++ b/.ci/jenkins/Jenkinsfile.promote
@@ -8,12 +8,10 @@ pipelineProperties = [:]
pipeline {
agent {
- label 'kie-rhel7 && !built-in'
- }
-
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -21,16 +19,8 @@ pipeline {
timeout(time: 180, unit: 'MINUTES')
}
- // parameters {
- // For parameters, check into ./dsl/jobs.groovy file
- // }
-
environment {
- // Static env is defined into ./dsl/jobs.groovy file
-
- KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
-
- PR_BRANCH_HASH = "${util.generateHash(10)}"
+ DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
}
stages {
@@ -45,18 +35,12 @@ pipeline {
readDeployProperties()
- if (isRelease()) {
- // Verify version is set and if on right release branch
- assert getProjectVersion()
- assert getBuildBranch() == util.getReleaseBranchFromVersion(getProjectVersion())
- }
+ assert getProjectVersion()
+ assert getBuildBranch() == util.getReleaseBranchFromVersion(getProjectVersion())
}
}
}
stage('Merge deploy PR and tag') {
- when {
- expression { return isRelease() }
- }
steps {
script {
dir(getRepoName()) {
@@ -68,41 +52,35 @@ pipeline {
}
}
- stage('Upload drools binaries and documentation') {
- when {
- expression { return isRelease() }
- }
+ stage('Create release') {
steps {
script {
- getMavenCommand().inDirectory(getRepoName()).skipTests(true).withProperty('full').run('clean install')
- uploadFileMgmt(getRepoName())
+ dir(getRepoName()) {
+ checkoutRepo()
+ if(githubscm.isReleaseExist(getGitTag(), getGitAuthorCredsID())) {
+ githubscm.deleteRelease(getGitTag(), getGitAuthorCredsID())
+ }
+ githubscm.createReleaseWithGeneratedReleaseNotes(getGitTag(), getBuildBranch(), githubscm.getPreviousTagFromVersion(getGitTag()), getGitAuthorCredsID())
+ githubscm.updateReleaseBody(getGitTag(), getGitAuthorCredsID())
+ }
}
}
}
- stage('Set next snapshot version') {
+ stage('Upload drools binaries and documentation') {
when {
- expression { return isRelease() }
+ expression { return isMainStream() }
}
steps {
script {
- dir('pr') {
- prepareForPR()
-
- maven.mvnVersionsSet(getMavenCommand(), getSnapshotVersion(), true)
-
- commitAndCreatePR()
- }
- dir(getRepoName()) {
- sh "git checkout ${getBuildBranch()}"
- mergeAndPush(getPipelinePrLink())
-
- if (shouldDeployToRepository()) {
- runMavenDeploy()
- } else {
- echo 'Testing environment and no specific deploy repository given => no deployment'
- }
- }
+ getMavenCommand()
+ .withOptions(env.DROOLS_BUILD_MVN_OPTS ? [ env.DROOLS_BUILD_MVN_OPTS ] : [])
+ .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
+ .inDirectory(getRepoName())
+ .skipTests(true)
+ .withProperty('full')
+ .run('clean install')
+ uploadFileMgmt(getRepoName())
}
}
}
@@ -121,7 +99,7 @@ pipeline {
void sendNotification() {
if (params.SEND_NOTIFICATION) {
- mailer.sendMarkdownTestSummaryNotification('Promote', "[${getBuildBranch()}] Drools", [env.KOGITO_CI_EMAIL_TO])
+ mailer.sendMarkdownTestSummaryNotification('Promote', "[${getBuildBranch()}] Drools", [env.DROOLS_CI_EMAIL_TO])
} else {
echo 'No notification sent per configuration'
}
@@ -166,14 +144,6 @@ String getParamOrDeployProperty(String paramKey, String deployPropertyKey) {
// Getter / Setter
//////////////////////////////////////////////////////////////////////////////
-boolean shouldDeployToRepository() {
- return env.MAVEN_DEPLOY_REPOSITORY || getGitAuthor() == 'kiegroup'
-}
-
-boolean isRelease() {
- return env.RELEASE ? env.RELEASE.toBoolean() : false
-}
-
String getRepoName() {
return env.REPO_NAME
}
@@ -182,10 +152,6 @@ String getProjectVersion() {
return getParamOrDeployProperty('PROJECT_VERSION', 'project.version')
}
-String getSnapshotVersion() {
- return util.getNextVersion(getProjectVersion(), 'micro')
-}
-
String getGitTag() {
return params.GIT_TAG != '' ? params.GIT_TAG : getProjectVersion()
}
@@ -206,18 +172,6 @@ String getDeployPrLink() {
return getDeployProperty("${getRepoName()}.pr.link")
}
-String getPipelinePrLink() {
- return pipelineProperties["${getRepoName()}.pr.link"]
-}
-
-void setPipelinePrLink(String value) {
- pipelineProperties["${getRepoName()}.pr.link"] = value
-}
-
-String getSnapshotBranch() {
- return "${getSnapshotVersion().toLowerCase()}-${env.PR_BRANCH_HASH}"
-}
-
//////////////////////////////////////////////////////////////////////////////
// Git
//////////////////////////////////////////////////////////////////////////////
@@ -242,37 +196,16 @@ void tagLatest() {
}
}
-void prepareForPR() {
- checkoutRepo()
- githubscm.createBranch(getSnapshotBranch())
-}
-
-void commitAndCreatePR() {
- def commitMsg = "[${getBuildBranch()}] Update project version to ${getSnapshotVersion()}"
- def prBody = "Generated by build ${BUILD_TAG}: ${BUILD_URL}.\nPlease do not merge, it should be merged automatically."
-
- githubscm.commitChanges(commitMsg, { githubscm.findAndStageNotIgnoredFiles('pom.xml') })
- githubscm.pushObject('origin', getSnapshotBranch(), getGitAuthorCredsID())
- setPipelinePrLink(githubscm.createPR(commitMsg, prBody, getBuildBranch(), getGitAuthorCredsID()))
-}
-
MavenCommand getMavenCommand() {
mvnCmd = new MavenCommand(this, ['-fae', '-ntp'])
.withSettingsXmlId("${env.MAVEN_SETTINGS_CONFIG_FILE_ID}")
+ .withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
if (env.MAVEN_DEPENDENCIES_REPOSITORY) {
mvnCmd.withDependencyRepositoryInSettings('deps-repo', env.MAVEN_DEPENDENCIES_REPOSITORY)
}
return mvnCmd
}
-void runMavenDeploy() {
- mvnCmd = getMavenCommand()
- if (env.MAVEN_DEPLOY_REPOSITORY) {
- mvnCmd.withDeployRepository(env.MAVEN_DEPLOY_REPOSITORY)
- }
- mvnCmd.skipTests(true).run('clean deploy')
-}
-
void uploadFileMgmt(String directory) {
if (isNotTestingBuild()) {
echo "upload binaries and docs for ${directory}"
@@ -287,5 +220,9 @@ void uploadFileMgmt(String directory) {
}
boolean isNotTestingBuild() {
- return getGitAuthor() == 'kiegroup'
-}
\ No newline at end of file
+ return getGitAuthor() == 'apache'
+}
+
+boolean isMainStream() {
+ return env.DROOLS_STREAM == 'main'
+}
diff --git a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr
index 32a52049344..5a4b689871c 100644
--- a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr
+++ b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr
@@ -7,11 +7,10 @@ changeBranch = env.ghprbSourceBranch ?: CHANGE_BRANCH
pipeline {
agent {
- label 'kie-rhel8 && kie-mem16g && !built-in'
- }
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
timestamps()
@@ -79,9 +78,3 @@ String getRepoName() {
String getGitAuthorCredsId() {
return env.AUTHOR_CREDS_ID
}
-
-MavenCommand getMavenCommand() {
- return new MavenCommand(this, ['-fae', '-ntp'])
- .withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
- .withProperty('full')
-}
diff --git a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone
index 26182984f62..4e2c7cf7ee9 100644
--- a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone
+++ b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone
@@ -7,12 +7,10 @@ previousHash = ''
pipeline {
agent {
- label 'kie-rhel8 && kie-mem16g && !built-in'
- }
-
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -21,7 +19,7 @@ pipeline {
}
environment {
- KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
+ DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
PR_BRANCH_HASH = "${util.generateHash(10)}"
}
@@ -113,13 +111,13 @@ void clean() {
}
void sendErrorNotification() {
- mailer.sendMarkdownTestSummaryNotification('quarkus-3', "[${getBuildBranch()}] Drools", [env.KOGITO_CI_EMAIL_TO])
+ mailer.sendMarkdownTestSummaryNotification('quarkus-3', "[${getBuildBranch()}] Drools", [env.DROOLS_CI_EMAIL_TO])
}
void sendNotification(String body) {
emailext body: "${body}",
subject: "[${getBuildBranch()}] Drools - quarkus-3",
- to: env.KOGITO_CI_EMAIL_TO
+ to: env.DROOLS_CI_EMAIL_TO
}
void checkoutRepo(String repository, String branch) {
@@ -152,9 +150,3 @@ String getGitAuthorCredsId() {
String getPRBranch() {
return "${getBuildBranch()}-${env.PR_BRANCH_HASH}"
}
-
-MavenCommand getMavenCommand() {
- return new MavenCommand(this, ['-fae', '-ntp'])
- .withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
- .withProperty('full')
-}
diff --git a/.ci/jenkins/Jenkinsfile.setup-branch b/.ci/jenkins/Jenkinsfile.setup-branch
index 2827afc10e3..95b74cfcbe6 100644
--- a/.ci/jenkins/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/Jenkinsfile.setup-branch
@@ -5,12 +5,10 @@ import org.kie.jenkins.MavenCommand
pipeline {
agent {
- label 'kie-rhel8 && !built-in'
- }
-
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -18,17 +16,8 @@ pipeline {
timeout(time: 60, unit: 'MINUTES')
}
- // parameters {
- // For parameters, check into ./dsl/jobs.groovy file
- // }
-
environment {
- // Static env is defined into ./dsl/jobs.groovy file
-
- KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
-
- // Keep here for visitibility
- MAVEN_OPTS = '-Xms1024m -Xmx4g'
+ DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
BRANCH_HASH = "${util.generateHash(10)}"
}
@@ -78,11 +67,11 @@ pipeline {
}
stage('Update Drools version in kie-benchmarks') {
when {
- expression { isMainBranch() }
+ expression { isMainStream() && isMainBranch() }
}
steps {
script {
- build job: '../tools/kie-benchmarks-update-drools', parameters: [ string(name: 'NEW_VERSION', value: "${getDroolsVersion()}")]
+ build job: '../tools/kie-benchmarks-update-drools', parameters: [ string(name: 'NEW_VERSION', value: "${getDroolsVersion()}")]
}
}
}
@@ -101,7 +90,7 @@ pipeline {
void sendNotification() {
if (params.SEND_NOTIFICATION) {
- mailer.sendMarkdownTestSummaryNotification('Setup branch', "[${getBuildBranch()}] Drools", [env.KOGITO_CI_EMAIL_TO])
+ mailer.sendMarkdownTestSummaryNotification('Setup branch', "[${getBuildBranch()}] Drools", [env.DROOLS_CI_EMAIL_TO])
} else {
echo 'No notification sent per configuration'
}
@@ -137,6 +126,7 @@ String getGitAuthorCredsId() {
MavenCommand getMavenCommand() {
return new MavenCommand(this, ['-fae', '-ntp'])
.withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
+ .withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
.withProperty('full')
}
@@ -157,3 +147,7 @@ void mergeAndPush(String prLink, String targetBranch) {
githubscm.pushObject('origin', targetBranch, getGitAuthorCredsId())
}
}
+
+boolean isMainStream() {
+ return env.DROOLS_STREAM == 'main'
+}
diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml
index 2effa1b6aa1..39248ee00a7 100644
--- a/.ci/jenkins/config/branch.yaml
+++ b/.ci/jenkins/config/branch.yaml
@@ -1,67 +1,67 @@
environments:
- native:
+ default:
env_vars:
- NATIVE: true
- BUILD_MVN_OPTS_CURRENT: -Dnative -Dquarkus.native.container-build=true
- ADDITIONAL_TIMEOUT: 720
- ids:
- - native
- native-lts:
+ DROOLS_BUILD_MVN_OPTS: -Dfull
+ native:
env_vars:
NATIVE: true
- BUILD_MVN_OPTS: -Dproductized -Ddata-index-ephemeral.image=quay.io/kiegroup/kogito-data-index-ephemeral
BUILD_MVN_OPTS_CURRENT: -Dnative -Dquarkus.native.container-build=true
- QUARKUS_BRANCH: '2.13'
+ DROOLS_BUILD_MVN_OPTS: -Dfull
ADDITIONAL_TIMEOUT: 720
ids:
- native
- - prod
quarkus-main:
enabled: false
env_vars:
QUARKUS_BRANCH: main
+ DROOLS_BUILD_MVN_OPTS: -Dfull
ids:
- quarkus
quarkus-3:
pull_request_default_check: false
env_vars:
- BUILD_MAVEN_TOOL: kie-maven-3.9.1
- BUILD_JDK_TOOL: kie-jdk17
+ BUILD_MAVEN_TOOL: maven_3.9.3
+ BUILD_JDK_TOOL: jdk_17_latest
BUILD_MVN_OPTS: -Denforcer.skip
+ # DROOLS_BUILD_MVN_OPTS: -Dfull # "No enabled as it does not compile in quarkus-3
+ # BUILD_MVN_OPTS_QUARKUS_UPDATE: -Dfull
ids:
- quarkus
- quarkus3
quarkus-branch:
env_vars:
QUARKUS_BRANCH: '2.16'
+ DROOLS_BUILD_MVN_OPTS: -Dfull
ids:
- quarkus
- quarkus-lts:
- pull_request_default_check: false
+ sonarcloud:
+ auto_generation: false
env_vars:
- BUILD_MVN_OPTS: -Dproductized -Ddata-index-ephemeral.image=quay.io/kiegroup/kogito-data-index-ephemeral
- QUARKUS_BRANCH: '2.13'
+ ENABLE_SONARCLOUD: true
+ DROOLS_BUILD_MVN_OPTS: -Dfull
ids:
- - quarkus
- - lts
- - prod
-productized_branch: true
+ - sonarcloud
+ - coverage
disable:
- triggers: false
+ deploy: true
repositories:
-- name: drools
-- name: drools-website
-- name: kie-benchmarks
-productized_repositories:
-- name: drools
+- name: incubator-kie-drools
+ job_display_name: drools
+# Not yet migrated to Apache
+# - name: incubator-kie-drools-website
+# job_display_name: drools-website
+- name: incubator-kie-benchmarks
+ job_display_name: kie-benchmarks
+## TODO to check if should be enabled
+# - name: incubator-kie-jpmml-integration
+# job_display_name: kie-jpmml-integration
git:
author:
- name: kiegroup
- credentials_id: kie-ci4
- token_credentials_id: kie-ci4-token
- bot_author:
- name: bsig-gh-bot
- credentials_id: bsig-gh-bot
+ name: apache
+ # Taken from https://ci-builds.apache.org/credentials/
+ # Need to be verified
+ credentials_id: kie-ci
+ token_credentials_id: kie-ci3-token
fork_author:
name: kie-ci
credentials_id: kie-ci
@@ -73,33 +73,34 @@ git:
jenkins_config_path: .ci/jenkins
buildchain_config:
git:
- repository: drools
+ repository: incubator-kie-drools
file_path: .ci/buildchain-config.yaml
maven:
- settings_file_id: kogito_release_settings
+ settings_file_id: kie-release-settings
nexus:
- release_url: https://repository.jboss.org/nexus
- release_repository: jboss-releases-repository
- staging_profile_url: https://repository.jboss.org/nexus/content/groups/kogito-public/
- staging_profile_id: 1976dd1c18392a
- build_promotion_profile_id: ea49ccd6f174
+ release_url: TO_DEFINE
+ release_repository: TO_DEFINE
+ staging_profile_url: TO_DEFINE
+ staging_profile_id: TO_DEFINE
+ build_promotion_profile_id: TO_DEFINE
artifacts_repository: ''
artifacts_upload_repository:
- url: https://repository.jboss.org/nexus/content/repositories/snapshots/
- creds_id: kogito-snapshots-upload
- pr_checks:
- repository:
- url: https://bxms-qe.rhev-ci-vms.eng.rdu2.redhat.com:8443/nexus/content/repositories/kogito-runtimes-pr-full-testing/
- creds_id: unpacks-zip-on-qa-nexus
+ url: TO_DEFINE
+ creds_id: TO_DEFINE
cloud:
image:
- registry_credentials_nightly: nightly_kogito
- registry_credentials_release: release_kogito
+ registry_credentials: tradisso_registry_token # TODO set to `kogito-quay-token`
registry: quay.io
- namespace: kiegroup
+ namespace: tradisso
latest_git_branch: main
jenkins:
- email_creds_id: KOGITO_CI_EMAIL_TO
+ email_creds_id: DROOLS_CI_NOTIFICATION_EMAILS
+ agent:
+ docker:
+ builder:
+ image: quay.io/kiegroup/kogito-ci-build:main-latest
+ args: -v /var/run/docker.sock:/var/run/docker.sock --network host --group-add docker --group-add input --group-add render
default_tools:
- jdk: kie-jdk11
- maven: kie-maven-3.8.7
+ jdk: jdk_11_latest
+ maven: maven_3.8.6
+ sonar_jdk: jdk_17_latest
diff --git a/.ci/jenkins/config/main.yaml b/.ci/jenkins/config/main.yaml
index 5b5d64e533e..82538f85d31 100644
--- a/.ci/jenkins/config/main.yaml
+++ b/.ci/jenkins/config/main.yaml
@@ -4,47 +4,28 @@ ecosystem:
- name: drools
regexs:
- drools.*
+ - incubator-kie-drools.*
+ # - name: kie-jpmml-integration
+ # regexs:
+ # - kie-jpmml-integration.*
- name: kie-benchmarks
ignore_release: true
- ignore_productization: true
regexs:
- kie-benchmarks.*
+ - incubator-kie-benchmarks.*
git:
branches:
- name: main
main_branch: true
- seed:
- branch: main
- - name: 8.35.x
- seed:
- branch: seed-drools-8.35.x
- - name: 8.36.x
- seed:
- branch: seed-drools-8.36.x
- - name: 8.36.x-prod
- seed:
- branch: seed-drools-8.36.x
- - name: 8.37.x
- seed:
- branch: seed-drools-8.37.x
- - name: 8.38.x
- seed:
- branch: seed-drools-8.38.x
- - name: 8.38.x-prod
- seed:
- branch: seed-drools-8.38.x
- - name: 8.39.x
- seed:
- branch: seed-drools-8.39.x
seed:
config_file:
git:
- repository: drools
+ repository: incubator-kie-drools
author:
- name: kiegroup
- credentials_id: kie-ci4
+ name: apache
+ credentials_id: ASF_Cloudbees_Jenkins_ci-builds
branch: main
path: .ci/jenkins/config/branch.yaml
jenkinsfile: dsl/seed/jenkinsfiles/Jenkinsfile.seed.branch
jenkins:
- email_creds_id: KOGITO_CI_EMAIL_TO
+ email_creds_id: DROOLS_CI_NOTIFICATION_EMAILS
diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy
index 7bbc1670a42..2ac07e91161 100644
--- a/.ci/jenkins/dsl/jobs.groovy
+++ b/.ci/jenkins/dsl/jobs.groovy
@@ -2,10 +2,10 @@
* This file is describing all the Jenkins jobs in the DSL format (see https://plugins.jenkins.io/job-dsl/)
* needed by the Kogito pipelines.
*
-* The main part of Jenkins job generation is defined into the https://github.com/kiegroup/kogito-pipelines repository.
+* The main part of Jenkins job generation is defined into the https://github.com/apache/incubator-kie-kogito-pipelines repository.
*
* This file is making use of shared libraries defined in
-* https://github.com/kiegroup/kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl.
+* https://github.com/apache/incubator-kie-kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl.
*/
import org.kie.jenkins.jobdsl.model.JenkinsFolder
@@ -18,6 +18,10 @@ import org.kie.jenkins.jobdsl.Utils
jenkins_path = '.ci/jenkins'
+boolean isMainStream() {
+ return Utils.getStream(this) == 'main'
+}
+
///////////////////////////////////////////////////////////////////////////////////////////
// Whole Drools project jobs
///////////////////////////////////////////////////////////////////////////////////////////
@@ -48,22 +52,26 @@ void createProjectSetupBranchJob() {
GIT_BRANCH_NAME: "${GIT_BRANCH}",
- IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}"
+ IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}",
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
stringParam('DROOLS_VERSION', '', 'Drools version')
+ booleanParam('DEPLOY', true, 'Deploy artifacts')
}
}
}
void setupProjectNightlyJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, '0-nightly', JobType.NIGHTLY, "${jenkins_path_project}/Jenkinsfile.nightly", 'Drools Nightly')
- jobParams.triggers = [cron : '@midnight']
+ jobParams.triggers = [cron : isMainStream() ? '@midnight' : 'H 3 * * *']
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
GIT_BRANCH_NAME: "${GIT_BRANCH}",
+
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -82,6 +90,8 @@ void setupProjectReleaseJob() {
DEFAULT_STAGING_REPOSITORY: "${MAVEN_NEXUS_STAGING_PROFILE_URL}",
ARTIFACTS_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
+
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -96,7 +106,7 @@ void setupProjectReleaseJob() {
void setupProjectPostReleaseJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-post-release', JobType.RELEASE, "${jenkins_path_project}/Jenkinsfile.post-release", 'Drools Post Release')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
@@ -104,6 +114,7 @@ void setupProjectPostReleaseJob() {
GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -119,7 +130,6 @@ void setupProjectPostReleaseJob() {
///////////////////////////////////////////////////////////////////////////////////////////
Map getMultijobPRConfig(JenkinsFolder jobFolder) {
- String defaultBuildMvnOptsCurrent = jobFolder.getDefaultEnvVarValue('BUILD_MVN_OPTS_CURRENT') ?: ''
def jobConfig = [
parallel: true,
buildchain: true,
@@ -131,33 +141,35 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) {
// Sonarcloud analysis only on main branch
// As we have only Community edition
ENABLE_SONARCLOUD: EnvUtils.isDefaultEnvironment(this, jobFolder.getEnvironmentName()) && Utils.isMainBranch(this),
- // Setup full build if not prod profile
- BUILD_MVN_OPTS_CURRENT: "${defaultBuildMvnOptsCurrent} ${EnvUtils.hasEnvironmentId(this, jobFolder.getEnvironmentName(), 'prod') || EnvUtils.hasEnvironmentId(this, jobFolder.getEnvironmentName(), 'quarkus3') ? '' : '-Dfull'}",
]
], [
id: 'kogito-runtimes',
- repository: 'kogito-runtimes'
+ repository: 'incubator-kie-kogito-runtimes'
], [
id: 'kogito-apps',
- repository: 'kogito-apps',
+ repository: 'incubator-kie-kogito-apps',
], [
id: 'kogito-quarkus-examples',
- repository: 'kogito-examples',
+ repository: 'incubator-kie-kogito-examples',
env : [
KOGITO_EXAMPLES_SUBFOLDER_POM: 'kogito-quarkus-examples/',
],
], [
id: 'kogito-springboot-examples',
- repository: 'kogito-examples',
+ repository: 'incubator-kie-kogito-examples',
env : [
KOGITO_EXAMPLES_SUBFOLDER_POM: 'kogito-springboot-examples/',
],
], [
id: 'serverless-workflow-examples',
- repository: 'kogito-examples',
+ repository: 'incubator-kie-kogito-examples',
env : [
KOGITO_EXAMPLES_SUBFOLDER_POM: 'serverless-workflow-examples/',
],
+ // Commented as not migrated
+ // ], [
+ // id: 'kie-jpmml-integration',
+ // repository: 'incubator-kie-jpmml-integration'
]
]
]
@@ -171,51 +183,46 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) {
}
// PR checks
-KogitoJobUtils.createAllEnvironmentsPerRepoPRJobs(this) { jobFolder -> getMultijobPRConfig(jobFolder) }
+Utils.isMainBranch(this) && KogitoJobTemplate.createPullRequestMultibranchPipelineJob(this, "${jenkins_path}/Jenkinsfile")
// Init branch
createSetupBranchJob()
// Nightly jobs
-Closure addFullProfileJobParamsGetter = { script ->
+Closure setup3AMCronTriggerJobParamsGetter = { script ->
def jobParams = JobParamsUtils.DEFAULT_PARAMS_GETTER(script)
- jobParams.env.put('BUILD_MVN_OPTS_CURRENT', '-Dfull')
+ jobParams.triggers = [ cron: 'H 3 * * *' ]
return jobParams
}
-KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, '', true, addFullProfileJobParamsGetter)
-
-// Environment nightlies
-setupSpecificBuildChainNightlyJob('native', addFullProfileJobParamsGetter)
-
-// Jobs with integration branch
-setupQuarkusIntegrationJob('quarkus-main', addFullProfileJobParamsGetter)
-setupQuarkusIntegrationJob('quarkus-branch', addFullProfileJobParamsGetter)
-setupQuarkusIntegrationJob('quarkus-lts')
-setupQuarkusIntegrationJob('native-lts')
-setupQuarkusIntegrationJob('quarkus-3') { script ->
- def jobParams = JobParamsUtils.DEFAULT_PARAMS_GETTER(script)
- jobParams.env.put('BUILD_ENVIRONMENT_OPTIONS_CURRENT', 'rewrite push_changes')
- jobParams.env.put('INTEGRATION_BRANCH_CURRENT', '9.x')
- JobParamsUtils.setupJobParamsDeployConfiguration(script, jobParams)
- return jobParams
-}
+Closure nightlyJobParamsGetter = isMainStream() ? JobParamsUtils.DEFAULT_PARAMS_GETTER : setup3AMCronTriggerJobParamsGetter
+KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, '', true)
+setupSpecificBuildChainNightlyJob('native', nightlyJobParamsGetter)
+setupSpecificBuildChainNightlyJob('sonarcloud', nightlyJobParamsGetter)
+setupQuarkusIntegrationJob('quarkus-main', nightlyJobParamsGetter)
+setupQuarkusIntegrationJob('quarkus-branch', nightlyJobParamsGetter)
+setupQuarkusIntegrationJob('quarkus-lts', nightlyJobParamsGetter)
+setupQuarkusIntegrationJob('native-lts', nightlyJobParamsGetter)
+// Quarkus 3 nightly is exported to Kogito pipelines for easier integration
// Release jobs
setupDeployJob(JobType.RELEASE)
setupPromoteJob(JobType.RELEASE)
// Tools job
-KogitoJobUtils.createQuarkusUpdateToolsJob(this, 'drools', [
- modules: [ 'drools-build-parent' ],
- compare_deps_remote_poms: [ 'io.quarkus:quarkus-bom' ],
- properties: [ 'version.io.quarkus' ],
-])
-
-// Quarkus 3
-if (EnvUtils.isEnvironmentEnabled(this, 'quarkus-3')) {
- // setupPrQuarkus3RewriteJob() # TODO to enable if you want the PR quarkus-3 rewrite job
- setupStandaloneQuarkus3RewriteJob()
+if (isMainStream()) {
+ KogitoJobUtils.createQuarkusUpdateToolsJob(this, 'drools', [
+ modules: [ 'drools-build-parent' ],
+ compare_deps_remote_poms: [ 'io.quarkus:quarkus-bom' ],
+ properties: [ 'version.io.quarkus' ],
+ ])
+
+ // Quarkus 3
+ if (EnvUtils.isEnvironmentEnabled(this, 'quarkus-3')) {
+ // TODO create PR job with branch source plugin. How to ?
+ // setupPrQuarkus3RewriteJob()
+ setupStandaloneQuarkus3RewriteJob()
+ }
}
/////////////////////////////////////////////////////////////////
@@ -232,9 +239,8 @@ void setupSpecificBuildChainNightlyJob(String envName, Closure defaultJobParamsG
void createSetupBranchJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools', JobType.SETUP_BRANCH, "${jenkins_path}/Jenkinsfile.setup-branch", 'Drools Setup branch')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
- REPO_NAME: 'drools',
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
@@ -242,7 +248,8 @@ void createSetupBranchJob() {
MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
- IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}"
+ IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}",
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -259,9 +266,8 @@ void createSetupBranchJob() {
void setupDeployJob(JobType jobType) {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-deploy', jobType, "${jenkins_path}/Jenkinsfile.deploy", 'Drools Deploy')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
- REPO_NAME: 'drools',
PROPERTIES_FILE_NAME: 'deployment.properties',
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
@@ -271,7 +277,10 @@ void setupDeployJob(JobType jobType) {
MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
- MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
+ MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_URL}",
+ MAVEN_REPO_CREDS_ID: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_CREDS_ID}",
+
+ DROOLS_STREAM: Utils.getStream(this),
])
if (jobType == JobType.RELEASE) {
jobParams.env.putAll([
@@ -291,6 +300,7 @@ void setupDeployJob(JobType jobType) {
booleanParam('CREATE_PR', false, 'Should we create a PR with the changes ?')
stringParam('PROJECT_VERSION', '', 'Optional if not RELEASE. If RELEASE, cannot be empty.')
+ stringParam('DROOLS_PR_BRANCH', '', 'PR branch name')
booleanParam('SEND_NOTIFICATION', false, 'In case you want the pipeline to send a notification on CI channel for this run.')
}
@@ -299,9 +309,8 @@ void setupDeployJob(JobType jobType) {
void setupPromoteJob(JobType jobType) {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-promote', jobType, "${jenkins_path}/Jenkinsfile.promote", 'Drools Promote')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
- REPO_NAME: 'drools',
PROPERTIES_FILE_NAME: 'deployment.properties',
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
@@ -312,6 +321,8 @@ void setupPromoteJob(JobType jobType) {
MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
+
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -329,7 +340,7 @@ void setupPromoteJob(JobType jobType) {
void setupPrQuarkus3RewriteJob() {
def jobParams = JobParamsUtils.getBasicJobParamsWithEnv(this, 'drools.rewrite', JobType.PULL_REQUEST, 'quarkus-3', "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.pr", 'Drools Quarkus 3 rewrite patch regeneration')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.jenkinsfile = "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.pr"
jobParams.pr.putAll([
run_only_for_branches: [ "${GIT_BRANCH}" ],
@@ -348,7 +359,7 @@ void setupPrQuarkus3RewriteJob() {
void setupStandaloneQuarkus3RewriteJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools.quarkus-3.rewrite', JobType.TOOLS, "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.standalone", 'Drools Quarkus 3 rewrite patch regeneration')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll(EnvUtils.getEnvironmentEnvVars(this, 'quarkus-3'))
jobParams.env.putAll([
AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
diff --git a/.ci/jenkins/dsl/test.sh b/.ci/jenkins/dsl/test.sh
index 054bc9b0a86..64d478475fb 100755
--- a/.ci/jenkins/dsl/test.sh
+++ b/.ci/jenkins/dsl/test.sh
@@ -22,13 +22,13 @@ fi
git_author="$(echo ${git_url} | awk -F"${git_server_url}" '{print $2}' | awk -F. '{print $1}' | awk -F/ '{print $1}')"
-export DSL_DEFAULT_MAIN_CONFIG_FILE_REPO="${git_author}"/drools
-export DSL_DEFAULT_FALLBACK_MAIN_CONFIG_FILE_REPO=kiegroup/drools
+export DSL_DEFAULT_MAIN_CONFIG_FILE_REPO="${git_author}"/incubator-kie-drools
+export DSL_DEFAULT_FALLBACK_MAIN_CONFIG_FILE_REPO=apache/incubator-kie-drools
export DSL_DEFAULT_MAIN_CONFIG_FILE_PATH=.ci/jenkins/config/main.yaml
-export DSL_DEFAULT_BRANCH_CONFIG_FILE_REPO="${git_author}"/drools
+export DSL_DEFAULT_BRANCH_CONFIG_FILE_REPO="${git_author}"/incubator-kie-drools
file=$(mktemp)
# For more usage of the script, use ./test.sh -h
-curl -o ${file} https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/seed_test.sh
+curl -o ${file} https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/seed_test.sh
chmod u+x ${file}
${file} $@
\ No newline at end of file
diff --git a/.ci/jenkins/project/Jenkinsfile.nightly b/.ci/jenkins/project/Jenkinsfile.nightly
index f152bb8512b..187f1af31af 100644
--- a/.ci/jenkins/project/Jenkinsfile.nightly
+++ b/.ci/jenkins/project/Jenkinsfile.nightly
@@ -4,6 +4,7 @@ import org.jenkinsci.plugins.workflow.libs.Library
// Deploy jobs
DROOLS_DEPLOY = 'drools.build-and-deploy'
+// KIE_JPMML_INTEGRATION_DEPLOY = 'kie-jpmml-integration.build-and-deploy' // Commented as not migrated for now
// Map of executed jobs
// See https://javadoc.jenkins.io/plugin/workflow-support/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.html
@@ -16,7 +17,7 @@ UNSTABLE_STAGES = [:]
// Should be multibranch pipeline
pipeline {
agent {
- label 'kie-rhel8 && !built-in'
+ label 'ubuntu'
}
options {
@@ -59,6 +60,22 @@ pipeline {
}
}
}
+ // stage('Build & Deploy KIE jpmml integration') {
+ // steps {
+ // script {
+ // def buildParams = getDefaultBuildParams()
+ // addSkipTestsParam(buildParams)
+ // addSkipIntegrationTestsParam(buildParams)
+
+ // buildJob(KIE_JPMML_INTEGRATION_DEPLOY, buildParams)
+ // }
+ // }
+ // post {
+ // failure {
+ // addFailedStage(KIE_JPMML_INTEGRATION_DEPLOY)
+ // }
+ // }
+ // }
}
post {
unsuccessful {
diff --git a/.ci/jenkins/project/Jenkinsfile.post-release b/.ci/jenkins/project/Jenkinsfile.post-release
index c69bbf6f250..a23c2cff2e3 100644
--- a/.ci/jenkins/project/Jenkinsfile.post-release
+++ b/.ci/jenkins/project/Jenkinsfile.post-release
@@ -7,12 +7,10 @@ import org.kie.jenkins.MavenCommand
pipeline {
agent {
- label 'kie-rhel8 && !built-in'
- }
-
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -21,16 +19,10 @@ pipeline {
disableConcurrentBuilds(abortPrevious: true)
}
- // parameters {
- // For parameters, check into .jenkins/dsl/jobs.groovy file
- // }
-
environment {
- // Some generated env is also defined into .jenkins/dsl/jobs.groovy file
-
DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
- BOT_BRANCH_HASH = "${util.generateHash(10)}"
+ PR_BRANCH_HASH = "${util.generateHash(10)}"
}
stages {
@@ -38,16 +30,17 @@ pipeline {
steps {
script {
cleanWs()
+ }
}
}
stage('Update drools version in drools-website') {
steps {
script {
- String droolsWebsiteRepository = 'drools-website'
+ String droolsWebsiteRepository = 'incubator-kie-drools-website'
String prLink = null
- String prBranchName = "${getProjectVersion().toLowerCase()}-${env.BOT_BRANCH_HASH}"
+ String prBranchName = "${getProjectVersion().toLowerCase()}-${env.PR_BRANCH_HASH}"
dir(droolsWebsiteRepository) {
- checkoutRepo(websiteRepository, getBuildBranch()) // there is no other branch
+ checkoutRepo(droolsWebsiteRepository, getBuildBranch()) // there is no other branch
githubscm.createBranch(prBranchName)
// Update versions in links on the website and in the docs.
@@ -56,19 +49,21 @@ pipeline {
sh 'mvn clean generate-resources'
// Add changed files, commit, open and merge PR
prLink = commitAndCreatePR("Upgrade drools-website ${getProjectVersion()}", prBranchName, getBuildBranch())
+ sh "git checkout ${getBuildBranch()}"
mergeAndPush(prLink, getBuildBranch())
githubscm.removeRemoteBranch('origin', prBranchName, getGitAuthorCredsID())
}
- }
}
}
}
}
post {
+ always {
+ cleanWs()
+ }
unsuccessful {
sendErrorNotification()
}
- cleanWs()
}
}
@@ -85,7 +80,7 @@ String getProjectVersion() {
}
String getBuildBranch() {
- return env.GIT_BRANCH_NAME
+ return 'main'
}
String getNextMinorSnapshotVersion(String currentVersion) {
diff --git a/.ci/jenkins/project/Jenkinsfile.release b/.ci/jenkins/project/Jenkinsfile.release
index c86d1e0db84..65943d551aa 100644
--- a/.ci/jenkins/project/Jenkinsfile.release
+++ b/.ci/jenkins/project/Jenkinsfile.release
@@ -3,6 +3,7 @@ import org.jenkinsci.plugins.workflow.libs.Library
@Library('jenkins-pipeline-shared-libraries')_
droolsRepo = 'drools'
+// kieJpmmlIntegrationRepo = 'kie-jpmml-integration' // Commented as not migrated for now
ARTIFACTS_STAGING_STAGE = 'stage.artifacts.staging'
ARTIFACTS_RELEASE_STAGE = 'stage.artifacts.release'
@@ -17,16 +18,10 @@ releaseProperties = [:]
pipeline {
agent {
- label 'kie-rhel8 && !built-in'
+ label 'ubuntu'
}
- // parameters {
- // For parameters, check into ./dsl/jobs.groovy file
- // }
-
environment {
- // Some generated env is also defined into ./dsl/jobs.groovy file
-
DROOLS_CI_EMAIL = credentials("${JENKINS_EMAIL_CREDS_ID}")
}
@@ -47,8 +42,8 @@ pipeline {
sendNotification("Release Pipeline has started...\nDrools version = ${getDroolsVersion()}\n=> ${env.BUILD_URL}")
// Safety measure to not publish to main JBoss
- if (getGitAuthor() != 'kiegroup' && !getArtifactsRepositoryParam()) {
- sendNotification("Git Author is different from `kiegroup` and no `ARTIFACTS_REPOSITORY` parameter has been provided. Are you sure you want to continue ? => ${env.BUILD_URL}input")
+ if (getGitAuthor() != 'apache' && !getArtifactsRepositoryParam()) {
+ sendNotification("Git Author is different from `apache` and no `ARTIFACTS_REPOSITORY` parameter has been provided. Are you sure you want to continue ? => ${env.BUILD_URL}input")
input message: 'Should the pipeline continue with no `ARTIFACTS_REPOSITORY` defined ?', ok: 'Yes'
}
}
@@ -71,6 +66,17 @@ pipeline {
}
}
+ // stage('Build & Deploy KIE jpmml integration') {
+ // steps {
+ // script {
+ // def buildParams = getDefaultBuildParams()
+ // addSkipTestsParam(buildParams)
+
+ // buildJob(getDeployJobName(kieJpmmlIntegrationRepo), buildParams)
+ // }
+ // }
+ // }
+
stage('Artifacts\' staging finalization') {
steps {
script {
@@ -113,6 +119,30 @@ pipeline {
}
}
}
+
+ // stage('Promote KIE jpmml integration') {
+ // when {
+ // expression { return isJobConsideredOk(getDeployJobName(kieJpmmlIntegrationRepo)) }
+ // }
+ // steps {
+ // script {
+ // def buildParams = getDefaultBuildParams()
+ // addDeployBuildUrlParam(buildParams, getDeployJobName(kieJpmmlIntegrationRepo))
+
+ // buildJob(getPromoteJobName(kieJpmmlIntegrationRepo), buildParams)
+ // }
+ // }
+ // }
+
+ stage('Setup next snapshot version') {
+ steps {
+ script {
+ def buildParams = []
+ addStringParam(buildParams, 'DROOLS_VERSION', util.getNextVersion(getDroolsVersion(), 'micro'))
+ build(job: '../setup-branch/0-setup-branch', wait: false, parameters: buildParams, propagate: false)
+ }
+ }
+ }
}
post {
always {
@@ -281,6 +311,7 @@ List getDefaultBuildParams() {
List buildParams = []
addDisplayNameParam(buildParams, getDisplayName(getDroolsVersion()))
addStringParam(buildParams, 'PROJECT_VERSION', getDroolsVersion())
+ addStringParam(buildParams, 'DROOLS_PR_BRANCH', "drools-${getDroolsVersion()}")
return buildParams
}
diff --git a/.ci/jenkins/project/Jenkinsfile.setup-branch b/.ci/jenkins/project/Jenkinsfile.setup-branch
index aee108ff5f0..0aa94e67220 100644
--- a/.ci/jenkins/project/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/project/Jenkinsfile.setup-branch
@@ -10,23 +10,16 @@ JOBS = [:]
FAILED_STAGES = [:]
UNSTABLE_STAGES = [:]
-// Should be multibranch pipeline
pipeline {
agent {
- label 'kie-rhel8 && !built-in'
+ label 'ubuntu'
}
options {
timeout(time: 360, unit: 'MINUTES')
}
- // parameters {
- // For parameters, check into ./dsl/jobs.groovy file
- // }
-
environment {
- // Some generated env is also defined into ./dsl/jobs.groovy file
-
DROOLS_CI_EMAIL = credentials("${JENKINS_EMAIL_CREDS_ID}")
// Use branch name in nightly tag as we may have parallel main and release branch builds
@@ -62,13 +55,32 @@ pipeline {
}
}
+ // Commented as not migrated for now
+ // stage('Init KIE jpmml integration') {
+ // steps {
+ // script {
+ // def buildParams = getDefaultBuildParams()
+ // addDroolsVersionParam(buildParams)
+ // buildJob('kie-jpmml-integration', buildParams)
+ // }
+ // }
+ // post {
+ // failure {
+ // addFailedStage('kie-jpmml-integration')
+ // }
+ // }
+ // }
+
// Launch the nightly to deploy all artifacts from the branch
stage('Launch the nightly') {
+ when {
+ expression { return params.DEPLOY }
+ }
steps {
script {
def buildParams = getDefaultBuildParams()
addBooleanParam(buildParams, 'SKIP_TESTS', true)
- buildJob('../nightly/0-nightly', buildParams, 'nightly', false)
+ build(job: '../nightly/0-nightly', wait: false, parameters: buildParams, propagate: false)
}
}
post {
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 3f474a7caef..d38feb205b6 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -45,8 +45,6 @@ How to retest this PR or trigger a specific build:
- a compile downstream build please add comment: Jenkins run cdb
-- a full production downstream build please add comment: Jenkins execute product fdb
-
- an upstream build please add comment: Jenkins run upstream
- for quarkus branch checks
diff --git a/.github/workflows/pr-backporting.yml b/.github/workflows/pr-backporting.yml
index d1eb53041a3..5a763c70da5 100644
--- a/.github/workflows/pr-backporting.yml
+++ b/.github/workflows/pr-backporting.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Set target branches
id: set-targets
- uses: kiegroup/kogito-pipelines/.ci/actions/parse-labels@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/parse-labels@main
with:
labels: ${LABELS}
@@ -34,7 +34,7 @@ jobs:
REVIEWERS: ${{ toJSON(github.event.pull_request.requested_reviewers) }}
steps:
- name: Backporting
- uses: kiegroup/kogito-pipelines/.ci/actions/backporting@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/backporting@main
with:
target-branch: ${{ matrix.target-branch }}
additional-reviewers: ${REVIEWERS}
diff --git a/.github/workflows/pr-downstream-full.yml b/.github/workflows/pr-downstream-full.yml
index 1bd112b8235..02c0479df51 100644
--- a/.github/workflows/pr-downstream-full.yml
+++ b/.github/workflows/pr-downstream-full.yml
@@ -30,24 +30,24 @@ jobs:
name: Build Chain (${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }})
steps:
- name: Clean Disk Space
- uses: kiegroup/kogito-pipelines/.ci/actions/ubuntu-disk-space@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/ubuntu-disk-space@main
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Support long paths
if: ${{ matrix.os == 'windows-latest' }}
- uses: kiegroup/kogito-pipelines/.ci/actions/long-paths@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/long-paths@main
- name: Java and Maven Setup
- uses: kiegroup/kogito-pipelines/.ci/actions/maven@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/maven@main
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven-version }}
cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }}
- name: Build Chain
- uses: kiegroup/kogito-pipelines/.ci/actions/build-chain@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/build-chain@main
with:
- definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/drools/${BRANCH:main}/.ci/buildchain-config.yaml
+ definition-file: https://raw.githubusercontent.com/${GROUP:apache}/incubator-kie-drools/${BRANCH:main}/.ci/buildchain-config.yaml
annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }}
github-token: "${{ secrets.GITHUB_TOKEN }}"
flow-type: full-downstream
- name: Surefire Report
- uses: kiegroup/kogito-pipelines/.ci/actions/surefire-report@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/surefire-report@main
if: ${{ always() }}
diff --git a/.github/workflows/pr-downstream.yml b/.github/workflows/pr-downstream.yml
index 0c2c81a83c4..b8ad43bfa00 100644
--- a/.github/workflows/pr-downstream.yml
+++ b/.github/workflows/pr-downstream.yml
@@ -26,47 +26,49 @@ jobs:
maven-version: ['3.8.7']
include:
- job_name: kogito-runtimes
- repository: kogito-runtimes
+ repository: incubator-kie-kogito-runtimes
- job_name: kogito-apps
- repository: kogito-apps
+ repository: incubator-kie-kogito-apps
env_BUILD_MVN_OPTS: "-DskipUI"
- job_name: kogito-quarkus-examples
- repository: kogito-examples
+ repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-quarkus-examples/
- job_name: kogito-springboot-examples
- repository: kogito-examples
+ repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-springboot-examples/
- job_name: serverless-workflow-examples
- repository: kogito-examples
+ repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: serverless-workflow-examples/
+ # - job_name: kie-jpmml-integration
+ # repository: kie-jpmml-integration
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ matrix.job_name }} (${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }})
steps:
- name: Clean Disk Space
- uses: kiegroup/kogito-pipelines/.ci/actions/ubuntu-disk-space@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/ubuntu-disk-space@main
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Support long paths
if: ${{ matrix.os == 'windows-latest' }}
- uses: kiegroup/kogito-pipelines/.ci/actions/long-paths@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/long-paths@main
- name: Java and Maven Setup
- uses: kiegroup/kogito-pipelines/.ci/actions/maven@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/maven@main
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven-version }}
cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }}
- name: Build Chain
- uses: kiegroup/kogito-pipelines/.ci/actions/build-chain@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/build-chain@main
with:
- definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/drools/${BRANCH:main}/.ci/buildchain-config.yaml
+ definition-file: https://raw.githubusercontent.com/${GROUP:apache}/incubator-kie-drools/${BRANCH:main}/.ci/buildchain-config.yaml
annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }}
- starting-project: kiegroup/${{ matrix.repository }}
+ starting-project: apache/${{ matrix.repository }}
github-token: "${{ secrets.GITHUB_TOKEN }}"
env:
BUILD_MVN_OPTS: ${{ matrix.env_BUILD_MVN_OPTS }}
KOGITO_EXAMPLES_SUBFOLDER_POM: ${{ matrix.env_KOGITO_EXAMPLES_SUBFOLDER_POM }}
- name: Surefire Report
- uses: kiegroup/kogito-pipelines/.ci/actions/surefire-report@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/surefire-report@main
if: ${{ always() }}
with:
report_paths: '**/*-reports/TEST-*.xml'
diff --git a/.github/workflows/pr-drools-ansible.yml b/.github/workflows/pr-drools-ansible.yml
index a9f022b48c1..5aae441d1cd 100644
--- a/.github/workflows/pr-drools-ansible.yml
+++ b/.github/workflows/pr-drools-ansible.yml
@@ -21,26 +21,27 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
- java-version: [11]
+ java-version: [17]
maven-version: ['3.8.7']
fail-fast: false
runs-on: ${{ matrix.os }}
name: Ansible Integration / ${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }}
steps:
- name: Clean Disk Space
- uses: kiegroup/kogito-pipelines/.ci/actions/ubuntu-disk-space@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/ubuntu-disk-space@main
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Support long paths
if: ${{ matrix.os == 'windows-latest' }}
- uses: kiegroup/kogito-pipelines/.ci/actions/long-paths@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/long-paths@main
- name: Java and Maven Setup
- uses: kiegroup/kogito-pipelines/.ci/actions/maven@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/maven@main
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven-version }}
cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }}
+ allow-snapshots: true
- name: Build Chain
- uses: kiegroup/kogito-pipelines/.ci/actions/build-chain@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/build-chain@main
with:
definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/drools-ansible-rulebook-integration/${BRANCH:main}/.ci/pull-request-config.yaml
annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }}
diff --git a/.github/workflows/pr-drools-docs.yml b/.github/workflows/pr-drools-docs.yml
index 3f89bf9b094..ee4d8fadb50 100644
--- a/.github/workflows/pr-drools-docs.yml
+++ b/.github/workflows/pr-drools-docs.yml
@@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Java and Maven Setup
- uses: kiegroup/kogito-pipelines/.ci/actions/maven@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/maven@main
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven-version }}
diff --git a/.github/workflows/pr-drools.yml b/.github/workflows/pr-drools.yml
index 62545b455f7..ba3be596731 100644
--- a/.github/workflows/pr-drools.yml
+++ b/.github/workflows/pr-drools.yml
@@ -28,27 +28,27 @@ jobs:
name: ${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }}
steps:
- name: Clean Disk Space
- uses: kiegroup/kogito-pipelines/.ci/actions/ubuntu-disk-space@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/ubuntu-disk-space@main
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Support long paths
if: ${{ matrix.os == 'windows-latest' }}
- uses: kiegroup/kogito-pipelines/.ci/actions/long-paths@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/long-paths@main
- name: Java and Maven Setup
- uses: kiegroup/kogito-pipelines/.ci/actions/maven@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/maven@main
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven-version }}
cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }}
- name: Build Chain
- uses: kiegroup/kogito-pipelines/.ci/actions/build-chain@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/build-chain@main
env:
BUILD_MVN_OPTS_CURRENT: -Dfull
with:
- definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/drools/${BRANCH:main}/.ci/buildchain-config.yaml
+ definition-file: https://raw.githubusercontent.com/${GROUP:apache}/incubator-kie-drools/${BRANCH:main}/.ci/buildchain-config.yaml
annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }}
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Surefire Report
- uses: kiegroup/kogito-pipelines/.ci/actions/surefire-report@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/surefire-report@main
if: ${{ always() }}
with:
report_paths: '**/*-reports/TEST-*.xml'
diff --git a/.github/workflows/pr-jenkins.yml b/.github/workflows/pr-jenkins.yml
index ed8a85c9276..670dd6d98bd 100644
--- a/.github/workflows/pr-jenkins.yml
+++ b/.github/workflows/pr-jenkins.yml
@@ -16,9 +16,9 @@ jobs:
name: DSL
steps:
- name: DSL tests
- uses: kiegroup/kogito-pipelines/.ci/actions/dsl-tests@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/dsl-tests@main
with:
- project: drools
- main-config-file-repo: kiegroup/drools
+ project: incubator-kie-drools
+ main-config-file-repo: apache/incubator-kie-drools
main-config-file-path: .ci/jenkins/config/main.yaml
- branch-config-file-repo: kiegroup/drools
+ branch-config-file-repo: apache/incubator-kie-drools
diff --git a/.github/workflows/pr-optaplanner.yml b/.github/workflows/pr-optaplanner.yml
deleted file mode 100644
index 122f3bbdbcb..00000000000
--- a/.github/workflows/pr-optaplanner.yml
+++ /dev/null
@@ -1,61 +0,0 @@
-# Tests RHBOP productized profile builds on PRs
-name: Optaplanner Downstream
-
-on:
- pull_request:
- types: [opened, synchronize, reopened, labeled]
- branches:
- - main
- - 8.*
- paths-ignore:
- - 'LICENSE*'
- - '.gitignore'
- - '**.md'
- - '**.adoc'
- - '*.txt'
- - 'docsimg/**'
- - '.ci/jenkins/**'
-
-defaults:
- run:
- shell: bash
-
-jobs:
- productized-build-chain:
- concurrency:
- group: rhbop_pull_request-${{ github.event_name }}-${{ github.head_ref }}-${{ matrix.os }}-${{ matrix.java-version }}-${{ matrix.maven-version }}
- cancel-in-progress: true
- timeout-minutes: 120
- strategy:
- matrix:
- os: [ubuntu-latest]
- java-version: [11]
- maven-version: ['3.8.7']
- fail-fast: false
- runs-on: ${{ matrix.os }}
- name: ${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }}
- steps:
- - name: Clean Disk Space
- uses: kiegroup/kogito-pipelines/.ci/actions/ubuntu-disk-space@main
- - name: Java and Maven Setup
- uses: kiegroup/kogito-pipelines/.ci/actions/maven@main
- with:
- java-version: ${{ matrix.java-version }}
- maven-version: ${{ matrix.maven-version }}
- cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }}
- - name: Productized Build Chain
- uses: kiegroup/kogito-pipelines/.ci/actions/build-chain@main
- env:
- # maven-assembly-plugin occasionally fails on heap space when building the ZIP in optaplanner-docs
- MAVEN_OPTS: "-Xmx2048m"
- with:
- definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/optaplanner/${BRANCH:main}/.ci/pull-request-config-rhbop.yaml
- annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }}
- github-token: "${{ secrets.GITHUB_TOKEN }}"
- starting-project: kiegroup/optaplanner
- - name: Surefire Report
- uses: kiegroup/kogito-pipelines/.ci/actions/surefire-report@main
- if: ${{ always() }}
- with:
- report_paths: '**/*-reports/TEST-*.xml'
-
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000000..56c65e26bd2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,101 @@
+mvn_opts=
+mvn_cmd=mvn $(mvn_opts)
+
+build_chain_branch=$(shell git branch --show-current)
+build_chain_file='https://raw.githubusercontent.com/kiegroup/drools/main/.ci/pull-request-config.yaml'
+build_chain_group='kiegroup'
+build_chain_project='kiegroup/drools'
+
+default: help
+
+.PHONY: build
+## Build the project
+build:
+ $(mvn_cmd) clean install
+
+.PHONY: build-quickly
+## Perform a quick build of the project
+build-quickly:
+ $(mvn_cmd) clean install -Dquickly
+
+.PHONY: build-upstream
+## (build-chain) Build upstream projects from the same branch. If needed, you can modify the `build_chain_file`, `build_chain_group` and `build_chain_branch`. See `build_chain_file` for setting correct environment variables
+build-upstream: build-chain
+ build-chain build cross_pr -f ${build_chain_file} -o /tmp/bc -p ${build_chain_project} -b ${build_chain_branch} -g ${build_chain_group} --skipParallelCheckout --skipProjectExecution kiegroup/kogito-runtimes --skipProjectCheckout kiegroup/kogito-runtimes
+
+.PHONY: build-pr
+pr_link=
+## (build-chain) Build projects from a given `pr_link` argument. If needed, you can also modify the `build_chain_file` and `build_chain_project`. See `build_chain_file` for setting correct environment variables
+build-pr: build-chain
+ $(if $(pr_link),,$(error Please provide the 'pr_link' argument))
+ build-chain build cross_pr -f ${build_chain_file} -o /tmp/bc -p ${build_chain_project} -u ${pr_link} --skipParallelCheckout
+
+.PHONY: test
+## Launch full testing
+test:
+ $(mvn_cmd) clean verify
+
+.PHONY: quick-test
+## Launch unit testing
+quick-test:
+ $(mvn_cmd) clean verify -DquickTests
+
+.PHONY: deploy
+## Deploy the project
+deploy:
+ $(mvn_cmd) deploy
+
+.PHONY: clean
+## Clean the project
+clean:
+ $(mvn_cmd) clean
+
+.PHONY: mvn
+## Execute a Maven command with project configuration. Needs the `cmd` argument set
+mvn:
+ $(mvn_cmd) ${cmd}
+
+.PHONY: update-quarkus
+## Update the quarkus version. Needs the `quarkus_version` argument set. See also '.ci/environments/common/update_quarkus.sh' for setting correct environment variables
+update-quarkus:
+ .ci/environments/common/update_quarkus.sh ${quarkus_version}
+ $(MAKE) show-diff
+
+.PHONY: prepare-env
+## Prepare the repository for a specific environment. Needs the `environment` argument set. See also '.ci/environments/{environment}' script for setting correct environment variables
+prepare-env:
+ .ci/environments/update.sh ${environment}
+
+.PHONY: tree
+## Show project dependencies
+tree:
+ $(mvn_cmd) dependency:tree
+
+.PHONY: show-diff
+## Show Git diff
+show-diff:
+ git status
+ git diff
+
+.PHONY: help
+## This help screen
+help:
+ @printf "Available targets:\n\n"
+ @awk '/^[a-zA-Z\-_0-9%:\\]+/ { \
+ helpMessage = match(lastLine, /^## (.*)/); \
+ if (helpMessage) { \
+ helpCommand = $$1; \
+ helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
+ gsub("\\\\", "", helpCommand); \
+ gsub(":+$$", "", helpCommand); \
+ printf " \x1b[32;01m%-35s\x1b[0m %s\n", helpCommand, helpMessage; \
+ } \
+ } \
+ { lastLine = $$0 }' $(MAKEFILE_LIST)
+ @printf "\n"
+ @printf "All Maven commands can include some maven options via the \`mvn_opts\` argument !"
+ @printf "\n"
+
+.PHONY: build-chain
+build-chain:
+ which build-chain || npm i @kie/build-chain-action -g || printf "\nERROR: Cannot install build-chain. Please run \`npm i @kie/build-chain-action -g\` as sudo user\n"
\ No newline at end of file
diff --git a/README.md b/README.md
index fb960f6199e..b5f526392c0 100644
--- a/README.md
+++ b/README.md
@@ -26,8 +26,8 @@ There are two ways to activate such profile during maven build:
The following two commands will execute tests on machine with locale different than _en_US_:
-1. `mvn clean verify -Ptest-en`
-2. `mvn clean verify -DTestEn`
+1. `make test -Ptest-en`
+2. `make test -DTestEn`
diff --git a/bom/drools-bom/pom.xml b/bom/drools-bom/pom.xml
index 177b268d612..3e2733cac14 100644
--- a/bom/drools-bom/pom.xml
+++ b/bom/drools-bom/pom.xml
@@ -6,7 +6,7 @@
org.kiekie-core-bom
- 8.40.0-SNAPSHOT
+ 8.45.0-SNAPSHOT../kie-core-bom/pom.xml
@@ -206,6 +206,26 @@
test-jartest
+
+
+ org.drools
+ drools-base
+ ${project.version}
+
+
+ org.drools
+ drools-base
+ ${project.version}
+ sources
+
+
+ org.drools
+ drools-base
+ ${project.version}
+ test-jar
+ test
+
+
org.droolsdrools-drl-ast
@@ -278,6 +298,24 @@
test-jartest
+
+ org.drools
+ drools-reliability-h2mvstore
+ ${project.version}
+
+
+ org.drools
+ drools-reliability-h2mvstore
+ ${project.version}
+ sources
+
+
+ org.drools
+ drools-reliability-h2mvstore
+ ${project.version}
+ test-jar
+ test
+ org.droolsdrools-tms
diff --git a/bom/kie-core-bom/pom.xml b/bom/kie-core-bom/pom.xml
index 36c3e04f45c..d5329807d5d 100644
--- a/bom/kie-core-bom/pom.xml
+++ b/bom/kie-core-bom/pom.xml
@@ -6,7 +6,7 @@
org.kiedrools-parent
- 8.40.0-SNAPSHOT
+ 8.45.0-SNAPSHOT../../pom.xml
diff --git a/bom/kie-dmn-bom/pom.xml b/bom/kie-dmn-bom/pom.xml
index 587891746df..2275d4e11fc 100644
--- a/bom/kie-dmn-bom/pom.xml
+++ b/bom/kie-dmn-bom/pom.xml
@@ -6,7 +6,7 @@
org.kiekie-core-bom
- 8.40.0-SNAPSHOT
+ 8.45.0-SNAPSHOT../kie-core-bom/pom.xml
diff --git a/bom/kie-efesto-bom/pom.xml b/bom/kie-efesto-bom/pom.xml
index f5da15d29af..b52c9812a09 100644
--- a/bom/kie-efesto-bom/pom.xml
+++ b/bom/kie-efesto-bom/pom.xml
@@ -6,7 +6,7 @@
org.kiekie-core-bom
- 8.40.0-SNAPSHOT
+ 8.45.0-SNAPSHOT../kie-core-bom/pom.xml
diff --git a/bom/kie-pmml-bom/pom.xml b/bom/kie-pmml-bom/pom.xml
index eed0fc693d4..bf1d694eb6e 100644
--- a/bom/kie-pmml-bom/pom.xml
+++ b/bom/kie-pmml-bom/pom.xml
@@ -6,7 +6,7 @@
org.kiekie-core-bom
- 8.40.0-SNAPSHOT
+ 8.45.0-SNAPSHOT../kie-core-bom/pom.xml
diff --git a/bom/pom.xml b/bom/pom.xml
index 3c6355f9c1f..0b46d81e8b8 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -5,7 +5,7 @@
drools-parentorg.kie
- 8.40.0-SNAPSHOT
+ 8.45.0-SNAPSHOT4.0.0
diff --git a/build-parent/pom.xml b/build-parent/pom.xml
index a01370282c5..903733ba328 100644
--- a/build-parent/pom.xml
+++ b/build-parent/pom.xml
@@ -1,11 +1,31 @@
+
drools-parentorg.kie
- 8.40.0-SNAPSHOT
+ 8.45.0-SNAPSHOT4.0.0
@@ -40,23 +60,21 @@
1.1.12.11.01.10.0
- 2.14.2
- 2.14.2
- 2.14.2
+ 2.15.2
+ 2.15.2
+ 2.15.24.31.0
- 2.1.73.7.41.0.1
- 4.03.22.0
- 2.1.214
- 1.0.43
+ 2.2.220
+ 1.0.862.3.01.4.200.18.04.7.11.10.2
- 2.16.6.Final
+ 2.16.10.Final3.1.18.5.114.13.1
@@ -71,16 +89,18 @@
3.8.61.7.33.5.1
+ 2.0.285.1.09.0.213.23.1
- 3.18.0
+ 3.33.02.3.322.3.61.35.6.12.Final2.3.0
+ 14.0.13.Final3.26.0-GA5.13.1.Final7.6.1.Final
@@ -105,7 +125,7 @@
1.1.61.5.15.9.2
- 2.4.15.Final
+ 2.5.0.Final2.0.71.7.30
@@ -191,6 +211,8 @@
3.24.2
+ 32.0.1-jre
+
${maven.multiModuleProjectDirectory}
@@ -206,6 +228,10 @@
io.smallrye${jandex.group-id}
+
+
+ 3.3.0
+ 3.4.0
@@ -324,19 +350,6 @@
-
- com.google.inject
- guice
- ${version.com.google.inject.guice}
- no_aop
-
-
- javax.inject
- javax.inject
-
-
-
-
com.google.protobufprotobuf-java
@@ -645,6 +658,10 @@
javax.annotationjavax.annotation-api
+
+ com.google.guava
+ guava
+
@@ -1241,6 +1258,13 @@
test
+
+
+ com.google.guava
+ guava
+ ${version.com.google.guava}
+
+
org.kie
@@ -1557,7 +1581,7 @@
org.apache.maven.pluginsmaven-checkstyle-plugin
- ${version.checkstyle.plugin}
+ ${version.maven-checkstyle}validate
@@ -1655,7 +1679,7 @@
org.apache.maven.pluginsmaven-failsafe-plugin
- ${version.failsafe.plugin}
+ ${version.maven-surefire}
@@ -1875,7 +1899,7 @@
org.apache.maven.pluginsmaven-deploy-plugin
- ${version.deploy.plugin}
+ ${version.maven-deploy-plugin}10
@@ -2029,6 +2053,19 @@
sonar-maven-plugin3.6.0.1398
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ ${version.maven-javadoc-plugin}
+
+ ${project.name} ${project.version}]]>
+
+
+ true
+
+ ${javadoc.additional.params}
+
+
@@ -2044,6 +2081,7 @@
org.codehaus.mojobuild-helper-maven-plugin
+ ${version.build.helper.maven.plugin}generate-sources
@@ -2063,7 +2101,7 @@
org.apache.maven.pluginsmaven-jar-plugin
- ${version.jar.plugin}
+ ${version.maven-jar-plugin}org.apache.maven.plugins
@@ -2480,6 +2518,49 @@
+
+ test-with-custom-binaries
+
+
+ unpackbuild.version
+
+
+ src/main/java
+
+
+
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+
+ ${project.groupId}
+ ${project.artifactId}
+ ${unpackbuild.version}
+ ${project.packaging}
+ true
+ target/classes
+
+
+
+
+
+ unpack-jar
+ compile
+
+ unpack
+
+
+
+
+
+
+ default
diff --git a/drools-alphanetwork-compiler/pom.xml b/drools-alphanetwork-compiler/pom.xml
index dad1a7cc93b..7200a26642a 100644
--- a/drools-alphanetwork-compiler/pom.xml
+++ b/drools-alphanetwork-compiler/pom.xml
@@ -1,4 +1,24 @@
+
@@ -6,7 +26,7 @@
org.kiedrools-build-parent
- 8.40.0-SNAPSHOT
+ 8.45.0-SNAPSHOT../build-parent/pom.xml
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ANCConfiguration.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ANCConfiguration.java
index ce93ac9daf5..054ad17e65b 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ANCConfiguration.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ANCConfiguration.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.ancompiler;
public class ANCConfiguration {
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/AbstractCompilerHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/AbstractCompilerHandler.java
index 5b66f584bf6..27bd0912931 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/AbstractCompilerHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/AbstractCompilerHandler.java
@@ -1,32 +1,35 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.NoSuchElementException;
+import org.drools.base.common.NetworkNode;
import org.drools.core.reteoo.AlphaNode;
import org.drools.core.reteoo.Sink;
-import org.drools.core.rule.ContextEntry;
+import org.drools.base.rule.ContextEntry;
import org.drools.core.util.index.AlphaRangeIndex;
/**
* This handler is used as a base class for all {@link org.drools.ancompiler.NetworkHandler}s used for
* generating a compiled network. It provides methods to return the variable type and names used for storing
- * refernces to different {@link org.drools.core.common.NetworkNode}s and variable names for ClassFieldReaders.
+ * refernces to different {@link NetworkNode}s and variable names for ClassFieldReaders.
*/
abstract class AbstractCompilerHandler extends NetworkHandlerAdaptor {
protected static final String NEWLINE = "\n";
@@ -80,7 +83,7 @@ protected String getVariableName() {
* nodeId.
*
* @param clazz class whose simple name is lowercased and user as the prefix of the variable name
- * @param nodeId id of {@link org.drools.core.common.NetworkNode}
+ * @param nodeId id of {@link NetworkNode}
* @return variable name
* @see Class#getSimpleName()
*/
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/AssertHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/AssertHandler.java
index a0bcf55f774..11c4519ae70 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/AssertHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/AssertHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import com.github.javaparser.ast.NodeList;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CanInlineInANC.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CanInlineInANC.java
index ee30fa896bf..645d6871fd9 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CanInlineInANC.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CanInlineInANC.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import com.github.javaparser.ast.expr.Expression;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CompiledNetwork.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CompiledNetwork.java
index 209cbc7db3f..a5b9d3eabe8 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CompiledNetwork.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CompiledNetwork.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.io.IOException;
@@ -21,9 +23,9 @@
import java.io.ObjectOutput;
import org.drools.core.common.BaseNode;
-import org.drools.core.common.NetworkNode;
+import org.drools.base.common.NetworkNode;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.common.RuleBasePartitionId;
+import org.drools.base.common.RuleBasePartitionId;
import org.drools.core.reteoo.AlphaNode;
import org.drools.core.reteoo.BetaNode;
import org.drools.core.reteoo.LeftInputAdapterNode;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CompiledNetworkSources.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CompiledNetworkSources.java
index 939b4a7535b..c773bc8269c 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CompiledNetworkSources.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CompiledNetworkSources.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.Collection;
@@ -24,8 +26,8 @@
import com.github.javaparser.ast.PackageDeclaration;
import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
import org.drools.core.reteoo.ObjectTypeNode;
-import org.drools.core.rule.IndexableConstraint;
-import org.drools.core.rule.accessor.ReadAccessor;
+import org.drools.base.rule.IndexableConstraint;
+import org.drools.base.rule.accessor.ReadAccessor;
import org.drools.core.util.index.AlphaRangeIndex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CouldNotCreateAlphaNetworkCompilerException.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CouldNotCreateAlphaNetworkCompilerException.java
index db3b3c322bd..add000ed017 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CouldNotCreateAlphaNetworkCompilerException.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/CouldNotCreateAlphaNetworkCompilerException.java
@@ -1,17 +1,20 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.ancompiler;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DebugHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DebugHandler.java
index f21e11b3c3d..cdec172e143 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DebugHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DebugHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import org.drools.core.reteoo.AlphaNode;
@@ -21,7 +23,7 @@
import org.drools.core.reteoo.LeftInputAdapterNode;
import org.drools.core.reteoo.ObjectTypeNode;
import org.drools.core.reteoo.WindowNode;
-import org.drools.core.rule.IndexableConstraint;
+import org.drools.base.rule.IndexableConstraint;
import org.drools.core.util.index.AlphaRangeIndex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DeclarationsHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DeclarationsHandler.java
index 840ccf49d52..395bb1abd09 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DeclarationsHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DeclarationsHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.Collection;
@@ -23,14 +25,14 @@
import java.util.Map;
import java.util.NoSuchElementException;
-import org.drools.core.base.ValueType;
+import org.drools.base.base.ValueType;
import org.drools.core.reteoo.AlphaNode;
import org.drools.core.reteoo.BetaNode;
import org.drools.core.reteoo.LeftInputAdapterNode;
import org.drools.core.reteoo.Sink;
import org.drools.core.reteoo.WindowNode;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.IndexableConstraint;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.IndexableConstraint;
import org.drools.core.util.index.AlphaRangeIndex;
/**
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DelegateMethodsHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DelegateMethodsHandler.java
index 2947340fa3c..4769d14fecb 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DelegateMethodsHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/DelegateMethodsHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import org.drools.core.common.InternalFactHandle;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/HashedAlphasDeclaration.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/HashedAlphasDeclaration.java
index 1d97efe2518..396235be5cc 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/HashedAlphasDeclaration.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/HashedAlphasDeclaration.java
@@ -1,22 +1,24 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
-import org.drools.core.base.ValueType;
+import org.drools.base.base.ValueType;
import java.util.Map;
import java.util.HashMap;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/InlineFieldReferenceInitHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/InlineFieldReferenceInitHandler.java
index 796ec9a9c9d..2db3a780410 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/InlineFieldReferenceInitHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/InlineFieldReferenceInitHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.ArrayList;
@@ -39,7 +41,7 @@
import com.github.javaparser.ast.stmt.ReturnStmt;
import com.github.javaparser.ast.type.ClassOrInterfaceType;
import com.github.javaparser.ast.type.VoidType;
-import org.drools.core.common.NetworkNode;
+import org.drools.base.common.NetworkNode;
import org.drools.core.reteoo.AlphaNode;
import org.drools.core.reteoo.Sink;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/KieBaseUpdaterANC.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/KieBaseUpdaterANC.java
index 7bc8351dca3..b0e504a2f05 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/KieBaseUpdaterANC.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/KieBaseUpdaterANC.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.Map;
@@ -95,7 +97,7 @@ public static void generateAndSetInMemoryANC(KieBase kbase) {
KieBaseUpdaterOptions kieBaseUpdaterOptions = new KieBaseUpdaterOptions(new KieBaseUpdaterOptions.OptionEntry(
AlphaNetworkCompilerOption.class, AlphaNetworkCompilerOption.INMEMORY));
KieBaseUpdatersContext context = new KieBaseUpdatersContext(kieBaseUpdaterOptions,
- (( InternalKnowledgeBase ) kbase).getRete(), (( InternalKnowledgeBase ) kbase).getRootClassLoader());
+ ((InternalKnowledgeBase) kbase).getRete(), ((InternalKnowledgeBase) kbase).getRootClassLoader());
new KieBaseUpdaterANC(context).run();
}
}
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/KieBaseUpdaterANCFactory.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/KieBaseUpdaterANCFactory.java
index ba2856e674d..4d829ecba6d 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/KieBaseUpdaterANCFactory.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/KieBaseUpdaterANCFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import org.drools.compiler.kie.builder.impl.KieBaseUpdater;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ListUtils.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ListUtils.java
index 7ad4316c2f3..e6e2946b653 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ListUtils.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ListUtils.java
@@ -1,22 +1,21 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Originally copied from org.apache.commons.collections4.ListUtils
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.AbstractList;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/MapUtils.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/MapUtils.java
index a71d31d8344..caf7d03ac21 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/MapUtils.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/MapUtils.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.Map;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ModifyHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ModifyHandler.java
index 47858259e8c..f5091fd2431 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ModifyHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ModifyHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import com.github.javaparser.ast.NodeList;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NetworkHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NetworkHandler.java
index 2c467b04a13..c7aa302da46 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NetworkHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NetworkHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import org.drools.core.reteoo.AlphaNode;
@@ -21,7 +23,7 @@
import org.drools.core.reteoo.LeftInputAdapterNode;
import org.drools.core.reteoo.ObjectTypeNode;
import org.drools.core.reteoo.WindowNode;
-import org.drools.core.rule.IndexableConstraint;
+import org.drools.base.rule.IndexableConstraint;
import org.drools.core.util.index.AlphaRangeIndex;
/**
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NetworkHandlerAdaptor.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NetworkHandlerAdaptor.java
index 48144caa212..7377e760765 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NetworkHandlerAdaptor.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NetworkHandlerAdaptor.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import com.github.javaparser.ast.Node;
@@ -23,7 +25,7 @@
import org.drools.core.reteoo.LeftInputAdapterNode;
import org.drools.core.reteoo.ObjectTypeNode;
import org.drools.core.reteoo.WindowNode;
-import org.drools.core.rule.IndexableConstraint;
+import org.drools.base.rule.IndexableConstraint;
import org.drools.core.util.index.AlphaRangeIndex;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NodeCollectorHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NodeCollectorHandler.java
index 2d880afc146..c4222b5682d 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NodeCollectorHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/NodeCollectorHandler.java
@@ -1,25 +1,27 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.ArrayList;
import java.util.List;
-import org.drools.core.common.NetworkNode;
+import org.drools.base.common.NetworkNode;
import org.drools.core.reteoo.AlphaNode;
import org.drools.core.reteoo.BetaNode;
import org.drools.core.reteoo.LeftInputAdapterNode;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ObjectTypeNodeCompiler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ObjectTypeNodeCompiler.java
index 8e67ad8a532..1aec3b65ada 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ObjectTypeNodeCompiler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ObjectTypeNodeCompiler.java
@@ -1,30 +1,23 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
import com.github.javaparser.StaticJavaParser;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.Modifier;
@@ -37,15 +30,24 @@
import com.github.javaparser.ast.stmt.Statement;
import com.github.javaparser.ast.type.VoidType;
import com.github.javaparser.printer.PrettyPrinter;
-import org.drools.core.InitialFact;
-import org.drools.core.base.ClassObjectType;
+import org.drools.base.InitialFact;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.rule.accessor.ReadAccessor;
import org.drools.core.reteoo.ObjectTypeNode;
import org.drools.core.reteoo.Rete;
-import org.drools.core.rule.accessor.ReadAccessor;
import org.drools.core.util.index.AlphaRangeIndex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
import static com.github.javaparser.StaticJavaParser.parse;
import static com.github.javaparser.StaticJavaParser.parseType;
@@ -191,7 +193,7 @@ public CompiledNetworkSources generateSource() {
private void addEmptySetNetworkReference(StringBuilder builder) {
builder.append(" @Override\n" +
- " protected void setNetworkNodeReference(org.drools.core.common.NetworkNode networkNode) {\n" +
+ " protected void setNetworkNodeReference(org.drools.base.common.NetworkNode networkNode) {\n" +
" \n" +
" }");
}
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ObjectTypeNodeParser.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ObjectTypeNodeParser.java
index ee05f4940f9..763cd2cbbeb 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ObjectTypeNodeParser.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ObjectTypeNodeParser.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.Collection;
@@ -29,15 +31,15 @@
import org.drools.core.reteoo.CompositeObjectSinkAdapter.FieldIndex;
import org.drools.core.reteoo.CompositePartitionAwareObjectSinkAdapter;
import org.drools.core.reteoo.LeftInputAdapterNode;
-import org.drools.core.reteoo.NodeTypeEnums;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.reteoo.ObjectSink;
import org.drools.core.reteoo.ObjectSinkNode;
import org.drools.core.reteoo.ObjectSinkPropagator;
import org.drools.core.reteoo.ObjectTypeNode;
import org.drools.core.reteoo.SingleObjectSinkAdapter;
import org.drools.core.reteoo.WindowNode;
-import org.drools.core.rule.IndexableConstraint;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
+import org.drools.base.rule.IndexableConstraint;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
import org.drools.core.util.index.AlphaRangeIndex;
/**
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/PropagatorCompilerHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/PropagatorCompilerHandler.java
index 2be8b2d276f..cb8220aa404 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/PropagatorCompilerHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/PropagatorCompilerHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.ArrayDeque;
@@ -61,9 +63,9 @@
import org.drools.core.reteoo.ObjectTypeNode;
import org.drools.core.reteoo.Sink;
import org.drools.core.reteoo.WindowNode;
-import org.drools.core.rule.IndexableConstraint;
+import org.drools.base.rule.IndexableConstraint;
import org.drools.core.common.PropagationContext;
-import org.drools.core.rule.accessor.ReadAccessor;
+import org.drools.base.rule.accessor.ReadAccessor;
import org.drools.core.util.index.AlphaRangeIndex;
import static com.github.javaparser.StaticJavaParser.parseExpression;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ResultCollectorSink.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ResultCollectorSink.java
index 53c3b4f1920..b7eeb81313e 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ResultCollectorSink.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/ResultCollectorSink.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.ancompiler;
diff --git a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/SetNodeReferenceHandler.java b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/SetNodeReferenceHandler.java
index de520f9f48c..cd801e1d237 100644
--- a/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/SetNodeReferenceHandler.java
+++ b/drools-alphanetwork-compiler/src/main/java/org/drools/ancompiler/SetNodeReferenceHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.ArrayList;
@@ -35,7 +37,7 @@
import com.github.javaparser.ast.stmt.SwitchStmt;
import com.github.javaparser.ast.type.PrimitiveType;
import com.github.javaparser.ast.type.VoidType;
-import org.drools.core.common.NetworkNode;
+import org.drools.base.common.NetworkNode;
import org.drools.core.reteoo.AlphaNode;
import org.drools.core.reteoo.Sink;
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/AlphaNetworkCompilerTest.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/AlphaNetworkCompilerTest.java
index 2c531c38103..2a7b1c483a9 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/AlphaNetworkCompilerTest.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/AlphaNetworkCompilerTest.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.io.Serializable;
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/AlphaNetworkInitTest.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/AlphaNetworkInitTest.java
index 77f6ba48865..385b150935c 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/AlphaNetworkInitTest.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/AlphaNetworkInitTest.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.ArrayList;
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/BaseModelTest.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/BaseModelTest.java
index 2d65a17be6f..d2d88b3200a 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/BaseModelTest.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/BaseModelTest.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.List;
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/ChildFactWithEnum1.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/ChildFactWithEnum1.java
index 71e5cae50f5..8f662a3d44b 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/ChildFactWithEnum1.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/ChildFactWithEnum1.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2018 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
public class ChildFactWithEnum1 {
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/EnumFact1.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/EnumFact1.java
index f4b763a5c10..6c1ae5f127d 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/EnumFact1.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/EnumFact1.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2018 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
public enum EnumFact1 {
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/KJARUtils.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/KJARUtils.java
index 702a78ac195..56951a36710 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/KJARUtils.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/KJARUtils.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import org.kie.api.builder.ReleaseId;
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/LargeAlphaNetworkTest.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/LargeAlphaNetworkTest.java
index e2236a42bc1..39cf059f7f4 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/LargeAlphaNetworkTest.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/LargeAlphaNetworkTest.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.ArrayList;
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/MixedConstraintsTest.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/MixedConstraintsTest.java
index 84038bef6f5..86a5691de79 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/MixedConstraintsTest.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/MixedConstraintsTest.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.ArrayList;
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/MultipleIndexableConstraintsTest.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/MultipleIndexableConstraintsTest.java
index 55a03a36458..9f5765d3b5e 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/MultipleIndexableConstraintsTest.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/MultipleIndexableConstraintsTest.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.ArrayList;
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/Person.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/Person.java
index 805e08fcf41..60eed312684 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/Person.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/Person.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.math.BigDecimal;
diff --git a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/RangeIndexANCTest.java b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/RangeIndexANCTest.java
index 71b803fa464..fe64111579f 100644
--- a/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/RangeIndexANCTest.java
+++ b/drools-alphanetwork-compiler/src/test/java/org/drools/ancompiler/RangeIndexANCTest.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.ancompiler;
import java.util.ArrayList;
diff --git a/drools-alphanetwork-compiler/src/test/resources/logback-test.xml b/drools-alphanetwork-compiler/src/test/resources/logback-test.xml
index e3a39178971..48c553b2fc4 100644
--- a/drools-alphanetwork-compiler/src/test/resources/logback-test.xml
+++ b/drools-alphanetwork-compiler/src/test/resources/logback-test.xml
@@ -1,4 +1,24 @@
+
diff --git a/drools-base/pom.xml b/drools-base/pom.xml
new file mode 100644
index 00000000000..68468e2a459
--- /dev/null
+++ b/drools-base/pom.xml
@@ -0,0 +1,229 @@
+
+
+
+
+ 4.0.0
+
+ org.kie
+ drools-build-parent
+ 8.45.0-SNAPSHOT
+ ../build-parent/pom.xml
+
+
+ org.drools
+ drools-base
+
+ Drools :: base
+
+
+ org.drools.base
+ 2
+
+
+
+
+
+ org.kie
+ kie-api
+
+
+
+ org.drools
+ drools-util
+
+
+
+ org.drools
+ drools-wiring-api
+
+
+
+
+ org.kie
+ kie-internal
+
+
+
+ org.assertj
+ assertj-core
+ test
+
+
+
+ com.sun.xml.bind
+ jaxb-xjc
+ provided
+
+
+ com.sun.xml.bind
+ jaxb-core
+ provided
+
+
+ com.sun.xml.bind
+ jaxb-impl
+ provided
+
+
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+ provided
+
+
+ jakarta.activation
+ jakarta.activation-api
+ provided
+
+
+
+ jakarta.inject
+ jakarta.inject-api
+ provided
+
+
+
+
+ org.slf4j
+ slf4j-api
+
+
+ ch.qos.logback
+ logback-classic
+ test
+
+
+
+
+ commons-codec
+ commons-codec
+
+
+
+ org.apache.commons
+ commons-lang3
+ test
+
+
+
+ junit
+ junit
+ test
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
+
+
+
+ grammarsProfile
+
+
+ grammars
+
+
+
+
+
+ maven-antrun-plugin
+
+
+ generate-sources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+ src/main/resources
+
+
+ true
+ src/main/filtered-resources
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+
+
+
+ com.github.spotbugs
+ spotbugs-maven-plugin
+
+ ${project.basedir}/src/main/spotbugs/spotbugs-exclude.xml
+
+
+
+
+
+
diff --git a/drools-base/src/main/java/org/drools/base/InitialFact.java b/drools-base/src/main/java/org/drools/base/InitialFact.java
new file mode 100644
index 00000000000..2c35c675df9
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/InitialFact.java
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base;
+
+import java.io.Serializable;
+
+/**
+ * Initial fact, automatically put into the network. This fact is needed by 'not' CEs
+ * when they are the CEs in the rule.
+ */
+public interface InitialFact
+ extends
+ Serializable {
+
+}
diff --git a/drools-base/src/main/java/org/drools/base/RuleBase.java b/drools-base/src/main/java/org/drools/base/RuleBase.java
new file mode 100644
index 00000000000..90253297633
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/RuleBase.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base;
+
+
+import org.drools.base.rule.TypeDeclaration;
+import org.kie.api.KieBaseConfiguration;
+
+public interface RuleBase {
+ ClassLoader getRootClassLoader();
+
+ TypeDeclaration getOrCreateExactTypeDeclaration(Class> nodeClass);
+
+ TypeDeclaration getTypeDeclaration(Class> classType);
+
+ KieBaseConfiguration getConfiguration();
+}
diff --git a/drools-base/src/main/java/org/drools/base/RuleBuildContext.java b/drools-base/src/main/java/org/drools/base/RuleBuildContext.java
new file mode 100644
index 00000000000..c294aba07d1
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/RuleBuildContext.java
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base;
+
+import org.drools.base.definitions.rule.impl.RuleImpl;
+
+public interface RuleBuildContext {
+ RuleImpl getRule();
+}
diff --git a/drools-base/src/main/java/org/drools/base/base/AcceptsClassObjectType.java b/drools-base/src/main/java/org/drools/base/base/AcceptsClassObjectType.java
new file mode 100644
index 00000000000..666cfa0773e
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/AcceptsClassObjectType.java
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+public interface AcceptsClassObjectType {
+ void setClassObjectType(ClassObjectType classObjectType);
+}
diff --git a/drools-core/src/main/java/org/drools/core/base/AccessorKey.java b/drools-base/src/main/java/org/drools/base/base/AccessorKey.java
similarity index 77%
rename from drools-core/src/main/java/org/drools/core/base/AccessorKey.java
rename to drools-base/src/main/java/org/drools/base/base/AccessorKey.java
index 672044b3d14..e7c33be0153 100644
--- a/drools-core/src/main/java/org/drools/core/base/AccessorKey.java
+++ b/drools-base/src/main/java/org/drools/base/base/AccessorKey.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.base;
+package org.drools.base.base;
import java.io.Externalizable;
import java.io.IOException;
diff --git a/drools-base/src/main/java/org/drools/base/base/AccessorKeySupplier.java b/drools-base/src/main/java/org/drools/base/base/AccessorKeySupplier.java
new file mode 100644
index 00000000000..f908fdb9d5a
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/AccessorKeySupplier.java
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+public interface AccessorKeySupplier {
+ AccessorKey getAccessorKey();
+}
diff --git a/drools-core/src/main/java/org/drools/core/base/BaseClassFieldReader.java b/drools-base/src/main/java/org/drools/base/base/BaseClassFieldReader.java
similarity index 79%
rename from drools-core/src/main/java/org/drools/core/base/BaseClassFieldReader.java
rename to drools-base/src/main/java/org/drools/base/base/BaseClassFieldReader.java
index 7301ecabd1a..c765c5a8308 100644
--- a/drools-core/src/main/java/org/drools/core/base/BaseClassFieldReader.java
+++ b/drools-base/src/main/java/org/drools/base/base/BaseClassFieldReader.java
@@ -1,30 +1,32 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
+package org.drools.base.base;
-package org.drools.core.base;
+import org.drools.base.common.DroolsObjectInput;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.util.ClassUtils;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import org.drools.core.common.DroolsObjectInput;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.util.ClassUtils;
-
/**
* This is the supertype for the ASM generated classes for accessing a field.
*/
@@ -112,11 +114,6 @@ public Object getValue(Object object) {
object );
}
- public boolean isNullValue(Object object) {
- return isNullValue( null,
- object );
- }
-
public int getHashCode(Object object) {
return getHashCode( null,
object );
diff --git a/drools-base/src/main/java/org/drools/base/base/ClassFieldInspector.java b/drools-base/src/main/java/org/drools/base/base/ClassFieldInspector.java
new file mode 100644
index 00000000000..b7b308d1112
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/ClassFieldInspector.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.Map;
+
+import org.kie.internal.builder.KnowledgeBuilderResult;
+
+public interface ClassFieldInspector {
+ Map getFieldNames();
+
+ boolean isNonGetter( String name );
+
+ Map getFieldTypesField();
+
+ Map> getFieldTypes();
+
+ Class< ? > getFieldType(String name);
+
+ Map getGetterMethods();
+
+ Map getSetterMethods();
+
+ Collection getInspectionResults( String fieldName );
+}
diff --git a/drools-core/src/main/java/org/drools/core/base/ClassObjectType.java b/drools-base/src/main/java/org/drools/base/base/ClassObjectType.java
similarity index 86%
rename from drools-core/src/main/java/org/drools/core/base/ClassObjectType.java
rename to drools-base/src/main/java/org/drools/base/base/ClassObjectType.java
index 49feb5bf33f..150fad3d6ee 100644
--- a/drools-core/src/main/java/org/drools/core/base/ClassObjectType.java
+++ b/drools-base/src/main/java/org/drools/base/base/ClassObjectType.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.base;
+package org.drools.base.base;
import java.io.Externalizable;
import java.io.IOException;
@@ -23,11 +25,11 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import org.drools.core.InitialFact;
-import org.drools.core.common.DroolsObjectInput;
-import org.drools.core.reteoo.InitialFactImpl;
+import org.drools.base.InitialFact;
+import org.drools.base.common.DroolsObjectInput;
+import org.drools.base.reteoo.InitialFactImpl;
import org.drools.util.ClassUtils;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
import org.kie.api.runtime.rule.Match;
/**
diff --git a/drools-base/src/main/java/org/drools/base/base/ClassWireable.java b/drools-base/src/main/java/org/drools/base/base/ClassWireable.java
new file mode 100644
index 00000000000..d33591fbb72
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/ClassWireable.java
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+
+public interface ClassWireable {
+
+ void wire( Class> klass );
+
+ String getClassName();
+
+ Class> getClassType();
+
+}
diff --git a/drools-base/src/main/java/org/drools/base/base/CoreComponentsBuilder.java b/drools-base/src/main/java/org/drools/base/base/CoreComponentsBuilder.java
new file mode 100644
index 00000000000..102d1de6f03
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/CoreComponentsBuilder.java
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+import java.io.IOException;
+
+import org.drools.base.common.MissingDependencyException;
+import org.drools.base.rule.DialectRuntimeData;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.util.Drools;
+import org.drools.base.util.MVELExecutor;
+import org.kie.api.internal.utils.KieService;
+
+public interface CoreComponentsBuilder extends KieService {
+
+ String NO_MVEL = "You're trying to compile a Drools asset without mvel. Please add the module org.drools:drools-mvel to your classpath.";
+
+ static T throwExceptionForMissingMvel() {
+ if (Drools.isNativeImage()) {
+ return null;
+ }
+ throw new MissingDependencyException(NO_MVEL);
+ }
+
+ class Holder {
+ private static final CoreComponentsBuilder cBuilder = KieService.load( CoreComponentsBuilder.class );
+ }
+
+ static CoreComponentsBuilder get() {
+ return Holder.cBuilder != null ? Holder.cBuilder : throwExceptionForMissingMvel();
+ }
+
+ static boolean present() {
+ return Holder.cBuilder != null;
+ }
+
+ ReadAccessor getReadAcessor(String className, String expr, boolean typesafe, Class> returnType );
+
+ Object evaluateMvelExpression(DialectRuntimeData data, ClassLoader classLoader, String expr );
+
+ default ClassFieldInspector createClassFieldInspector( final Class> classUnderInspection ) throws IOException {
+ return createClassFieldInspector( classUnderInspection, true );
+ }
+
+ ClassFieldInspector createClassFieldInspector( Class> classUnderInspection, boolean includeFinalMethods ) throws IOException;
+
+ MVELExecutor getMVELExecutor();
+}
diff --git a/drools-base/src/main/java/org/drools/base/base/DroolsQuery.java b/drools-base/src/main/java/org/drools/base/base/DroolsQuery.java
new file mode 100644
index 00000000000..aa60b4653af
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/DroolsQuery.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+import org.kie.api.runtime.rule.Variable;
+
+public interface DroolsQuery {
+ Variable[] getVariables();
+
+ Object getName();
+
+ public Object[] getElements();
+}
diff --git a/drools-base/src/main/java/org/drools/base/base/EnabledBoolean.java b/drools-base/src/main/java/org/drools/base/base/EnabledBoolean.java
new file mode 100644
index 00000000000..312dee062cf
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/EnabledBoolean.java
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.reteoo.BaseTuple;
+import org.drools.base.rule.accessor.Enabled;
+import org.drools.base.rule.Declaration;
+
+public class EnabledBoolean
+ implements
+ Enabled,
+ Externalizable {
+
+ private static final long serialVersionUID = 510l;
+
+ public static final Enabled ENABLED_TRUE = new EnabledBoolean( true );
+ public static final Enabled ENABLED_FALSE = new EnabledBoolean( false );
+
+ private boolean value;
+
+ public EnabledBoolean() {
+ }
+
+ public EnabledBoolean(boolean value) {
+ this.value = value;
+ }
+
+ public void readExternal(ObjectInput in) throws IOException,
+ ClassNotFoundException {
+ value = in.readBoolean();
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException {
+ out.writeBoolean( value );
+ }
+
+ public boolean getValue(final BaseTuple tuple,
+ final Declaration[] declarations,
+ final RuleImpl rule,
+ final ValueResolver valueResolver) {
+ return this.value;
+ }
+
+ public String toString() {
+ return String.valueOf( this.value );
+ }
+
+}
diff --git a/drools-base/src/main/java/org/drools/base/base/FieldAccessor.java b/drools-base/src/main/java/org/drools/base/base/FieldAccessor.java
new file mode 100755
index 00000000000..4ad458c1b55
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/FieldAccessor.java
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.rule.accessor.WriteAccessor;
+
+
+/**
+ * An interface for Accessor classes that joins both reader and writer accessor methods
+ */
+public interface FieldAccessor extends ReadAccessor, WriteAccessor {
+
+}
diff --git a/drools-base/src/main/java/org/drools/base/base/ObjectType.java b/drools-base/src/main/java/org/drools/base/base/ObjectType.java
new file mode 100644
index 00000000000..03cdd4f6482
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/ObjectType.java
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+import java.io.Externalizable;
+
+/**
+ * Semantic object type differentiator.
+ */
+public interface ObjectType
+ extends
+ Externalizable {
+
+ boolean isAssignableFrom(Class> clazz);
+
+ boolean isAssignableTo(Class> clazz);
+
+ boolean isAssignableFrom(ObjectType objectType);
+
+ /**
+ * Returns true if the object type represented by this object
+ * is an event object type. False otherwise.
+ * @return
+ */
+ boolean isEvent();
+
+ ValueType getValueType();
+
+ Object getTypeKey();
+
+ String getClassName();
+
+ boolean hasField(String name);
+
+ boolean isTemplate();
+}
diff --git a/drools-base/src/main/java/org/drools/base/base/ReadAccessorSupplier.java b/drools-base/src/main/java/org/drools/base/base/ReadAccessorSupplier.java
new file mode 100644
index 00000000000..2141067bc20
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/ReadAccessorSupplier.java
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+import org.drools.base.rule.accessor.ReadAccessor;
+
+public interface ReadAccessorSupplier {
+ ReadAccessor getReader(AccessorKey key);
+}
diff --git a/drools-core/src/main/java/org/drools/core/base/SalienceInteger.java b/drools-base/src/main/java/org/drools/base/base/SalienceInteger.java
similarity index 51%
rename from drools-core/src/main/java/org/drools/core/base/SalienceInteger.java
rename to drools-base/src/main/java/org/drools/base/base/SalienceInteger.java
index 9dce476f531..7fc8106c633 100644
--- a/drools-core/src/main/java/org/drools/core/base/SalienceInteger.java
+++ b/drools-base/src/main/java/org/drools/base/base/SalienceInteger.java
@@ -1,34 +1,35 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.base;
+package org.drools.base.base;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.consequence.InternalMatch;
-import org.drools.core.rule.accessor.Salience;
+import org.drools.base.rule.accessor.Salience;
import org.kie.api.definition.rule.Rule;
+import org.kie.api.runtime.rule.Match;
public class SalienceInteger
implements
- Salience, Externalizable {
+ Salience, Externalizable {
private static final long serialVersionUID = 510l;
@@ -51,9 +52,9 @@ public void writeExternal(ObjectOutput out) throws IOException {
out.writeInt(value);
}
- public int getValue(final InternalMatch internalMatch,
+ public int getValue(final Match activation,
final Rule rule,
- final ReteEvaluator reteEvaluator) {
+ final ValueResolver valueResolver) {
return this.value;
}
diff --git a/drools-base/src/main/java/org/drools/base/base/SimpleValueType.java b/drools-base/src/main/java/org/drools/base/base/SimpleValueType.java
new file mode 100644
index 00000000000..8cf19e50e34
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/SimpleValueType.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+public class SimpleValueType {
+ public static final int UNKNOWN = 0;
+ public static final int NULL = 1;
+ public static final int BOOLEAN = 2;
+ public static final int NUMBER = 3;
+ public static final int INTEGER = 4;
+ public static final int DECIMAL = 5;
+ public static final int CHAR = 6;
+ public static final int STRING = 7;
+ public static final int DATE = 8;
+ public static final int LIST = 9;
+ public static final int OBJECT = 10;
+ public static final int FUNCTION = 11; //This one is for LISP
+}
diff --git a/drools-base/src/main/java/org/drools/base/base/ValueResolver.java b/drools-base/src/main/java/org/drools/base/base/ValueResolver.java
new file mode 100644
index 00000000000..1c1e3306ec7
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/ValueResolver.java
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base;
+
+import org.drools.base.RuleBase;
+import org.drools.base.rule.accessor.GlobalResolver;
+
+public interface ValueResolver {
+
+ default Object getGlobal(String identifier) {
+ return getGlobalResolver().resolveGlobal( identifier );
+ }
+
+ long getCurrentTime();
+
+ GlobalResolver getGlobalResolver();
+
+ RuleBase getRuleBase();
+}
diff --git a/drools-core/src/main/java/org/drools/core/base/ValueType.java b/drools-base/src/main/java/org/drools/base/base/ValueType.java
similarity index 84%
rename from drools-core/src/main/java/org/drools/core/base/ValueType.java
rename to drools-base/src/main/java/org/drools/base/base/ValueType.java
index d4653781b89..e3edc67f655 100644
--- a/drools-core/src/main/java/org/drools/core/base/ValueType.java
+++ b/drools-base/src/main/java/org/drools/base/base/ValueType.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.base;
+package org.drools.base.base;
import java.math.BigDecimal;
import java.math.BigInteger;
@@ -23,10 +25,11 @@
import java.util.Date;
import java.util.function.Function;
-import org.drools.core.common.EventFactHandle;
-import org.drools.core.factmodel.traits.Thing;
-import org.drools.core.factmodel.traits.Trait;
-import org.drools.core.facttemplates.FactTemplate;
+import org.drools.base.factmodel.traits.Thing;
+import org.drools.base.factmodel.traits.Trait;
+import org.drools.base.facttemplates.FactTemplate;
+import org.drools.util.CoercionUtil;
+import org.kie.api.runtime.rule.EventHandle;
public enum ValueType {
@@ -63,8 +66,9 @@ public enum ValueType {
STRING_TYPE( "String", String.class, SimpleValueType.STRING, CoercionUtil::coerceToString ),
OBJECT_TYPE( "Object", Object.class, SimpleValueType.OBJECT ),
FACTTEMPLATE_TYPE( "FactTemplate", FactTemplate.class, SimpleValueType.UNKNOWN ),
- EVENT_TYPE( "Event", EventFactHandle.class, SimpleValueType.OBJECT ),
- QUERY_TYPE( "Query", DroolsQuery.class, SimpleValueType.OBJECT ),
+
+ EVENT_TYPE("Event", EventHandle.class, SimpleValueType.OBJECT ),
+ QUERY_TYPE("Query", DroolsQuery.class, SimpleValueType.OBJECT ),
TRAIT_TYPE( "Trait", Thing.class, SimpleValueType.OBJECT ),
CLASS_TYPE( "Class", Class.class, SimpleValueType.OBJECT );
@@ -128,7 +132,7 @@ public boolean isDate() {
}
public boolean isEvent() {
- return this.classType == EventFactHandle.class;
+ return this.classType == EventHandle.class;
}
public static ValueType determineValueType(final Class> clazz) {
@@ -196,7 +200,7 @@ public static ValueType determineValueType(final Class> clazz) {
return ValueType.ARRAY_TYPE;
} else if ( clazz == String.class ) {
return ValueType.STRING_TYPE;
- } else if ( clazz == EventFactHandle.class ) {
+ } else if ( clazz == EventHandle.class ) {
return ValueType.EVENT_TYPE;
} else if ( clazz == Class.class ) {
return ValueType.CLASS_TYPE;
diff --git a/drools-core/src/main/java/org/drools/core/base/XMLSupport.java b/drools-base/src/main/java/org/drools/base/base/XMLSupport.java
similarity index 71%
rename from drools-core/src/main/java/org/drools/core/base/XMLSupport.java
rename to drools-base/src/main/java/org/drools/base/base/XMLSupport.java
index 7095b457cdb..71929218c2b 100644
--- a/drools-core/src/main/java/org/drools/core/base/XMLSupport.java
+++ b/drools-base/src/main/java/org/drools/base/base/XMLSupport.java
@@ -1,26 +1,29 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.base;
+package org.drools.base.base;
import java.io.File;
import java.io.InputStream;
import java.net.URL;
-import org.drools.core.common.MissingDependencyException;
-import org.drools.core.util.Drools;
+import org.drools.base.common.MissingDependencyException;
+import org.drools.base.util.Drools;
import org.kie.api.internal.utils.KieService;
public interface XMLSupport extends KieService {
diff --git a/drools-core/src/main/java/org/drools/core/base/extractors/ArrayElementReader.java b/drools-base/src/main/java/org/drools/base/base/extractors/ArrayElementReader.java
similarity index 75%
rename from drools-core/src/main/java/org/drools/core/base/extractors/ArrayElementReader.java
rename to drools-base/src/main/java/org/drools/base/base/extractors/ArrayElementReader.java
index 6acbf0da9f5..0ca90a40ca9 100644
--- a/drools-core/src/main/java/org/drools/core/base/extractors/ArrayElementReader.java
+++ b/drools-base/src/main/java/org/drools/base/base/extractors/ArrayElementReader.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.base.extractors;
+package org.drools.base.base.extractors;
import java.io.Externalizable;
import java.io.IOException;
@@ -22,18 +24,18 @@
import java.io.ObjectOutput;
import java.lang.reflect.Method;
-import org.drools.core.base.ValueType;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.accessor.AcceptsReadAccessor;
-import org.drools.core.base.ClassWireable;
-import org.drools.core.rule.accessor.ReadAccessor;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.rule.accessor.AcceptsReadAccessor;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.base.ValueType;
+import org.drools.base.base.ClassWireable;
import org.drools.util.ClassUtils;
import org.drools.util.StringUtils;
public class ArrayElementReader
implements
- AcceptsReadAccessor,
- ReadAccessor,
+ AcceptsReadAccessor,
+ ReadAccessor,
ClassWireable,
Externalizable {
private ReadAccessor arrayReadAccessor;
@@ -81,51 +83,51 @@ public String getExtractToClassName() {
return ClassUtils.canonicalName( type );
}
- public boolean getBooleanValue(ReteEvaluator reteEvaluator,
+ public boolean getBooleanValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return ((Boolean) array[this.index]).booleanValue();
}
- public byte getByteValue(ReteEvaluator reteEvaluator,
+ public byte getByteValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return ((Number) array[this.index]).byteValue();
}
- public char getCharValue(ReteEvaluator reteEvaluator,
+ public char getCharValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return ((Character) array[this.index]).charValue();
}
- public double getDoubleValue(ReteEvaluator reteEvaluator,
+ public double getDoubleValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return ((Number) array[this.index]).doubleValue();
}
- public float getFloatValue(ReteEvaluator reteEvaluator,
+ public float getFloatValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return ((Number) array[this.index]).floatValue();
}
- public int getIntValue(ReteEvaluator reteEvaluator,
+ public int getIntValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return ((Number) array[this.index]).intValue();
}
- public long getLongValue(ReteEvaluator reteEvaluator,
+ public long getLongValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return ((Number) array[this.index]).longValue();
}
@@ -133,7 +135,7 @@ public long getLongValue(ReteEvaluator reteEvaluator,
public Method getNativeReadMethod() {
try {
return this.getClass().getDeclaredMethod(getNativeReadMethodName(),
- ReteEvaluator.class, Object.class);
+ ValueResolver.class, Object.class);
} catch ( final Exception e ) {
throw new RuntimeException( "This is a bug. Please report to development team: " + e.getMessage(),
e );
@@ -147,16 +149,16 @@ public String getNativeReadMethodName() {
return "get" + method + "Value";
}
- public short getShortValue(ReteEvaluator reteEvaluator,
+ public short getShortValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return ((Number) array[this.index]).shortValue();
}
- public Object getValue(ReteEvaluator reteEvaluator,
+ public Object getValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return array[this.index];
}
@@ -165,16 +167,16 @@ public ValueType getValueType() {
return ValueType.OBJECT_TYPE;
}
- public boolean isNullValue(ReteEvaluator reteEvaluator,
+ public boolean isNullValue(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
return array[this.index] == null;
}
- public int getHashCode(ReteEvaluator reteEvaluator,
+ public int getHashCode(ValueResolver valueResolver,
Object object) {
- Object[] array = (Object[]) this.arrayReadAccessor.getValue( reteEvaluator,
+ Object[] array = (Object[]) this.arrayReadAccessor.getValue( valueResolver,
object );
Object value = array[this.index];
diff --git a/drools-core/src/main/java/org/drools/core/base/extractors/BaseObjectClassFieldReader.java b/drools-base/src/main/java/org/drools/base/base/extractors/BaseObjectClassFieldReader.java
similarity index 68%
rename from drools-core/src/main/java/org/drools/core/base/extractors/BaseObjectClassFieldReader.java
rename to drools-base/src/main/java/org/drools/base/base/extractors/BaseObjectClassFieldReader.java
index 2b8179d16b5..5635a53e03d 100755
--- a/drools-core/src/main/java/org/drools/core/base/extractors/BaseObjectClassFieldReader.java
+++ b/drools-base/src/main/java/org/drools/base/base/extractors/BaseObjectClassFieldReader.java
@@ -1,27 +1,29 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.base.extractors;
+package org.drools.base.base.extractors;
import java.lang.reflect.Method;
import java.util.Date;
-import org.drools.core.base.BaseClassFieldReader;
-import org.drools.core.base.ValueType;
-import org.drools.core.common.ReteEvaluator;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.base.BaseClassFieldReader;
+import org.drools.base.base.ValueType;
public abstract class BaseObjectClassFieldReader extends BaseClassFieldReader {
@@ -39,12 +41,12 @@ protected BaseObjectClassFieldReader(final int index,
valueType );
}
- public abstract Object getValue(ReteEvaluator reteEvaluator,
+ public abstract Object getValue(ValueResolver valueResolver,
Object object);
- public boolean getBooleanValue(ReteEvaluator reteEvaluator,
+ public boolean getBooleanValue(ValueResolver valueResolver,
final Object object) {
- final Object value = getValue( reteEvaluator,
+ final Object value = getValue( valueResolver,
object );
if ( value instanceof Boolean ) {
@@ -54,9 +56,9 @@ public boolean getBooleanValue(ReteEvaluator reteEvaluator,
throw new RuntimeException( "Conversion to boolean not supported from " + getExtractToClass().getName() );
}
- public byte getByteValue(ReteEvaluator reteEvaluator,
+ public byte getByteValue(ValueResolver valueResolver,
final Object object) {
- final Object value = getValue( reteEvaluator,
+ final Object value = getValue( valueResolver,
object );
if ( value instanceof Character ) {
@@ -66,9 +68,9 @@ public byte getByteValue(ReteEvaluator reteEvaluator,
throw new RuntimeException( "Conversion to byte not supported from " + getExtractToClass().getName());
}
- public char getCharValue(ReteEvaluator reteEvaluator,
+ public char getCharValue(ValueResolver valueResolver,
final Object object) {
- final Object value = getValue( reteEvaluator,
+ final Object value = getValue( valueResolver,
object );
if ( value instanceof Character ) {
@@ -78,9 +80,9 @@ public char getCharValue(ReteEvaluator reteEvaluator,
throw new RuntimeException( "Conversion to char not supported from " + getExtractToClass().getName() );
}
- public double getDoubleValue(ReteEvaluator reteEvaluator,
+ public double getDoubleValue(ValueResolver valueResolver,
final Object object) {
- final Object value = getValue( reteEvaluator,
+ final Object value = getValue( valueResolver,
object );
if( value instanceof Character ) {
@@ -92,9 +94,9 @@ public double getDoubleValue(ReteEvaluator reteEvaluator,
throw new RuntimeException( "Conversion to double not supported from " + getExtractToClass().getName() );
}
- public float getFloatValue(ReteEvaluator reteEvaluator,
+ public float getFloatValue(ValueResolver valueResolver,
final Object object) {
- final Object value = getValue( reteEvaluator,
+ final Object value = getValue( valueResolver,
object );
if( value instanceof Character ) {
@@ -106,9 +108,9 @@ public float getFloatValue(ReteEvaluator reteEvaluator,
throw new RuntimeException( "Conversion to float not supported from " + getExtractToClass().getName() );
}
- public int getIntValue(ReteEvaluator reteEvaluator,
+ public int getIntValue(ValueResolver valueResolver,
final Object object) {
- final Object value = getValue( reteEvaluator,
+ final Object value = getValue( valueResolver,
object );
if( value instanceof Character ) {
@@ -120,9 +122,9 @@ public int getIntValue(ReteEvaluator reteEvaluator,
throw new RuntimeException( "Conversion to int not supported from " + getExtractToClass().getName() );
}
- public long getLongValue(ReteEvaluator reteEvaluator,
+ public long getLongValue(ValueResolver valueResolver,
final Object object) {
- final Object value = getValue( reteEvaluator,
+ final Object value = getValue( valueResolver,
object );
if( value instanceof Character ) {
@@ -136,9 +138,9 @@ public long getLongValue(ReteEvaluator reteEvaluator,
throw new RuntimeException( "Conversion to long not supported from " + getExtractToClass().getName() );
}
- public short getShortValue(ReteEvaluator reteEvaluator,
+ public short getShortValue(ValueResolver valueResolver,
final Object object) {
- final Object value = getValue( reteEvaluator,
+ final Object value = getValue( valueResolver,
object );
if( value instanceof Character ) {
@@ -150,12 +152,12 @@ public short getShortValue(ReteEvaluator reteEvaluator,
throw new RuntimeException( "Conversion to short not supported from " + getExtractToClass().getName() );
}
- public boolean isNullValue(ReteEvaluator reteEvaluator,
+ public boolean isNullValue(ValueResolver valueResolver,
final Object object) {
if ( object == null ) {
return true;
} else {
- return getValue( reteEvaluator,
+ return getValue( valueResolver,
object ) == null;
}
}
@@ -163,7 +165,7 @@ public boolean isNullValue(ReteEvaluator reteEvaluator,
public Method getNativeReadMethod() {
try {
return this.getClass().getMethod(getNativeReadMethodName(),
- ReteEvaluator.class, Object.class);
+ ValueResolver.class, Object.class);
} catch ( final Exception e ) {
throw new RuntimeException( "This is a bug. Please report to development team: " + e.getMessage(),
e );
@@ -178,9 +180,9 @@ public String getNativeReadMethodName() {
return "get" + type.getName().substring(0, 1).toUpperCase() + type.getName().substring(1) + "Value";
}
- public int getHashCode(ReteEvaluator reteEvaluator,
+ public int getHashCode(ValueResolver valueResolver,
final Object object) {
- final Object value = getValue( reteEvaluator,
+ final Object value = getValue( valueResolver,
object );
return (value != null) ? value.hashCode() : 0;
}
diff --git a/drools-base/src/main/java/org/drools/base/base/extractors/SelfReferenceClassFieldReader.java b/drools-base/src/main/java/org/drools/base/base/extractors/SelfReferenceClassFieldReader.java
new file mode 100755
index 00000000000..c8bba4dc006
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/base/extractors/SelfReferenceClassFieldReader.java
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.base.extractors;
+
+import java.io.Externalizable;
+
+import org.drools.base.base.ValueResolver;
+import org.drools.base.base.ValueType;
+
+/**
+ * A special field extractor for the self reference "this".
+ */
+public class SelfReferenceClassFieldReader extends BaseObjectClassFieldReader implements Externalizable {
+
+ private static final long serialVersionUID = 510l;
+
+ public SelfReferenceClassFieldReader() {
+
+ }
+
+ public SelfReferenceClassFieldReader(final Class> clazz) {
+ super( 0, // index
+ clazz, // fieldType
+ ValueType.determineValueType( clazz ) ); // value type
+ }
+
+ public Object getValue(ValueResolver valueResolver, final Object object) {
+ return object;
+ }
+
+ public boolean isNullValue(ValueResolver valueResolver, final Object object) {
+ return getValue( valueResolver, object ) == null;
+ }
+
+ @Override
+ public boolean isSelfReference() {
+ return true;
+ }
+}
diff --git a/drools-core/src/main/java/org/drools/core/base/field/ObjectFieldImpl.java b/drools-base/src/main/java/org/drools/base/base/field/ObjectFieldImpl.java
similarity index 86%
rename from drools-core/src/main/java/org/drools/core/base/field/ObjectFieldImpl.java
rename to drools-base/src/main/java/org/drools/base/base/field/ObjectFieldImpl.java
index ad4ded71012..1e6d8d7f0e5 100644
--- a/drools-core/src/main/java/org/drools/core/base/field/ObjectFieldImpl.java
+++ b/drools-base/src/main/java/org/drools/base/base/field/ObjectFieldImpl.java
@@ -1,36 +1,37 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.base.field;
+package org.drools.base.base.field;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
-import org.drools.core.rule.accessor.FieldValue;
+import org.drools.base.rule.accessor.FieldValue;
import org.drools.util.MathUtils;
public class ObjectFieldImpl
implements
- FieldValue,
+ FieldValue,
Externalizable {
private static final long serialVersionUID = 510l;
diff --git a/drools-base/src/main/java/org/drools/base/beliefsystem/Mode.java b/drools-base/src/main/java/org/drools/base/beliefsystem/Mode.java
new file mode 100644
index 00000000000..1ae6a0e93fa
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/beliefsystem/Mode.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.beliefsystem;
+
+public interface Mode {
+}
diff --git a/drools-base/src/main/java/org/drools/base/common/DroolsObjectInput.java b/drools-base/src/main/java/org/drools/base/common/DroolsObjectInput.java
new file mode 100644
index 00000000000..648a513196c
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/common/DroolsObjectInput.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.common;
+
+import org.drools.base.RuleBase;
+
+import java.io.ObjectInput;
+
+public interface DroolsObjectInput extends ObjectInput {
+ ClassLoader getParentClassLoader();
+ ClassLoader getClassLoader();
+ void setClassLoader(ClassLoader classLoader);
+ RuleBase getRuleBase();
+ void setRuleBase(RuleBase kBase);
+ Package getPackage();
+ void setPackage(Package pkg);
+}
diff --git a/drools-core/src/main/java/org/drools/core/common/DroolsObjectInputStream.java b/drools-base/src/main/java/org/drools/base/common/DroolsObjectInputStream.java
similarity index 81%
rename from drools-core/src/main/java/org/drools/core/common/DroolsObjectInputStream.java
rename to drools-base/src/main/java/org/drools/base/common/DroolsObjectInputStream.java
index 8f995123395..d37fe74401d 100644
--- a/drools-core/src/main/java/org/drools/core/common/DroolsObjectInputStream.java
+++ b/drools-base/src/main/java/org/drools/base/common/DroolsObjectInputStream.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.common;
+package org.drools.base.common;
import java.io.IOException;
import java.io.InputStream;
@@ -27,11 +29,11 @@
import java.util.Map;
import java.util.function.Consumer;
-import org.drools.core.base.AccessorKey;
-import org.drools.core.base.ReadAccessorSupplier;
-import org.drools.core.impl.RuleBase;
-import org.drools.core.rule.accessor.ReadAccessor;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.base.AccessorKey;
+import org.drools.base.base.ReadAccessorSupplier;
import org.drools.util.ClassUtils;
+import org.drools.base.RuleBase;
public class DroolsObjectInputStream extends ObjectInputStream
implements
@@ -39,7 +41,6 @@ public class DroolsObjectInputStream extends ObjectInputStream
private ClassLoader classLoader;
private RuleBase ruleBase;
- private InternalWorkingMemory workingMemory;
private Package pkg;
private ReadAccessorSupplier store;
@@ -112,14 +113,6 @@ public void setRuleBase(RuleBase ruleBase) {
this.classLoader = this.ruleBase.getRootClassLoader();
}
- public InternalWorkingMemory getWorkingMemory() {
- return workingMemory;
- }
-
- public void setWorkingMemory(InternalWorkingMemory workingMemory) {
- this.workingMemory = workingMemory;
- }
-
public Package getPackage() {
return pkg;
}
diff --git a/drools-core/src/main/java/org/drools/core/common/DroolsObjectOutputStream.java b/drools-base/src/main/java/org/drools/base/common/DroolsObjectOutputStream.java
similarity index 61%
rename from drools-core/src/main/java/org/drools/core/common/DroolsObjectOutputStream.java
rename to drools-base/src/main/java/org/drools/base/common/DroolsObjectOutputStream.java
index 4d6c7664b7d..b1992484cac 100644
--- a/drools-core/src/main/java/org/drools/core/common/DroolsObjectOutputStream.java
+++ b/drools-base/src/main/java/org/drools/base/common/DroolsObjectOutputStream.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.common;
+package org.drools.base.common;
import java.io.IOException;
import java.io.ObjectOutputStream;
diff --git a/drools-base/src/main/java/org/drools/base/common/DroolsObjectStreamConstants.java b/drools-base/src/main/java/org/drools/base/common/DroolsObjectStreamConstants.java
new file mode 100644
index 00000000000..a3107be6617
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/common/DroolsObjectStreamConstants.java
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.common;
+
+public interface DroolsObjectStreamConstants {
+ int STREAM_MAGIC = 0x001500d2;
+ short STREAM_VERSION = 400;
+
+ byte RT_CLASS = 11;
+ byte RT_SERIALIZABLE = 12;
+ byte RT_REFERENCE = 13;
+ byte RT_EMPTY_SET = 14;
+ byte RT_EMPTY_LIST = 15;
+ byte RT_EMPTY_MAP = 16;
+ byte RT_MAP = 17;
+ byte RT_ARRAY = 18;
+ byte RT_STRING = 19;
+ byte RT_NULL = 20;
+ byte RT_COLLECTION = 21;
+ byte RT_EXTERNALIZABLE = 22;
+ byte RT_ATOMICREFERENCEARRAY = 30;
+}
diff --git a/drools-base/src/main/java/org/drools/base/common/MissingDependencyException.java b/drools-base/src/main/java/org/drools/base/common/MissingDependencyException.java
new file mode 100644
index 00000000000..e52de19d6d0
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/common/MissingDependencyException.java
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.common;
+
+public class MissingDependencyException extends RuntimeException {
+
+ public MissingDependencyException(String message) {
+ super(message);
+ }
+}
diff --git a/drools-base/src/main/java/org/drools/base/common/NetworkNode.java b/drools-base/src/main/java/org/drools/base/common/NetworkNode.java
new file mode 100644
index 00000000000..70b08f7ce3d
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/common/NetworkNode.java
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.common;
+
+import java.io.Serializable;
+
+import org.drools.base.reteoo.BaseTerminalNode;
+import org.kie.api.definition.rule.Rule;
+
+/**
+ * Interface used to expose generic information on Rete nodes outside of he package. It is used
+ * for exposing information events.
+ */
+public interface NetworkNode extends Serializable {
+
+ /**
+ * Returns the unique id that represents the node in the Rete network
+ */
+ int getId();
+
+ /**
+ * Returns the partition ID to which this node belongs to
+ */
+ RuleBasePartitionId getPartitionId();
+
+ short getType();
+
+ Rule[] getAssociatedRules();
+
+ boolean isAssociatedWith( Rule rule );
+
+ void addAssociatedTerminal(BaseTerminalNode terminalNode);
+ void removeAssociatedTerminal(BaseTerminalNode terminalNode);
+
+ int getAssociatedTerminalsSize();
+
+ boolean hasAssociatedTerminal(BaseTerminalNode terminalNode);
+
+ NetworkNode[] getSinks();
+
+ default boolean isRightInputIsRiaNode() {
+ // not ideal, but this was here to allow NetworkNode to be in drools-base
+ return false;
+ }
+}
diff --git a/drools-base/src/main/java/org/drools/base/common/PartitionsManager.java b/drools-base/src/main/java/org/drools/base/common/PartitionsManager.java
new file mode 100644
index 00000000000..79777ae52f2
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/common/PartitionsManager.java
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.common;
+
+import org.drools.util.ObjectPool;
+import org.kie.internal.concurrent.ExecutorProviderFactory;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ForkJoinPool;
+
+public class PartitionsManager {
+
+ public static final int MIN_PARALLEL_THRESHOLD = 8;
+ public static final int MAX_PARALLEL_THRESHOLD = MIN_PARALLEL_THRESHOLD * 4;
+
+ private int partitionCounter = 0;
+
+ private int parallelEvaluationSlotsCount = -1;
+
+ public RuleBasePartitionId createNewPartitionId() {
+ return new RuleBasePartitionId(this, ++partitionCounter);
+ }
+
+ public boolean hasParallelEvaluation() {
+ return partitionCounter >= MIN_PARALLEL_THRESHOLD;
+ }
+
+ public int getParallelEvaluationSlotsCount() {
+ return parallelEvaluationSlotsCount;
+ }
+
+ public void init() {
+ this.parallelEvaluationSlotsCount = Math.min(partitionCounter, MAX_PARALLEL_THRESHOLD);
+ }
+
+ private static class ForkJoinPoolHolder {
+ private static final ForkJoinPool RULES_EVALUATION_POOL = new ForkJoinPool(); // avoid common pool
+ }
+
+ public static void doOnForkJoinPool(Runnable task) {
+ ForkJoinPoolHolder.RULES_EVALUATION_POOL.submit( task ).join();
+ }
+
+ public static T doOnForkJoinPool(Callable task) {
+ return ForkJoinPoolHolder.RULES_EVALUATION_POOL.submit( task ).join();
+ }
+
+ private static class FireUntilHaltExecutorsPoolHolder {
+ private static final ObjectPool POOL = ObjectPool.newLockFreePool( () -> ExecutorProviderFactory.getExecutorProvider().newFixedThreadPool(MAX_PARALLEL_THRESHOLD));
+ }
+
+ public static ExecutorService borrowFireUntilHaltExecutors() {
+ return FireUntilHaltExecutorsPoolHolder.POOL.borrow();
+ }
+
+ public static void offerFireUntilHaltExecutors(ExecutorService executor) {
+ FireUntilHaltExecutorsPoolHolder.POOL.offer(executor);
+ }
+}
diff --git a/drools-base/src/main/java/org/drools/base/common/RuleBasePartitionId.java b/drools-base/src/main/java/org/drools/base/common/RuleBasePartitionId.java
new file mode 100644
index 00000000000..92c1c51c0ce
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/common/RuleBasePartitionId.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.common;
+
+/**
+ * A class to identify RuleBase partitions
+ */
+public final class RuleBasePartitionId {
+
+ public static final RuleBasePartitionId MAIN_PARTITION = new RuleBasePartitionId(null, 0);
+
+ private final PartitionsManager partitionsManager;
+
+ private final int id;
+
+ public RuleBasePartitionId(PartitionsManager partitionsManager, int id ) {
+ this.partitionsManager = partitionsManager;
+ this.id = id;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public int getParallelEvaluationSlot() {
+ return id % partitionsManager.getParallelEvaluationSlotsCount();
+ }
+
+ @Override
+ public int hashCode() {
+ return id;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return this == obj || (obj instanceof RuleBasePartitionId && id == ((RuleBasePartitionId)obj).id);
+ }
+
+ @Override
+ public String toString() {
+ return "Partition(" + (id == 0 ? "MAIN" : id) + ")";
+ }
+}
diff --git a/drools-core/src/main/java/org/drools/core/definitions/InternalKnowledgePackage.java b/drools-base/src/main/java/org/drools/base/definitions/InternalKnowledgePackage.java
similarity index 72%
rename from drools-core/src/main/java/org/drools/core/definitions/InternalKnowledgePackage.java
rename to drools-base/src/main/java/org/drools/base/definitions/InternalKnowledgePackage.java
index e4c3fed2c87..d1839f1e1a5 100644
--- a/drools-core/src/main/java/org/drools/core/definitions/InternalKnowledgePackage.java
+++ b/drools-base/src/main/java/org/drools/base/definitions/InternalKnowledgePackage.java
@@ -1,19 +1,22 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.definitions;
+package org.drools.base.definitions;
import java.io.Externalizable;
import java.lang.reflect.Type;
@@ -23,23 +26,22 @@
import java.util.Map;
import java.util.Set;
-import org.drools.core.base.AcceptsClassObjectType;
-import org.drools.core.base.ClassFieldAccessorCache;
-import org.drools.core.base.ObjectType;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.facttemplates.FactTemplate;
-import org.drools.core.impl.RuleBase;
-import org.drools.core.rule.DialectRuntimeRegistry;
-import org.drools.core.rule.Function;
-import org.drools.core.rule.ImportDeclaration;
-import org.drools.core.rule.TypeDeclaration;
-import org.drools.core.rule.WindowDeclaration;
-import org.drools.core.rule.accessor.AcceptsReadAccessor;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.ruleunit.RuleUnitDescriptionLoader;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.facttemplates.FactTemplate;
+import org.drools.base.rule.ImportDeclaration;
+import org.drools.base.rule.TypeDeclaration;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.ruleunit.RuleUnitDescriptionLoader;
+import org.drools.base.base.AcceptsClassObjectType;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.DialectRuntimeRegistry;
+import org.drools.base.rule.Function;
+import org.drools.base.rule.WindowDeclaration;
+import org.drools.base.rule.accessor.AcceptsReadAccessor;
import org.drools.util.TypeResolver;
import org.kie.api.definition.KiePackage;
import org.kie.api.definition.process.Process;
+import org.drools.base.RuleBase;
import org.kie.api.definition.type.FactType;
import org.kie.api.io.Resource;
import org.kie.api.runtime.rule.AccumulateFunction;
@@ -174,5 +176,5 @@ default void removeClass( Class> cls ) { }
default ReadAccessor getFieldExtractor( TypeDeclaration type, String timestampField, Class> returnType ) { return null; }
- default void setClassFieldAccessorCache(ClassFieldAccessorCache classFieldAccessorCache) { }
+ default void setClassFieldAccessorCache(Object classFieldAccessorCache) { }
}
diff --git a/drools-core/src/main/java/org/drools/core/definitions/ProcessPackage.java b/drools-base/src/main/java/org/drools/base/definitions/ProcessPackage.java
similarity index 68%
rename from drools-core/src/main/java/org/drools/core/definitions/ProcessPackage.java
rename to drools-base/src/main/java/org/drools/base/definitions/ProcessPackage.java
index bd8fcfa1647..92e579ca676 100644
--- a/drools-core/src/main/java/org/drools/core/definitions/ProcessPackage.java
+++ b/drools-base/src/main/java/org/drools/base/definitions/ProcessPackage.java
@@ -1,21 +1,22 @@
-/*
- * Copyright 2018 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Unless required by applicable law or agreed to in writing, software
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.definitions;
+package org.drools.base.definitions;
import java.util.HashMap;
import java.util.Iterator;
diff --git a/drools-core/src/main/java/org/drools/core/definitions/ResourceTypePackageRegistry.java b/drools-base/src/main/java/org/drools/base/definitions/ResourceTypePackageRegistry.java
similarity index 61%
rename from drools-core/src/main/java/org/drools/core/definitions/ResourceTypePackageRegistry.java
rename to drools-base/src/main/java/org/drools/base/definitions/ResourceTypePackageRegistry.java
index b26fde189b3..6f1ab12c703 100644
--- a/drools-core/src/main/java/org/drools/core/definitions/ResourceTypePackageRegistry.java
+++ b/drools-base/src/main/java/org/drools/base/definitions/ResourceTypePackageRegistry.java
@@ -1,21 +1,22 @@
-/*
- * Copyright 2018 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.definitions;
+package org.drools.base.definitions;
import java.io.Serializable;
import java.util.Collection;
diff --git a/drools-core/src/main/java/org/drools/core/definitions/impl/KnowledgePackageImpl.java b/drools-base/src/main/java/org/drools/base/definitions/impl/KnowledgePackageImpl.java
similarity index 92%
rename from drools-core/src/main/java/org/drools/core/definitions/impl/KnowledgePackageImpl.java
rename to drools-base/src/main/java/org/drools/base/definitions/impl/KnowledgePackageImpl.java
index db6813b9045..d23dacb4ce3 100644
--- a/drools-core/src/main/java/org/drools/core/definitions/impl/KnowledgePackageImpl.java
+++ b/drools-base/src/main/java/org/drools/base/definitions/impl/KnowledgePackageImpl.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.definitions.impl;
+package org.drools.base.definitions.impl;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -35,24 +37,25 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
-import org.drools.core.common.DroolsObjectInputStream;
-import org.drools.core.common.DroolsObjectOutputStream;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.ProcessPackage;
-import org.drools.core.definitions.ResourceTypePackageRegistry;
-import org.drools.core.definitions.rule.impl.GlobalImpl;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.facttemplates.FactTemplate;
-import org.drools.core.impl.RuleBase;
-import org.drools.core.rule.DialectRuntimeRegistry;
-import org.drools.core.rule.Function;
-import org.drools.core.rule.ImportDeclaration;
-import org.drools.core.rule.InvalidRulePackage;
-import org.drools.core.rule.JavaDialectRuntimeData;
-import org.drools.core.rule.TypeDeclaration;
-import org.drools.core.rule.WindowDeclaration;
-import org.drools.core.ruleunit.RuleUnitDescriptionLoader;
-import org.drools.core.util.CloneUtil;
+import org.drools.base.rule.DialectRuntimeData;
+import org.drools.base.rule.DuplicateRuleNameException;
+import org.drools.base.rule.ImportDeclaration;
+import org.drools.base.rule.InvalidRuleException;
+import org.drools.base.rule.InvalidRulePackage;
+import org.drools.base.rule.TypeDeclaration;
+import org.drools.base.util.CloneUtil;
+import org.drools.base.common.DroolsObjectInputStream;
+import org.drools.base.common.DroolsObjectOutputStream;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.ProcessPackage;
+import org.drools.base.definitions.ResourceTypePackageRegistry;
+import org.drools.base.definitions.rule.impl.GlobalImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.facttemplates.FactTemplate;
+import org.drools.base.rule.DialectRuntimeRegistry;
+import org.drools.base.rule.Function;
+import org.drools.base.rule.WindowDeclaration;
+import org.drools.base.ruleunit.RuleUnitDescriptionLoader;
import org.drools.util.ClassTypeResolver;
import org.drools.util.ClassUtils;
import org.drools.util.TypeResolver;
@@ -61,6 +64,7 @@
import org.kie.api.definition.rule.Global;
import org.kie.api.definition.rule.Query;
import org.kie.api.definition.rule.Rule;
+import org.drools.base.RuleBase;
import org.kie.api.definition.type.FactType;
import org.kie.api.io.Resource;
import org.kie.api.io.ResourceType;
@@ -313,7 +317,7 @@ public String getName() {
}
public ClassLoader getPackageClassLoader() {
- JavaDialectRuntimeData javaRuntime = (JavaDialectRuntimeData) getDialectRuntimeRegistry().getDialectData("java");
+ DialectRuntimeData javaRuntime = getDialectRuntimeRegistry().getDialectData("java");
return javaRuntime.getClassLoader();
}
@@ -458,9 +462,9 @@ public void addFactTemplate(final FactTemplate factTemplate) {
* Add a Rule to this Package.
*
* @param rule The rule to add.
- * @throws org.drools.core.rule.DuplicateRuleNameException If the Rule attempting to be added has the
+ * @throws DuplicateRuleNameException If the Rule attempting to be added has the
* same name as another previously added Rule.
- * @throws org.drools.core.rule.InvalidRuleException If the Rule is not valid.
+ * @throws InvalidRuleException If the Rule is not valid.
*/
public void addRule(RuleImpl rule) {
this.rules.put(rule.getName(),
@@ -686,7 +690,7 @@ public boolean removeFromResourceTypePackageGeneratedFromResource(Resource resou
public List removeTypesGeneratedFromResource(Resource resource) {
List typesToBeRemoved = getTypesGeneratedFromResource(resource);
if (!typesToBeRemoved.isEmpty()) {
- JavaDialectRuntimeData dialect = (JavaDialectRuntimeData) getDialectRuntimeRegistry().getDialectData("java");
+ DialectRuntimeData dialect = getDialectRuntimeRegistry().getDialectData("java");
for (TypeDeclaration type : typesToBeRemoved) {
if (type.getTypeClassName() != null) {
// the type declaration might not have been built up to actual class, if an error was found first
@@ -793,7 +797,7 @@ public KnowledgePackageImpl deepCloneIfAlreadyInUse(ClassLoader classLoader) {
}
if (classLoader instanceof ProjectClassLoader ) {
- JavaDialectRuntimeData javaDialectRuntimeData = (JavaDialectRuntimeData) dialectRuntimeRegistry.getDialectData("java");
+ DialectRuntimeData javaDialectRuntimeData = dialectRuntimeRegistry.getDialectData("java");
if (javaDialectRuntimeData == null) {
// using the canonical model there's no runtime registry and no need for any clone
return this;
diff --git a/drools-core/src/main/java/org/drools/core/definitions/rule/impl/GlobalImpl.java b/drools-base/src/main/java/org/drools/base/definitions/rule/impl/GlobalImpl.java
similarity index 67%
rename from drools-core/src/main/java/org/drools/core/definitions/rule/impl/GlobalImpl.java
rename to drools-base/src/main/java/org/drools/base/definitions/rule/impl/GlobalImpl.java
index 34487828a6e..7f0a1aa7195 100644
--- a/drools-core/src/main/java/org/drools/core/definitions/rule/impl/GlobalImpl.java
+++ b/drools-base/src/main/java/org/drools/base/definitions/rule/impl/GlobalImpl.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.definitions.rule.impl;
+package org.drools.base.definitions.rule.impl;
import org.kie.api.definition.rule.Global;
diff --git a/drools-core/src/main/java/org/drools/core/definitions/rule/impl/QueryImpl.java b/drools-base/src/main/java/org/drools/base/definitions/rule/impl/QueryImpl.java
similarity index 67%
rename from drools-core/src/main/java/org/drools/core/definitions/rule/impl/QueryImpl.java
rename to drools-base/src/main/java/org/drools/base/definitions/rule/impl/QueryImpl.java
index afa24a0f671..316b7343ea1 100644
--- a/drools-core/src/main/java/org/drools/core/definitions/rule/impl/QueryImpl.java
+++ b/drools-base/src/main/java/org/drools/base/definitions/rule/impl/QueryImpl.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.definitions.rule.impl;
+package org.drools.base.definitions.rule.impl;
import java.io.IOException;
import java.io.ObjectInput;
@@ -22,12 +24,12 @@
import java.lang.annotation.Annotation;
import java.util.function.Function;
-import org.drools.core.base.DroolsQuery;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.consequence.InternalMatch;
-import org.drools.core.base.ObjectType;
+import org.drools.base.base.DroolsQuery;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.rule.Declaration;
+import org.drools.base.base.ObjectType;
import org.kie.api.definition.rule.Query;
+import org.kie.api.runtime.rule.Match;
public class QueryImpl extends RuleImpl implements Query {
@@ -83,8 +85,7 @@ public boolean isQuery() {
public boolean isAbductive() {
return false;
}
-
- public boolean processAbduction(InternalMatch resultLeftTuple, DroolsQuery dquery, Object[] objects, ReteEvaluator reteEvaluator) {
+ public boolean processAbduction(Match resultLeftTuple, DroolsQuery dquery, Object[] objects, ValueResolver valueResolver) {
return true;
}
diff --git a/drools-core/src/main/java/org/drools/core/definitions/rule/impl/RuleImpl.java b/drools-base/src/main/java/org/drools/base/definitions/rule/impl/RuleImpl.java
similarity index 88%
rename from drools-core/src/main/java/org/drools/core/definitions/rule/impl/RuleImpl.java
rename to drools-base/src/main/java/org/drools/base/definitions/rule/impl/RuleImpl.java
index e8d179e5abb..93b1e600976 100644
--- a/drools-core/src/main/java/org/drools/core/definitions/rule/impl/RuleImpl.java
+++ b/drools-base/src/main/java/org/drools/base/definitions/rule/impl/RuleImpl.java
@@ -1,20 +1,47 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.definitions.rule.impl;
+package org.drools.base.definitions.rule.impl;
+
+import org.drools.base.base.EnabledBoolean;
+import org.drools.base.base.SalienceInteger;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.reteoo.BaseTuple;
+import org.drools.base.rule.ConsequenceMetaData;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.Dialectable;
+import org.drools.base.rule.GroupElement;
+import org.drools.base.rule.GroupElementFactory;
+import org.drools.base.rule.InvalidPatternException;
+import org.drools.base.rule.InvalidRuleException;
+import org.drools.base.rule.LogicTransformer;
+import org.drools.base.rule.RuleConditionElement;
+import org.drools.base.rule.accessor.CompiledInvoker;
+import org.drools.base.rule.accessor.Enabled;
+import org.drools.base.rule.accessor.Salience;
+import org.drools.base.rule.accessor.Wireable;
+import org.drools.base.rule.consequence.Consequence;
+import org.drools.base.time.impl.Timer;
+import org.drools.util.StringUtils;
+import org.kie.api.definition.rule.Query;
+import org.kie.api.io.Resource;
+import org.kie.api.runtime.rule.AgendaGroup;
+import org.kie.internal.definition.rule.InternalRule;
import java.io.Externalizable;
import java.io.IOException;
@@ -31,34 +58,9 @@
import java.util.List;
import java.util.Map;
-import org.drools.core.base.EnabledBoolean;
-import org.drools.core.base.SalienceInteger;
-import org.drools.core.common.InternalAgendaGroup;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.reteoo.RuleTerminalNode;
-import org.drools.core.reteoo.Tuple;
-import org.drools.core.rule.ConsequenceMetaData;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.Dialectable;
-import org.drools.core.rule.GroupElement;
-import org.drools.core.rule.GroupElementFactory;
-import org.drools.core.rule.InvalidPatternException;
-import org.drools.core.rule.LogicTransformer;
-import org.drools.core.rule.RuleConditionElement;
-import org.drools.core.rule.accessor.CompiledInvoker;
-import org.drools.core.rule.accessor.Enabled;
-import org.drools.core.rule.accessor.Salience;
-import org.drools.core.rule.accessor.Wireable;
-import org.drools.core.rule.consequence.Consequence;
-import org.drools.core.time.impl.Timer;
-import org.drools.util.StringUtils;
-import org.kie.api.definition.rule.Query;
-import org.kie.api.io.Resource;
-import org.kie.internal.definition.rule.InternalRule;
-
public class RuleImpl implements Externalizable,
- Wireable,
- Dialectable,
+ Wireable,
+ Dialectable,
InternalRule,
Query {
@@ -85,7 +87,7 @@ public class RuleImpl implements Externalizable,
private List children;
/** Salience value. */
- private Salience salience = SalienceInteger.DEFAULT_SALIENCE;
+ private Salience salience = SalienceInteger.DEFAULT_SALIENCE;
/** The Rule is dirty after patterns have been added */
private boolean dirty;
@@ -96,7 +98,7 @@ public class RuleImpl implements Externalizable,
private String dialect;
- private String agendaGroup = InternalAgendaGroup.MAIN;
+ private String agendaGroup = AgendaGroup.MAIN;
private Map metaAttributes = new HashMap<>();
@@ -121,13 +123,13 @@ public class RuleImpl implements Externalizable,
private Calendar dateExpires;
- private Enabled enabled = EnabledBoolean.ENABLED_TRUE;
+ private Enabled enabled = EnabledBoolean.ENABLED_TRUE;
private Resource resource;
protected String activationListener;
- private ConsequenceMetaData consequenceMetaData = new ConsequenceMetaData();
+ private ConsequenceMetaData consequenceMetaData = new ConsequenceMetaData();
private List usedQueries;
@@ -388,7 +390,7 @@ public RuleImpl setAgendaGroup(final String agendaGroup) {
@Override
public boolean isMainAgendaGroup() {
- return InternalAgendaGroup.MAIN.equals( agendaGroup );
+ return AgendaGroup.MAIN.equals( agendaGroup );
}
private void set( int flag, boolean b ) {
@@ -413,20 +415,20 @@ public boolean isNoLoop() {
*
* This uses the dateEffective, dateExpires and enabled flag to decide this.
*/
- public boolean isEffective(Tuple tuple,
- RuleTerminalNode rtn,
- ReteEvaluator reteEvaluator) {
+ public boolean isEffective(BaseTuple tuple,
+ Declaration[] declarations,
+ ValueResolver valueResolver) {
if ( !this.enabled.getValue( tuple,
- rtn.getEnabledDeclarations(),
+ declarations,
this,
- reteEvaluator ) ) {
+ valueResolver ) ) {
return false;
}
if ( this.dateEffective == null && this.dateExpires == null ) {
return true;
} else {
Calendar now = Calendar.getInstance();
- now.setTimeInMillis( reteEvaluator.getSessionClock().getCurrentTime() );
+ now.setTimeInMillis( valueResolver.getCurrentTime() );
if ( this.dateEffective != null && this.dateExpires != null ) {
return (now.after( this.dateEffective ) && now.before( this.dateExpires ));
@@ -536,7 +538,7 @@ public Map getDeclarations() {
*
* @param element
* The Test to add.
- * @throws org.drools.core.rule.InvalidRuleException
+ * @throws InvalidRuleException
*/
public void addPattern(final RuleConditionElement element) {
this.dirty = true;
@@ -586,9 +588,9 @@ private GroupElement getExtendedLhs(RuleImpl rule,
* changed.
*
* @return
- * @throws org.drools.core.rule.InvalidPatternException
+ * @throws InvalidPatternException
*/
- public GroupElement[] getTransformedLhs( LogicTransformer transformer, Map globals ) throws InvalidPatternException {
+ public GroupElement[] getTransformedLhs(LogicTransformer transformer, Map globals ) throws InvalidPatternException {
//Moved to getExtendedLhs --final GroupElement cloned = (GroupElement) this.lhsRoot.clone();
return transformer.transform( getExtendedLhs( this, null ), globals );
}
@@ -769,10 +771,10 @@ public Enabled getEnabled() {
}
- public boolean isEnabled(Tuple tuple,
- RuleTerminalNode rtn,
- ReteEvaluator reteEvaluator) {
- return this.enabled.getValue( tuple, rtn.getEnabledDeclarations(), this, reteEvaluator );
+ public boolean isEnabled(BaseTuple tuple,
+ Declaration[] enabledDeclarations,
+ ValueResolver valueResolver) {
+ return this.enabled.getValue( tuple, enabledDeclarations, this, valueResolver );
}
public void addMetaAttribute(String key,
@@ -806,7 +808,7 @@ public RuleImpl getParent() {
return parent;
}
- public void addChild(RuleImpl child) {
+ public synchronized void addChild(RuleImpl child) {
if (children == null) {
children = new ArrayList<>();
}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/AccessibleFact.java b/drools-base/src/main/java/org/drools/base/factmodel/AccessibleFact.java
new file mode 100644
index 00000000000..51f80a0cd03
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/AccessibleFact.java
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel;
+
+public interface AccessibleFact {
+ Object getValue(String fieldName);
+ void setValue(String fieldName, Object value);
+}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/AnnotationDefinition.java b/drools-base/src/main/java/org/drools/base/factmodel/AnnotationDefinition.java
similarity index 92%
rename from drools-core/src/main/java/org/drools/core/factmodel/AnnotationDefinition.java
rename to drools-base/src/main/java/org/drools/base/factmodel/AnnotationDefinition.java
index 8fdf5457122..fbd5fb48ba4 100644
--- a/drools-core/src/main/java/org/drools/core/factmodel/AnnotationDefinition.java
+++ b/drools-base/src/main/java/org/drools/base/factmodel/AnnotationDefinition.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.factmodel;
+package org.drools.base.factmodel;
import java.io.Externalizable;
import java.io.IOException;
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/ClassDefinition.java b/drools-base/src/main/java/org/drools/base/factmodel/ClassDefinition.java
similarity index 93%
rename from drools-core/src/main/java/org/drools/core/factmodel/ClassDefinition.java
rename to drools-base/src/main/java/org/drools/base/factmodel/ClassDefinition.java
index a83d81e2840..40bdb25acfe 100755
--- a/drools-core/src/main/java/org/drools/core/factmodel/ClassDefinition.java
+++ b/drools-base/src/main/java/org/drools/base/factmodel/ClassDefinition.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2008 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.factmodel;
+package org.drools.base.factmodel;
import java.io.IOException;
import java.io.ObjectInput;
@@ -30,7 +32,7 @@
import java.util.List;
import java.util.Map;
-import org.drools.core.phreak.Reactive;
+import org.drools.base.phreak.Reactive;
import org.kie.api.definition.type.Annotation;
import org.kie.api.definition.type.FactField;
import org.kie.api.definition.type.FactType;
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/FieldDefinition.java b/drools-base/src/main/java/org/drools/base/factmodel/FieldDefinition.java
similarity index 94%
rename from drools-core/src/main/java/org/drools/core/factmodel/FieldDefinition.java
rename to drools-base/src/main/java/org/drools/base/factmodel/FieldDefinition.java
index c46b08992c9..ba5d3b7d9f9 100755
--- a/drools-core/src/main/java/org/drools/core/factmodel/FieldDefinition.java
+++ b/drools-base/src/main/java/org/drools/base/factmodel/FieldDefinition.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2008 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.factmodel;
+package org.drools.base.factmodel;
import java.io.IOException;
import java.io.ObjectInput;
@@ -25,9 +27,9 @@
import java.util.List;
import java.util.Map;
-import org.drools.core.base.CoreComponentsBuilder;
-import org.drools.core.base.FieldAccessor;
-import org.drools.core.factmodel.traits.Alias;
+import org.drools.base.factmodel.traits.Alias;
+import org.drools.base.base.CoreComponentsBuilder;
+import org.drools.base.base.FieldAccessor;
import org.drools.util.StringUtils;
import org.kie.api.definition.type.Annotation;
import org.kie.api.definition.type.FactField;
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/GeneratedFact.java b/drools-base/src/main/java/org/drools/base/factmodel/GeneratedFact.java
new file mode 100644
index 00000000000..9d1b0a2e770
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/GeneratedFact.java
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel;
+
+/**
+ * This is a marker interface implemented by classes dinamically generated from declared types or facts
+ */
+public interface GeneratedFact {
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/Alias.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/Alias.java
new file mode 100644
index 00000000000..1e8c27d2a01
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/Alias.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention( value = RetentionPolicy.RUNTIME )
+@Target( value = ElementType.FIELD )
+public @interface Alias {
+
+ String value();
+
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/CoreWrapper.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/CoreWrapper.java
new file mode 100644
index 00000000000..bca27724844
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/CoreWrapper.java
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+public interface CoreWrapper extends TraitableBean> {
+
+ void init( K core );
+
+ K getCore();
+
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/Thing.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/Thing.java
new file mode 100644
index 00000000000..07c0da375be
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/Thing.java
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+import java.util.Map;
+
+@Trait
+public interface Thing {
+
+ Map getFields();
+
+ K getCore();
+
+ boolean isTop();
+
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/Trait.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/Trait.java
new file mode 100644
index 00000000000..48143e25fb4
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/Trait.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(value = RetentionPolicy.RUNTIME)
+@Target( value = ElementType.TYPE)
+public @interface Trait {
+
+ Class impl() default NullMixin.class;
+
+ class NullMixin {
+ private NullMixin() {}
+ }
+
+ boolean logical() default false;
+
+ MixinConflictResolutionStrategy mixinSolveConflicts() default MixinConflictResolutionStrategy.DECLARATION_ORDER;
+
+ enum MixinConflictResolutionStrategy {
+ DECLARATION_ORDER, ERROR_ON_CONFLICT
+ }
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitConstants.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitConstants.java
new file mode 100644
index 00000000000..8be1aeb4038
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitConstants.java
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+public interface TraitConstants {
+ String MAP_FIELD_NAME = "__$$dynamic_properties_map$$";
+ String TRAITSET_FIELD_NAME = "__$$dynamic_traits_map$$";
+ String FIELDTMS_FIELD_NAME = "__$$field_Tms$$";
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitFactory.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitFactory.java
new file mode 100644
index 00000000000..dc1009b9e54
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitFactory.java
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+public interface TraitFactory {
+
+ boolean isRuntimeClass( String resourceName );
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitField.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitField.java
new file mode 100644
index 00000000000..3cefc861c4f
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitField.java
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+import java.util.Set;
+
+public interface TraitField {
+
+ Set> getRangeTypes();
+}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitFieldTMS.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitFieldTMS.java
similarity index 52%
rename from drools-core/src/main/java/org/drools/core/factmodel/traits/TraitFieldTMS.java
rename to drools-base/src/main/java/org/drools/base/factmodel/traits/TraitFieldTMS.java
index 84970465d96..7b5f62e41fc 100644
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitFieldTMS.java
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitFieldTMS.java
@@ -1,22 +1,24 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
-package org.drools.core.factmodel.traits;
-
-import org.drools.core.WorkingMemory;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
import java.io.Externalizable;
@@ -25,7 +27,7 @@ public interface TraitFieldTMS extends Externalizable {
// Most of the code generation for traits is still in drools-core DefaultBeanClassBuilder so this module needs to know the name of the impl class for traits
String TYPE_NAME = "org/drools/traits/core/factmodel/TraitFieldTMSImpl";
- void init( WorkingMemory wm );
+ void init( Object wm );
boolean needsInit();
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitType.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitType.java
new file mode 100644
index 00000000000..7f3d6ac7f74
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitType.java
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+
+import java.util.BitSet;
+
+public interface TraitType {
+
+ BitSet _getTypeCode();
+
+ boolean _isVirtual();
+
+ String traitNameField = "__$$trait_Name";
+
+ String _getTraitName();
+
+ boolean _hasTypeCode( BitSet typeCode );
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitTypeEnum.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitTypeEnum.java
new file mode 100644
index 00000000000..f02614846ba
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitTypeEnum.java
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+
+public enum TraitTypeEnum {
+
+ TRAIT, // trait proxy
+ TRAITABLE, // native traitable bean
+ LEGACY_TRAITABLE, // legacy class marked as traitable, bean not yet traited (needs wrapping/injection to provide data structures
+ WRAPPED_TRAITABLE, // legacy class wrapped by a proxy to provide the core data structures.
+ NON_TRAIT // not marked as trait/traitable
+
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitTypeMap.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitTypeMap.java
new file mode 100644
index 00000000000..238c03a5061
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitTypeMap.java
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+import java.util.BitSet;
+import java.util.Collection;
+
+public interface TraitTypeMap, C> {
+
+ K putSafe(String key, K value);
+
+ Collection removeCascade(String traitName);
+
+ Collection removeCascade(BitSet code);
+
+ Collection getMostSpecificTraits();
+
+ BitSet getCurrentTypeCode();
+
+ void setBottomCode(BitSet code);
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitTypeMapConstants.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitTypeMapConstants.java
new file mode 100644
index 00000000000..956e2506ce4
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitTypeMapConstants.java
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+public interface TraitTypeMapConstants {
+
+ String TYPE_NAME = "org/drools/traits/core/factmodel/TraitTypeMapImpl";
+}
diff --git a/drools-base/src/main/java/org/drools/base/factmodel/traits/Traitable.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/Traitable.java
new file mode 100644
index 00000000000..9364e3667f3
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/Traitable.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.factmodel.traits;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention( value = RetentionPolicy.RUNTIME )
+@Target( value = ElementType.TYPE )
+public @interface Traitable {
+
+ boolean logical() default false;
+
+}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitableBean.java b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitableBean.java
similarity index 72%
rename from drools-core/src/main/java/org/drools/core/factmodel/traits/TraitableBean.java
rename to drools-base/src/main/java/org/drools/base/factmodel/traits/TraitableBean.java
index 0c2b81ad230..ae43622136c 100644
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitableBean.java
+++ b/drools-base/src/main/java/org/drools/base/factmodel/traits/TraitableBean.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.factmodel.traits;
+package org.drools.base.factmodel.traits;
import java.util.BitSet;
import java.util.Collection;
diff --git a/drools-base/src/main/java/org/drools/base/facttemplates/Event.java b/drools-base/src/main/java/org/drools/base/facttemplates/Event.java
new file mode 100644
index 00000000000..8692847bddb
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/facttemplates/Event.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.facttemplates;
+
+import java.util.concurrent.TimeUnit;
+
+public interface Event extends Fact {
+
+ long getTimestamp();
+
+ long getExpiration();
+
+ Event withExpiration( long value, TimeUnit unit );
+
+ default boolean isEvent() {
+ return true;
+ }
+}
diff --git a/drools-base/src/main/java/org/drools/base/facttemplates/Fact.java b/drools-base/src/main/java/org/drools/base/facttemplates/Fact.java
new file mode 100644
index 00000000000..3073a652b5e
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/facttemplates/Fact.java
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.facttemplates;
+
+import java.util.Map;
+
+public interface Fact {
+
+ Object get(String name);
+
+ void set(String name, Object value);
+
+ Map asMap();
+
+ FactTemplate getFactTemplate();
+
+ default boolean isEvent() {
+ return false;
+ }
+}
diff --git a/drools-core/src/main/java/org/drools/core/facttemplates/FactImpl.java b/drools-base/src/main/java/org/drools/base/facttemplates/FactImpl.java
similarity index 67%
rename from drools-core/src/main/java/org/drools/core/facttemplates/FactImpl.java
rename to drools-base/src/main/java/org/drools/base/facttemplates/FactImpl.java
index 9a85d5763f1..a50ff6a0de7 100644
--- a/drools-core/src/main/java/org/drools/core/facttemplates/FactImpl.java
+++ b/drools-base/src/main/java/org/drools/base/facttemplates/FactImpl.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.facttemplates;
+package org.drools.base.facttemplates;
import java.io.Externalizable;
import java.io.IOException;
diff --git a/drools-base/src/main/java/org/drools/base/facttemplates/FactTemplate.java b/drools-base/src/main/java/org/drools/base/facttemplates/FactTemplate.java
new file mode 100644
index 00000000000..4b0ffaed98b
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/facttemplates/FactTemplate.java
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.facttemplates;
+
+import java.io.Externalizable;
+import java.util.Collection;
+
+import org.drools.base.definitions.InternalKnowledgePackage;
+
+
+public interface FactTemplate
+ extends
+ Externalizable {
+
+ InternalKnowledgePackage getPackage();
+
+ /**
+ * The name of the template may be the fully qualified
+ * class name, or an alias.
+ * @return
+ */
+ String getName();
+
+ /**
+ * templates may have 1 or more slots. A slot is a named
+ * pattern with a specific type of value.
+ * @return
+ */
+ int getNumberOfFields();
+
+ Collection getFieldNames();
+
+ /**
+ * Return the slot with the String name
+ * @return
+ */
+ FieldTemplate getFieldTemplate(String name);
+
+ /**
+ * Get the pattern index with the given name
+ * @param name
+ * @return
+ */
+ int getFieldTemplateIndex(String name);
+
+ Fact createFact();
+}
diff --git a/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateFieldExtractor.java b/drools-base/src/main/java/org/drools/base/facttemplates/FactTemplateFieldExtractor.java
similarity index 72%
rename from drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateFieldExtractor.java
rename to drools-base/src/main/java/org/drools/base/facttemplates/FactTemplateFieldExtractor.java
index aaaa8e15401..09aa3afe529 100644
--- a/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateFieldExtractor.java
+++ b/drools-base/src/main/java/org/drools/base/facttemplates/FactTemplateFieldExtractor.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.facttemplates;
+package org.drools.base.facttemplates;
import java.io.Externalizable;
import java.io.IOException;
@@ -22,10 +24,9 @@
import java.io.ObjectOutput;
import java.lang.reflect.Method;
-import org.drools.core.base.ValueType;
-import org.drools.core.common.InternalWorkingMemory;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.accessor.ReadAccessor;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.base.ValueType;
import org.drools.util.ClassUtils;
public class FactTemplateFieldExtractor
@@ -65,7 +66,7 @@ public ValueType getValueType() {
return this.factTemplate.getFieldTemplate( this.fieldName ).getValueType();
}
- public Object getValue(ReteEvaluator reteEvaluator,
+ public Object getValue(ValueResolver valueResolver,
final Object object) {
return ((Fact) object).get( this.fieldName );
}
@@ -82,42 +83,42 @@ public String getExtractToClassName() {
return ClassUtils.canonicalName( getExtractToClass() );
}
- public boolean getBooleanValue(ReteEvaluator reteEvaluator,
+ public boolean getBooleanValue(ValueResolver valueResolver,
final Object object) {
return ((Boolean) ((Fact) object).get( fieldName )).booleanValue();
}
- public byte getByteValue(ReteEvaluator reteEvaluator,
+ public byte getByteValue(ValueResolver valueResolver,
final Object object) {
return ((Number) ((Fact) object).get( fieldName )).byteValue();
}
- public char getCharValue(ReteEvaluator reteEvaluator,
+ public char getCharValue(ValueResolver valueResolver,
final Object object) {
return ((Character) ((Fact) object).get( fieldName )).charValue();
}
- public double getDoubleValue(ReteEvaluator reteEvaluator,
+ public double getDoubleValue(ValueResolver valueResolver,
final Object object) {
return ((Number) ((Fact) object).get( fieldName )).doubleValue();
}
- public float getFloatValue(ReteEvaluator reteEvaluator,
+ public float getFloatValue(ValueResolver valueResolver,
final Object object) {
return ((Number) ((Fact) object).get( fieldName )).floatValue();
}
- public int getIntValue(ReteEvaluator reteEvaluator,
+ public int getIntValue(ValueResolver valueResolver,
final Object object) {
return ((Number) ((Fact) object).get( fieldName )).intValue();
}
- public long getLongValue(ReteEvaluator reteEvaluator,
+ public long getLongValue(ValueResolver valueResolver,
final Object object) {
return ((Number) ((Fact) object).get( fieldName )).longValue();
}
- public short getShortValue(ReteEvaluator reteEvaluator,
+ public short getShortValue(ValueResolver valueResolver,
final Object object) {
return ((Number) ((Fact) object).get( fieldName )).shortValue();
}
@@ -125,7 +126,7 @@ public short getShortValue(ReteEvaluator reteEvaluator,
public Method getNativeReadMethod() {
try {
return this.getClass().getDeclaredMethod("getValue",
- InternalWorkingMemory.class, Object.class);
+ ValueResolver.class, Object.class);
} catch ( final Exception e ) {
throw new RuntimeException( "This is a bug. Please report to development team: " + e.getMessage(),
e );
@@ -136,8 +137,8 @@ public String getNativeReadMethodName() {
return "getValue";
}
- public int getHashCode(ReteEvaluator reteEvaluator, Object object) {
- return getValue( reteEvaluator, object ).hashCode();
+ public int getHashCode(ValueResolver valueResolver, Object object) {
+ return getValue( valueResolver, object ).hashCode();
}
public boolean isGlobal() {
@@ -148,7 +149,7 @@ public boolean isSelfReference() {
return false;
}
- public boolean isNullValue(ReteEvaluator reteEvaluator, Object object) {
+ public boolean isNullValue(ValueResolver valueResolver, Object object) {
return ((Fact) object).get( this.fieldName ) == null;
}
diff --git a/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateImpl.java b/drools-base/src/main/java/org/drools/base/facttemplates/FactTemplateImpl.java
similarity index 78%
rename from drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateImpl.java
rename to drools-base/src/main/java/org/drools/base/facttemplates/FactTemplateImpl.java
index 31054bb943c..9172fd90987 100644
--- a/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateImpl.java
+++ b/drools-base/src/main/java/org/drools/base/facttemplates/FactTemplateImpl.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.facttemplates;
+package org.drools.base.facttemplates;
import java.io.IOException;
import java.io.ObjectInput;
@@ -25,7 +27,7 @@
import java.util.SortedMap;
import java.util.TreeMap;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
public class FactTemplateImpl implements FactTemplate {
diff --git a/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateObjectType.java b/drools-base/src/main/java/org/drools/base/facttemplates/FactTemplateObjectType.java
similarity index 81%
rename from drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateObjectType.java
rename to drools-base/src/main/java/org/drools/base/facttemplates/FactTemplateObjectType.java
index 6a1355d68b3..3c8c94453e2 100644
--- a/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateObjectType.java
+++ b/drools-base/src/main/java/org/drools/base/facttemplates/FactTemplateObjectType.java
@@ -1,35 +1,35 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.facttemplates;
+package org.drools.base.facttemplates;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Collection;
-import org.drools.core.base.ValueType;
-import org.drools.core.base.ObjectType;
+import org.drools.base.base.ValueType;
+import org.drools.base.base.ObjectType;
public class FactTemplateObjectType
implements
ObjectType {
- // ------------------------------------------------------------
- // Instance members
- // ------------------------------------------------------------
+
private static final long serialVersionUID = 510l;
diff --git a/drools-base/src/main/java/org/drools/base/facttemplates/FieldTemplate.java b/drools-base/src/main/java/org/drools/base/facttemplates/FieldTemplate.java
new file mode 100644
index 00000000000..fd77a04de15
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/facttemplates/FieldTemplate.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.facttemplates;
+
+import org.drools.base.base.ValueType;
+
+public interface FieldTemplate {
+
+ String getName();
+
+ ValueType getValueType();
+
+}
diff --git a/drools-core/src/main/java/org/drools/core/facttemplates/FieldTemplateImpl.java b/drools-base/src/main/java/org/drools/base/facttemplates/FieldTemplateImpl.java
similarity index 66%
rename from drools-core/src/main/java/org/drools/core/facttemplates/FieldTemplateImpl.java
rename to drools-base/src/main/java/org/drools/base/facttemplates/FieldTemplateImpl.java
index e987e509d10..9a2e63b84d1 100644
--- a/drools-core/src/main/java/org/drools/core/facttemplates/FieldTemplateImpl.java
+++ b/drools-base/src/main/java/org/drools/base/facttemplates/FieldTemplateImpl.java
@@ -1,27 +1,29 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.facttemplates;
+package org.drools.base.facttemplates;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import org.drools.core.base.ValueType;
+import org.drools.base.base.ValueType;
public class FieldTemplateImpl implements FieldTemplate, Externalizable {
diff --git a/drools-base/src/main/java/org/drools/base/phreak/Reactive.java b/drools-base/src/main/java/org/drools/base/phreak/Reactive.java
new file mode 100644
index 00000000000..244c2c86727
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/phreak/Reactive.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.phreak;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(value = RetentionPolicy.RUNTIME)
+@Target(value = ElementType.TYPE)
+public @interface Reactive {
+}
diff --git a/drools-base/src/main/java/org/drools/base/phreak/ReactiveObject.java b/drools-base/src/main/java/org/drools/base/phreak/ReactiveObject.java
new file mode 100644
index 00000000000..3b30d2fb64c
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/phreak/ReactiveObject.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.phreak;
+
+import org.drools.base.reteoo.BaseTuple;
+
+import java.util.Collection;
+
+public interface ReactiveObject {
+ void addTuple(BaseTuple tuple);
+ void removeTuple(BaseTuple tuple);
+ Collection getTuples();
+}
diff --git a/drools-base/src/main/java/org/drools/base/reteoo/AccumulateContextEntry.java b/drools-base/src/main/java/org/drools/base/reteoo/AccumulateContextEntry.java
new file mode 100644
index 00000000000..7739c62718b
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/reteoo/AccumulateContextEntry.java
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.reteoo;
+
+import org.kie.api.runtime.rule.FactHandle;
+
+public class AccumulateContextEntry {
+ private Object key;
+ private FactHandle resultFactHandle;
+ private BaseTuple resultLeftTuple;
+ private boolean propagated;
+ private Object functionContext;
+ private boolean toPropagate;
+ private boolean empty = true;
+
+ public AccumulateContextEntry(Object key) {
+ this.key = key;
+ }
+
+ public FactHandle getResultFactHandle() {
+ return resultFactHandle;
+ }
+
+ public void setResultFactHandle(FactHandle resultFactHandle) {
+ this.resultFactHandle = resultFactHandle;
+ }
+
+ public BaseTuple getResultLeftTuple() {
+ return resultLeftTuple;
+ }
+
+ public void setResultLeftTuple(BaseTuple resultLeftTuple) {
+ this.resultLeftTuple = resultLeftTuple;
+ }
+
+ public boolean isPropagated() {
+ return propagated;
+ }
+
+ public void setPropagated(boolean propagated) {
+ this.propagated = propagated;
+ }
+
+ public boolean isToPropagate() {
+ return toPropagate;
+ }
+
+ public void setToPropagate(boolean toPropagate) {
+ this.toPropagate = toPropagate;
+ }
+
+ public Object getFunctionContext() {
+ return functionContext;
+ }
+
+ public void setFunctionContext(Object context) {
+ this.functionContext = context;
+ }
+
+ public Object getKey() {
+ return this.key;
+ }
+
+ public boolean isEmpty() {
+ return empty;
+ }
+
+ public void setEmpty(boolean empty) {
+ this.empty = empty;
+ }
+}
diff --git a/drools-base/src/main/java/org/drools/base/reteoo/BaseTerminalNode.java b/drools-base/src/main/java/org/drools/base/reteoo/BaseTerminalNode.java
new file mode 100644
index 00000000000..66f2b6b4d7b
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/reteoo/BaseTerminalNode.java
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.reteoo;
+
+import org.drools.base.common.NetworkNode;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.GroupElement;
+import org.drools.util.bitmask.BitMask;
+
+public interface BaseTerminalNode extends NetworkNode {
+ Declaration[] getAllDeclarations();
+
+ Declaration[] getRequiredDeclarations();
+
+ Declaration[] getSalienceDeclarations();
+
+ void initInferredMask();
+
+ BitMask getDeclaredMask();
+
+ void setDeclaredMask(BitMask mask);
+
+ BitMask getInferredMask();
+
+ void setInferredMask(BitMask mask);
+
+ BitMask getNegativeMask();
+
+ void setNegativeMask(BitMask mask);
+
+ RuleImpl getRule();
+
+ GroupElement getSubRule();
+
+ boolean isFireDirect();
+
+ int getSubruleIndex();
+}
diff --git a/drools-base/src/main/java/org/drools/base/reteoo/BaseTuple.java b/drools-base/src/main/java/org/drools/base/reteoo/BaseTuple.java
new file mode 100644
index 00000000000..9a26e4931a5
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/reteoo/BaseTuple.java
@@ -0,0 +1,81 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.reteoo;
+
+import org.drools.base.rule.Declaration;
+import org.kie.api.runtime.rule.FactHandle;
+
+public interface BaseTuple {
+ /**
+ * Returns the FactHandle for the given Declaration, which in turn
+ * specifcy the Pattern that they depend on.
+ *
+ * @param declaration
+ * The Declaration which specifies the Pattern
+ * @return
+ * The FactHandle
+ */
+ FactHandle get(Declaration declaration);
+
+ /**
+ * Returns the FactHandle for the given pattern index. If the pattern is empty
+ * It returns null.
+ *
+ * @param pattern
+ * The index of the pattern from which the FactHandleImpl is to be returned
+ * @return
+ * The FactHandle
+ */
+ FactHandle get(int pattern);
+
+ FactHandle getFactHandle();
+
+ Object getObject(int pattern);
+
+ Object getObject(Declaration declaration);
+
+ /**
+ * Returns the size of this tuple in number of elements (patterns)
+ */
+ int size();
+
+ Object[] toObjects();
+
+ Object[] toObjects(boolean reverse);
+
+ /**
+ * Returns the fact handles in reverse order
+ */
+ FactHandle[] toFactHandles();
+
+ BaseTuple getParent();
+
+ /**
+ * Returns the tuple at the given index
+ * @param index
+ * @return
+ */
+ BaseTuple getTuple(int index);
+
+ int getIndex();
+
+ Object getContextObject();
+
+ BaseTuple skipEmptyHandles();
+}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/InitialFactImpl.java b/drools-base/src/main/java/org/drools/base/reteoo/InitialFactImpl.java
similarity index 57%
rename from drools-core/src/main/java/org/drools/core/reteoo/InitialFactImpl.java
rename to drools-base/src/main/java/org/drools/base/reteoo/InitialFactImpl.java
index d298a916534..4da663da1a2 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/InitialFactImpl.java
+++ b/drools-base/src/main/java/org/drools/base/reteoo/InitialFactImpl.java
@@ -1,27 +1,29 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.reteoo;
+package org.drools.base.reteoo;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import org.drools.core.InitialFact;
+import org.drools.base.InitialFact;
/**
* We dont want users to be able to instantiate InitialFact so we expose it as
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/NodeTypeEnums.java b/drools-base/src/main/java/org/drools/base/reteoo/NodeTypeEnums.java
similarity index 79%
rename from drools-core/src/main/java/org/drools/core/reteoo/NodeTypeEnums.java
rename to drools-base/src/main/java/org/drools/base/reteoo/NodeTypeEnums.java
index a2d3090787a..df05b2fb781 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/NodeTypeEnums.java
+++ b/drools-base/src/main/java/org/drools/base/reteoo/NodeTypeEnums.java
@@ -1,22 +1,24 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
+package org.drools.base.reteoo;
-package org.drools.core.reteoo;
-
-import org.drools.core.common.NetworkNode;
+import org.drools.base.common.NetworkNode;
/**
*
@@ -90,7 +92,7 @@ public static boolean isBetaNode(NetworkNode node) {
}
public static boolean isBetaNodeWithRian(NetworkNode node) {
- return node.getType() > NodeTypeEnums.BetaNode && ((org.drools.core.reteoo.BetaNode)node).isRightInputIsRiaNode();
+ return node.getType() > NodeTypeEnums.BetaNode && node.isRightInputIsRiaNode();
}
public static boolean isTerminalNode(NetworkNode node) {
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/PropertySpecificUtil.java b/drools-base/src/main/java/org/drools/base/reteoo/PropertySpecificUtil.java
similarity index 73%
rename from drools-core/src/main/java/org/drools/core/reteoo/PropertySpecificUtil.java
rename to drools-base/src/main/java/org/drools/base/reteoo/PropertySpecificUtil.java
index 56ef9274f9b..f10e75f509c 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/PropertySpecificUtil.java
+++ b/drools-base/src/main/java/org/drools/base/reteoo/PropertySpecificUtil.java
@@ -1,47 +1,49 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.drools.core.reteoo;
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.reteoo;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.factmodel.traits.TraitConstants;
-import org.drools.core.facttemplates.FactTemplateObjectType;
-import org.drools.core.impl.RuleBase;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.TypeDeclaration;
-import org.drools.core.base.ObjectType;
-import org.drools.core.util.bitmask.AllSetBitMask;
-import org.drools.core.util.bitmask.AllSetButLastBitMask;
-import org.drools.core.util.bitmask.BitMask;
-import org.drools.core.util.bitmask.EmptyBitMask;
-import org.drools.core.util.bitmask.EmptyButLastBitMask;
+import org.drools.base.rule.TypeDeclaration;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.factmodel.traits.TraitConstants;
+import org.drools.base.facttemplates.FactTemplateObjectType;
+import org.drools.base.base.ObjectType;
+import org.drools.util.bitmask.AllSetBitMask;
+import org.drools.util.bitmask.AllSetButLastBitMask;
+import org.drools.util.bitmask.BitMask;
+import org.drools.util.bitmask.EmptyBitMask;
+import org.drools.util.bitmask.EmptyButLastBitMask;
+import org.drools.base.RuleBase;
public class PropertySpecificUtil {
public static final int TRAITABLE_BIT = 0;
public static final int CUSTOM_BITS_OFFSET = 1;
- public static boolean isPropertyReactive(BuildContext context, ObjectType objectType) {
+ public static boolean isPropertyReactive(RuleBase ruleBase, ObjectType objectType) {
if (objectType.isTemplate()) {
return !((FactTemplateObjectType) objectType).getFieldNames().isEmpty();
}
- TypeDeclaration typeDeclaration = context.getRuleBase().getTypeDeclaration(((ClassObjectType) objectType).getClassType() );
+ TypeDeclaration typeDeclaration = ruleBase.getTypeDeclaration(((ClassObjectType) objectType).getClassType() );
return typeDeclaration != null && typeDeclaration.isPropertyReactive();
}
@@ -125,7 +127,7 @@ public static boolean isPropertySetOnMask(BitMask mask, int index) {
return mask.isSet(index + CUSTOM_BITS_OFFSET);
}
- public static List getAccessibleProperties(RuleBase ruleBase, ObjectType objectType ) {
+ public static List getAccessibleProperties(RuleBase ruleBase, ObjectType objectType) {
return objectType.isTemplate() ?
new ArrayList<>(((FactTemplateObjectType) objectType).getFieldNames()) :
getAccessibleProperties(ruleBase, ((ClassObjectType) objectType).getClassType());
diff --git a/drools-base/src/main/java/org/drools/base/reteoo/SortDeclarations.java b/drools-base/src/main/java/org/drools/base/reteoo/SortDeclarations.java
new file mode 100644
index 00000000000..2df32bacdac
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/reteoo/SortDeclarations.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.reteoo;
+
+import org.drools.base.rule.Declaration;
+
+import java.util.Comparator;
+
+public class SortDeclarations
+ implements
+ Comparator {
+ public final static SortDeclarations instance = new SortDeclarations();
+
+ public int compare(Declaration d1,
+ Declaration d2) {
+ return (d1.getIdentifier().compareTo(d2.getIdentifier()));
+ }
+}
diff --git a/drools-core/src/main/java/org/drools/core/rule/Accumulate.java b/drools-base/src/main/java/org/drools/base/rule/Accumulate.java
similarity index 69%
rename from drools-core/src/main/java/org/drools/core/rule/Accumulate.java
rename to drools-base/src/main/java/org/drools/base/rule/Accumulate.java
index 6b1fd1aba8c..6bd1338c71d 100755
--- a/drools-core/src/main/java/org/drools/core/rule/Accumulate.java
+++ b/drools-base/src/main/java/org/drools/base/rule/Accumulate.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.rule;
+package org.drools.base.rule;
import java.io.IOException;
import java.io.ObjectInput;
@@ -25,16 +27,11 @@
import java.util.List;
import java.util.Map;
-import org.drools.core.common.InternalFactHandle;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.reteoo.AccumulateNode;
-import org.drools.core.reteoo.AccumulateNode.GroupByContext;
-import org.drools.core.reteoo.LeftTuple;
-import org.drools.core.reteoo.RightTuple;
-import org.drools.core.reteoo.RuleTerminalNode;
-import org.drools.core.rule.accessor.Accumulator;
-import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.index.TupleList;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.reteoo.BaseTuple;
+import org.drools.base.reteoo.SortDeclarations;
+import org.drools.base.rule.accessor.Accumulator;
+import org.kie.api.runtime.rule.FactHandle;
/**
* A class to represent the Accumulate CE
@@ -85,36 +82,35 @@ public void writeExternal(ObjectOutput out) throws IOException {
*/
public abstract Object init(final Object workingMemoryContext,
final Object accContext,
- Object funcContext, final Tuple leftTuple,
- final ReteEvaluator reteEvaluator);
+ Object funcContext, final BaseTuple leftTuple,
+ final ValueResolver valueResolver);
/**
* Executes the accumulate (action) code for the given fact handle
*/
public abstract Object accumulate(final Object workingMemoryContext,
final Object context,
- final Tuple match,
- final InternalFactHandle handle,
- final ReteEvaluator reteEvaluator);
+ final BaseTuple match,
+ final FactHandle handle,
+ final ValueResolver valueResolver);
/**
* Executes the reverse (action) code for the given fact handle
*/
public abstract boolean tryReverse(final Object workingMemoryContext,
final Object context,
- final Tuple leftTuple,
- final InternalFactHandle handle,
- final RightTuple rightParent,
- final LeftTuple match,
- final ReteEvaluator reteEvaluator);
+ final BaseTuple leftTuple,
+ final FactHandle handle,
+ final BaseTuple match,
+ final ValueResolver valueResolver);
/**
* Gets the result of the accumulation
*/
public abstract Object getResult(final Object workingMemoryContext,
final Object context,
- final Tuple leftTuple,
- final ReteEvaluator reteEvaluator);
+ final BaseTuple leftTuple,
+ final ValueResolver valueResolver);
/**
* Returns true if this accumulate supports reverse
@@ -181,7 +177,7 @@ protected Declaration[] getInnerDeclarationCache() {
private void initInnerDeclarationCache() {
Map innerDeclarations = this.source.getInnerDeclarations();
this.innerDeclarationCache = innerDeclarations.values().toArray( new Declaration[innerDeclarations.size()] );
- Arrays.sort( this.innerDeclarationCache, RuleTerminalNode.SortDeclarations.instance );
+ Arrays.sort(this.innerDeclarationCache, SortDeclarations.instance);
}
public Declaration[] getRequiredDeclarations() {
@@ -197,10 +193,13 @@ public boolean requiresLeftActivation() {
return true;
}
+
public boolean isGroupBy() {
return false;
}
- public abstract Object accumulate(Object workingMemoryContext, Tuple match, InternalFactHandle childHandle,
- GroupByContext groupByContext, TupleList tupleList, ReteEvaluator reteEvaluator);
+ public abstract Object accumulate(Object workingMemoryContext, BaseTuple match, FactHandle childHandle,
+ Object groupByContext,
+ Object tupleList,
+ ValueResolver valueResolver);
}
diff --git a/drools-base/src/main/java/org/drools/base/rule/Annotated.java b/drools-base/src/main/java/org/drools/base/rule/Annotated.java
new file mode 100644
index 00000000000..8975556a494
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/rule/Annotated.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.rule;
+
+import java.lang.annotation.Annotation;
+
+public interface Annotated {
+ boolean hasAnnotation( Class extends Annotation> annotationClass );
+ A getTypedAnnotation( Class annotationClass );
+
+ class ClassAdapter implements Annotated {
+
+ private final Class> cls;
+
+ public ClassAdapter( Class> cls ) {
+ this.cls = cls;
+ }
+
+ @Override
+ public boolean hasAnnotation( Class extends Annotation> annotationClass ) {
+ return cls.isAnnotationPresent(annotationClass);
+ }
+
+ @Override
+ public A getTypedAnnotation( Class annotationClass ) {
+ return cls.getAnnotation(annotationClass);
+ }
+ }
+}
diff --git a/drools-core/src/main/java/org/drools/core/rule/AsyncReceive.java b/drools-base/src/main/java/org/drools/base/rule/AsyncReceive.java
similarity index 70%
rename from drools-core/src/main/java/org/drools/core/rule/AsyncReceive.java
rename to drools-base/src/main/java/org/drools/base/rule/AsyncReceive.java
index 2320c59988f..1813cf41f8a 100644
--- a/drools-core/src/main/java/org/drools/core/rule/AsyncReceive.java
+++ b/drools-base/src/main/java/org/drools/base/rule/AsyncReceive.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.rule;
+package org.drools.base.rule;
import java.io.IOException;
import java.io.ObjectInput;
@@ -23,7 +25,7 @@
import java.util.List;
import java.util.Map;
-import org.drools.core.base.ClassObjectType;
+import org.drools.base.base.ClassObjectType;
public class AsyncReceive extends ConditionalElement implements PatternSource {
@@ -93,6 +95,6 @@ public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundExce
}
public Class> getResultClass() {
- return ((ClassObjectType )resultPattern.getObjectType()).getClassType();
+ return ((ClassObjectType)resultPattern.getObjectType()).getClassType();
}
}
diff --git a/drools-core/src/main/java/org/drools/core/rule/AsyncSend.java b/drools-base/src/main/java/org/drools/base/rule/AsyncSend.java
similarity index 71%
rename from drools-core/src/main/java/org/drools/core/rule/AsyncSend.java
rename to drools-base/src/main/java/org/drools/base/rule/AsyncSend.java
index 30a10196bb7..0cd9f50e3b1 100644
--- a/drools-core/src/main/java/org/drools/core/rule/AsyncSend.java
+++ b/drools-base/src/main/java/org/drools/base/rule/AsyncSend.java
@@ -1,20 +1,22 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
-package org.drools.core.rule;
+package org.drools.base.rule;
import java.io.IOException;
import java.io.ObjectInput;
@@ -23,8 +25,8 @@
import java.util.List;
import java.util.Map;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.rule.accessor.DataProvider;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.rule.accessor.DataProvider;
public class AsyncSend extends ConditionalElement implements PatternSource {
@@ -103,6 +105,6 @@ public Pattern getResultPattern() {
}
public Class> getResultClass() {
- return ((ClassObjectType )resultPattern.getObjectType()).getClassType();
+ return ((ClassObjectType)resultPattern.getObjectType()).getClassType();
}
}
diff --git a/drools-base/src/main/java/org/drools/base/rule/Behavior.java b/drools-base/src/main/java/org/drools/base/rule/Behavior.java
new file mode 100644
index 00000000000..21833edb4d4
--- /dev/null
+++ b/drools-base/src/main/java/org/drools/base/rule/Behavior.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.base.rule;
+
+public interface Behavior extends RuleComponent, Cloneable {
+
+ /**
+ * Returns the type of the behavior
+ */
+ Behavior.BehaviorType getType();
+
+ long getExpirationOffset();
+
+ enum BehaviorType {
+ TIME_WINDOW( "time" ),
+ LENGTH_WINDOW( "length" );
+
+ private final String id;
+
+ BehaviorType( String id ) {
+ this.id = id;
+ }
+
+ public boolean matches( String id ) {
+ return this.id.equalsIgnoreCase( id );
+ }
+ }
+}
\ No newline at end of file
diff --git a/drools-core/src/main/java/org/drools/core/rule/Collect.java b/drools-base/src/main/java/org/drools/base/rule/Collect.java
similarity index 80%
rename from drools-core/src/main/java/org/drools/core/rule/Collect.java
rename to drools-base/src/main/java/org/drools/base/rule/Collect.java
index 5fdf1cd476d..6e665063191 100755
--- a/drools-core/src/main/java/org/drools/core/rule/Collect.java
+++ b/drools-base/src/main/java/org/drools/base/rule/Collect.java
@@ -1,23 +1,25 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
+package org.drools.base.rule;
-package org.drools.core.rule;
-
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.common.ReteEvaluator;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.base.ClassObjectType;
import java.io.IOException;
import java.io.ObjectInput;
@@ -31,7 +33,9 @@
import java.util.Objects;
import java.util.Set;
-public class Collect extends ConditionalElement implements PatternSource {
+public class Collect extends ConditionalElement
+ implements
+ PatternSource {
private static final long serialVersionUID = 510l;
@@ -83,14 +87,14 @@ public Pattern getSourcePattern() {
}
@SuppressWarnings("unchecked")
- public Collection
+
+ org.drools
+ drools-base
+ org.droolsdrools-core
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/AbstractAssemblerService.java b/drools-compiler/src/main/java/org/drools/compiler/builder/AbstractAssemblerService.java
index 34bf51ddb16..f30888cbf2d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/AbstractAssemblerService.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/AbstractAssemblerService.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2018 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Unless required by applicable law or agreed to in writing, software
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder;
import java.util.Collection;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/AbstractResourceProcessor.java b/drools-compiler/src/main/java/org/drools/compiler/builder/AbstractResourceProcessor.java
index aefbfbf759d..009438aa3e1 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/AbstractResourceProcessor.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/AbstractResourceProcessor.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2018 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Unless required by applicable law or agreed to in writing, software
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/DroolsAssemblerContext.java b/drools-compiler/src/main/java/org/drools/compiler/builder/DroolsAssemblerContext.java
index 355bd0541df..5d128f9ea91 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/DroolsAssemblerContext.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/DroolsAssemblerContext.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2018 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Unless required by applicable law or agreed to in writing, software
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder;
import java.lang.reflect.Type;
@@ -27,8 +28,8 @@
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.rule.builder.PackageBuildContext;
import org.drools.compiler.rule.builder.RuleBuildContext;
-import org.drools.core.base.ObjectType;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.ast.descr.PackageDescr;
import org.kie.internal.builder.KnowledgeBuilderErrors;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/InternalKnowledgeBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/builder/InternalKnowledgeBuilder.java
index d261bf4455b..ede2753a3bc 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/InternalKnowledgeBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/InternalKnowledgeBuilder.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder;
import java.lang.reflect.Type;
@@ -28,9 +32,9 @@
import org.drools.compiler.compiler.PackageBuilderErrors;
import org.drools.compiler.compiler.PackageBuilderResults;
import org.drools.compiler.compiler.PackageRegistry;
-import org.drools.core.base.ObjectType;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.base.ObjectType;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.kie.api.KieBase;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/PackageRegistryManager.java b/drools-compiler/src/main/java/org/drools/compiler/builder/PackageRegistryManager.java
index 603fc3018f4..b1cdfe0b17d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/PackageRegistryManager.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/PackageRegistryManager.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder;
import org.drools.compiler.compiler.PackageRegistry;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/ResourceProcessor.java b/drools-compiler/src/main/java/org/drools/compiler/builder/ResourceProcessor.java
index 5afd5d5b0e7..d951fc08d63 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/ResourceProcessor.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/ResourceProcessor.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2018 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Unless required by applicable law or agreed to in writing, software
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder;
import java.util.Collection;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/conf/DecisionTableConfigurationImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/conf/DecisionTableConfigurationImpl.java
index f68ce81048d..2404648188d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/conf/DecisionTableConfigurationImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/conf/DecisionTableConfigurationImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.conf;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/conf/JaxbConfigurationImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/conf/JaxbConfigurationImpl.java
index 52b0b6c416a..16800f1bddd 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/conf/JaxbConfigurationImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/conf/JaxbConfigurationImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.conf;
import java.io.ByteArrayInputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/AssetFilter.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/AssetFilter.java
index e3f32578b45..80155d82e50 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/AssetFilter.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/AssetFilter.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import org.kie.internal.builder.ResourceChange;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuildResultCollector.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuildResultCollector.java
index 8208c73e6a5..f3ea9df9198 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuildResultCollector.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuildResultCollector.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import org.kie.internal.builder.KnowledgeBuilderResult;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuildResultCollectorImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuildResultCollectorImpl.java
index 47e850550ea..d408eff0e38 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuildResultCollectorImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuildResultCollectorImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import org.drools.compiler.compiler.ConfigurableSeverityResult;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuilderConfigurationProvider.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuilderConfigurationProvider.java
index 2a31de416d6..43611db1d92 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuilderConfigurationProvider.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/BuilderConfigurationProvider.java
@@ -1,16 +1,20 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.builder.impl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassDefinitionFactory.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassDefinitionFactory.java
index 5b4f55f41fa..8f2b7d62a56 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassDefinitionFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassDefinitionFactory.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import java.io.Externalizable;
@@ -42,19 +45,19 @@
import org.drools.drl.ast.descr.TypeFieldDescr;
import org.drools.compiler.rule.builder.util.AnnotationFactory;
import org.drools.util.TypeResolver;
-import org.drools.core.base.ClassFieldInspector;
-import org.drools.core.base.CoreComponentsBuilder;
-import org.drools.core.factmodel.AnnotationDefinition;
-import org.drools.core.factmodel.ClassDefinition;
+import org.drools.base.base.ClassFieldInspector;
+import org.drools.base.base.CoreComponentsBuilder;
+import org.drools.base.factmodel.AnnotationDefinition;
+import org.drools.base.factmodel.ClassDefinition;
import org.drools.compiler.builder.impl.classbuilder.EnumClassDefinition;
import org.drools.compiler.builder.impl.classbuilder.EnumLiteralDefinition;
-import org.drools.core.factmodel.FieldDefinition;
+import org.drools.base.factmodel.FieldDefinition;
import org.kie.internal.definition.GenericTypeDefinition;
-import org.drools.core.factmodel.traits.Thing;
-import org.drools.core.factmodel.traits.Trait;
-import org.drools.core.factmodel.traits.Traitable;
-import org.drools.core.factmodel.traits.TraitableBean;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.factmodel.traits.Thing;
+import org.drools.base.factmodel.traits.Trait;
+import org.drools.base.factmodel.traits.Traitable;
+import org.drools.base.factmodel.traits.TraitableBean;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.util.ClassUtils;
import org.kie.api.definition.type.Key;
import org.kie.api.definition.type.Position;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassHierarchyManager.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassHierarchyManager.java
index 5d9219cc1b9..f3e8ecba24d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassHierarchyManager.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassHierarchyManager.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import java.io.IOException;
@@ -27,13 +30,13 @@
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.compiler.TypeDeclarationError;
import org.drools.util.TypeResolver;
-import org.drools.core.base.ClassFieldInspector;
-import org.drools.core.base.CoreComponentsBuilder;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.factmodel.ClassDefinition;
-import org.drools.core.factmodel.FieldDefinition;
-import org.drools.core.factmodel.traits.Alias;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.base.ClassFieldInspector;
+import org.drools.base.base.CoreComponentsBuilder;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.factmodel.ClassDefinition;
+import org.drools.base.factmodel.FieldDefinition;
+import org.drools.base.factmodel.traits.Alias;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.ast.descr.AbstractClassTypeDeclarationDescr;
import org.drools.drl.ast.descr.AnnotationDescr;
import org.drools.drl.ast.descr.PatternDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/CompositeBuilderConfiguration.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/CompositeBuilderConfiguration.java
index f16ec25f7a7..bd554eb712e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/CompositeBuilderConfiguration.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/CompositeBuilderConfiguration.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/CompositeKnowledgeBuilderImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/CompositeKnowledgeBuilderImpl.java
index 54c03321dfa..1d0f2bbacb2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/CompositeKnowledgeBuilderImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/CompositeKnowledgeBuilderImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import org.drools.compiler.lang.descr.CompositePackageDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DeclaredClassBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DeclaredClassBuilder.java
index e811872242a..602b09e9cf7 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DeclaredClassBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DeclaredClassBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import org.drools.compiler.compiler.PackageRegistry;
@@ -20,9 +23,9 @@
import org.drools.drl.ast.descr.AbstractClassTypeDeclarationDescr;
import org.drools.drl.ast.descr.TypeDeclarationDescr;
import org.drools.compiler.builder.impl.classbuilder.ClassBuilder;
-import org.drools.core.factmodel.ClassDefinition;
+import org.drools.base.factmodel.ClassDefinition;
import org.drools.core.rule.JavaDialectRuntimeData;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.wiring.api.classloader.ProjectClassLoader;
import org.drools.util.TypeResolver;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DefaultTypeDeclarationBuilderFactory.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DefaultTypeDeclarationBuilderFactory.java
index 8a0caf27605..23c065d8cca 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DefaultTypeDeclarationBuilderFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DefaultTypeDeclarationBuilderFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
public class DefaultTypeDeclarationBuilderFactory implements TypeDeclarationBuilderFactory {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DroolsAssemblerContextImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DroolsAssemblerContextImpl.java
index 601c68cbf5e..01a0a48486f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DroolsAssemblerContextImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/DroolsAssemblerContextImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import java.lang.reflect.Type;
@@ -21,10 +24,10 @@
import org.drools.compiler.builder.DroolsAssemblerContext;
import org.drools.compiler.compiler.PackageRegistry;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.base.ObjectType;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.base.ObjectType;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.kie.internal.builder.KnowledgeBuilderErrors;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/EvaluatorRegistry.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/EvaluatorRegistry.java
index 964edef2178..4cf8588d8a4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/EvaluatorRegistry.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/EvaluatorRegistry.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import java.io.Externalizable;
@@ -26,9 +28,9 @@
import org.drools.compiler.rule.builder.ConstraintBuilder;
import org.drools.compiler.rule.builder.EvaluatorDefinition;
-import org.drools.core.base.ValueType;
-import org.drools.core.common.DroolsObjectInput;
-import org.drools.core.rule.accessor.Evaluator;
+import org.drools.base.base.ValueType;
+import org.drools.base.common.DroolsObjectInput;
+import org.drools.base.rule.accessor.Evaluator;
import org.drools.drl.parser.impl.Operator;
/**
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/GlobalVariableContext.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/GlobalVariableContext.java
index 3767f5f2dba..e015351bf9b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/GlobalVariableContext.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/GlobalVariableContext.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import java.lang.reflect.Type;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/GlobalVariableContextImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/GlobalVariableContextImpl.java
index 0c31fac5574..9fa46f9ec46 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/GlobalVariableContextImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/GlobalVariableContextImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import java.lang.reflect.Type;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/HierarchySorter.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/HierarchySorter.java
index 2848fba9ff8..0022f30a520 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/HierarchySorter.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/HierarchySorter.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import java.util.*;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/InternalKnowledgeBaseProvider.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/InternalKnowledgeBaseProvider.java
index 5ac79881be6..213e6f75fe3 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/InternalKnowledgeBaseProvider.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/InternalKnowledgeBaseProvider.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/JaxbConfigurationFactoryServiceImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/JaxbConfigurationFactoryServiceImpl.java
index b9c6717a747..a2ec67f2da0 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/JaxbConfigurationFactoryServiceImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/JaxbConfigurationFactoryServiceImpl.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import com.sun.tools.xjc.Options;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderConfigurationFactories.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderConfigurationFactories.java
index 51f381638bd..51e281ebe04 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderConfigurationFactories.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderConfigurationFactories.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import org.kie.api.conf.OptionsConfiguration;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderConfigurationImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderConfigurationImpl.java
index 6c7391e42fa..c21cc85b10e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderConfigurationImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderConfigurationImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import java.io.File;
@@ -28,7 +30,7 @@
import org.drools.compiler.kie.builder.impl.InternalKieModule.CompilationCache;
import org.drools.compiler.rule.builder.ConstraintBuilder;
import org.drools.core.BaseConfiguration;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.kie.api.conf.ConfigurationKey;
import org.kie.api.conf.OptionKey;
import org.kie.internal.builder.KnowledgeBuilderConfiguration;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderFactoryServiceImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderFactoryServiceImpl.java
index 22fd450375c..90593b2f2ae 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderFactoryServiceImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderFactoryServiceImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import java.util.Properties;
@@ -95,7 +98,7 @@ public KnowledgeBuilder newKnowledgeBuilder(KieBase kbase) {
public KnowledgeBuilder newKnowledgeBuilder(KieBase kbase,
KnowledgeBuilderConfiguration conf) {
if ( kbase != null ) {
- return new KnowledgeBuilderImpl( (InternalKnowledgeBase)kbase, conf );
+ return new KnowledgeBuilderImpl((InternalKnowledgeBase)kbase, conf );
} else {
return new KnowledgeBuilderImpl(conf );
}
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderFlowConfigurationImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderFlowConfigurationImpl.java
index 0f734de4cf8..1266f6da273 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderFlowConfigurationImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderFlowConfigurationImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import java.util.Set;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderImpl.java
index 812ec3cefe6..2820f541925 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import static java.util.Arrays.asList;
@@ -43,7 +46,6 @@
import org.drools.compiler.builder.impl.processors.ReteCompiler;
import org.drools.compiler.builder.impl.processors.RuleCompilationPhase;
import org.drools.compiler.builder.impl.processors.RuleValidator;
-import org.drools.compiler.builder.impl.resources.DecisionTableResourceHandler;
import org.drools.compiler.builder.impl.resources.ResourceHandler;
import org.drools.compiler.compiler.DroolsWarning;
import org.drools.compiler.compiler.DuplicateFunction;
@@ -54,14 +56,14 @@
import org.drools.compiler.compiler.ResourceTypeDeclarationWarning;
import org.drools.compiler.kie.builder.impl.BuildContext;
import org.drools.compiler.lang.descr.CompositePackageDescr;
-import org.drools.core.base.ObjectType;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.impl.RuleBase;
+import org.drools.base.base.ObjectType;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.impl.RuleBaseFactory;
-import org.drools.core.rule.Function;
-import org.drools.core.rule.ImportDeclaration;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.rule.Function;
+import org.drools.base.rule.ImportDeclaration;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.ast.descr.AttributeDescr;
import org.drools.drl.ast.descr.ImportDescr;
import org.drools.drl.ast.descr.PackageDescr;
@@ -946,7 +948,7 @@ public KieBase newKnowledgeBase(KieBaseConfiguration conf) {
}
throw new IllegalArgumentException("Could not parse knowledge. See the logs for details.");
}
- RuleBase kbase = RuleBaseFactory.newRuleBase(conf);
+ InternalRuleBase kbase = RuleBaseFactory.newRuleBase(conf);
kbase.addPackages(asList(getPackages()));
return KnowledgeBaseFactory.newKnowledgeBase(kbase);
}
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderRulesConfigurationImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderRulesConfigurationImpl.java
index 511d38bc1d0..0c8a95b904b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderRulesConfigurationImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderRulesConfigurationImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import java.util.Collection;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeTypeManager.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeTypeManager.java
index 58e5b7e34d6..af4bd4f6075 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeTypeManager.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeTypeManager.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
public class KnowledgeTypeManager {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageAttributeManagerImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageAttributeManagerImpl.java
index e4b28916648..ae15602e9ce 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageAttributeManagerImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageAttributeManagerImpl.java
@@ -1,16 +1,20 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.builder.impl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageDescrBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageDescrBuilder.java
index 0f81b088bb6..aebdd80511e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageDescrBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageDescrBuilder.java
@@ -1,17 +1,20 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.builder.impl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageDescrManager.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageDescrManager.java
index 9c7d243caf1..568ccfafa5a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageDescrManager.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageDescrManager.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import org.drools.drl.ast.descr.PackageDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageRegistryCompiler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageRegistryCompiler.java
index e8b6e91c7dc..ea660b17d47 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageRegistryCompiler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageRegistryCompiler.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import org.kie.internal.builder.KnowledgeBuilderResult;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageRegistryManagerImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageRegistryManagerImpl.java
index 17e5cd1afcc..d5044c8ca4a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageRegistryManagerImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/PackageRegistryManagerImpl.java
@@ -1,23 +1,27 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.builder.impl;
import org.drools.compiler.builder.PackageRegistryManager;
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.core.base.ClassFieldAccessorCache;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.drools.core.reteoo.CoreComponentFactory;
import org.drools.drl.ast.descr.AttributeDescr;
import org.drools.drl.ast.descr.ImportDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ResourceBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ResourceBuilder.java
index 9a48b4bfc79..8e9a36f01f6 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ResourceBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ResourceBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import org.kie.api.io.Resource;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ResourceHandlerManager.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ResourceHandlerManager.java
index b67972fc469..7b7d62aecd6 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ResourceHandlerManager.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ResourceHandlerManager.java
@@ -1,17 +1,20 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.builder.impl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/RootClassLoaderProvider.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/RootClassLoaderProvider.java
index 62f768d545d..7ae6923c71d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/RootClassLoaderProvider.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/RootClassLoaderProvider.java
@@ -1,16 +1,20 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.builder.impl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationBuilder.java
index 68ffdeb50e9..e740f1ed7f6 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import java.util.Collection;
@@ -24,11 +27,11 @@
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.compiler.TypeDeclarationError;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.drools.compiler.builder.impl.classbuilder.ClassBuilder;
import org.drools.compiler.builder.impl.classbuilder.ClassBuilderFactory;
-import org.drools.core.factmodel.ClassDefinition;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.factmodel.ClassDefinition;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.ast.descr.AbstractClassTypeDeclarationDescr;
import org.drools.drl.ast.descr.AnnotationDescr;
import org.drools.drl.ast.descr.EnumDeclarationDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationBuilderFactory.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationBuilderFactory.java
index 6368855593c..7fde1a401c9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationBuilderFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationBuilderFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import org.kie.api.internal.utils.KieService;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationCache.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationCache.java
index efbb3daba19..352c4174ff2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationCache.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationCache.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import java.lang.reflect.Field;
@@ -27,13 +30,12 @@
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.compiler.TypeDeclarationError;
-import org.drools.core.RuleBaseConfiguration;
import org.drools.drl.ast.descr.PackageDescr;
-import org.drools.core.factmodel.ClassDefinition;
-import org.drools.core.factmodel.FieldDefinition;
-import org.drools.core.factmodel.traits.Thing;
-import org.drools.core.rule.Annotated;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.factmodel.ClassDefinition;
+import org.drools.base.factmodel.FieldDefinition;
+import org.drools.base.factmodel.traits.Thing;
+import org.drools.base.rule.Annotated;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.util.ClassUtils;
import org.kie.api.definition.type.Position;
import org.kie.api.io.Resource;
@@ -42,8 +44,8 @@
import static org.drools.compiler.builder.impl.ClassDefinitionFactory.createClassDefinition;
import static org.drools.compiler.builder.impl.TypeDeclarationConfigurator.processMvelBasedAccessors;
-import static org.drools.util.BitMaskUtil.isSet;
-import static org.drools.core.util.Drools.hasMvel;
+import static org.drools.util.bitmask.BitMaskUtil.isSet;
+import static org.drools.base.util.Drools.hasMvel;
public class TypeDeclarationCache {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationConfigurator.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationConfigurator.java
index 0ac8233590d..37f6eee0af5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationConfigurator.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationConfigurator.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import java.util.Map;
@@ -23,9 +26,9 @@
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.compiler.TypeDeclarationError;
import org.drools.compiler.rule.builder.PackageBuildContext;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.rule.Annotated;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.rule.Annotated;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.ast.descr.AbstractClassTypeDeclarationDescr;
import org.drools.drl.ast.descr.BaseDescr;
import org.kie.api.definition.type.Duration;
@@ -34,7 +37,7 @@
import org.kie.internal.builder.conf.PropertySpecificOption;
import static org.drools.compiler.rule.builder.util.AnnotationFactory.toAnnotated;
-import static org.drools.core.rule.TypeDeclaration.processTypeAnnotations;
+import static org.drools.base.rule.TypeDeclaration.processTypeAnnotations;
public class TypeDeclarationConfigurator {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationContext.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationContext.java
index 97e494e6656..9f27e95f81a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationContext.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationContext.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
import org.drools.compiler.builder.PackageRegistryManager;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationContextImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationContextImpl.java
index 43900555be7..cc16536f333 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationContextImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationContextImpl.java
@@ -1,16 +1,20 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.builder.impl;
@@ -21,8 +25,8 @@
import org.drools.compiler.builder.PackageRegistryManager;
import org.drools.compiler.compiler.PackageRegistry;
-import org.drools.core.base.ObjectType;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.kie.internal.builder.ResourceChange;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationFactory.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationFactory.java
index e52a48cbd8f..7ec15766230 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationFactory.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import java.io.IOException;
@@ -28,11 +31,11 @@
import org.drools.drl.ast.descr.EnumDeclarationDescr;
import org.drools.drl.ast.descr.TypeDeclarationDescr;
import org.drools.drl.ast.descr.TypeFieldDescr;
-import org.drools.core.base.ClassFieldInspector;
-import org.drools.core.base.CoreComponentsBuilder;
-import org.drools.core.factmodel.FieldDefinition;
-import org.drools.core.factmodel.GeneratedFact;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.base.ClassFieldInspector;
+import org.drools.base.base.CoreComponentsBuilder;
+import org.drools.base.factmodel.FieldDefinition;
+import org.drools.base.factmodel.GeneratedFact;
+import org.drools.base.rule.TypeDeclaration;
import org.kie.api.definition.type.FactField;
import org.kie.api.definition.type.PropertyChangeSupport;
import org.kie.api.definition.type.Role;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationManager.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationManager.java
index 07141864304..6f5b0c45021 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationManager.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationManager.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
-import org.drools.core.base.ObjectType;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.TypeDeclaration;
/**
* Public interface to a {@link TypeDeclarationBuilder}
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationManagerImpl.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationManagerImpl.java
index d34dc8480e4..2c847740b81 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationManagerImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationManagerImpl.java
@@ -1,24 +1,27 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.base.ObjectType;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.base.ObjectType;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
/**
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationNameResolver.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationNameResolver.java
index 3e0d9ac7237..b4a917f3d0e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationNameResolver.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationNameResolver.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import java.util.Collection;
@@ -22,7 +25,7 @@
import org.drools.compiler.compiler.TypeDeclarationError;
import org.drools.util.TypeResolver;
import org.kie.internal.definition.GenericTypeDefinition;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.util.ClassUtils;
import org.drools.drl.ast.descr.AbstractClassTypeDeclarationDescr;
import org.drools.drl.ast.descr.EnumDeclarationDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationUtils.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationUtils.java
index ff8cebda352..a354d148bec 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationUtils.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationUtils.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import java.io.IOException;
@@ -25,11 +28,11 @@
import org.drools.drl.ast.descr.ImportDescr;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.util.TypeResolver;
-import org.drools.core.base.ClassFieldInspector;
-import org.drools.core.base.CoreComponentsBuilder;
+import org.drools.base.base.ClassFieldInspector;
+import org.drools.base.base.CoreComponentsBuilder;
import org.drools.compiler.builder.impl.classbuilder.BuildUtils;
-import org.drools.core.factmodel.ClassDefinition;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.factmodel.ClassDefinition;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.util.StringUtils;
import org.kie.api.definition.type.Modifies;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDefinition.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDefinition.java
index eb2681bcb96..927902fff0c 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDefinition.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDefinition.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl;
import org.drools.drl.ast.descr.AbstractClassTypeDeclarationDescr;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.rule.TypeDeclaration;
public class TypeDefinition {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/BeanClassBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/BeanClassBuilder.java
index 3e54b048ba0..aa49ff26cb7 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/BeanClassBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/BeanClassBuilder.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.classbuilder;
public interface BeanClassBuilder extends ClassBuilder {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/BuildUtils.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/BuildUtils.java
index dd66a707c12..dda932f9eb0 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/BuildUtils.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/BuildUtils.java
@@ -1,22 +1,24 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.classbuilder;
-import org.drools.core.factmodel.FieldDefinition;
+import org.drools.base.factmodel.FieldDefinition;
import org.kie.internal.definition.GenericTypeDefinition;
import static java.util.stream.Collectors.joining;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/ClassBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/ClassBuilder.java
index bef5a8f6cd2..1bfc21cbea5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/ClassBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/ClassBuilder.java
@@ -1,25 +1,27 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.classbuilder;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
-import org.drools.core.factmodel.ClassDefinition;
+import org.drools.base.factmodel.ClassDefinition;
import org.kie.api.internal.utils.KieService;
public interface ClassBuilder extends KieService {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/ClassBuilderFactory.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/ClassBuilderFactory.java
index 0735cbff71c..e3f2c97d81e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/ClassBuilderFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/ClassBuilderFactory.java
@@ -1,25 +1,27 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.classbuilder;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.rule.TypeDeclaration;
import org.kie.api.internal.utils.KieService;
-import static org.drools.core.base.CoreComponentsBuilder.throwExceptionForMissingMvel;
+import static org.drools.base.base.CoreComponentsBuilder.throwExceptionForMissingMvel;
public interface ClassBuilderFactory extends KieService {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumClassBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumClassBuilder.java
index 2a35a550138..daa67e767a7 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumClassBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumClassBuilder.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.classbuilder;
public interface EnumClassBuilder extends ClassBuilder {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumClassDefinition.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumClassDefinition.java
index eaeb5493827..4e41aa5ef9f 100755
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumClassDefinition.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumClassDefinition.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.classbuilder;
import java.io.IOException;
@@ -23,7 +25,7 @@
import java.util.ArrayList;
import java.util.Collections;
-import org.drools.core.factmodel.ClassDefinition;
+import org.drools.base.factmodel.ClassDefinition;
/**
* Declares an enum class to be dynamically created
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumLiteralDefinition.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumLiteralDefinition.java
index c376d92fe7d..1c8aaa4319a 100755
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumLiteralDefinition.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/classbuilder/EnumLiteralDefinition.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.classbuilder;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/ErrorHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/ErrorHandler.java
index 7b4ab529ea3..4721de837af 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/ErrorHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/ErrorHandler.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.errors;
import org.drools.drl.parser.DroolsError;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/FunctionErrorHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/FunctionErrorHandler.java
index 480f1aa62d5..8d813147ba9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/FunctionErrorHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/FunctionErrorHandler.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.errors;
import org.drools.drl.parser.DroolsError;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/MissingImplementationException.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/MissingImplementationException.java
index 603952120f3..d9e2c01cc38 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/MissingImplementationException.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/MissingImplementationException.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2019 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.errors;
import org.kie.api.io.Resource;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/RuleErrorHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/RuleErrorHandler.java
index f490a605e35..b9ed5d4f0f2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/RuleErrorHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/RuleErrorHandler.java
@@ -1,24 +1,27 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.errors;
import org.drools.drl.parser.DroolsError;
import org.drools.compiler.compiler.RuleBuildError;
import org.drools.drl.ast.descr.BaseDescr;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
public class RuleErrorHandler extends ErrorHandler {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/RuleInvokerErrorHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/RuleInvokerErrorHandler.java
index df2dc104359..a04bab9dff5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/RuleInvokerErrorHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/RuleInvokerErrorHandler.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.errors;
import org.drools.drl.ast.descr.BaseDescr;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
public class RuleInvokerErrorHandler extends RuleErrorHandler {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/SrcError.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/SrcError.java
index 50f6c91e1ab..92c16e5c2bb 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/SrcError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/SrcError.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.errors;
import org.drools.drl.parser.DroolsError;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/SrcErrorHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/SrcErrorHandler.java
index 9f559eb9fa8..7d940c39a1e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/SrcErrorHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/errors/SrcErrorHandler.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.errors;
import org.drools.drl.parser.DroolsError;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AbstractPackageCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AbstractPackageCompilationPhase.java
index 594c4dd2e9d..b93ad54c60a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AbstractPackageCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AbstractPackageCompilationPhase.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.BuildResultCollector;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AccumulateFunctionCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AccumulateFunctionCompilationPhase.java
index 8d39f8b8b69..99b9e96c566 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AccumulateFunctionCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AccumulateFunctionCompilationPhase.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.compiler.PackageRegistry;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AnnotationNormalizer.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AnnotationNormalizer.java
index f1f821cc925..46e93428adc 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AnnotationNormalizer.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/AnnotationNormalizer.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.compiler.AnnotationDeclarationError;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/CompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/CompilationPhase.java
index 8d3256196f2..670613dbf6a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/CompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/CompilationPhase.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.kie.internal.builder.KnowledgeBuilderResult;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/CompositePackageCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/CompositePackageCompilationPhase.java
index f1db0cb3f9c..8ba36a2a315 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/CompositePackageCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/CompositePackageCompilationPhase.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.PackageRegistryManager;
@@ -25,9 +26,9 @@
import org.drools.compiler.builder.impl.TypeDeclarationContext;
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.lang.descr.CompositePackageDescr;
+import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.util.TypeResolver;
import org.drools.util.StringUtils;
-import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.kie.internal.builder.KnowledgeBuilderResult;
import org.kie.internal.builder.ResultSeverity;
import org.kie.internal.builder.conf.LanguageLevelOption;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ConsequenceCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ConsequenceCompilationPhase.java
index efb0df970de..2ee32596c72 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ConsequenceCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ConsequenceCompilationPhase.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.PackageRegistryCompiler;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/EntryPointDeclarationCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/EntryPointDeclarationCompilationPhase.java
index 1a5007d1908..6d4896a181d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/EntryPointDeclarationCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/EntryPointDeclarationCompilationPhase.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.compiler.PackageRegistry;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/FunctionCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/FunctionCompilationPhase.java
index 4485c9afff9..87387bff6a5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/FunctionCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/FunctionCompilationPhase.java
@@ -1,25 +1,26 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.compiler.DuplicateFunction;
import org.drools.compiler.compiler.PackageRegistry;
-import org.drools.core.rule.Function;
+import org.drools.base.rule.Function;
import org.drools.drl.ast.descr.FunctionDescr;
import org.drools.drl.ast.descr.FunctionImportDescr;
import org.drools.drl.ast.descr.PackageDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/FunctionCompiler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/FunctionCompiler.java
index be88829ec50..8f21ed441c5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/FunctionCompiler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/FunctionCompiler.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.AssetFilter;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/GlobalCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/GlobalCompilationPhase.java
index 04eda46e5d6..30ba1c84f36 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/GlobalCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/GlobalCompilationPhase.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import java.lang.reflect.Type;
@@ -22,7 +23,7 @@
import org.drools.compiler.builder.impl.AssetFilter;
import org.drools.compiler.builder.impl.GlobalVariableContext;
import org.drools.compiler.compiler.PackageRegistry;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.kie.internal.builder.ResourceChange;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableFunctionCompiler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableFunctionCompiler.java
index 5450ba49113..649e904d3f9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableFunctionCompiler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableFunctionCompiler.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.compiler.Dialect;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableGlobalCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableGlobalCompilationPhase.java
index 972f7880383..981806d9f63 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableGlobalCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableGlobalCompilationPhase.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import java.lang.reflect.Type;
@@ -24,7 +25,7 @@
import org.drools.compiler.builder.impl.GlobalVariableContext;
import org.drools.compiler.compiler.GlobalError;
import org.drools.compiler.compiler.PackageRegistry;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.drools.drl.ast.descr.GlobalDescr;
import org.drools.drl.ast.descr.PackageDescr;
import org.slf4j.Logger;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableRuleCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableRuleCompilationPhase.java
index 98fbefaf732..6d67af015f9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableRuleCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImmutableRuleCompilationPhase.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import java.util.ArrayList;
@@ -33,7 +36,7 @@
import org.drools.compiler.compiler.RuleBuildError;
import org.drools.compiler.rule.builder.RuleBuildContext;
import org.drools.compiler.rule.builder.RuleBuilder;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.drools.drl.ast.descr.AttributeDescr;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.drl.ast.descr.RuleDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImportCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImportCompilationPhase.java
index cdb20fa9088..97ec0cf9677 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImportCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ImportCompilationPhase.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.compiler.PackageRegistry;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/IteratingPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/IteratingPhase.java
index 6565a827a6c..370adcc30d6 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/IteratingPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/IteratingPhase.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Unless required by applicable law or agreed to in writing, software
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.PackageRegistryManager;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/OtherDeclarationCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/OtherDeclarationCompilationPhase.java
index 57f143c25df..3139f075a99 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/OtherDeclarationCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/OtherDeclarationCompilationPhase.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.AssetFilter;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/PackageCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/PackageCompilationPhase.java
index f9e9e920256..9ed117d62b5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/PackageCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/PackageCompilationPhase.java
@@ -1,14 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.AssetFilter;
-import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
import org.drools.compiler.builder.impl.KnowledgeBuilderImpl;
import org.drools.compiler.builder.impl.TypeDeclarationBuilder;
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.kie.api.io.Resource;
-import org.kie.internal.builder.KnowledgeBuilder;
import org.kie.internal.builder.KnowledgeBuilderConfiguration;
import org.kie.internal.builder.conf.LanguageLevelOption;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ReteCompiler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ReteCompiler.java
index b5ee2ec0473..e4ea65d8fe4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ReteCompiler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/ReteCompiler.java
@@ -1,10 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.AssetFilter;
import org.drools.compiler.compiler.PackageRegistry;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.impl.RuleBase;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.drl.ast.descr.RuleDescr;
import org.kie.internal.builder.ResourceChange;
@@ -14,9 +32,9 @@
public class ReteCompiler extends AbstractPackageCompilationPhase {
private final AssetFilter assetFilter;
- private RuleBase kBase;
+ private InternalRuleBase kBase;
- public ReteCompiler(PackageRegistry pkgRegistry, PackageDescr packageDescr, RuleBase kBase, AssetFilter assetFilter) {
+ public ReteCompiler(PackageRegistry pkgRegistry, PackageDescr packageDescr, InternalRuleBase kBase, AssetFilter assetFilter) {
super(pkgRegistry, packageDescr);
this.kBase = kBase;
this.assetFilter = assetFilter;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleAnnotationNormalizer.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleAnnotationNormalizer.java
index 001f6cb61fd..bbab170c2a1 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleAnnotationNormalizer.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleAnnotationNormalizer.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.drl.ast.descr.AnnotatedBaseDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleCompilationPhase.java
index ff7762df867..40261b2956e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleCompilationPhase.java
@@ -1,28 +1,29 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.AssetFilter;
import org.drools.compiler.builder.impl.TypeDeclarationContext;
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.lang.descr.CompositePackageDescr;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.drl.ast.descr.AttributeDescr;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.drl.ast.descr.RuleDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleValidator.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleValidator.java
index 55bd5e4e88b..69c9648ec69 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleValidator.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/RuleValidator.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import java.util.HashSet;
@@ -5,8 +23,8 @@
import org.drools.compiler.compiler.DuplicateRule;
import org.drools.compiler.compiler.PackageRegistry;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.drl.ast.descr.RuleDescr;
import org.drools.drl.parser.ParserError;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/SinglePackagePhaseFactory.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/SinglePackagePhaseFactory.java
index a874cbe5d01..7e8f3f40846 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/SinglePackagePhaseFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/SinglePackagePhaseFactory.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Unless required by applicable law or agreed to in writing, software
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.compiler.PackageRegistry;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationAnnotationNormalizer.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationAnnotationNormalizer.java
index 265f84f67f9..27041586f9d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationAnnotationNormalizer.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationAnnotationNormalizer.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.drl.ast.descr.EnumDeclarationDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationCompilationPhase.java
index 691bbf43ee5..b2703f895e4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationCompilationPhase.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.TypeDeclarationBuilder;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationCompositeCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationCompositeCompilationPhase.java
index 2a192ce836c..777e19cec2c 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationCompositeCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/TypeDeclarationCompositeCompilationPhase.java
@@ -1,20 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.TypeDeclarationBuilder;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/WindowDeclarationCompilationPhase.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/WindowDeclarationCompilationPhase.java
index 4eaaf55a59f..f849619528a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/WindowDeclarationCompilationPhase.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/WindowDeclarationCompilationPhase.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.builder.impl.processors;
import org.drools.compiler.builder.impl.TypeDeclarationContext;
@@ -6,9 +24,9 @@
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.rule.builder.RuleBuildContext;
import org.drools.compiler.rule.builder.RuleConditionBuilder;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.WindowDeclaration;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.WindowDeclaration;
import org.drools.drl.ast.descr.AttributeDescr;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.drl.ast.descr.RuleDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/package-info.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/package-info.java
index aadd3334ccc..46a37dfa0dc 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/package-info.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/processors/package-info.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
/**
* {@link org.drools.compiler.builder.impl.processors.CompilationPhase}s originate as
* methods in {@link org.drools.compiler.builder.impl.KnowledgeBuilderImpl}.
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DecisionTableResourceHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DecisionTableResourceHandler.java
index 6fcce05a53a..ee69c6b1b78 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DecisionTableResourceHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DecisionTableResourceHandler.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.resources;
import org.drools.compiler.builder.conf.DecisionTableConfigurationImpl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DrlResourceHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DrlResourceHandler.java
index 5707226678e..62fba20aaa8 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DrlResourceHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DrlResourceHandler.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.resources;
import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DslrResourceHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DslrResourceHandler.java
index 10e71bbb5ea..bf93130fe7f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DslrResourceHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/DslrResourceHandler.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.resources;
import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/ResourceHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/ResourceHandler.java
index 7100e9fe84b..86e61cc6269 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/ResourceHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/ResourceHandler.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.resources;
import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/TemplateResourceHandler.java b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/TemplateResourceHandler.java
index fe3f064256a..2b45b1a4718 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/TemplateResourceHandler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/builder/impl/resources/TemplateResourceHandler.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.builder.impl.resources;
import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/ActionError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/ActionError.java
index 049c8befd16..0f27989d46f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/ActionError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/ActionError.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.BaseDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/AnalysisResult.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/AnalysisResult.java
index 4f335cf5e4f..2d5916b1e34 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/AnalysisResult.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/AnalysisResult.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import java.util.Set;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/AnnotationDeclarationError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/AnnotationDeclarationError.java
index 8bf30a5ff74..bf105b7a017 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/AnnotationDeclarationError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/AnnotationDeclarationError.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.AnnotationDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/BoundIdentifiers.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/BoundIdentifiers.java
index 11cbd08f7e8..e588ccf05a4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/BoundIdentifiers.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/BoundIdentifiers.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import java.lang.reflect.Type;
@@ -24,12 +27,12 @@
import org.drools.compiler.rule.builder.EvaluatorWrapper;
import org.drools.compiler.rule.builder.PackageBuildContext;
import org.drools.compiler.rule.builder.RuleBuildContext;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.base.ObjectType;
-import org.drools.core.facttemplates.Fact;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.XpathBackReference;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.base.ObjectType;
+import org.drools.base.facttemplates.Fact;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.XpathBackReference;
import static org.drools.util.ClassUtils.rawType;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/BuilderResultUtils.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/BuilderResultUtils.java
index be8ecc5c880..22fd41d0b82 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/BuilderResultUtils.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/BuilderResultUtils.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.kie.internal.jci.CompilationProblem;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/ConfigurableSeverityResult.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/ConfigurableSeverityResult.java
index 0ad17dac903..46ca5bb189e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/ConfigurableSeverityResult.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/ConfigurableSeverityResult.java
@@ -1,18 +1,22 @@
-/*
-* Copyright 2011 Red Hat, Inc. and/or its affiliates.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.drools.compiler.compiler;
import org.drools.drl.parser.BaseKnowledgeBuilderResultImpl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DeprecatedResourceTypeWarning.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DeprecatedResourceTypeWarning.java
index 3c8b1b4d918..ab6b40eed66 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DeprecatedResourceTypeWarning.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DeprecatedResourceTypeWarning.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.drools.io.InternalResource;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DescrBuildError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DescrBuildError.java
index 5ed91d9f1bd..4969f7231ac 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DescrBuildError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DescrBuildError.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.BaseDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DescrBuildWarning.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DescrBuildWarning.java
index 24c6ccb74a6..fc4d89682b3 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DescrBuildWarning.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DescrBuildWarning.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.BaseDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/Dialect.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/Dialect.java
index 5e8dafde5ae..228c45ccda6 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/Dialect.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/Dialect.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import java.util.List;
@@ -24,6 +27,7 @@
import org.drools.compiler.rule.builder.EngineElementBuilder;
import org.drools.compiler.rule.builder.EntryPointBuilder;
import org.drools.compiler.rule.builder.FromBuilder;
+import org.drools.compiler.rule.builder.GroupByBuilder;
import org.drools.compiler.rule.builder.GroupElementBuilder;
import org.drools.compiler.rule.builder.PackageBuildContext;
import org.drools.compiler.rule.builder.PatternBuilder;
@@ -34,9 +38,9 @@
import org.drools.compiler.rule.builder.RuleConditionBuilder;
import org.drools.compiler.rule.builder.SalienceBuilder;
import org.drools.util.TypeResolver;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.drools.core.rule.JavaDialectRuntimeData;
-import org.drools.core.definitions.rule.impl.QueryImpl;
+import org.drools.base.definitions.rule.impl.QueryImpl;
import org.drools.drl.ast.descr.AndDescr;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.ast.descr.EntryPointDescr;
@@ -51,7 +55,7 @@
import org.kie.api.io.Resource;
import org.kie.internal.builder.KnowledgeBuilderResult;
-import static org.drools.core.base.CoreComponentsBuilder.throwExceptionForMissingMvel;
+import static org.drools.base.base.CoreComponentsBuilder.throwExceptionForMissingMvel;
/**
* A Dialect implementation handles the building and execution of code
@@ -79,6 +83,8 @@ public interface Dialect {
AccumulateBuilder getAccumulateBuilder();
+ GroupByBuilder getGroupByBuilder();
+
PredicateBuilder getPredicateBuilder();
ConsequenceBuilder getConsequenceBuilder();
@@ -249,6 +255,10 @@ public AccumulateBuilder getAccumulateBuilder() {
return throwExceptionForMissingMvel();
}
+ public GroupByBuilder getGroupByBuilder() {
+ return throwExceptionForMissingMvel();
+ }
+
@Override
public PredicateBuilder getPredicateBuilder() {
return throwExceptionForMissingMvel();
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java
index e443a6d2113..4b9450e8b11 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectConfiguration.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectConfiguration.java
index 49ab3c1f571..7736a68f570 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectConfiguration.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectConfiguration.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
/**
* Each Dialect can have its own configuration. Implementations of this class are typically
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsErrorWrapper.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsErrorWrapper.java
index 70ffb4852ce..3f88e6e0e25 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsErrorWrapper.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsErrorWrapper.java
@@ -1,18 +1,21 @@
-/*
-* Copyright 2011 Red Hat, Inc. and/or its affiliates.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.drools.drl.parser.DroolsError;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsWarning.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsWarning.java
index b0f451900e1..02bde4e972c 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsWarning.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsWarning.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.drools.drl.parser.BaseKnowledgeBuilderResultImpl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsWarningWrapper.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsWarningWrapper.java
index 916e24b3076..70834cca9be 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsWarningWrapper.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DroolsWarningWrapper.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.kie.internal.builder.KnowledgeBuilderResult;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DuplicateFunction.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DuplicateFunction.java
index e627beb433b..89a91bd673d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DuplicateFunction.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DuplicateFunction.java
@@ -1,22 +1,26 @@
-/*
-* Copyright 2011 Red Hat, Inc. and/or its affiliates.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.FunctionDescr;
-import org.drools.core.rule.Function;
+import org.drools.base.rule.Function;
import org.kie.internal.builder.KnowledgeBuilderConfiguration;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/DuplicateRule.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/DuplicateRule.java
index 6379531b47e..5ee49fbd17f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/DuplicateRule.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/DuplicateRule.java
@@ -1,19 +1,21 @@
-/*
-* Copyright 2011 Red Hat, Inc. and/or its affiliates.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.PackageDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/FactTemplateError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/FactTemplateError.java
index 0c8b4282894..0a254f05ee0 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/FactTemplateError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/FactTemplateError.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.BaseDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/FieldTemplateError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/FieldTemplateError.java
index 78016bc0155..50f6b6ab9bd 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/FieldTemplateError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/FieldTemplateError.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.BaseDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/FunctionError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/FunctionError.java
index d8f4e5519a7..058e1273d8a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/FunctionError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/FunctionError.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.FunctionDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/GlobalError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/GlobalError.java
index 0fd331e0ad2..6b7ee6331c7 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/GlobalError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/GlobalError.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.GlobalDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/ImportError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/ImportError.java
index 1c43cbe5255..5ee127ae9e2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/ImportError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/ImportError.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.ImportDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/JavaDialectConfiguration.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/JavaDialectConfiguration.java
index 27f2df526f0..bf8e66d0fb2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/JavaDialectConfiguration.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/JavaDialectConfiguration.java
@@ -1,22 +1,26 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
import org.drools.compiler.builder.impl.KnowledgeBuilderFactoryServiceImpl;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.kie.memorycompiler.JavaCompiler;
import org.kie.memorycompiler.JavaCompilerFactory;
import org.kie.memorycompiler.JavaConfiguration;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/MissingDependencyError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/MissingDependencyError.java
index 85cce0edc2f..eb5818b7044 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/MissingDependencyError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/MissingDependencyError.java
@@ -1,20 +1,24 @@
-/*
- * Copyright (c) 2021. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
-import org.drools.core.common.MissingDependencyException;
+import org.drools.base.common.MissingDependencyException;
import org.drools.drl.parser.DroolsError;
import org.kie.api.io.Resource;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageBuilderErrors.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageBuilderErrors.java
index df308cc6b80..e79b99e8843 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageBuilderErrors.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageBuilderErrors.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import java.io.Externalizable;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageBuilderResults.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageBuilderResults.java
index c3d74b72da3..247ed5abf57 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageBuilderResults.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageBuilderResults.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import java.io.Externalizable;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageRegistry.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageRegistry.java
index bc411d2f4bf..4023bcffcdf 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageRegistry.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/PackageRegistry.java
@@ -1,26 +1,29 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
import org.drools.drl.ast.descr.ImportDescr;
import org.drools.util.TypeResolver;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.rule.DialectRuntimeRegistry;
-import org.drools.core.rule.ImportDeclaration;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.rule.DialectRuntimeRegistry;
+import org.drools.base.rule.ImportDeclaration;
import org.kie.api.io.Resource;
import org.kie.internal.builder.KnowledgeBuilderConfiguration;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilder.java
index c3909c34b33..a87965e1a2e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.kie.api.definition.process.Process;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilderFactory.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilderFactory.java
index e0310838438..a8819b10604 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilderFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilderFactory.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.kie.api.internal.utils.KieService;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilderFactoryService.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilderFactoryService.java
index 2eb503d58fd..372ef55d325 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilderFactoryService.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessBuilderFactoryService.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.kie.api.internal.utils.KieService;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessLoadError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessLoadError.java
index 9a0100ef717..48cceed33da 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessLoadError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProcessLoadError.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProjectJavaCompiler.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProjectJavaCompiler.java
index d30cea09c89..501562b27d1 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/ProjectJavaCompiler.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/ProjectJavaCompiler.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/ResourceTypeDeclarationWarning.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/ResourceTypeDeclarationWarning.java
index 6d3d539aaef..2e386d7dd6c 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/ResourceTypeDeclarationWarning.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/ResourceTypeDeclarationWarning.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.kie.api.io.Resource;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/RuleBuildError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/RuleBuildError.java
index 45deca39feb..32c6001fcb8 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/RuleBuildError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/RuleBuildError.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.BaseDescr;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
public class RuleBuildError extends DescrBuildError {
private final RuleImpl rule;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/RuleBuildWarning.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/RuleBuildWarning.java
index 57039f4db20..b4fbd2d039f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/RuleBuildWarning.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/RuleBuildWarning.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.BaseDescr;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
public class RuleBuildWarning extends DescrBuildWarning {
private final RuleImpl rule;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/SerializableDroolsError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/SerializableDroolsError.java
index e14ffdbfb1d..0fbbdd0d9c4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/SerializableDroolsError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/SerializableDroolsError.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.parser.BaseKnowledgeBuilderResultImpl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/TypeDeclarationError.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/TypeDeclarationError.java
index e28d2663f22..2160300c9c9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/TypeDeclarationError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/TypeDeclarationError.java
@@ -1,23 +1,25 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.ast.descr.BaseDescr;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.parser.DroolsError;
public class TypeDeclarationError extends DroolsError {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/TypeDeclarationWarning.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/TypeDeclarationWarning.java
index e4dc650b986..1cb145fd4ff 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/TypeDeclarationWarning.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/TypeDeclarationWarning.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.compiler;
import org.drools.drl.parser.BaseKnowledgeBuilderResultImpl;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/File.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/File.java
index 8da969a9fe3..936912d3512 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/File.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/File.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler.io;
import java.io.IOException;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/FileSystem.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/FileSystem.java
index 0bb138c2bbb..a7624812a9d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/FileSystem.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/FileSystem.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler.io;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/FileSystemItem.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/FileSystemItem.java
index 611ae909130..03ee5aaf2e3 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/FileSystemItem.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/FileSystemItem.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler.io;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/Folder.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/Folder.java
index 90d30f2909a..7485be93a9c 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/Folder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/Folder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler.io;
import java.util.Collection;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFile.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFile.java
index 5017a85f6bc..8a48399447b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFile.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFile.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler.io.memory;
import java.io.ByteArrayInputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFileSystem.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFileSystem.java
index c9e1d568a1f..479f95dbbc4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFileSystem.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFileSystem.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler.io.memory;
import java.io.ByteArrayInputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFolder.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFolder.java
index f5c6e2e8875..63e157d8ec2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFolder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/io/memory/MemoryFolder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.compiler.io.memory;
import java.io.Serializable;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/compiler/package-info.java b/drools-compiler/src/main/java/org/drools/compiler/compiler/package-info.java
index df595b566c9..948d0850c05 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/compiler/package-info.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/compiler/package-info.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2013 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
/**
*
* This is the main package to load rules. Use PackageBuilder and RuleBaseLoader classes.
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/MaterializedLambda.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/MaterializedLambda.java
index 498b93d6328..a5a28b9573c 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/MaterializedLambda.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/MaterializedLambda.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder;
import java.lang.annotation.ElementType;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieModule.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieModule.java
index b419c619d32..d8a4d9b044a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieModule.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieModule.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.ByteArrayInputStream;
@@ -34,9 +37,9 @@
import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
import org.drools.compiler.kproject.models.KieBaseModelImpl;
import org.drools.core.RuleBaseConfiguration;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.impl.KnowledgePackageImpl;
-import org.drools.core.impl.RuleBase;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.impl.KnowledgePackageImpl;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.impl.RuleBaseFactory;
import org.drools.io.ResourceConfigurationImpl;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
@@ -201,7 +204,7 @@ public KnowledgePackagesBuildResult buildKnowledgePackages(KieBaseModelImpl kBas
return new KnowledgePackagesBuildResult(false, pkgs);
}
- public InternalKnowledgeBase createKieBase( KieBaseModelImpl kBaseModel, KieProject kieProject, BuildContext buildContext, KieBaseConfiguration conf ) {
+ public InternalKnowledgeBase createKieBase(KieBaseModelImpl kBaseModel, KieProject kieProject, BuildContext buildContext, KieBaseConfiguration conf) {
KnowledgePackagesBuildResult knowledgePackagesBuildResult = buildKnowledgePackages(kBaseModel, kieProject, buildContext);
if(knowledgePackagesBuildResult.hasErrors()) {
return null;
@@ -217,7 +220,7 @@ public InternalKnowledgeBase createKieBase( KieBaseModelImpl kBaseModel, KieProj
((RuleBaseConfiguration)conf).setClassLoader(cl);
}
- RuleBase kBase = RuleBaseFactory.newRuleBase(kBaseModel.getName(), conf );
+ InternalRuleBase kBase = RuleBaseFactory.newRuleBase(kBaseModel.getName(), conf);
kBase.addPackages( pkgs );
return KnowledgeBaseFactory.newKnowledgeBase(kBase);
}
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieProject.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieProject.java
index b90cb05379b..134c67e2f13 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieProject.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieProject.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.Collection;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieScanner.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieScanner.java
index 5e2715f4a64..5ba5572b569 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieScanner.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/AbstractKieScanner.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.Collection;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/BuildContext.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/BuildContext.java
index dc8b1027605..f9b564d7745 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/BuildContext.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/BuildContext.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
public class BuildContext {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ClasspathKieProject.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ClasspathKieProject.java
index 076439dbfef..34c9fae29aa 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ClasspathKieProject.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ClasspathKieProject.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.File;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/CompilationCacheProvider.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/CompilationCacheProvider.java
index 6b0cff8c13f..b660f3a5d7f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/CompilationCacheProvider.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/CompilationCacheProvider.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.Map;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/CompilationProblemAdapter.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/CompilationProblemAdapter.java
index 0ab2b57fc95..fc4015624e2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/CompilationProblemAdapter.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/CompilationProblemAdapter.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
/**
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DecisionTableConfigurationDelegate.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DecisionTableConfigurationDelegate.java
index 32617892fa8..004cd72c3a9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DecisionTableConfigurationDelegate.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DecisionTableConfigurationDelegate.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import org.kie.api.io.Resource;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DiskResourceReader.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DiskResourceReader.java
index e9fedcf1d80..1f94d4d3101 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DiskResourceReader.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DiskResourceReader.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.io.File;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DrlProject.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DrlProject.java
index b4d181113bf..0b38131ceb6 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DrlProject.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/DrlProject.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.function.BiFunction;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/FileKieModule.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/FileKieModule.java
index d51aaadc376..2796ca3ddcb 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/FileKieModule.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/FileKieModule.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.File;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/IncrementalResultsImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/IncrementalResultsImpl.java
index 1d5e9d16b20..71a8bc9705b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/IncrementalResultsImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/IncrementalResultsImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieModule.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieModule.java
index b9aea293e5e..a0a37c5b692 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieModule.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieModule.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.File;
@@ -33,7 +36,7 @@
import org.drools.compiler.kie.util.KieJarChangeSet;
import org.drools.compiler.kproject.models.KieBaseModelImpl;
import org.drools.compiler.kproject.models.KieModuleModelImpl;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.drools.io.InternalResource;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.wiring.api.ResourceProvider;
@@ -122,7 +125,7 @@ default byte[] getBytes( final PortablePath resourcePath ) {
KnowledgeBuilderConfiguration createBuilderConfiguration( KieBaseModel kBaseModel, ClassLoader classLoader );
- InternalKnowledgeBase createKieBase( KieBaseModelImpl kBaseModel, KieProject kieProject, BuildContext buildContext, KieBaseConfiguration conf );
+ InternalKnowledgeBase createKieBase(KieBaseModelImpl kBaseModel, KieProject kieProject, BuildContext buildContext, KieBaseConfiguration conf);
default void afterKieBaseCreationUpdate(String name, InternalKnowledgeBase kBase) { }
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieModuleProvider.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieModuleProvider.java
index 2a640534fa8..f4b8cea3c61 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieModuleProvider.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieModuleProvider.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.io.File;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieScanner.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieScanner.java
index 6afd801a901..e040160e6e1 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieScanner.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieScanner.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.InputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieServices.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieServices.java
index 538b308a26d..805fcb493a5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieServices.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/InternalKieServices.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import org.drools.compiler.kie.builder.impl.event.KieServicesEventListerner;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdater.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdater.java
index 87e5943a17c..b28ee513fbe 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdater.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdater.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
public interface KieBaseUpdater extends Runnable {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterFactory.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterFactory.java
index 660afb569e5..4a7b4922d4d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
public interface KieBaseUpdaterFactory {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterImpl.java
index 466602ea663..fc4453c095f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License; private final Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing; private final software
- * distributed under the License is distributed on an "AS IS" BASIS; private final
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND; private final either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.List;
@@ -21,14 +23,14 @@
import org.drools.compiler.builder.InternalKnowledgeBuilder;
import org.drools.compiler.compiler.PackageBuilderErrors;
import org.drools.core.impl.KieBaseUpdate;
-import org.drools.core.base.ClassObjectType;
+import org.drools.base.base.ClassObjectType;
import org.drools.core.common.InternalWorkingMemory;
import org.drools.core.common.InternalWorkingMemoryEntryPoint;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.impl.KnowledgePackageImpl;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.impl.KnowledgePackageImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.EntryPointNode;
-import org.drools.core.rule.DialectRuntimeData;
+import org.drools.base.rule.DialectRuntimeData;
import org.kie.api.builder.model.KieBaseModel;
import org.kie.api.io.Resource;
import org.kie.api.runtime.rule.EntryPoint;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterImplContext.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterImplContext.java
index 2fa00cb0661..6767be42abe 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterImplContext.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterImplContext.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.Collection;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterOptions.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterOptions.java
index 0f4d6a920ab..82f25f9ae9a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterOptions.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaterOptions.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.HashMap;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaters.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaters.java
index 1c90641e89e..6ae5224fdc8 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaters.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdaters.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.Collection;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdatersContext.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdatersContext.java
index 7643442f259..e1a7d2b0822 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdatersContext.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdatersContext.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.Optional;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdatersImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdatersImpl.java
index e0ffa7f530a..c61494b0ae6 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdatersImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBaseUpdatersImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderImpl.java
index 1c1304f2df1..809cebf4f08 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.ByteArrayInputStream;
@@ -69,7 +72,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static org.drools.core.util.Drools.hasXmlSupport;
+import static org.drools.base.util.Drools.hasXmlSupport;
import static org.drools.util.StringUtils.codeAwareIndexOf;
import static org.kie.internal.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration;
@@ -378,18 +381,13 @@ private static boolean isFileInKieBase( KieBaseModel kieBase, String fileName, S
return true;
} else {
String folderNameForFile = lastSep > 0 ? fileName.substring( 0, lastSep ) : "";
- int resourcesPos = folderNameForFile.indexOf( RESOURCES_ROOT );
- if (resourcesPos >= 0) {
- folderNameForFile = folderNameForFile.substring( resourcesPos + RESOURCES_ROOT.length() );
- }
String pkgNameForFile = packageNameForFile( fileName, folderNameForFile, !useFolders, file );
return isPackageInKieBase( kieBase, pkgNameForFile );
}
}
private static String packageNameForFile( String fileName, String folderNameForFile, boolean discoverPackage, Supplier file ) {
- String packageNameFromFolder = folderNameForFile.replace( '/', '.' );
-
+ String packageNameFromFolder = getRelativePackageName(folderNameForFile.replace( '/', '.' ));
if (discoverPackage) {
String packageNameForFile = packageNameFromAsset(fileName, file.get());
if (packageNameForFile != null) {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderSetImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderSetImpl.java
index 68d157069fd..76ad7a8450d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderSetImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderSetImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.IOException;
@@ -31,7 +34,7 @@
import org.drools.compiler.builder.InternalKnowledgeBuilder;
import org.drools.compiler.builder.impl.KnowledgeBuilderImpl;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.drools.io.BaseResource;
import org.drools.wiring.api.classloader.ProjectClassLoader;
import org.kie.api.KieServices;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerImpl.java
index d6ac8da0047..5eb73dd68e5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.io.InputStream;
@@ -38,7 +41,7 @@
import org.drools.compiler.management.KieContainerMonitor;
import org.drools.core.SessionConfiguration;
import org.drools.core.impl.InternalKieContainer;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.management.DroolsManagementAgent;
import org.drools.core.management.DroolsManagementAgent.CBSKey;
import org.drools.core.reteoo.RuntimeComponentFactory;
@@ -81,7 +84,7 @@
import static java.util.stream.Collectors.toList;
import static org.drools.compiler.kie.util.InjectionHelper.wireSessionComponents;
-import static org.drools.core.util.Drools.isJndiAvailable;
+import static org.drools.base.util.Drools.isJndiAvailable;
import static org.drools.util.ClassUtils.convertResourceToClassName;
public class KieContainerImpl
@@ -540,7 +543,7 @@ StatefulSessionPool createKieSessionsPool(String kSessionName, KieSessionConfigu
log.error("Unknown KieSession name: " + kSessionName);
return null;
}
- InternalKnowledgeBase kBase = (InternalKnowledgeBase) getKieBaseFromKieSessionModel( kSessionModel );
+ InternalKnowledgeBase kBase = (InternalKnowledgeBase) getKieBaseFromKieSessionModel(kSessionModel);
return kBase == null ? null : new StatefulSessionPool(kBase, initialSize, () -> {
SessionConfiguration sessConf = conf != null ? conf.as(SessionConfiguration.KEY) : kBase.getSessionConfiguration().as(SessionConfiguration.KEY);
StatefulKnowledgeSessionImpl kSession = stateless ?
@@ -608,11 +611,11 @@ public KieSession newKieSession(String kSessionName, Environment environment, Ki
if ( kBase == null ) return null;
KieSession kSession = kBase.newKieSession( conf != null ? conf : getKieSessionConfiguration( kSessionModel ), environment );
- registerNewKieSession( kSessionModel, ( InternalKnowledgeBase ) kBase, kSession );
+ registerNewKieSession(kSessionModel, (InternalKnowledgeBase) kBase, kSession);
return kSession;
}
- private void registerNewKieSession( KieSessionModel kSessionModel, InternalKnowledgeBase kBase, KieSession kSession ) {
+ private void registerNewKieSession(KieSessionModel kSessionModel, InternalKnowledgeBase kBase, KieSession kSession) {
if (isJndiAvailable()) {
wireSessionComponents( kSessionModel, kSession );
}
@@ -725,15 +728,15 @@ private KieSessionConfiguration getKieSessionConfiguration( KieSessionModel kSes
public void dispose() {
sessionConfsCache.clear();
- kBases.values().forEach( kb -> ( (InternalKnowledgeBase) kb ).setKieContainer( null ) );
+ kBases.values().forEach( kb -> ( (InternalKnowledgeBase) kb ).setKieContainer(null));
Set cbskeys = new HashSet<>();
if ( isMBeanOptionEnabled() ) {
for (Entry kv : kSessions.entrySet()) {
- cbskeys.add(new DroolsManagementAgent.CBSKey(containerId, ((RuleBase) kv.getValue().getKieBase()).getId(), kv.getKey()));
+ cbskeys.add(new DroolsManagementAgent.CBSKey(containerId, ((InternalRuleBase) kv.getValue().getKieBase()).getId(), kv.getKey()));
}
for (Entry kv : statelessKSessions.entrySet()) {
- cbskeys.add(new DroolsManagementAgent.CBSKey(containerId, ((RuleBase) kv.getValue().getKieBase()).getId(), kv.getKey()));
+ cbskeys.add(new DroolsManagementAgent.CBSKey(containerId, ((InternalRuleBase) kv.getValue().getKieBase()).getId(), kv.getKey()));
}
}
@@ -748,7 +751,7 @@ public void dispose() {
DroolsManagementAgent.getInstance().unregisterKnowledgeSessionBean(c);
}
for (KieBase kb : kBases.values()) {
- DroolsManagementAgent.getInstance().unregisterKnowledgeBase((RuleBase) kb);
+ DroolsManagementAgent.getInstance().unregisterKnowledgeBase((InternalRuleBase) kb);
}
DroolsManagementAgent.getInstance().unregisterMBeansFromOwner(this);
}
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerSessionsPoolImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerSessionsPoolImpl.java
index 4d24e25196c..5eae8f158a5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerSessionsPoolImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerSessionsPoolImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import org.drools.kiesession.session.AbstractKieSessionsPool;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieFileSystemImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieFileSystemImpl.java
index 289ac9f288d..83beb49a590 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieFileSystemImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieFileSystemImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.ByteArrayInputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieFileSystemScannerImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieFileSystemScannerImpl.java
index d11948a7729..a76227613c5 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieFileSystemScannerImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieFileSystemScannerImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.io.File;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieMetaInfoBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieMetaInfoBuilder.java
index 5db8621ca7d..ff5ebc80592 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieMetaInfoBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieMetaInfoBuilder.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl;
import java.util.ArrayList;
@@ -25,11 +29,11 @@
import org.kie.memorycompiler.resources.ResourceStore;
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.kproject.models.KieModuleModelImpl;
-import org.drools.core.factmodel.ClassDefinition;
+import org.drools.base.factmodel.ClassDefinition;
import org.drools.core.rule.JavaDialectRuntimeData;
-import org.drools.core.rule.KieModuleMetaInfo;
-import org.drools.core.rule.TypeDeclaration;
-import org.drools.core.rule.TypeMetaInfo;
+import org.drools.base.rule.KieModuleMetaInfo;
+import org.drools.base.rule.TypeDeclaration;
+import org.drools.base.rule.TypeMetaInfo;
import org.drools.util.IoUtils;
import org.kie.api.builder.model.KieModuleModel;
import org.kie.api.definition.KiePackage;
@@ -37,7 +41,7 @@
import org.kie.api.definition.type.FactType;
import org.kie.internal.builder.KnowledgeBuilder;
-import static org.drools.core.util.Drools.hasMvel;
+import static org.drools.base.util.Drools.hasMvel;
public class KieMetaInfoBuilder {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieModuleKieProject.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieModuleKieProject.java
index 445b33b47e5..1b6e3b8db04 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieModuleKieProject.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieModuleKieProject.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.InputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieProject.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieProject.java
index 55d9360a99f..8265179b77f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieProject.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieProject.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.InputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieRepositoryImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieRepositoryImpl.java
index b7095573a46..cd20a202a56 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieRepositoryImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieRepositoryImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.ByteArrayInputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieServicesImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieServicesImpl.java
index dbacdf9f25c..0722212ab5f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieServicesImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieServicesImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.File;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KnowledgePackagesBuildResult.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KnowledgePackagesBuildResult.java
index 7b845050d50..197121f4781 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KnowledgePackagesBuildResult.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KnowledgePackagesBuildResult.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.util.Collection;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/MemoryKieModule.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/MemoryKieModule.java
index a2abd82d1b5..d3258487517 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/MemoryKieModule.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/MemoryKieModule.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.ByteArrayInputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ResultsImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ResultsImpl.java
index b6bdc2e6936..7e664248998 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ResultsImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ResultsImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ZipKieModule.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ZipKieModule.java
index 4504f183a33..ae150b9d126 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ZipKieModule.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ZipKieModule.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl;
import java.io.BufferedInputStream;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/AbstractKieServicesEventListerner.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/AbstractKieServicesEventListerner.java
index 9aad74d741c..581a3da691e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/AbstractKieServicesEventListerner.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/AbstractKieServicesEventListerner.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl.event;
public abstract class AbstractKieServicesEventListerner implements KieServicesEventListerner {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieModuleDiscovered.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieModuleDiscovered.java
index adc15820869..5e28957382f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieModuleDiscovered.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieModuleDiscovered.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl.event;
public class KieModuleDiscovered {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerEventSupport.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerEventSupport.java
index e94334f2e24..ae35c72893a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerEventSupport.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerEventSupport.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl.event;
import org.drools.core.event.AbstractEventSupport;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerStatusChangeEventImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerStatusChangeEventImpl.java
index 236432f7225..c6c40a49401 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerStatusChangeEventImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerStatusChangeEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl.event;
import org.kie.api.builder.KieScanner.Status;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerUpdateResultsEventImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerUpdateResultsEventImpl.java
index 08b3b1fc74d..9afc64a9ae2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerUpdateResultsEventImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieScannerUpdateResultsEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.builder.impl.event;
import org.kie.api.builder.Results;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieServicesEventListerner.java b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieServicesEventListerner.java
index a80c8ce3f08..8b4856a84f4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieServicesEventListerner.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/event/KieServicesEventListerner.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.builder.impl.event;
public interface KieServicesEventListerner {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/util/BeanCreator.java b/drools-compiler/src/main/java/org/drools/compiler/kie/util/BeanCreator.java
index 347e0cc5fcd..a9f3078763d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/util/BeanCreator.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/util/BeanCreator.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.util;
import org.kie.api.builder.model.QualifierModel;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/util/ChangeSetBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/kie/util/ChangeSetBuilder.java
index 1d1ed29ba48..ebc9900e3cf 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/util/ChangeSetBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/util/ChangeSetBuilder.java
@@ -1,17 +1,20 @@
-/*
- * Copyright 2012 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.kie.util;
@@ -26,7 +29,6 @@
import java.util.Map;
import java.util.Set;
-import org.drools.compiler.builder.impl.KnowledgeBuilderConfigurationImpl;
import org.drools.compiler.builder.impl.KnowledgeBuilderFactoryServiceImpl;
import org.drools.drl.parser.DrlParser;
import org.drools.compiler.kie.builder.impl.InternalKieModule;
@@ -38,7 +40,7 @@
import org.drools.drl.ast.descr.TypeDeclarationDescr;
import org.drools.drl.ast.descr.TypeFieldDescr;
import org.drools.util.TypeResolver;
-import org.drools.core.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.InternalKnowledgePackage;
import org.drools.io.ByteArrayResource;
import org.drools.util.StringUtils;
import org.kie.api.io.ResourceType;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/util/InjectionHelper.java b/drools-compiler/src/main/java/org/drools/compiler/kie/util/InjectionHelper.java
index f6e13ce6554..269667a9e3e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/util/InjectionHelper.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/util/InjectionHelper.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.util;
import java.util.List;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/util/KieJarChangeSet.java b/drools-compiler/src/main/java/org/drools/compiler/kie/util/KieJarChangeSet.java
index e849682e180..735c9d65559 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/util/KieJarChangeSet.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/util/KieJarChangeSet.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kie.util;
import java.util.HashMap;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kie/util/ReflectionBeanCreator.java b/drools-compiler/src/main/java/org/drools/compiler/kie/util/ReflectionBeanCreator.java
index ee2f04a91ed..b841397ccdd 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kie/util/ReflectionBeanCreator.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kie/util/ReflectionBeanCreator.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kie.util;
import org.kie.api.builder.model.QualifierModel;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/KieModuleException.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/KieModuleException.java
new file mode 100644
index 00000000000..6431efc7654
--- /dev/null
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/KieModuleException.java
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.compiler.kproject;
+
+public class KieModuleException extends RuntimeException {
+
+ public KieModuleException(String message) {
+ super(message);
+ }
+}
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/ChannelModelImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/ChannelModelImpl.java
index cfc1940e9ee..7704e9e3ab4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/ChannelModelImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/ChannelModelImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kproject.models;
import org.kie.api.builder.model.ChannelModel;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/FileLoggerModelImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/FileLoggerModelImpl.java
index d084ef98e7c..16b733ca7b9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/FileLoggerModelImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/FileLoggerModelImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kproject.models;
import org.kie.api.builder.model.FileLoggerModel;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieBaseModelImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieBaseModelImpl.java
index fd61b0366ee..bdae5fabbcf 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieBaseModelImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieBaseModelImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kproject.models;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieModuleModelImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieModuleModelImpl.java
index 29fd4e8a3bf..d73d5cb9f8b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieModuleModelImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieModuleModelImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kproject.models;
import java.io.InputStream;
@@ -21,7 +24,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.drools.core.base.XMLSupport;
+import org.drools.base.base.XMLSupport;
import org.drools.util.StringUtils;
import org.kie.api.builder.model.KieBaseModel;
import org.kie.api.builder.model.KieModuleModel;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieSessionModelImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieSessionModelImpl.java
index 9fb9152838a..08847623e41 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieSessionModelImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/KieSessionModelImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kproject.models;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/ListenerModelImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/ListenerModelImpl.java
index b37f9bb5a08..35d21544ea1 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/ListenerModelImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/ListenerModelImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kproject.models;
import org.kie.api.builder.model.ListenerModel;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/QualifierModelImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/QualifierModelImpl.java
index d4a0e43cb71..936a7d2ce8f 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/QualifierModelImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/QualifierModelImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kproject.models;
import java.util.HashMap;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/RuleTemplateModelImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/RuleTemplateModelImpl.java
index 9ef2b6d286e..a0c885e401c 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/RuleTemplateModelImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/RuleTemplateModelImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.kproject.models;
import org.kie.api.builder.model.KieBaseModel;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/WorkItemHandlerModelImpl.java b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/WorkItemHandlerModelImpl.java
index 172e9368ff7..d67549d78c9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/kproject/models/WorkItemHandlerModelImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/kproject/models/WorkItemHandlerModelImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.kproject.models;
import org.kie.api.builder.model.QualifierModel;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/lang/DescrDumper.java b/drools-compiler/src/main/java/org/drools/compiler/lang/DescrDumper.java
index 350001573e8..32fe74e4101 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/lang/DescrDumper.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/lang/DescrDumper.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +47,7 @@
import org.drools.drl.ast.descr.OperatorDescr;
import org.drools.drl.ast.descr.RelationalExprDescr;
import org.drools.drl.parser.impl.Operator;
-import org.drools.core.rule.XpathBackReference;
+import org.drools.base.rule.XpathBackReference;
import org.kie.internal.builder.conf.LanguageLevelOption;
import static org.drools.compiler.rule.builder.dialect.DialectUtil.findClassByName;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/lang/DumperContext.java b/drools-compiler/src/main/java/org/drools/compiler/lang/DumperContext.java
index 7f8363f2cf7..266494c354b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/lang/DumperContext.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/lang/DumperContext.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.lang;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/lang/ExpressionRewriter.java b/drools-compiler/src/main/java/org/drools/compiler/lang/ExpressionRewriter.java
index ec8a080b2ef..fd5c95f9504 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/lang/ExpressionRewriter.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/lang/ExpressionRewriter.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.lang;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/lang/ReflectiveVisitor.java b/drools-compiler/src/main/java/org/drools/compiler/lang/ReflectiveVisitor.java
index 8fa8f84f48e..3513b9ff18a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/lang/ReflectiveVisitor.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/lang/ReflectiveVisitor.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.lang;
import java.lang.reflect.Method;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/lang/Visitor.java b/drools-compiler/src/main/java/org/drools/compiler/lang/Visitor.java
index 555d0192c43..ac0dfa946c0 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/lang/Visitor.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/lang/Visitor.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.lang;
public interface Visitor {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/lang/descr/CompositePackageDescr.java b/drools-compiler/src/main/java/org/drools/compiler/lang/descr/CompositePackageDescr.java
index 9ddcbbe3383..b7da760ee75 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/lang/descr/CompositePackageDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/lang/descr/CompositePackageDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.lang.descr;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/management/KieContainerMonitor.java b/drools-compiler/src/main/java/org/drools/compiler/management/KieContainerMonitor.java
index 6d30c75cefc..48fe0d1ebaa 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/management/KieContainerMonitor.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/management/KieContainerMonitor.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.management;
import org.drools.core.impl.InternalKieContainer;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/AccumulateBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/AccumulateBuilder.java
index db53f54e99b..ad2679daf5e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/AccumulateBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/AccumulateBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
/**
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/CollectBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/CollectBuilder.java
index 7358063c75a..8c08a58154b 100755
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/CollectBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/CollectBuilder.java
@@ -1,27 +1,29 @@
-/*
- * Copyright 2006 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.ast.descr.CollectDescr;
import org.drools.drl.ast.descr.PatternDescr;
-import org.drools.core.rule.Collect;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.RuleConditionElement;
+import org.drools.base.rule.Collect;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.RuleConditionElement;
public class CollectBuilder
implements
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConditionalBranchBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConditionalBranchBuilder.java
index a79caca94d0..8490aaad03a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConditionalBranchBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConditionalBranchBuilder.java
@@ -1,31 +1,34 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
import java.util.List;
import org.drools.drl.parser.DroolsError;
import org.drools.compiler.compiler.RuleBuildError;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.rule.ConditionalBranch;
-import org.drools.core.rule.EvalCondition;
-import org.drools.core.rule.GroupElement;
-import org.drools.core.rule.NamedConsequence;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.RuleConditionElement;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.rule.ConditionalBranch;
+import org.drools.base.rule.EvalCondition;
+import org.drools.base.rule.GroupElement;
+import org.drools.base.rule.NamedConsequence;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.RuleConditionElement;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.ast.descr.ConditionalBranchDescr;
import org.drools.drl.ast.descr.EvalDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConsequenceBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConsequenceBuilder.java
index f21f7fb0407..74a25acf56a 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConsequenceBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConsequenceBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
public interface ConsequenceBuilder {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConstraintBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConstraintBuilder.java
index c01fd8300c8..b0e3dca43e2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConstraintBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ConstraintBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
@@ -25,15 +28,15 @@
import org.drools.compiler.compiler.DialectConfiguration;
import org.drools.compiler.compiler.JavaDialectConfiguration;
import org.drools.compiler.kie.util.BeanCreator;
-import org.drools.core.base.ObjectType;
-import org.drools.core.base.ValueType;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.QueryArgument;
-import org.drools.core.rule.accessor.Evaluator;
-import org.drools.core.rule.accessor.FieldValue;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.rule.constraint.Constraint;
+import org.drools.base.base.ObjectType;
+import org.drools.base.base.ValueType;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.QueryArgument;
+import org.drools.base.rule.accessor.Evaluator;
+import org.drools.base.rule.accessor.FieldValue;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.rule.constraint.Constraint;
import org.drools.core.time.TimerExpression;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.ast.descr.LiteralRestrictionDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EnabledBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EnabledBuilder.java
index b97c604004d..4428a600c53 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EnabledBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EnabledBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
public interface EnabledBuilder {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EngineElementBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EngineElementBuilder.java
index 0cf451a8043..e3064d30a3b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EngineElementBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EngineElementBuilder.java
@@ -1,17 +1,20 @@
-/*
- * Copyright 2008 Red Hat
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.rule.builder;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EntryPointBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EntryPointBuilder.java
index 502d1de2e60..54e97274c67 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EntryPointBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EntryPointBuilder.java
@@ -1,25 +1,28 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.ast.descr.EntryPointDescr;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.RuleConditionElement;
+import org.drools.base.rule.EntryPointId;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.RuleConditionElement;
/**
* A class capable of building entry point instances
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EvaluatorDefinition.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EvaluatorDefinition.java
index e5d78f1d78c..c77425d68a0 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EvaluatorDefinition.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EvaluatorDefinition.java
@@ -1,26 +1,28 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import java.io.Externalizable;
-import org.drools.core.base.ValueType;
+import org.drools.base.base.ValueType;
import org.drools.drl.parser.impl.Operator;
-import org.drools.core.rule.accessor.Evaluator;
+import org.drools.base.rule.accessor.Evaluator;
/**
* An evaluator definition interface that allows for pluggable
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EvaluatorWrapper.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EvaluatorWrapper.java
index de5b75ffcba..cb13ddb5d76 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EvaluatorWrapper.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/EvaluatorWrapper.java
@@ -1,33 +1,36 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
-import org.drools.core.base.ValueType;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.base.ValueType;
import org.drools.core.base.extractors.ConstantValueReader;
-import org.drools.core.base.extractors.SelfReferenceClassFieldReader;
-import org.drools.core.base.field.ObjectFieldImpl;
-import org.drools.core.common.EventFactHandle;
-import org.drools.core.common.InternalFactHandle;
+import org.drools.base.base.extractors.SelfReferenceClassFieldReader;
+import org.drools.base.base.field.ObjectFieldImpl;
+import org.drools.core.common.DefaultEventHandle;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.accessor.Evaluator;
-import org.drools.core.rule.accessor.FieldValue;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.time.Interval;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.accessor.Evaluator;
+import org.drools.base.rule.accessor.FieldValue;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.time.Interval;
+import org.kie.api.runtime.rule.FactHandle;
import static org.drools.core.common.InternalFactHandle.dummyFactHandleOf;
@@ -124,22 +127,22 @@ public ValueType getCoercedValueType() {
return evaluator.getCoercedValueType();
}
- public boolean evaluate(ReteEvaluator reteEvaluator,
+ public boolean evaluate(ValueResolver valueResolver,
ReadAccessor extractor,
- InternalFactHandle factHandle,
+ FactHandle factHandle,
FieldValue value) {
- return evaluator.evaluate( reteEvaluator,
+ return evaluator.evaluate( valueResolver,
extractor,
factHandle,
value );
}
- public boolean evaluate(ReteEvaluator reteEvaluator,
+ public boolean evaluate(ValueResolver valueResolver,
ReadAccessor leftExtractor,
- InternalFactHandle left,
+ FactHandle left,
ReadAccessor rightExtractor,
- InternalFactHandle right) {
- return evaluator.evaluate( reteEvaluator,
+ FactHandle right) {
+ return evaluator.evaluate( valueResolver,
leftExtractor,
left,
rightExtractor,
@@ -162,18 +165,18 @@ public Interval getInterval() {
return evaluator.getInterval();
}
- public void loadHandles(InternalFactHandle[] handles, InternalFactHandle rightHandle) {
- InternalFactHandle localLeftHandle = selfLeft ? null : getFactHandle(leftBinding, handles);
+ public void loadHandles(FactHandle[] handles, FactHandle rightHandle) {
+ FactHandle localLeftHandle = selfLeft ? null : getFactHandle(leftBinding, handles);
- InternalFactHandle localRightHandle = selfRight ? rightHandle : getFactHandle(rightBinding, handles);
+ FactHandle localRightHandle = selfRight ? rightHandle : getFactHandle(rightBinding, handles);
this.rightLiteral = localRightHandle == null;
if (isTemporal()) {
if (localLeftHandle == null) {
localLeftHandle = rightHandle;
}
- leftTimestamp = localLeftHandle instanceof EventFactHandle ? (( EventFactHandle ) localLeftHandle).getStartTimestamp() : null;
- rightTimestamp = localRightHandle instanceof EventFactHandle ? (( EventFactHandle ) localRightHandle).getStartTimestamp() : null;
+ leftTimestamp = localLeftHandle instanceof DefaultEventHandle ? ((DefaultEventHandle) localLeftHandle).getStartTimestamp() : null;
+ rightTimestamp = localRightHandle instanceof DefaultEventHandle ? ((DefaultEventHandle) localRightHandle).getStartTimestamp() : null;
}
}
@@ -195,8 +198,8 @@ public void setBindingName( String bindingName ) {
this.bindingName = bindingName;
}
- private static InternalFactHandle getFactHandle( Declaration declaration,
- InternalFactHandle[] handles ) {
+ private static FactHandle getFactHandle( Declaration declaration,
+ FactHandle[] handles ) {
return handles != null && handles.length > declaration.getObjectIndex() ? handles[declaration.getObjectIndex()] : null;
}
}
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ForallBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ForallBuilder.java
index 2d1c03adeae..431c1cd5ec5 100755
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ForallBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/ForallBuilder.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2006 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import org.drools.drl.ast.descr.BaseDescr;
@@ -21,10 +23,10 @@
import org.drools.drl.ast.descr.ForallDescr;
import org.drools.drl.ast.descr.NotDescr;
import org.drools.drl.ast.descr.PatternDescr;
-import org.drools.core.rule.Forall;
-import org.drools.core.rule.GroupElement;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.RuleConditionElement;
+import org.drools.base.rule.Forall;
+import org.drools.base.rule.GroupElement;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.RuleConditionElement;
public class ForallBuilder
implements
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/FromBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/FromBuilder.java
index 3ff440c35e6..3064a235e2c 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/FromBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/FromBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
/**
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/FunctionBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/FunctionBuilder.java
index 1469a3a03b2..e88e3d075e4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/FunctionBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/FunctionBuilder.java
@@ -1,27 +1,29 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import java.util.List;
import java.util.Map;
import org.drools.drl.ast.descr.FunctionDescr;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.rule.LineMappings;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.rule.LineMappings;
import org.kie.internal.builder.KnowledgeBuilderResult;
import org.drools.util.TypeResolver;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/GroupByBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/GroupByBuilder.java
new file mode 100644
index 00000000000..6549b050446
--- /dev/null
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/GroupByBuilder.java
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.compiler.rule.builder;
+
+/**
+ * A markup interface for AccumulateBuilders
+ */
+public interface GroupByBuilder extends RuleConditionBuilder {
+
+}
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/GroupElementBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/GroupElementBuilder.java
index 171f698facc..2fd20abb3e6 100755
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/GroupElementBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/GroupElementBuilder.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2006 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import org.drools.drl.ast.descr.AndDescr;
@@ -22,10 +24,10 @@
import org.drools.drl.ast.descr.ExistsDescr;
import org.drools.drl.ast.descr.NotDescr;
import org.drools.drl.ast.descr.OrDescr;
-import org.drools.core.rule.GroupElement;
-import org.drools.core.rule.GroupElementFactory;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.RuleConditionElement;
+import org.drools.base.rule.GroupElement;
+import org.drools.base.rule.GroupElementFactory;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.RuleConditionElement;
public class GroupElementBuilder
implements
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/JavaRuleClassBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/JavaRuleClassBuilder.java
index e255e6a5043..6599079d019 100755
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/JavaRuleClassBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/JavaRuleClassBuilder.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import org.drools.drl.ast.descr.RuleDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/NamedConsequenceBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/NamedConsequenceBuilder.java
index a1d99772f41..bc9c3872efc 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/NamedConsequenceBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/NamedConsequenceBuilder.java
@@ -1,24 +1,27 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.ast.descr.NamedConsequenceDescr;
-import org.drools.core.rule.NamedConsequence;
-import org.drools.core.rule.Pattern;
+import org.drools.base.rule.NamedConsequence;
+import org.drools.base.rule.Pattern;
public class NamedConsequenceBuilder implements RuleConditionBuilder {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PackageBuildContext.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PackageBuildContext.java
index e40c7c6d67f..16093c00e2b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PackageBuildContext.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PackageBuildContext.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2006 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import java.lang.reflect.Type;
@@ -28,8 +30,8 @@
import org.drools.compiler.compiler.Dialect;
import org.drools.compiler.compiler.DialectCompiletimeRegistry;
import org.drools.compiler.compiler.DroolsWarning;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.rule.Dialectable;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.rule.Dialectable;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.parser.DroolsError;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilder.java
index 248c0e8462c..0fd9d75de1b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilder.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2006 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import java.lang.reflect.Field;
@@ -43,41 +45,41 @@
import org.drools.compiler.rule.builder.EvaluatorDefinition.Target;
import org.drools.compiler.rule.builder.XpathAnalysis.XpathPart;
import org.drools.compiler.rule.builder.util.ConstraintUtil;
-import org.drools.core.base.AcceptsClassObjectType;
-import org.drools.core.base.ClassObjectType;
+import org.drools.base.base.AcceptsClassObjectType;
+import org.drools.base.base.ClassObjectType;
import org.drools.core.base.FieldNameSupplier;
-import org.drools.core.base.ObjectType;
-import org.drools.core.base.ValueType;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.QueryImpl;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.factmodel.AnnotationDefinition;
-import org.drools.core.factmodel.ClassDefinition;
-import org.drools.core.factmodel.FieldDefinition;
-import org.drools.core.facttemplates.FactTemplate;
-import org.drools.core.facttemplates.FactTemplateFieldExtractor;
-import org.drools.core.facttemplates.FactTemplateObjectType;
-import org.drools.core.reteoo.RuleTerminalNode.SortDeclarations;
-import org.drools.core.rule.Behavior;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.PatternSource;
-import org.drools.core.rule.PredicateConstraint;
-import org.drools.core.rule.RuleConditionElement;
+import org.drools.base.base.ObjectType;
+import org.drools.base.base.ValueType;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.QueryImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.factmodel.AnnotationDefinition;
+import org.drools.base.factmodel.ClassDefinition;
+import org.drools.base.factmodel.FieldDefinition;
+import org.drools.base.facttemplates.FactTemplate;
+import org.drools.base.facttemplates.FactTemplateFieldExtractor;
+import org.drools.base.facttemplates.FactTemplateObjectType;
+import org.drools.base.reteoo.SortDeclarations;
+import org.drools.core.rule.BehaviorRuntime;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.PatternSource;
+import org.drools.base.rule.PredicateConstraint;
+import org.drools.base.rule.RuleConditionElement;
import org.drools.core.rule.SlidingLengthWindow;
import org.drools.core.rule.SlidingTimeWindow;
-import org.drools.core.rule.TypeDeclaration;
-import org.drools.core.rule.XpathBackReference;
-import org.drools.core.rule.accessor.AcceptsReadAccessor;
-import org.drools.core.rule.accessor.DeclarationScopeResolver;
-import org.drools.core.rule.accessor.Evaluator;
-import org.drools.core.rule.accessor.FieldValue;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.rule.constraint.Constraint;
-import org.drools.core.rule.constraint.NegConstraint;
-import org.drools.core.rule.constraint.XpathConstraint;
-import org.drools.core.time.TimeUtils;
-import org.drools.core.util.index.IndexUtil;
+import org.drools.base.rule.TypeDeclaration;
+import org.drools.base.rule.XpathBackReference;
+import org.drools.base.rule.accessor.AcceptsReadAccessor;
+import org.drools.base.rule.accessor.DeclarationScopeResolver;
+import org.drools.base.rule.accessor.Evaluator;
+import org.drools.base.rule.accessor.FieldValue;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.rule.constraint.Constraint;
+import org.drools.base.rule.constraint.NegConstraint;
+import org.drools.base.rule.constraint.XpathConstraint;
+import org.drools.base.time.TimeUtils;
+import org.drools.base.util.index.ConstraintTypeOperator;
import org.drools.drl.ast.descr.AnnotationDescr;
import org.drools.drl.ast.descr.AtomicExprDescr;
import org.drools.drl.ast.descr.BaseDescr;
@@ -376,7 +378,7 @@ private void processSource(RuleBuildContext context, PatternDescr patternDescr,
private void processBehaviors(RuleBuildContext context, PatternDescr patternDescr, Pattern pattern) {
for (BehaviorDescr behaviorDescr : patternDescr.getBehaviors()) {
if (pattern.getObjectType().isEvent()) {
- Behavior window = createWindow(behaviorDescr);
+ BehaviorRuntime window = createWindow(behaviorDescr);
if (window != null) {
pattern.addBehavior(window);
context.setNeedStreamMode();
@@ -393,11 +395,11 @@ private void processBehaviors(RuleBuildContext context, PatternDescr patternDesc
}
}
- private Behavior createWindow(BehaviorDescr behaviorDescr) {
- if (Behavior.BehaviorType.TIME_WINDOW.matches(behaviorDescr.getSubType())) {
+ private BehaviorRuntime createWindow(BehaviorDescr behaviorDescr) {
+ if (BehaviorRuntime.BehaviorType.TIME_WINDOW.matches(behaviorDescr.getSubType())) {
return new SlidingTimeWindow(TimeUtils.parseTimeString(behaviorDescr.getParameters().get(0)));
}
- if (Behavior.BehaviorType.LENGTH_WINDOW.matches(behaviorDescr.getSubType())) {
+ if (BehaviorRuntime.BehaviorType.LENGTH_WINDOW.matches(behaviorDescr.getSubType())) {
return new SlidingLengthWindow(Integer.parseInt(behaviorDescr.getParameters().get(0)));
}
return null;
@@ -997,7 +999,7 @@ private Constraint buildExpression(final RuleBuildContext context,
}
private String normalizeNegatedExpr(String expr, String operator) {
- IndexUtil.ConstraintType constraintType = IndexUtil.ConstraintType.decode(operator);
+ ConstraintTypeOperator constraintType = ConstraintTypeOperator.decode(operator);
return constraintType.getOperator() != null ?
expr.replace( constraintType.getOperator(), constraintType.negate().getOperator() ) :
"!(" + expr + ")";
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilderForAbductiveQuery.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilderForAbductiveQuery.java
index 1f88b5fce4b..af334cdac12 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilderForAbductiveQuery.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilderForAbductiveQuery.java
@@ -1,28 +1,31 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import java.util.Arrays;
import org.drools.compiler.compiler.DescrBuildError;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.rule.Declaration;
-import org.drools.core.definitions.rule.impl.QueryImpl;
-import org.drools.core.base.AcceptsClassObjectType;
-import org.drools.core.base.ObjectType;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.rule.Declaration;
+import org.drools.base.definitions.rule.impl.QueryImpl;
+import org.drools.base.base.AcceptsClassObjectType;
+import org.drools.base.base.ObjectType;
import org.drools.drl.ast.descr.AnnotationDescr;
import org.drools.drl.ast.descr.QueryDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilderForQuery.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilderForQuery.java
index efb291b2f9c..eb2234b4483 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilderForQuery.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilderForQuery.java
@@ -1,30 +1,33 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
import org.drools.compiler.compiler.DescrBuildError;
-import org.drools.core.rule.accessor.ReadAccessor;
+import org.drools.base.rule.accessor.ReadAccessor;
import org.drools.drl.ast.descr.QueryDescr;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.base.extractors.ArrayElementReader;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.Pattern;
-import org.drools.core.definitions.rule.impl.QueryImpl;
-import org.drools.core.rule.constraint.QueryNameConstraint;
-import org.drools.core.base.ObjectType;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.base.extractors.ArrayElementReader;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.Pattern;
+import org.drools.base.definitions.rule.impl.QueryImpl;
+import org.drools.base.rule.constraint.QueryNameConstraint;
+import org.drools.base.base.ObjectType;
public class PatternBuilderForQuery implements EngineElementBuilder {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PredicateBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PredicateBuilder.java
index c712f0c0fd9..771f7c1241e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PredicateBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/PredicateBuilder.java
@@ -1,25 +1,28 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
import org.drools.compiler.compiler.AnalysisResult;
import org.drools.compiler.compiler.BoundIdentifiers;
import org.drools.drl.ast.descr.PredicateDescr;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.PredicateConstraint;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.PredicateConstraint;
public interface PredicateBuilder {
public void build(final RuleBuildContext context,
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/QueryElementBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/QueryElementBuilder.java
index db92d5c93b4..a6345f30fe4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/QueryElementBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/QueryElementBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
import java.util.ArrayList;
@@ -24,19 +27,19 @@
import org.drools.compiler.compiler.DescrBuildError;
import org.drools.compiler.lang.DescrDumper;
import org.drools.compiler.lang.DumperContext;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.base.CoreComponentsBuilder;
-import org.drools.core.base.extractors.ArrayElementReader;
-import org.drools.core.base.extractors.SelfReferenceClassFieldReader;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.QueryArgument;
-import org.drools.core.rule.QueryElement;
-import org.drools.core.definitions.rule.impl.QueryImpl;
-import org.drools.core.rule.RuleConditionElement;
-import org.drools.core.rule.accessor.DeclarationScopeResolver;
-import org.drools.core.base.ObjectType;
-import org.drools.core.rule.accessor.ReadAccessor;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.base.CoreComponentsBuilder;
+import org.drools.base.base.extractors.ArrayElementReader;
+import org.drools.base.base.extractors.SelfReferenceClassFieldReader;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.QueryArgument;
+import org.drools.base.rule.QueryElement;
+import org.drools.base.definitions.rule.impl.QueryImpl;
+import org.drools.base.rule.RuleConditionElement;
+import org.drools.base.rule.accessor.DeclarationScopeResolver;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.accessor.ReadAccessor;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.ast.descr.BindingDescr;
import org.drools.drl.ast.descr.ConstraintConnectiveDescr;
@@ -48,7 +51,7 @@
import org.drools.util.StringUtils;
import org.kie.internal.builder.conf.LanguageLevelOption;
-import static org.drools.core.rule.LogicTransformer.toIntArray;
+import static org.drools.base.rule.LogicTransformer.toIntArray;
import static org.drools.util.StringUtils.isDereferencingIdentifier;
public class QueryElementBuilder
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuildContext.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuildContext.java
index 5879a1001c1..95aa5893379 100755
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuildContext.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuildContext.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2006 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import java.beans.IntrospectionException;
@@ -27,11 +29,11 @@
import org.drools.compiler.compiler.DialectCompiletimeRegistry;
import org.drools.compiler.compiler.RuleBuildError;
import org.drools.core.common.TruthMaintenanceSystemFactory;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.accessor.DeclarationScopeResolver;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.rule.EntryPointId;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.accessor.DeclarationScopeResolver;
import org.drools.drl.ast.descr.QueryDescr;
import org.drools.drl.ast.descr.RuleDescr;
import org.drools.util.TypeResolver;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuilder.java
index 8fa41bc9112..cdef6fe7f23 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuilder.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import java.text.ParseException;
@@ -29,22 +31,22 @@
import org.drools.compiler.compiler.DroolsWarning;
import org.drools.compiler.compiler.RuleBuildError;
import org.drools.compiler.compiler.RuleBuildWarning;
-import org.drools.core.base.CoreComponentsBuilder;
-import org.drools.core.base.EnabledBoolean;
-import org.drools.core.base.SalienceInteger;
+import org.drools.base.base.CoreComponentsBuilder;
+import org.drools.base.base.EnabledBoolean;
+import org.drools.base.base.SalienceInteger;
import org.drools.core.common.InternalAgendaGroup;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.factmodel.AnnotationDefinition;
-import org.drools.core.rule.GroupElement;
-import org.drools.core.definitions.rule.impl.QueryImpl;
-import org.drools.core.rule.accessor.Salience;
-import org.drools.core.time.TimeUtils;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.factmodel.AnnotationDefinition;
+import org.drools.base.rule.GroupElement;
+import org.drools.base.definitions.rule.impl.QueryImpl;
+import org.drools.base.rule.accessor.Salience;
+import org.drools.base.time.TimeUtils;
import org.drools.core.time.TimerExpression;
import org.drools.core.time.impl.CronExpression;
import org.drools.core.time.impl.CronTimer;
import org.drools.core.time.impl.ExpressionIntervalTimer;
import org.drools.core.time.impl.IntervalTimer;
-import org.drools.core.time.impl.Timer;
+import org.drools.base.time.impl.Timer;
import org.drools.drl.ast.descr.AnnotationDescr;
import org.drools.drl.ast.descr.AttributeDescr;
import org.drools.drl.ast.descr.QueryDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleClassBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleClassBuilder.java
index ea971f8f6c7..78eb8547e6b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleClassBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleClassBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleConditionBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleConditionBuilder.java
index 25920914ffb..1caafd5b13b 100755
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleConditionBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleConditionBuilder.java
@@ -1,24 +1,26 @@
-/*
- * Copyright 2006 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder;
import org.drools.drl.ast.descr.BaseDescr;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.RuleConditionElement;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.RuleConditionElement;
/**
* An interface to define classes capable of building
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/SalienceBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/SalienceBuilder.java
index e29a8f250b4..7257e9f10bb 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/SalienceBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/SalienceBuilder.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
public interface SalienceBuilder {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/WindowReferenceBuilder.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/WindowReferenceBuilder.java
index 7836b321189..867b59b10c3 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/WindowReferenceBuilder.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/WindowReferenceBuilder.java
@@ -1,26 +1,29 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
import org.drools.compiler.compiler.DescrBuildError;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.ast.descr.WindowReferenceDescr;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.RuleConditionElement;
-import org.drools.core.rule.WindowReference;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.RuleConditionElement;
+import org.drools.base.rule.WindowReference;
/**
* A class capable of building window source references
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/XpathAnalysis.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/XpathAnalysis.java
index 0bfefc80915..bfe9712ffa2 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/XpathAnalysis.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/XpathAnalysis.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectError.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectError.java
index 87c6b6fde41..edcd53101de 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectError.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectError.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect;
import org.drools.drl.parser.DroolsError;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectUtil.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectUtil.java
index b6cbe198634..3ca1706d3db 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectUtil.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectUtil.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect;
import java.util.HashSet;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/AbstractJavaBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/AbstractJavaBlockDescr.java
index cd203daf599..565773c2a09 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/AbstractJavaBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/AbstractJavaBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
import java.util.List;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/AbstractJavaContainerBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/AbstractJavaContainerBlockDescr.java
index bbee8eea5a7..32fcbafbb7b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/AbstractJavaContainerBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/AbstractJavaContainerBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaBlockDescr.java
index 3323e49a42c..5da92e20147 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
import java.util.List;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaCatchBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaCatchBlockDescr.java
index 312116cf736..1a2197011a7 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaCatchBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaCatchBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
public class JavaCatchBlockDescr extends AbstractJavaContainerBlockDescr
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaContainerBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaContainerBlockDescr.java
index 31eb6c8ba55..70295c5fac9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaContainerBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaContainerBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
import java.util.List;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaElseBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaElseBlockDescr.java
index 24852dd2306..4a3874d82f1 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaElseBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaElseBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
public class JavaElseBlockDescr extends AbstractJavaContainerBlockDescr
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaExitPointsDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaExitPointsDescr.java
index 7cd0f9dc0a4..bcb7c51f7df 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaExitPointsDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaExitPointsDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaFinalBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaFinalBlockDescr.java
index 4ce3dd2dabc..094b76d30fa 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaFinalBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaFinalBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
public class JavaFinalBlockDescr extends AbstractJavaContainerBlockDescr
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaForBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaForBlockDescr.java
index 8ddf921352f..e50969d169e 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaForBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaForBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
public class JavaForBlockDescr extends AbstractJavaContainerBlockDescr
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaIfBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaIfBlockDescr.java
index bd4b67c6360..83530cf1933 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaIfBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaIfBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
public class JavaIfBlockDescr extends AbstractJavaContainerBlockDescr
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaInterfacePointsDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaInterfacePointsDescr.java
index 2126e3942ed..467a32f1c54 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaInterfacePointsDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaInterfacePointsDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaLexer.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaLexer.java
index e21fc184237..6d8b69cee6d 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaLexer.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaLexer.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// $ANTLR 3.5 src/main/resources/org/drools/compiler/semantics/java/parser/Java.g 2017-05-16 10:26:33
package org.drools.compiler.rule.builder.dialect.java.parser;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaLocalDeclarationDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaLocalDeclarationDescr.java
index 302d60042dc..acc31eef500 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaLocalDeclarationDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaLocalDeclarationDescr.java
@@ -1,19 +1,20 @@
-/*
- * Copyright 2006 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Created on Jun 18, 2007
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.drools.compiler.rule.builder.dialect.java.parser;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaModifyBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaModifyBlockDescr.java
index 68214beb001..e71eccaf48c 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaModifyBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaModifyBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaParser.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaParser.java
index 8a0457ca39b..becf8097228 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaParser.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaParser.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// $ANTLR 3.5.2 src/main/resources/org/drools/compiler/semantics/java/parser/Java.g 2020-01-03 12:48:30
package org.drools.compiler.rule.builder.dialect.java.parser;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaRootBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaRootBlockDescr.java
index 9c0b7e7d300..79d0c6ccbec 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaRootBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaRootBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
public class JavaRootBlockDescr extends AbstractJavaContainerBlockDescr
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaStatementBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaStatementBlockDescr.java
index 0523adc32ee..b7873ed6a78 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaStatementBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaStatementBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
public class JavaStatementBlockDescr extends AbstractJavaBlockDescr implements JavaBlockDescr {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaThrowBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaThrowBlockDescr.java
index 328969dd980..db7d4f195b6 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaThrowBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaThrowBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
/**
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaTryBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaTryBlockDescr.java
index 5ac4c1ae43c..60f99508977 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaTryBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaTryBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
import java.util.ArrayList;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaWhileBlockDescr.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaWhileBlockDescr.java
index 3c6b7759a02..4d99cf2d491 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaWhileBlockDescr.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/parser/JavaWhileBlockDescr.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.dialect.java.parser;
public class JavaWhileBlockDescr extends AbstractJavaContainerBlockDescr
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/AccumulateUtil.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/AccumulateUtil.java
index 57a9941bd07..192873909f1 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/AccumulateUtil.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/AccumulateUtil.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.util;
import java.math.BigDecimal;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/AnnotationFactory.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/AnnotationFactory.java
index f710d5dfce3..39d4d82d046 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/AnnotationFactory.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/AnnotationFactory.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.util;
import java.lang.annotation.Annotation;
@@ -20,7 +23,7 @@
import java.lang.reflect.Method;
import org.drools.util.TypeResolver;
-import org.drools.core.rule.Annotated;
+import org.drools.base.rule.Annotated;
import org.drools.drl.ast.descr.AnnotatedBaseDescr;
import org.drools.drl.ast.descr.AnnotationDescr;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/ConstraintUtil.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/ConstraintUtil.java
index 5eff8c657b2..7cf071f3192 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/ConstraintUtil.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/ConstraintUtil.java
@@ -1,9 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.util;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.rule.Pattern;
-import org.drools.core.base.ObjectType;
-import org.drools.core.util.index.IndexUtil;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.rule.Pattern;
+import org.drools.base.base.ObjectType;
+import org.drools.base.util.index.ConstraintTypeOperator;
import org.drools.drl.ast.descr.BaseDescr;
import org.drools.drl.ast.descr.OperatorDescr;
import org.drools.drl.ast.descr.RelationalExprDescr;
@@ -54,7 +72,7 @@ public static String inverseExpression(RelationalExprDescr relDescr, String expr
relDescr.setLeft(relDescr.getRight());
relDescr.setRight(left);
- String inversedOperator = IndexUtil.ConstraintType.decode(operator).inverse().getOperator();
+ String inversedOperator = ConstraintTypeOperator.decode(operator).inverse().getOperator();
operatorDescr.setOperator(inversedOperator);
@@ -84,7 +102,7 @@ private static boolean canInverse(Pattern pattern, String operator, OperatorDesc
if (leftProp.isEmpty() || rightProp.isEmpty()) {
return false;
}
- return IndexUtil.ConstraintType.decode(operator).canInverse();
+ return ConstraintTypeOperator.decode(operator).canInverse();
}
private static String getFirstProp(String str) {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/PackageBuilderUtil.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/PackageBuilderUtil.java
index 572ae0af8c1..92565eb54fb 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/PackageBuilderUtil.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/PackageBuilderUtil.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.rule.builder.util;
import org.drools.compiler.compiler.DescrBuildError;
@@ -21,10 +24,10 @@
import org.drools.drl.ast.descr.PatternDescr;
import org.drools.drl.ast.descr.WindowReferenceDescr;
import org.drools.compiler.rule.builder.RuleBuildContext;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.QueryElement;
-import org.drools.core.rule.RuleConditionElement;
+import org.drools.base.rule.EntryPointId;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.QueryElement;
+import org.drools.base.rule.RuleConditionElement;
public class PackageBuilderUtil {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/PatternBuilderUtil.java b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/PatternBuilderUtil.java
index c66155876a5..292d89709a9 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/PatternBuilderUtil.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/rule/builder/util/PatternBuilderUtil.java
@@ -1,27 +1,31 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.rule.builder.util;
import java.time.LocalDate;
import java.time.LocalDateTime;
-import org.drools.core.base.ValueType;
-import org.drools.core.rule.accessor.FieldValue;
+import org.drools.base.base.ValueType;
+import org.drools.base.rule.accessor.FieldValue;
import org.drools.drl.ast.descr.LiteralRestrictionDescr;
-import static org.drools.core.util.TimeIntervalParser.getTimestampFromDate;
+import static org.drools.base.util.TimeIntervalParser.getTimestampFromDate;
public class PatternBuilderUtil {
diff --git a/drools-compiler/src/main/java/org/drools/compiler/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java b/drools-compiler/src/main/java/org/drools/compiler/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java
index 9b15d3e9d71..e6f93ed5ec4 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.compiler.runtime.pipeline.impl;
import java.io.ByteArrayOutputStream;
@@ -45,7 +47,7 @@
import org.drools.compiler.compiler.PackageRegistry;
import org.drools.compiler.compiler.ProjectJavaCompiler;
import org.drools.core.common.DefaultFactHandle;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.drl.ast.descr.PackageDescr;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.wiring.api.classloader.ProjectClassLoader;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/testframework/RuleCoverageListener.java b/drools-compiler/src/main/java/org/drools/compiler/testframework/RuleCoverageListener.java
index a0a4456fdb5..8c4a3ca43dc 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/testframework/RuleCoverageListener.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/testframework/RuleCoverageListener.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.testframework;
import java.util.HashSet;
diff --git a/drools-compiler/src/main/java/org/drools/compiler/testframework/TestingEventListener.java b/drools-compiler/src/main/java/org/drools/compiler/testframework/TestingEventListener.java
index 042c30da00b..bdec940b81b 100644
--- a/drools-compiler/src/main/java/org/drools/compiler/testframework/TestingEventListener.java
+++ b/drools-compiler/src/main/java/org/drools/compiler/testframework/TestingEventListener.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.compiler.testframework;
import java.io.IOException;
@@ -24,8 +27,8 @@
import java.util.Map;
import java.util.Map.Entry;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.consequence.Consequence;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.rule.consequence.Consequence;
import org.drools.core.rule.consequence.KnowledgeHelper;
import org.kie.api.definition.rule.Rule;
import org.kie.api.event.rule.AfterMatchFiredEvent;
@@ -208,9 +211,9 @@ public void beforeRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent event)
}
-class NilConsequence implements Consequence {
+class NilConsequence implements Consequence {
- public void evaluate(KnowledgeHelper knowledgeHelper, ReteEvaluator reteEvaluator) throws Exception {
+ public void evaluate(KnowledgeHelper knowledgeHelper, ValueResolver valueResolver) throws Exception {
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
diff --git a/drools-compiler/src/main/spotbugs/spotbugs-exclude.xml b/drools-compiler/src/main/spotbugs/spotbugs-exclude.xml
index 0d013b50c04..63947bbcff1 100644
--- a/drools-compiler/src/main/spotbugs/spotbugs-exclude.xml
+++ b/drools-compiler/src/main/spotbugs/spotbugs-exclude.xml
@@ -1,4 +1,24 @@
+
diff --git a/drools-core/pom.xml b/drools-core/pom.xml
index 530fa03d835..42092de7979 100644
--- a/drools-core/pom.xml
+++ b/drools-core/pom.xml
@@ -1,4 +1,24 @@
+
@@ -6,7 +26,7 @@
org.kiedrools-build-parent
- 8.40.0-SNAPSHOT
+ 8.45.0-SNAPSHOT../build-parent/pom.xml
@@ -41,6 +61,10 @@
org.droolsdrools-wiring-api
+
+ org.drools
+ drools-base
+ org.droolsdrools-wiring-static
diff --git a/drools-core/src/main/filtered-resources/drools.versions.properties b/drools-core/src/main/filtered-resources/drools.versions.properties
index d01d77ba5a4..c2c081302ad 100644
--- a/drools-core/src/main/filtered-resources/drools.versions.properties
+++ b/drools-core/src/main/filtered-resources/drools.versions.properties
@@ -1 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
drools.version=${project.version}
\ No newline at end of file
diff --git a/drools-core/src/main/java/org/drools/core/ActivationListenerFactory.java b/drools-core/src/main/java/org/drools/core/ActivationListenerFactory.java
index 93462ad8784..78c62a7e2a9 100644
--- a/drools-core/src/main/java/org/drools/core/ActivationListenerFactory.java
+++ b/drools-core/src/main/java/org/drools/core/ActivationListenerFactory.java
@@ -1,25 +1,28 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.LeftTupleSource;
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.GroupElement;
+import org.drools.base.rule.GroupElement;
public interface ActivationListenerFactory {
TerminalNode createActivationListener(int id,
diff --git a/drools-core/src/main/java/org/drools/core/BaseConfiguration.java b/drools-core/src/main/java/org/drools/core/BaseConfiguration.java
index 1e3ecaa28bb..7d2a7cc991c 100644
--- a/drools-core/src/main/java/org/drools/core/BaseConfiguration.java
+++ b/drools-core/src/main/java/org/drools/core/BaseConfiguration.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/BaseConfigurationFactories.java b/drools-core/src/main/java/org/drools/core/BaseConfigurationFactories.java
index 475f7e9f772..556c27f764c 100644
--- a/drools-core/src/main/java/org/drools/core/BaseConfigurationFactories.java
+++ b/drools-core/src/main/java/org/drools/core/BaseConfigurationFactories.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import org.kie.api.conf.KieBaseOption;
diff --git a/drools-core/src/main/java/org/drools/core/BeliefSystemType.java b/drools-core/src/main/java/org/drools/core/BeliefSystemType.java
index 8056ff03f45..c18fb2900d3 100644
--- a/drools-core/src/main/java/org/drools/core/BeliefSystemType.java
+++ b/drools-core/src/main/java/org/drools/core/BeliefSystemType.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
/**
diff --git a/drools-core/src/main/java/org/drools/core/ClassObjectFilter.java b/drools-core/src/main/java/org/drools/core/ClassObjectFilter.java
index 2bc4194cb56..ad7e228fbef 100644
--- a/drools-core/src/main/java/org/drools/core/ClassObjectFilter.java
+++ b/drools-core/src/main/java/org/drools/core/ClassObjectFilter.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
diff --git a/drools-core/src/main/java/org/drools/core/ClassObjectSerializationFilter.java b/drools-core/src/main/java/org/drools/core/ClassObjectSerializationFilter.java
index 9f0e1fadf94..1dbb032c7e7 100644
--- a/drools-core/src/main/java/org/drools/core/ClassObjectSerializationFilter.java
+++ b/drools-core/src/main/java/org/drools/core/ClassObjectSerializationFilter.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core;
import javax.xml.bind.annotation.XmlAccessType;
diff --git a/drools-core/src/main/java/org/drools/core/ClockType.java b/drools-core/src/main/java/org/drools/core/ClockType.java
index fbb6619d587..d3aaa608a1e 100644
--- a/drools-core/src/main/java/org/drools/core/ClockType.java
+++ b/drools-core/src/main/java/org/drools/core/ClockType.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import org.drools.core.time.TimerService;
diff --git a/drools-core/src/main/java/org/drools/core/CompositeSessionConfiguration.java b/drools-core/src/main/java/org/drools/core/CompositeSessionConfiguration.java
index 425a188d70b..41070ec5727 100644
--- a/drools-core/src/main/java/org/drools/core/CompositeSessionConfiguration.java
+++ b/drools-core/src/main/java/org/drools/core/CompositeSessionConfiguration.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import org.kie.api.runtime.KieSessionConfiguration;
diff --git a/drools-core/src/main/java/org/drools/core/EntryPointsManager.java b/drools-core/src/main/java/org/drools/core/EntryPointsManager.java
index 24b9c1816f4..ba367595235 100644
--- a/drools-core/src/main/java/org/drools/core/EntryPointsManager.java
+++ b/drools-core/src/main/java/org/drools/core/EntryPointsManager.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core;
import java.util.Collection;
diff --git a/drools-core/src/main/java/org/drools/core/FlowBaseConfiguration.java b/drools-core/src/main/java/org/drools/core/FlowBaseConfiguration.java
index 9882cabbcdc..b81676ae75f 100755
--- a/drools-core/src/main/java/org/drools/core/FlowBaseConfiguration.java
+++ b/drools-core/src/main/java/org/drools/core/FlowBaseConfiguration.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/FlowSessionConfiguration.java b/drools-core/src/main/java/org/drools/core/FlowSessionConfiguration.java
index ad86f2da4c7..51499fc5b56 100644
--- a/drools-core/src/main/java/org/drools/core/FlowSessionConfiguration.java
+++ b/drools-core/src/main/java/org/drools/core/FlowSessionConfiguration.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.io.Externalizable;
@@ -24,7 +26,7 @@
import java.util.Map;
import java.util.Set;
-import org.drools.core.base.CoreComponentsBuilder;
+import org.drools.base.base.CoreComponentsBuilder;
import org.drools.core.process.WorkItemManagerFactory;
import org.drools.core.util.ConfFileUtils;
import org.kie.api.conf.ConfigurationKey;
diff --git a/drools-core/src/main/java/org/drools/core/InitialFact.java b/drools-core/src/main/java/org/drools/core/InitialFact.java
deleted file mode 100644
index ddf43df2afe..00000000000
--- a/drools-core/src/main/java/org/drools/core/InitialFact.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core;
-
-import java.io.Serializable;
-
-/**
- * Initial fact, automatically put into the network. This fact is needed by 'not' CEs
- * when they are the CEs in the rule.
- */
-public interface InitialFact
- extends
- Serializable {
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/KieBaseConfigurationImpl.java b/drools-core/src/main/java/org/drools/core/KieBaseConfigurationImpl.java
index f98df34a2bd..d41ffdb12f0 100755
--- a/drools-core/src/main/java/org/drools/core/KieBaseConfigurationImpl.java
+++ b/drools-core/src/main/java/org/drools/core/KieBaseConfigurationImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/QueryActivationListenerFactory.java b/drools-core/src/main/java/org/drools/core/QueryActivationListenerFactory.java
index fd02ba36f87..5d35b854829 100644
--- a/drools-core/src/main/java/org/drools/core/QueryActivationListenerFactory.java
+++ b/drools-core/src/main/java/org/drools/core/QueryActivationListenerFactory.java
@@ -1,26 +1,29 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.CoreComponentFactory;
import org.drools.core.reteoo.LeftTupleSource;
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.GroupElement;
+import org.drools.base.rule.GroupElement;
public class QueryActivationListenerFactory implements ActivationListenerFactory {
public static final QueryActivationListenerFactory INSTANCE = new QueryActivationListenerFactory();
diff --git a/drools-core/src/main/java/org/drools/core/QueryResultsImpl.java b/drools-core/src/main/java/org/drools/core/QueryResultsImpl.java
index 8d444d82337..fd2cf7a6cf7 100644
--- a/drools-core/src/main/java/org/drools/core/QueryResultsImpl.java
+++ b/drools-core/src/main/java/org/drools/core/QueryResultsImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.util.Collections;
@@ -26,7 +28,7 @@
import org.drools.core.base.QueryRowWithSubruleIndex;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.Declaration;
+import org.drools.base.rule.Declaration;
import org.kie.api.runtime.rule.QueryResults;
import org.kie.api.runtime.rule.QueryResultsRow;
diff --git a/drools-core/src/main/java/org/drools/core/QueryResultsRowImpl.java b/drools-core/src/main/java/org/drools/core/QueryResultsRowImpl.java
index b26e3cfa451..53d599f8e89 100644
--- a/drools-core/src/main/java/org/drools/core/QueryResultsRowImpl.java
+++ b/drools-core/src/main/java/org/drools/core/QueryResultsRowImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.util.Map;
@@ -21,7 +23,7 @@
import org.drools.core.base.QueryRowWithSubruleIndex;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.Declaration;
+import org.drools.base.rule.Declaration;
import org.kie.api.runtime.rule.FactHandle;
import org.kie.api.runtime.rule.QueryResultsRow;
diff --git a/drools-core/src/main/java/org/drools/core/RuleActivationListenerFactory.java b/drools-core/src/main/java/org/drools/core/RuleActivationListenerFactory.java
index 8067888149e..2e5193fdb31 100644
--- a/drools-core/src/main/java/org/drools/core/RuleActivationListenerFactory.java
+++ b/drools-core/src/main/java/org/drools/core/RuleActivationListenerFactory.java
@@ -1,26 +1,29 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.CoreComponentFactory;
import org.drools.core.reteoo.LeftTupleSource;
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.GroupElement;
+import org.drools.base.rule.GroupElement;
public class RuleActivationListenerFactory implements ActivationListenerFactory {
diff --git a/drools-core/src/main/java/org/drools/core/RuleBaseConfiguration.java b/drools-core/src/main/java/org/drools/core/RuleBaseConfiguration.java
index 404e9ba6e11..0f4d0bde74d 100755
--- a/drools-core/src/main/java/org/drools/core/RuleBaseConfiguration.java
+++ b/drools-core/src/main/java/org/drools/core/RuleBaseConfiguration.java
@@ -1,29 +1,24 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.drools.core.rule.consequence.ConflictResolver;
+import org.drools.base.rule.consequence.ConflictResolver;
import org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler;
import org.drools.util.StringUtils;
import org.kie.api.KieBaseConfiguration;
@@ -50,13 +45,20 @@
import org.kie.internal.conf.IndexPrecedenceOption;
import org.kie.internal.conf.IndexRightBetaMemoryOption;
import org.kie.internal.conf.MaxThreadsOption;
-import org.kie.internal.conf.MultithreadEvaluationOption;
+import org.kie.internal.conf.ParallelExecutionOption;
import org.kie.internal.conf.SequentialAgendaOption;
import org.kie.internal.conf.ShareAlphaNodesOption;
import org.kie.internal.conf.ShareBetaNodesOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* RuleBaseConfiguration
*
@@ -141,10 +143,10 @@ public class RuleBaseConfiguration extends BaseConfiguration T getOption(OptionKey option) {
case MaxThreadsOption.PROPERTY_NAME: {
return (T) MaxThreadsOption.get(getMaxThreads());
}
- case MultithreadEvaluationOption.PROPERTY_NAME: {
- return (T) (this.multithread ? MultithreadEvaluationOption.YES : MultithreadEvaluationOption.NO);
+ case ParallelExecutionOption.PROPERTY_NAME: {
+ return (T) parallelExecution;
}
case DeclarativeAgendaOption.PROPERTY_NAME: {
return (T) (this.isDeclarativeAgenda() ? DeclarativeAgendaOption.ENABLED : DeclarativeAgendaOption.DISABLED);
@@ -419,8 +421,8 @@ public void setOption(KieBaseOption option) {
setMaxThreads( ( (MaxThreadsOption) option ).getMaxThreads());
break;
}
- case MultithreadEvaluationOption.PROPERTY_NAME: {
- setMultithreadEvaluation( ( (MultithreadEvaluationOption) option ).isMultithreadEvaluation());
+ case ParallelExecutionOption.PROPERTY_NAME: {
+ setParallelExecution( (ParallelExecutionOption) option );
break;
}
case DeclarativeAgendaOption.PROPERTY_NAME: {
@@ -502,8 +504,8 @@ public boolean setInternalProperty(String name, String value) {
setRuleBaseUpdateHandler(StringUtils.isEmpty(value) ? "" : value);
break;
}
- case MultithreadEvaluationOption.PROPERTY_NAME: {
- setMultithreadEvaluation(StringUtils.isEmpty(value) ? false : Boolean.valueOf(value));
+ case ParallelExecutionOption.PROPERTY_NAME: {
+ setParallelExecution(ParallelExecutionOption.determineParallelExecution(StringUtils.isEmpty(value) ? "sequential" : value));
break;
}
case MaxThreadsOption.PROPERTY_NAME: {
@@ -575,8 +577,8 @@ public String getInternalProperty(String name) {
case "drools.ruleBaseUpdateHandler": {
return getRuleBaseUpdateHandler();
}
- case MultithreadEvaluationOption.PROPERTY_NAME: {
- return Boolean.toString(isMultithreadEvaluation());
+ case ParallelExecutionOption.PROPERTY_NAME: {
+ return parallelExecution.toExternalForm();
}
case MaxThreadsOption.PROPERTY_NAME: {
return Integer.toString(getMaxThreads());
@@ -762,21 +764,13 @@ public void setSequentialAgenda(final SequentialAgenda sequentialAgenda) {
this.sequentialAgenda = sequentialAgenda;
}
- /**
- * Defines if the RuleBase should be executed using a pool of
- * threads for evaluating the rules ("true"), or if the rulebase
- * should work in classic single thread mode ("false").
- *
- * @param enableMultithread true for multi-thread or
- * false for single-thread. Default is false.
- */
- public void setMultithreadEvaluation(boolean enableMultithread) {
+ public void setParallelExecution(ParallelExecutionOption parallelExecutionOption) {
checkCanChange();
- this.multithread = enableMultithread;
+ this.parallelExecution = parallelExecutionOption;
}
public void enforceSingleThreadEvaluation() {
- this.multithread = false;
+ this.parallelExecution = ParallelExecutionOption.SEQUENTIAL;
}
/**
@@ -785,8 +779,12 @@ public void enforceSingleThreadEvaluation() {
*
* @return
*/
- public boolean isMultithreadEvaluation() {
- return this.multithread;
+ public boolean isParallelEvaluation() {
+ return this.parallelExecution.isParallel();
+ }
+
+ public boolean isParallelExecution() {
+ return this.parallelExecution == ParallelExecutionOption.FULLY_PARALLEL;
}
/**
diff --git a/drools-core/src/main/java/org/drools/core/RuleSessionConfiguration.java b/drools-core/src/main/java/org/drools/core/RuleSessionConfiguration.java
index ac7b3617558..b03f4d5212d 100644
--- a/drools-core/src/main/java/org/drools/core/RuleSessionConfiguration.java
+++ b/drools-core/src/main/java/org/drools/core/RuleSessionConfiguration.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/SessionConfiguration.java b/drools-core/src/main/java/org/drools/core/SessionConfiguration.java
index 551170c7d2e..a087e43644b 100644
--- a/drools-core/src/main/java/org/drools/core/SessionConfiguration.java
+++ b/drools-core/src/main/java/org/drools/core/SessionConfiguration.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/SessionConfigurationFactories.java b/drools-core/src/main/java/org/drools/core/SessionConfigurationFactories.java
index 6b5aa49b842..edb44c8c315 100644
--- a/drools-core/src/main/java/org/drools/core/SessionConfigurationFactories.java
+++ b/drools-core/src/main/java/org/drools/core/SessionConfigurationFactories.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import org.kie.api.conf.OptionsConfiguration;
diff --git a/drools-core/src/main/java/org/drools/core/TimerJobFactoryType.java b/drools-core/src/main/java/org/drools/core/TimerJobFactoryType.java
index b2f60e86a9a..ebba16257a4 100644
--- a/drools-core/src/main/java/org/drools/core/TimerJobFactoryType.java
+++ b/drools-core/src/main/java/org/drools/core/TimerJobFactoryType.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core;
import java.io.Serializable;
diff --git a/drools-core/src/main/java/org/drools/core/WorkItemHandlerNotFoundException.java b/drools-core/src/main/java/org/drools/core/WorkItemHandlerNotFoundException.java
index a71987f44f8..bb5300c49dd 100644
--- a/drools-core/src/main/java/org/drools/core/WorkItemHandlerNotFoundException.java
+++ b/drools-core/src/main/java/org/drools/core/WorkItemHandlerNotFoundException.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core;
diff --git a/drools-core/src/main/java/org/drools/core/WorkingMemory.java b/drools-core/src/main/java/org/drools/core/WorkingMemory.java
index d84a00b3a10..5991a5dac57 100644
--- a/drools-core/src/main/java/org/drools/core/WorkingMemory.java
+++ b/drools-core/src/main/java/org/drools/core/WorkingMemory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.util.Collection;
@@ -22,7 +24,7 @@
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.accessor.GlobalResolver;
+import org.drools.base.rule.accessor.GlobalResolver;
import org.kie.api.runtime.Environment;
import org.kie.api.runtime.process.ProcessInstance;
import org.kie.api.runtime.process.WorkItemManager;
diff --git a/drools-core/src/main/java/org/drools/core/WorkingMemoryEntryPoint.java b/drools-core/src/main/java/org/drools/core/WorkingMemoryEntryPoint.java
index 7f862181daf..982ce46fd3d 100644
--- a/drools-core/src/main/java/org/drools/core/WorkingMemoryEntryPoint.java
+++ b/drools-core/src/main/java/org/drools/core/WorkingMemoryEntryPoint.java
@@ -1,33 +1,35 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import org.drools.core.common.ObjectStore;
import org.drools.core.common.ObjectTypeConfigurationRegistry;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.impl.RuleBase;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.EntryPointNode;
import org.drools.core.reteoo.TerminalNode;
-import org.drools.core.rule.EntryPointId;
+import org.drools.base.rule.EntryPointId;
import org.drools.core.rule.consequence.InternalMatch;
import org.drools.core.rule.accessor.FactHandleFactory;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
import org.kie.api.runtime.rule.EntryPoint;
import org.kie.api.runtime.rule.FactHandle;
@@ -61,7 +63,7 @@ FactHandle insert(Object object,
ObjectTypeConfigurationRegistry getObjectTypeConfigurationRegistry();
- RuleBase getKnowledgeBase();
+ InternalRuleBase getKnowledgeBase();
void delete(FactHandle factHandle,
RuleImpl rule,
diff --git a/drools-core/src/main/java/org/drools/core/WorkingMemoryEventManager.java b/drools-core/src/main/java/org/drools/core/WorkingMemoryEventManager.java
index 61d664ff6f8..de23364fda9 100644
--- a/drools-core/src/main/java/org/drools/core/WorkingMemoryEventManager.java
+++ b/drools-core/src/main/java/org/drools/core/WorkingMemoryEventManager.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core;
import java.util.Collection;
diff --git a/drools-core/src/main/java/org/drools/core/base/AbstractQueryViewListener.java b/drools-core/src/main/java/org/drools/core/base/AbstractQueryViewListener.java
index c4f4188899f..1ad3b510187 100644
--- a/drools-core/src/main/java/org/drools/core/base/AbstractQueryViewListener.java
+++ b/drools-core/src/main/java/org/drools/core/base/AbstractQueryViewListener.java
@@ -1,14 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.base;
import java.util.ArrayList;
import java.util.List;
-import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleNode;
import org.drools.core.reteoo.QueryTerminalNode;
+import org.kie.api.runtime.rule.FactHandle;
public abstract class AbstractQueryViewListener implements InternalViewChangedEventListener {
@@ -22,28 +40,28 @@ public List extends Object> getResults() {
return this.results;
}
- public abstract InternalFactHandle getHandle(InternalFactHandle originalHandle);
+ public abstract FactHandle getHandle(FactHandle originalHandle);
public void rowAdded(RuleImpl rule, LeftTuple tuple, ReteEvaluator reteEvaluator) {
- InternalFactHandle[] handles = new InternalFactHandle[((LeftTupleNode)tuple.getTupleSink()).getObjectCount()];
+ FactHandle[] handles = new FactHandle[((LeftTupleNode)tuple.getTupleSink()).getObjectCount()];
LeftTuple entry = (LeftTuple) tuple.skipEmptyHandles();
// Add all the FactHandles
int i = handles.length-1;
while ( entry != null ) {
- InternalFactHandle handle = entry.getFactHandle();
+ FactHandle handle = entry.getFactHandle();
handles[i--] = getHandle(handle);
entry = entry.getParent();
}
- QueryTerminalNode node = tuple.getTupleSink();
+ QueryTerminalNode node = (QueryTerminalNode) tuple.getTupleSink();
this.results.add( new QueryRowWithSubruleIndex(handles, node.getSubruleIndex()) );
}
- public void rowRemoved( RuleImpl rule, LeftTuple tuple, ReteEvaluator reteEvaluator ) {
+ public void rowRemoved(RuleImpl rule, LeftTuple tuple, ReteEvaluator reteEvaluator ) {
}
- public void rowUpdated( RuleImpl rule, LeftTuple tuple, ReteEvaluator reteEvaluator ) {
+ public void rowUpdated(RuleImpl rule, LeftTuple tuple, ReteEvaluator reteEvaluator ) {
}
}
diff --git a/drools-core/src/main/java/org/drools/core/base/AcceptsClassObjectType.java b/drools-core/src/main/java/org/drools/core/base/AcceptsClassObjectType.java
deleted file mode 100644
index 68351bc1962..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/AcceptsClassObjectType.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-public interface AcceptsClassObjectType {
- void setClassObjectType(ClassObjectType classObjectType);
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/AccessorKeySupplier.java b/drools-core/src/main/java/org/drools/core/base/AccessorKeySupplier.java
deleted file mode 100644
index bad444e7749..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/AccessorKeySupplier.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-public interface AccessorKeySupplier {
- AccessorKey getAccessorKey();
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/ArrayElements.java b/drools-core/src/main/java/org/drools/core/base/ArrayElements.java
index 2318d25e54f..6c17e910f7e 100644
--- a/drools-core/src/main/java/org/drools/core/base/ArrayElements.java
+++ b/drools-core/src/main/java/org/drools/core/base/ArrayElements.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.util.Arrays;
diff --git a/drools-core/src/main/java/org/drools/core/base/BaseClassFieldWriter.java b/drools-core/src/main/java/org/drools/core/base/BaseClassFieldWriter.java
index ae8ee36c393..8becdfcd536 100644
--- a/drools-core/src/main/java/org/drools/core/base/BaseClassFieldWriter.java
+++ b/drools-core/src/main/java/org/drools/core/base/BaseClassFieldWriter.java
@@ -1,26 +1,31 @@
-/*
- * Copyright 2008 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import org.drools.core.rule.accessor.WriteAccessor;
+import org.drools.base.base.ClassFieldInspector;
+import org.drools.base.base.CoreComponentsBuilder;
+import org.drools.base.base.ValueType;
+import org.drools.base.rule.accessor.WriteAccessor;
/**
* This is the supertype for the ASM generated classes for writing values into fields.
@@ -30,7 +35,7 @@ abstract public class BaseClassFieldWriter implements WriteAccessor {
private Class< ? > fieldType;
- private ValueType valueType;
+ private ValueType valueType;
public BaseClassFieldWriter() {
}
diff --git a/drools-core/src/main/java/org/drools/core/base/CalendarsImpl.java b/drools-core/src/main/java/org/drools/core/base/CalendarsImpl.java
index e2f546a30be..4832e311004 100644
--- a/drools-core/src/main/java/org/drools/core/base/CalendarsImpl.java
+++ b/drools-core/src/main/java/org/drools/core/base/CalendarsImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/ClassFieldAccessorCache.java b/drools-core/src/main/java/org/drools/core/base/ClassFieldAccessorCache.java
index 0262da039d3..ca875d550e9 100644
--- a/drools-core/src/main/java/org/drools/core/base/ClassFieldAccessorCache.java
+++ b/drools-core/src/main/java/org/drools/core/base/ClassFieldAccessorCache.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.security.AccessController;
@@ -23,8 +25,11 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.rule.accessor.WriteAccessor;
+import org.drools.base.base.AccessorKey;
+import org.drools.base.base.ClassFieldInspector;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.rule.accessor.WriteAccessor;
import org.drools.wiring.api.ComponentsFactory;
import org.drools.wiring.api.util.ByteArrayClassLoader;
@@ -103,7 +108,7 @@ public void setReadAcessor(String className, String fieldName, ReadAccessor read
getCacheEntry( cls ).setReadAccessor( getAccessorKey( className, fieldName ), readAccessor );
}
- private AccessorKey getAccessorKey( String className, String fieldName ) {
+ private AccessorKey getAccessorKey(String className, String fieldName ) {
return new AccessorKey( className, fieldName, AccessorKey.AccessorType.FieldAccessor );
}
diff --git a/drools-core/src/main/java/org/drools/core/base/ClassFieldInspector.java b/drools-core/src/main/java/org/drools/core/base/ClassFieldInspector.java
deleted file mode 100644
index 6797ae665aa..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/ClassFieldInspector.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.Map;
-
-import org.kie.internal.builder.KnowledgeBuilderResult;
-
-public interface ClassFieldInspector {
- Map getFieldNames();
-
- boolean isNonGetter( String name );
-
- Map getFieldTypesField();
-
- Map> getFieldTypes();
-
- Class< ? > getFieldType(String name);
-
- Map getGetterMethods();
-
- Map getSetterMethods();
-
- Collection getInspectionResults( String fieldName );
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/ClassWireable.java b/drools-core/src/main/java/org/drools/core/base/ClassWireable.java
deleted file mode 100644
index 17cca8057b0..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/ClassWireable.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-
-public interface ClassWireable {
-
- void wire( Class> klass );
-
- String getClassName();
-
- Class> getClassType();
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/CoreComponentsBuilder.java b/drools-core/src/main/java/org/drools/core/base/CoreComponentsBuilder.java
deleted file mode 100644
index 68f9814459a..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/CoreComponentsBuilder.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-import java.io.IOException;
-
-import org.drools.core.common.MissingDependencyException;
-import org.drools.core.rule.DialectRuntimeData;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.util.Drools;
-import org.drools.core.util.MVELExecutor;
-import org.kie.api.internal.utils.KieService;
-
-public interface CoreComponentsBuilder extends KieService {
-
- String NO_MVEL = "You're trying to compile a Drools asset without mvel. Please add the module org.drools:drools-mvel to your classpath.";
-
- static T throwExceptionForMissingMvel() {
- if (Drools.isNativeImage()) {
- return null;
- }
- throw new MissingDependencyException(NO_MVEL);
- }
-
- class Holder {
- private static final CoreComponentsBuilder cBuilder = KieService.load( CoreComponentsBuilder.class );
- }
-
- static CoreComponentsBuilder get() {
- return Holder.cBuilder != null ? Holder.cBuilder : throwExceptionForMissingMvel();
- }
-
- static boolean present() {
- return Holder.cBuilder != null;
- }
-
- ReadAccessor getReadAcessor( String className, String expr, boolean typesafe, Class> returnType );
-
- Object evaluateMvelExpression( DialectRuntimeData data, ClassLoader classLoader, String expr );
-
- default ClassFieldInspector createClassFieldInspector( final Class> classUnderInspection ) throws IOException {
- return createClassFieldInspector( classUnderInspection, true );
- }
-
- ClassFieldInspector createClassFieldInspector( Class> classUnderInspection, boolean includeFinalMethods ) throws IOException;
-
- MVELExecutor getMVELExecutor();
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/DroolsQuery.java b/drools-core/src/main/java/org/drools/core/base/DroolsQueryImpl.java
similarity index 74%
rename from drools-core/src/main/java/org/drools/core/base/DroolsQuery.java
rename to drools-core/src/main/java/org/drools/core/base/DroolsQueryImpl.java
index e86cd931c22..a86713ad743 100644
--- a/drools-core/src/main/java/org/drools/core/base/DroolsQuery.java
+++ b/drools-core/src/main/java/org/drools/core/base/DroolsQueryImpl.java
@@ -1,24 +1,27 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.util.Arrays;
import java.util.List;
+import org.drools.base.base.DroolsQuery;
import org.drools.core.common.TupleSets;
import org.drools.core.common.WorkingMemoryAction;
import org.drools.core.phreak.StackEntry;
@@ -26,11 +29,11 @@
import org.drools.core.reteoo.LeftTupleSink;
import org.drools.core.reteoo.PathMemory;
import org.drools.core.reteoo.QueryElementNode.QueryElementNodeMemory;
-import org.drools.core.definitions.rule.impl.QueryImpl;
+import org.drools.base.definitions.rule.impl.QueryImpl;
import org.drools.core.util.index.TupleList;
import org.kie.api.runtime.rule.Variable;
-public final class DroolsQuery extends ArrayElements {
+public final class DroolsQueryImpl extends ArrayElements implements DroolsQuery{
private final String name;
private InternalViewChangedEventListener resultsCollector;
private QueryImpl query;
@@ -54,19 +57,19 @@ public final class DroolsQuery extends ArrayElements {
private LeftTupleSink sink;
- public DroolsQuery(String name, Object[] params, InternalViewChangedEventListener resultsCollector, boolean open) {
+ public DroolsQueryImpl(String name, Object[] params, InternalViewChangedEventListener resultsCollector, boolean open) {
this(name, params, resultsCollector, open, null, null, null, null, null);
}
- public DroolsQuery(final String name,
- final Object[] params,
- final InternalViewChangedEventListener resultsCollector,
- final boolean open,
- final StackEntry stackEntry,
- final List pmems,
- final TupleSets resultLeftTuples,
- final QueryElementNodeMemory qmem,
- final LeftTupleSink sink) {
+ public DroolsQueryImpl(final String name,
+ final Object[] params,
+ final InternalViewChangedEventListener resultsCollector,
+ final boolean open,
+ final StackEntry stackEntry,
+ final List pmems,
+ final TupleSets resultLeftTuples,
+ final QueryElementNodeMemory qmem,
+ final LeftTupleSink sink) {
setParameters(params);
this.name = name;
this.resultsCollector = resultsCollector;
diff --git a/drools-core/src/main/java/org/drools/core/base/EnabledBoolean.java b/drools-core/src/main/java/org/drools/core/base/EnabledBoolean.java
deleted file mode 100644
index 7e4dc091d13..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/EnabledBoolean.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.accessor.Enabled;
-import org.drools.core.reteoo.Tuple;
-
-public class EnabledBoolean
- implements
- Enabled,
- Externalizable {
-
- private static final long serialVersionUID = 510l;
-
- public static final Enabled ENABLED_TRUE = new EnabledBoolean( true );
- public static final Enabled ENABLED_FALSE = new EnabledBoolean( false );
-
- private boolean value;
-
- public EnabledBoolean() {
- }
-
- public EnabledBoolean(boolean value) {
- this.value = value;
- }
-
- public void readExternal(ObjectInput in) throws IOException,
- ClassNotFoundException {
- value = in.readBoolean();
- }
-
- public void writeExternal(ObjectOutput out) throws IOException {
- out.writeBoolean( value );
- }
-
- public boolean getValue(final Tuple tuple,
- final Declaration[] declarations,
- final RuleImpl rule,
- final ReteEvaluator reteEvaluator) {
- return this.value;
- }
-
- public String toString() {
- return String.valueOf( this.value );
- }
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/FieldAccessor.java b/drools-core/src/main/java/org/drools/core/base/FieldAccessor.java
deleted file mode 100755
index 2a1449a51bd..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/FieldAccessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.rule.accessor.WriteAccessor;
-
-
-/**
- * An interface for Accessor classes that joins both reader and writer accessor methods
- */
-public interface FieldAccessor extends ReadAccessor, WriteAccessor {
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/FieldAccessorFactory.java b/drools-core/src/main/java/org/drools/core/base/FieldAccessorFactory.java
index 2203de9d3c2..d75b459c343 100644
--- a/drools-core/src/main/java/org/drools/core/base/FieldAccessorFactory.java
+++ b/drools-core/src/main/java/org/drools/core/base/FieldAccessorFactory.java
@@ -1,24 +1,28 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.rule.accessor.WriteAccessor;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.rule.accessor.WriteAccessor;
import org.kie.api.internal.utils.KieService;
-import static org.drools.core.base.CoreComponentsBuilder.throwExceptionForMissingMvel;
+import static org.drools.base.base.CoreComponentsBuilder.throwExceptionForMissingMvel;
public interface FieldAccessorFactory extends KieService {
class Holder {
diff --git a/drools-core/src/main/java/org/drools/core/base/FieldNameSupplier.java b/drools-core/src/main/java/org/drools/core/base/FieldNameSupplier.java
index beea48eb26d..6aa33d717cd 100644
--- a/drools-core/src/main/java/org/drools/core/base/FieldNameSupplier.java
+++ b/drools-core/src/main/java/org/drools/core/base/FieldNameSupplier.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
public interface FieldNameSupplier {
diff --git a/drools-core/src/main/java/org/drools/core/base/InternalViewChangedEventListener.java b/drools-core/src/main/java/org/drools/core/base/InternalViewChangedEventListener.java
index 7c240bf2db6..4fbd73e2cd4 100644
--- a/drools-core/src/main/java/org/drools/core/base/InternalViewChangedEventListener.java
+++ b/drools-core/src/main/java/org/drools/core/base/InternalViewChangedEventListener.java
@@ -1,25 +1,27 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.util.List;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.LeftTuple;
public interface InternalViewChangedEventListener {
diff --git a/drools-core/src/main/java/org/drools/core/base/MapGlobalResolver.java b/drools-core/src/main/java/org/drools/core/base/MapGlobalResolver.java
index 01cbc0d6c40..c18fb884fec 100644
--- a/drools-core/src/main/java/org/drools/core/base/MapGlobalResolver.java
+++ b/drools-core/src/main/java/org/drools/core/base/MapGlobalResolver.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.io.Externalizable;
@@ -28,7 +30,7 @@
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
-import org.drools.core.rule.accessor.GlobalResolver;
+import org.drools.base.rule.accessor.GlobalResolver;
import org.kie.api.runtime.Globals;
public class MapGlobalResolver
diff --git a/drools-core/src/main/java/org/drools/core/base/NonCloningQueryViewListener.java b/drools-core/src/main/java/org/drools/core/base/NonCloningQueryViewListener.java
index ff869dd261d..65f3eaacc35 100644
--- a/drools-core/src/main/java/org/drools/core/base/NonCloningQueryViewListener.java
+++ b/drools-core/src/main/java/org/drools/core/base/NonCloningQueryViewListener.java
@@ -1,27 +1,30 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import org.drools.core.common.InternalFactHandle;
+import org.kie.api.runtime.rule.FactHandle;
public class NonCloningQueryViewListener
extends AbstractQueryViewListener {
- public InternalFactHandle getHandle(InternalFactHandle originalHandle) {
+ public FactHandle getHandle(FactHandle originalHandle) {
return originalHandle;
}
diff --git a/drools-core/src/main/java/org/drools/core/base/ObjectType.java b/drools-core/src/main/java/org/drools/core/base/ObjectType.java
deleted file mode 100644
index 4df9e0db0db..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/ObjectType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-import java.io.Externalizable;
-
-/**
- * Semantic object type differentiator.
- */
-public interface ObjectType
- extends
- Externalizable {
-
- boolean isAssignableFrom(Class> clazz);
-
- boolean isAssignableTo(Class> clazz);
-
- boolean isAssignableFrom(ObjectType objectType);
-
- /**
- * Returns true if the object type represented by this object
- * is an event object type. False otherwise.
- * @return
- */
- boolean isEvent();
-
- ValueType getValueType();
-
- Object getTypeKey();
-
- String getClassName();
-
- boolean hasField(String name);
-
- boolean isTemplate();
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/QueryRowWithSubruleIndex.java b/drools-core/src/main/java/org/drools/core/base/QueryRowWithSubruleIndex.java
index 5f41e675f06..c68b169e55b 100644
--- a/drools-core/src/main/java/org/drools/core/base/QueryRowWithSubruleIndex.java
+++ b/drools-core/src/main/java/org/drools/core/base/QueryRowWithSubruleIndex.java
@@ -1,34 +1,38 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.base;
import org.drools.core.common.InternalFactHandle;
+import org.kie.api.runtime.rule.FactHandle;
public class QueryRowWithSubruleIndex {
- private InternalFactHandle[] handles;
+ private FactHandle[] handles;
private int subruleIndex;
- public QueryRowWithSubruleIndex(InternalFactHandle[] handles,
+ public QueryRowWithSubruleIndex(FactHandle[] handles,
int subruleIndex) {
this.handles = handles;
this.subruleIndex = subruleIndex;
}
- public InternalFactHandle[] getHandles() {
+ public FactHandle[] getHandles() {
return handles;
}
diff --git a/drools-core/src/main/java/org/drools/core/base/ReadAccessorSupplier.java b/drools-core/src/main/java/org/drools/core/base/ReadAccessorSupplier.java
deleted file mode 100644
index ece24782091..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/ReadAccessorSupplier.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-import org.drools.core.rule.accessor.ReadAccessor;
-
-public interface ReadAccessorSupplier {
- ReadAccessor getReader(AccessorKey key);
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/RuleNameEndsWithAgendaFilter.java b/drools-core/src/main/java/org/drools/core/base/RuleNameEndsWithAgendaFilter.java
index cb579b95304..6b5556a52c4 100644
--- a/drools-core/src/main/java/org/drools/core/base/RuleNameEndsWithAgendaFilter.java
+++ b/drools-core/src/main/java/org/drools/core/base/RuleNameEndsWithAgendaFilter.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.io.Serializable;
diff --git a/drools-core/src/main/java/org/drools/core/base/RuleNameEqualsAgendaFilter.java b/drools-core/src/main/java/org/drools/core/base/RuleNameEqualsAgendaFilter.java
index 74e86b8f30a..3401e228162 100644
--- a/drools-core/src/main/java/org/drools/core/base/RuleNameEqualsAgendaFilter.java
+++ b/drools-core/src/main/java/org/drools/core/base/RuleNameEqualsAgendaFilter.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.io.Serializable;
diff --git a/drools-core/src/main/java/org/drools/core/base/RuleNameMatchesAgendaFilter.java b/drools-core/src/main/java/org/drools/core/base/RuleNameMatchesAgendaFilter.java
index 6003fb3fbf8..d535a3be948 100644
--- a/drools-core/src/main/java/org/drools/core/base/RuleNameMatchesAgendaFilter.java
+++ b/drools-core/src/main/java/org/drools/core/base/RuleNameMatchesAgendaFilter.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.io.Serializable;
diff --git a/drools-core/src/main/java/org/drools/core/base/RuleNameStartsWithAgendaFilter.java b/drools-core/src/main/java/org/drools/core/base/RuleNameStartsWithAgendaFilter.java
index c5f6384f43a..53047b62f34 100644
--- a/drools-core/src/main/java/org/drools/core/base/RuleNameStartsWithAgendaFilter.java
+++ b/drools-core/src/main/java/org/drools/core/base/RuleNameStartsWithAgendaFilter.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import java.io.Serializable;
diff --git a/drools-core/src/main/java/org/drools/core/base/SimpleValueType.java b/drools-core/src/main/java/org/drools/core/base/SimpleValueType.java
deleted file mode 100644
index 805e666efb9..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/SimpleValueType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base;
-
-public class SimpleValueType {
- public static final int UNKNOWN = 0;
- public static final int NULL = 1;
- public static final int BOOLEAN = 2;
- public static final int NUMBER = 3;
- public static final int INTEGER = 4;
- public static final int DECIMAL = 5;
- public static final int CHAR = 6;
- public static final int STRING = 7;
- public static final int DATE = 8;
- public static final int LIST = 9;
- public static final int OBJECT = 10;
- public static final int FUNCTION = 11; //This one is for LISP
-}
diff --git a/drools-core/src/main/java/org/drools/core/base/StandardQueryViewChangedEventListener.java b/drools-core/src/main/java/org/drools/core/base/StandardQueryViewChangedEventListener.java
index a446d0ffa24..11aac3af472 100644
--- a/drools-core/src/main/java/org/drools/core/base/StandardQueryViewChangedEventListener.java
+++ b/drools-core/src/main/java/org/drools/core/base/StandardQueryViewChangedEventListener.java
@@ -1,35 +1,39 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base;
import org.drools.core.common.DefaultFactHandle;
import org.drools.core.common.InternalFactHandle;
+import org.kie.api.runtime.rule.FactHandle;
public class StandardQueryViewChangedEventListener
extends AbstractQueryViewListener {
- public InternalFactHandle getHandle(InternalFactHandle originalHandle) {
+ public FactHandle getHandle(FactHandle originalHandle) {
+ InternalFactHandle fh = (InternalFactHandle) originalHandle;
// can be null for eval, not and exists that have no right input
- return new DefaultFactHandle( originalHandle.getId(),
- originalHandle.getEntryPointId() != null ? originalHandle.getEntryPointId().getEntryPointId() : null,
- originalHandle.getIdentityHashCode(),
- originalHandle.getObjectHashCode(),
- originalHandle.getRecency(),
- originalHandle.getObject() );
+ return new DefaultFactHandle( fh.getId(),
+ fh.getEntryPointId() != null ? fh.getEntryPointId().getEntryPointId() : null,
+ fh.getIdentityHashCode(),
+ fh.getObjectHashCode(),
+ fh.getRecency(),
+ fh.getObject() );
}
}
diff --git a/drools-core/src/main/java/org/drools/core/base/TraitHelper.java b/drools-core/src/main/java/org/drools/core/base/TraitHelper.java
index ccd1bc147c2..a91aa7df474 100644
--- a/drools-core/src/main/java/org/drools/core/base/TraitHelper.java
+++ b/drools-core/src/main/java/org/drools/core/base/TraitHelper.java
@@ -1,15 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.base;
import java.util.Collection;
import org.drools.core.common.InternalFactHandle;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.factmodel.traits.Thing;
-import org.drools.core.factmodel.traits.TraitableBean;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.factmodel.traits.Thing;
+import org.drools.base.factmodel.traits.TraitableBean;
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.rule.consequence.InternalMatch;
-import org.drools.core.util.bitmask.BitMask;
-import org.drools.core.beliefsystem.Mode;
+import org.drools.util.bitmask.BitMask;
+import org.drools.base.beliefsystem.Mode;
public interface TraitHelper {
diff --git a/drools-core/src/main/java/org/drools/core/base/UndefinedCalendarExcption.java b/drools-core/src/main/java/org/drools/core/base/UndefinedCalendarExcption.java
index ca121830c34..75366955344 100644
--- a/drools-core/src/main/java/org/drools/core/base/UndefinedCalendarExcption.java
+++ b/drools-core/src/main/java/org/drools/core/base/UndefinedCalendarExcption.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.base;
public class UndefinedCalendarExcption extends RuntimeException {
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/AbstractAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/AbstractAccumulateFunction.java
index 6d1aa9f7449..73b54036072 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/AbstractAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/AbstractAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Serializable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/AverageAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/AverageAccumulateFunction.java
index 3b93188c240..d1bbb50b13f 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/AverageAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/AverageAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/BigDecimalAverageAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/BigDecimalAverageAccumulateFunction.java
index 9b4bd306817..c9bbe6985a0 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/BigDecimalAverageAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/BigDecimalAverageAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/BigDecimalSumAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/BigDecimalSumAccumulateFunction.java
index 11e93c059b4..1fe8119c298 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/BigDecimalSumAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/BigDecimalSumAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/BigIntegerSumAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/BigIntegerSumAccumulateFunction.java
index c97e93697cd..5775b8496f8 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/BigIntegerSumAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/BigIntegerSumAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/CollectAccumulator.java b/drools-core/src/main/java/org/drools/core/base/accumulators/CollectAccumulator.java
index e05175f9d63..78b864cc513 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/CollectAccumulator.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/CollectAccumulator.java
@@ -1,28 +1,27 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
-import org.drools.core.common.InternalFactHandle;
-import org.drools.core.common.ReteEvaluator;
import org.drools.core.reteoo.LeftTuple;
-import org.drools.core.reteoo.Tuple;
-import org.drools.core.rule.Collect;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.accessor.Accumulator;
+import org.drools.base.rule.Collect;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.accessor.Accumulator;
import java.io.Externalizable;
import java.io.IOException;
@@ -31,6 +30,10 @@
import java.util.Collection;
import java.util.Objects;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.reteoo.BaseTuple;
+import org.kie.api.runtime.rule.FactHandle;
+
/**
* An accumulator to execute "collect" CEs
*/
@@ -72,10 +75,10 @@ public Object createContext() {
*/
public Object init(Object workingMemoryContext,
Object context,
- Tuple leftTuple,
+ BaseTuple leftTuple,
Declaration[] declarations,
- ReteEvaluator reteEvaluator) {
- return this.collect.instantiateResultObject( reteEvaluator );
+ ValueResolver valueResolver) {
+ return this.collect.instantiateResultObject( valueResolver );
}
/* (non-Javadoc)
@@ -83,11 +86,11 @@ public Object init(Object workingMemoryContext,
*/
public Object accumulate(Object workingMemoryContext,
Object context,
- Tuple leftTuple,
- InternalFactHandle handle,
+ BaseTuple leftTuple,
+ FactHandle handle,
Declaration[] declarations,
Declaration[] innerDeclarations,
- ReteEvaluator reteEvaluator) {
+ ValueResolver valueResolver) {
Object value = this.unwrapHandle ? ((LeftTuple) handle.getObject()).getFactHandle().getObject() : handle.getObject();
((Collection) context).add( value );
return value;
@@ -95,12 +98,12 @@ public Object accumulate(Object workingMemoryContext,
public boolean tryReverse(Object workingMemoryContext,
Object context,
- Tuple leftTuple,
- InternalFactHandle handle,
+ BaseTuple leftTuple,
+ FactHandle handle,
Object value,
Declaration[] declarations,
Declaration[] innerDeclarations,
- ReteEvaluator reteEvaluator) {
+ ValueResolver valueResolver) {
((Collection) context).remove( value );
return true;
}
@@ -110,9 +113,9 @@ public boolean tryReverse(Object workingMemoryContext,
*/
public Object getResult(Object workingMemoryContext,
Object context,
- Tuple leftTuple,
+ BaseTuple leftTuple,
Declaration[] declarations,
- ReteEvaluator reteEvaluator) {
+ ValueResolver valueResolver) {
return context;
}
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/CollectListAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/CollectListAccumulateFunction.java
index 671ea675d03..22a41481433 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/CollectListAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/CollectListAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/CollectSetAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/CollectSetAccumulateFunction.java
index da80db2a9ad..44f87d84adb 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/CollectSetAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/CollectSetAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/CountAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/CountAccumulateFunction.java
index 47baaa184ff..fdb50c28cd2 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/CountAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/CountAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerMaxAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerMaxAccumulateFunction.java
index 5671fd27f00..476ba633c43 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerMaxAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerMaxAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerMinAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerMinAccumulateFunction.java
index 8ae4017e7c0..456fe8da2db 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerMinAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerMinAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerSumAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerSumAccumulateFunction.java
index 8cf43621075..1927e911a41 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerSumAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/IntegerSumAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/JavaAccumulatorFunctionExecutor.java b/drools-core/src/main/java/org/drools/core/base/accumulators/JavaAccumulatorFunctionExecutor.java
index e29703a7e06..5fd28ac8eb1 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/JavaAccumulatorFunctionExecutor.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/JavaAccumulatorFunctionExecutor.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
@@ -22,14 +24,14 @@
import java.io.ObjectOutput;
import java.io.Serializable;
-import org.drools.core.common.InternalFactHandle;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.reteoo.Tuple;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.accessor.Accumulator;
-import org.drools.core.rule.accessor.CompiledInvoker;
-import org.drools.core.rule.accessor.ReturnValueExpression;
-import org.drools.core.rule.accessor.Wireable;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.reteoo.BaseTuple;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.accessor.Accumulator;
+import org.drools.base.rule.accessor.CompiledInvoker;
+import org.drools.base.rule.accessor.ReturnValueExpression;
+import org.drools.base.rule.accessor.Wireable;
+import org.kie.api.runtime.rule.FactHandle;
/**
* A Java accumulator function executor implementation
@@ -80,10 +82,10 @@ public Object createContext() {
* @see org.kie.spi.Accumulator#init(java.lang.Object, org.kie.spi.Tuple, org.kie.rule.Declaration[], org.kie.WorkingMemory)
*/
public Object init(Object workingMemoryContext,
- Object context,
- Tuple leftTuple,
- Declaration[] declarations,
- ReteEvaluator reteEvaluator) {
+ Object context,
+ BaseTuple leftTuple,
+ Declaration[] declarations,
+ ValueResolver valueResolver) {
return this.function.initContext( (Serializable) context );
}
@@ -92,17 +94,17 @@ public Object init(Object workingMemoryContext,
*/
public Object accumulate(Object workingMemoryContext,
Object context,
- Tuple leftTuple,
- InternalFactHandle handle,
+ BaseTuple leftTuple,
+ FactHandle handle,
Declaration[] declarations,
Declaration[] innerDeclarations,
- ReteEvaluator reteEvaluator) {
+ ValueResolver valueResolver) {
try {
Object value = this.expression.evaluate( handle,
leftTuple,
declarations,
innerDeclarations,
- reteEvaluator,
+ valueResolver,
workingMemoryContext ).getValue();
return this.function.accumulateValue( (Serializable) context, value );
} catch (Exception e) {
@@ -112,12 +114,12 @@ public Object accumulate(Object workingMemoryContext,
public boolean tryReverse(Object workingMemoryContext,
Object context,
- Tuple leftTuple,
- InternalFactHandle handle,
+ BaseTuple leftTuple,
+ FactHandle handle,
Object value,
Declaration[] declarations,
Declaration[] innerDeclarations,
- ReteEvaluator reteEvaluator) {
+ ValueResolver valueResolver) {
return this.function.tryReverse( (Serializable) context, value );
}
@@ -126,9 +128,9 @@ public boolean tryReverse(Object workingMemoryContext,
*/
public Object getResult(Object workingMemoryContext,
Object context,
- Tuple leftTuple,
+ BaseTuple leftTuple,
Declaration[] declarations,
- ReteEvaluator reteEvaluator) {
+ ValueResolver valueResolver) {
try {
return this.function.getResult( (Serializable) context );
} catch (Exception e) {
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/LongMaxAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/LongMaxAccumulateFunction.java
index bc2ff11245a..4b1213db802 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/LongMaxAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/LongMaxAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/LongMinAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/LongMinAccumulateFunction.java
index 2ef0d9eca20..8e047983556 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/LongMinAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/LongMinAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/LongSumAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/LongSumAccumulateFunction.java
index f326bd274c3..0dd3cef3f63 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/LongSumAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/LongSumAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/MaxAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/MaxAccumulateFunction.java
index 784781db829..8147c18287e 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/MaxAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/MaxAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/MinAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/MinAccumulateFunction.java
index a7fa01a980d..a1c2fd0700d 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/MinAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/MinAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/NumericMaxAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/NumericMaxAccumulateFunction.java
index 9ee34a3f9f6..b9afb487faf 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/NumericMaxAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/NumericMaxAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/NumericMinAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/NumericMinAccumulateFunction.java
index df4a1de5226..36134e36c35 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/NumericMinAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/NumericMinAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/StandardDeviationAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/StandardDeviationAccumulateFunction.java
index b6d4bf0a8e9..030a4f8987a 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/StandardDeviationAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/StandardDeviationAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/SumAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/SumAccumulateFunction.java
index 3220c25467f..e9a87c41052 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/SumAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/SumAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/base/accumulators/VarianceAccumulateFunction.java b/drools-core/src/main/java/org/drools/core/base/accumulators/VarianceAccumulateFunction.java
index ad8a159f0dd..645a50cef96 100644
--- a/drools-core/src/main/java/org/drools/core/base/accumulators/VarianceAccumulateFunction.java
+++ b/drools-core/src/main/java/org/drools/core/base/accumulators/VarianceAccumulateFunction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.base.accumulators;
import java.io.IOException;
diff --git a/drools-core/src/main/java/org/drools/core/base/extractors/ConstantValueReader.java b/drools-core/src/main/java/org/drools/core/base/extractors/ConstantValueReader.java
index 7136944ff3e..13f7ebc98ed 100644
--- a/drools-core/src/main/java/org/drools/core/base/extractors/ConstantValueReader.java
+++ b/drools-core/src/main/java/org/drools/core/base/extractors/ConstantValueReader.java
@@ -1,27 +1,30 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.base.extractors;
import java.lang.reflect.Method;
-import org.drools.core.base.ValueType;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.accessor.ReadAccessor;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.base.ValueType;
+import org.drools.base.rule.accessor.ReadAccessor;
-import static org.drools.core.util.TimeIntervalParser.getTimestampFromDate;
+import static org.drools.base.util.TimeIntervalParser.getTimestampFromDate;
public class ConstantValueReader implements ReadAccessor {
@@ -31,47 +34,47 @@ public ConstantValueReader(Object value) {
this.value = value;
}
- public Object getValue(ReteEvaluator reteEvaluator, Object object) {
+ public Object getValue(ValueResolver valueResolver, Object object) {
return value;
}
- public char getCharValue(ReteEvaluator reteEvaluator, Object object) {
+ public char getCharValue(ValueResolver valueResolver, Object object) {
return (Character)value;
}
- public int getIntValue(ReteEvaluator reteEvaluator, Object object) {
+ public int getIntValue(ValueResolver valueResolver, Object object) {
return (Integer)value;
}
- public byte getByteValue(ReteEvaluator reteEvaluator, Object object) {
+ public byte getByteValue(ValueResolver valueResolver, Object object) {
return (Byte)value;
}
- public short getShortValue(ReteEvaluator reteEvaluator, Object object) {
+ public short getShortValue(ValueResolver valueResolver, Object object) {
return (Short)value;
}
- public long getLongValue(ReteEvaluator reteEvaluator, Object object) {
+ public long getLongValue(ValueResolver valueResolver, Object object) {
return value instanceof Long ? (Long)value : getTimestampFromDate( value );
}
- public float getFloatValue(ReteEvaluator reteEvaluator, Object object) {
+ public float getFloatValue(ValueResolver valueResolver, Object object) {
return (Float)value;
}
- public double getDoubleValue(ReteEvaluator reteEvaluator, Object object) {
+ public double getDoubleValue(ValueResolver valueResolver, Object object) {
return (Double)value;
}
- public boolean getBooleanValue(ReteEvaluator reteEvaluator, Object object) {
+ public boolean getBooleanValue(ValueResolver valueResolver, Object object) {
return (Boolean)value;
}
- public boolean isNullValue(ReteEvaluator reteEvaluator, Object object) {
+ public boolean isNullValue(ValueResolver valueResolver, Object object) {
return value == null;
}
- public int getHashCode(ReteEvaluator reteEvaluator, Object object) {
+ public int getHashCode(ValueResolver valueResolver, Object object) {
return value.hashCode();
}
diff --git a/drools-core/src/main/java/org/drools/core/base/extractors/SelfReferenceClassFieldReader.java b/drools-core/src/main/java/org/drools/core/base/extractors/SelfReferenceClassFieldReader.java
deleted file mode 100755
index f5e65666c38..00000000000
--- a/drools-core/src/main/java/org/drools/core/base/extractors/SelfReferenceClassFieldReader.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.base.extractors;
-
-import java.io.Externalizable;
-
-import org.drools.core.base.ValueType;
-import org.drools.core.common.ReteEvaluator;
-
-/**
- * A special field extractor for the self reference "this".
- */
-public class SelfReferenceClassFieldReader extends BaseObjectClassFieldReader implements Externalizable {
-
- private static final long serialVersionUID = 510l;
-
- public SelfReferenceClassFieldReader() {
-
- }
-
- public SelfReferenceClassFieldReader(final Class> clazz) {
- super( 0, // index
- clazz, // fieldType
- ValueType.determineValueType( clazz ) ); // value type
- }
-
- public Object getValue(ReteEvaluator reteEvaluator, final Object object) {
- return object;
- }
-
- public boolean isNullValue(ReteEvaluator reteEvaluator, final Object object) {
- return getValue( reteEvaluator, object ) == null;
- }
-
- @Override
- public boolean isSelfReference() {
- return true;
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/common/AbstractFactHandleFactory.java b/drools-core/src/main/java/org/drools/core/common/AbstractFactHandleFactory.java
index 831b121a023..229c4215d14 100644
--- a/drools-core/src/main/java/org/drools/core/common/AbstractFactHandleFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/AbstractFactHandleFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.ArrayDeque;
@@ -89,8 +91,8 @@ public DefaultFactHandle createDefaultFactHandle(long id, Object object, long re
}
@Override
- public EventFactHandle createEventFactHandle(long id, Object object, long recency, WorkingMemoryEntryPoint entryPoint, long timestamp, long duration) {
- return new EventFactHandle(id, object, recency, timestamp, duration, entryPoint);
+ public DefaultEventHandle createEventFactHandle(long id, Object object, long recency, WorkingMemoryEntryPoint entryPoint, long timestamp, long duration) {
+ return new DefaultEventHandle(id, object, recency, timestamp, duration, entryPoint);
}
protected WorkingMemoryEntryPoint getWmEntryPoint(ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint) {
diff --git a/drools-core/src/main/java/org/drools/core/common/ActivationGroupImpl.java b/drools-core/src/main/java/org/drools/core/common/ActivationGroupImpl.java
index d9618465393..45b34d96eed 100644
--- a/drools-core/src/main/java/org/drools/core/common/ActivationGroupImpl.java
+++ b/drools-core/src/main/java/org/drools/core/common/ActivationGroupImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.drools.core.rule.consequence.InternalMatch;
diff --git a/drools-core/src/main/java/org/drools/core/common/ActivationGroupNode.java b/drools-core/src/main/java/org/drools/core/common/ActivationGroupNode.java
index 686fa2070b0..cc01a1f2035 100644
--- a/drools-core/src/main/java/org/drools/core/common/ActivationGroupNode.java
+++ b/drools-core/src/main/java/org/drools/core/common/ActivationGroupNode.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.drools.core.rule.consequence.InternalMatch;
diff --git a/drools-core/src/main/java/org/drools/core/common/ActivationNode.java b/drools-core/src/main/java/org/drools/core/common/ActivationNode.java
index c4608b83486..a537b00c6ce 100644
--- a/drools-core/src/main/java/org/drools/core/common/ActivationNode.java
+++ b/drools-core/src/main/java/org/drools/core/common/ActivationNode.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.drools.core.rule.consequence.InternalMatch;
diff --git a/drools-core/src/main/java/org/drools/core/common/ActivationsFilter.java b/drools-core/src/main/java/org/drools/core/common/ActivationsFilter.java
index d113619a29a..d904a2c8a58 100644
--- a/drools-core/src/main/java/org/drools/core/common/ActivationsFilter.java
+++ b/drools-core/src/main/java/org/drools/core/common/ActivationsFilter.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
import org.drools.core.phreak.RuleAgendaItem;
@@ -23,7 +26,5 @@
*/
public interface ActivationsFilter extends AgendaFilter {
- boolean accept(RuleAgendaItem activation);
-
- void fireRNEAs(InternalWorkingMemory wm);
+ void accept(RuleAgendaItem activation);
}
diff --git a/drools-core/src/main/java/org/drools/core/common/ActivationsManager.java b/drools-core/src/main/java/org/drools/core/common/ActivationsManager.java
index 69c08113636..5042d5fce56 100644
--- a/drools-core/src/main/java/org/drools/core/common/ActivationsManager.java
+++ b/drools-core/src/main/java/org/drools/core/common/ActivationsManager.java
@@ -1,21 +1,24 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
+import org.drools.base.common.NetworkNode;
import org.drools.core.event.AgendaEventSupport;
import org.drools.core.phreak.ExecutableEntry;
import org.drools.core.phreak.PropagationEntry;
@@ -74,6 +77,9 @@ InternalMatch createAgendaItem(RuleTerminalNodeLeftTuple rtnLeftTuple,
void evaluateQueriesForRule(RuleAgendaItem item);
KnowledgeHelper getKnowledgeHelper();
+ void resetKnowledgeHelper();
+
+ void haltGroupEvaluation();
void executeTask(ExecutableEntry executableEntry);
diff --git a/drools-core/src/main/java/org/drools/core/common/AgendaFactory.java b/drools-core/src/main/java/org/drools/core/common/AgendaFactory.java
index ff5a48f4f38..6b5f7ee2b4a 100644
--- a/drools-core/src/main/java/org/drools/core/common/AgendaFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/AgendaFactory.java
@@ -1,28 +1,25 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import org.drools.core.impl.RuleBase;
-
public interface AgendaFactory {
- InternalAgenda createAgenda(RuleBase kBase, boolean initMain);
-
- InternalAgenda createAgenda(RuleBase kBase);
-
+ InternalAgenda createAgenda(InternalWorkingMemory workingMemory);
}
diff --git a/drools-core/src/main/java/org/drools/core/common/AgendaGroupFactory.java b/drools-core/src/main/java/org/drools/core/common/AgendaGroupFactory.java
index 44ddef835ea..1606d7edef3 100644
--- a/drools-core/src/main/java/org/drools/core/common/AgendaGroupFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/AgendaGroupFactory.java
@@ -1,24 +1,26 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
public interface AgendaGroupFactory {
- InternalAgendaGroup createAgendaGroup(String name, RuleBase kBase);
+ InternalAgendaGroup createAgendaGroup(String name, InternalRuleBase kBase);
}
diff --git a/drools-core/src/main/java/org/drools/core/common/AgendaGroupQueueImpl.java b/drools-core/src/main/java/org/drools/core/common/AgendaGroupQueueImpl.java
index bacaeadcb09..4c2df781496 100644
--- a/drools-core/src/main/java/org/drools/core/common/AgendaGroupQueueImpl.java
+++ b/drools-core/src/main/java/org/drools/core/common/AgendaGroupQueueImpl.java
@@ -1,29 +1,25 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-import java.util.PriorityQueue;
-import java.util.concurrent.ConcurrentHashMap;
-
import org.drools.core.conflict.RuleAgendaConflictResolver;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.marshalling.MarshallerReaderContext;
import org.drools.core.phreak.PropagationEntry;
import org.drools.core.phreak.RuleAgendaItem;
@@ -31,6 +27,12 @@
import org.drools.core.util.Queue;
import org.drools.core.util.QueueFactory;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+import java.util.PriorityQueue;
+import java.util.concurrent.ConcurrentHashMap;
+
/**
* AgendaGroup implementation that uses a PriorityQueue to prioritise the evaluation of added
* ActivationQueues. The AgendaGroup also maintains a Map of ActivationQueues
@@ -65,7 +67,7 @@ public class AgendaGroupQueueImpl
private final boolean sequential;
public AgendaGroupQueueImpl(final String name,
- final RuleBase kBase) {
+ final InternalRuleBase kBase) {
this.name = name;
this.sequential = kBase.getRuleBaseConfiguration().isSequential();
@@ -138,7 +140,9 @@ public SetFocusAction( String name ) {
@Override
public void internalExecute(ReteEvaluator reteEvaluator ) {
- ((InternalAgenda) reteEvaluator.getActivationsManager()).setFocus(this.name);
+ if ( ((InternalAgenda) reteEvaluator.getActivationsManager()).setFocus(this.name) ) {
+ reteEvaluator.getActivationsManager().haltGroupEvaluation();
+ }
}
@Override
@@ -152,13 +156,6 @@ public void reset() {
this.lastRemoved = null;
}
- public Collection getAll() {
- return this.priorityQueue.getAll();
- }
-
- /* (non-Javadoc)
- * @see org.kie.spi.AgendaGroup#size()
- */
public int size() {
return this.priorityQueue.size();
}
@@ -239,6 +236,9 @@ public String toString() {
}
public boolean equals(final Object object) {
+ if (this == object) {
+ return true;
+ }
return object instanceof AgendaGroupQueueImpl &&
((AgendaGroupQueueImpl) object).name.equals( this.name );
}
diff --git a/drools-core/src/main/java/org/drools/core/common/AgendaGroupsManager.java b/drools-core/src/main/java/org/drools/core/common/AgendaGroupsManager.java
index bdb68b55491..dc5d8225265 100644
--- a/drools-core/src/main/java/org/drools/core/common/AgendaGroupsManager.java
+++ b/drools-core/src/main/java/org/drools/core/common/AgendaGroupsManager.java
@@ -1,21 +1,27 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
+import org.drools.core.impl.InternalRuleBase;
+import org.drools.core.phreak.RuleAgendaItem;
+import org.drools.core.reteoo.RuntimeComponentFactory;
+
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
@@ -30,12 +36,7 @@
import java.util.Map;
import java.util.stream.Collectors;
-import org.drools.core.impl.RuleBase;
-import org.drools.core.phreak.RuleAgendaItem;
-import org.drools.core.reteoo.RuntimeComponentFactory;
-
public interface AgendaGroupsManager extends Externalizable {
- void setReteEvaluator(ReteEvaluator reteEvaluator);
void reset(boolean clearForRecency);
@@ -62,7 +63,7 @@ public interface AgendaGroupsManager extends Externalizable {
InternalAgendaGroup getAgendaGroup(String name);
- InternalAgendaGroup getAgendaGroup(String name, RuleBase kBase);
+ InternalAgendaGroup getAgendaGroup(String name, InternalRuleBase kBase);
InternalAgendaGroup getNextFocus();
@@ -70,8 +71,6 @@ public interface AgendaGroupsManager extends Externalizable {
boolean removeGroup(InternalAgendaGroup group);
- int focusStackSize();
-
int agendaSize();
int sizeOfRuleFlowGroup(String name);
@@ -80,8 +79,9 @@ public interface AgendaGroupsManager extends Externalizable {
InternalAgendaGroup getMainAgendaGroup();
- static AgendaGroupsManager create(RuleBase kBase, boolean initMain) {
- return kBase.hasMultipleAgendaGroups() || !kBase.getProcesses().isEmpty() ? new StackedAgendaGroupsManager(kBase, initMain) : new SimpleAgendaGroupsManager(kBase);
+ static AgendaGroupsManager create(InternalWorkingMemory workingMemory) {
+ InternalRuleBase kBase = workingMemory.getKnowledgeBase();
+ return kBase.hasMultipleAgendaGroups() || !kBase.getProcesses().isEmpty() ? new StackedAgendaGroupsManager(workingMemory) : new SimpleAgendaGroupsManager(workingMemory);
}
class SimpleAgendaGroupsManager implements AgendaGroupsManager {
@@ -90,19 +90,10 @@ class SimpleAgendaGroupsManager implements AgendaGroupsManager {
public SimpleAgendaGroupsManager() { }
- public SimpleAgendaGroupsManager(RuleBase kBase) {
- this.mainAgendaGroup = RuntimeComponentFactory.get().getAgendaGroupFactory().createAgendaGroup(InternalAgendaGroup.MAIN, kBase);
- }
-
public SimpleAgendaGroupsManager(ReteEvaluator reteEvaluator) {
- this(reteEvaluator.getKnowledgeBase());
- setReteEvaluator(reteEvaluator);
- }
-
- @Override
- public void setReteEvaluator(ReteEvaluator reteEvaluator) {
this.reteEvaluator = reteEvaluator;
- this.mainAgendaGroup.setReteEvaluator( reteEvaluator );
+ this.mainAgendaGroup = RuntimeComponentFactory.get().getAgendaGroupFactory().createAgendaGroup(InternalAgendaGroup.MAIN, reteEvaluator.getKnowledgeBase());
+ this.mainAgendaGroup.setReteEvaluator(reteEvaluator);
}
@Override
@@ -179,7 +170,7 @@ public String getFocusName() {
@Override
public RuleAgendaItem peekNextRule() {
- return (RuleAgendaItem) this.mainAgendaGroup.peek();
+ return this.mainAgendaGroup.peek();
}
@Override
@@ -188,7 +179,7 @@ public InternalAgendaGroup getAgendaGroup(String name) {
}
@Override
- public InternalAgendaGroup getAgendaGroup(String name, RuleBase kBase) {
+ public InternalAgendaGroup getAgendaGroup(String name, InternalRuleBase kBase) {
return InternalAgendaGroup.MAIN.equals(name) ? this.mainAgendaGroup : null;
}
@@ -215,11 +206,6 @@ public boolean removeGroup(InternalAgendaGroup group) {
throw new UnsupportedOperationException();
}
- @Override
- public int focusStackSize() {
- return mainAgendaGroup.size();
- }
-
@Override
public int agendaSize() {
return mainAgendaGroup.size();
@@ -265,11 +251,14 @@ class StackedAgendaGroupsManager implements AgendaGroupsManager {
public StackedAgendaGroupsManager() { }
- public StackedAgendaGroupsManager(RuleBase kBase, boolean initMain) {
+ public StackedAgendaGroupsManager(InternalWorkingMemory workingMemory) {
this.agendaGroupFactory = RuntimeComponentFactory.get().getAgendaGroupFactory();
- if (initMain) {
- initMainAgendaGroup(kBase);
+ // stacked agenda groups are supported only for InternalWorkingMemory
+ this.workingMemory = workingMemory;
+ if (this.mainAgendaGroup == null) {
+ initMainAgendaGroup(workingMemory.getKnowledgeBase());
}
+ this.mainAgendaGroup.setReteEvaluator( workingMemory );
}
@Override
@@ -277,22 +266,12 @@ public InternalAgendaGroup getMainAgendaGroup() {
return mainAgendaGroup;
}
- private void initMainAgendaGroup(RuleBase kBase) {
+ private void initMainAgendaGroup(InternalRuleBase kBase) {
this.mainAgendaGroup = agendaGroupFactory.createAgendaGroup( InternalAgendaGroup.MAIN, kBase);
this.agendaGroups.put( InternalAgendaGroup.MAIN, this.mainAgendaGroup );
this.focusStack.add( this.mainAgendaGroup );
}
- @Override
- public void setReteEvaluator(ReteEvaluator reteEvaluator) {
- // stacked agenda groups are supported only for InternalWorkingMemory
- this.workingMemory = (InternalWorkingMemory) reteEvaluator;
- if (this.mainAgendaGroup == null) {
- initMainAgendaGroup(reteEvaluator.getKnowledgeBase());
- }
- this.mainAgendaGroup.setReteEvaluator( reteEvaluator );
- }
-
private boolean isEmpty() {
return focusStack.isEmpty();
}
@@ -345,7 +324,7 @@ public void clearAndCancelAgendaGroup(String name, InternalAgenda agenda) {
private void clearAndCancelAgendaGroup(InternalAgendaGroup agendaGroup, InternalAgenda agenda) {
// enforce materialization of all activations of this group before removing them
for (RuleAgendaItem activation : agendaGroup.getActivations()) {
- activation.getRuleExecutor().reEvaluateNetwork( agenda );
+ activation.getRuleExecutor().evaluateNetworkIfDirty( agenda );
}
final EventSupport eventsupport = this.workingMemory;
@@ -355,7 +334,7 @@ private void clearAndCancelAgendaGroup(InternalAgendaGroup agendaGroup, Internal
// this is thread safe for BinaryHeapQueue
// Binary Heap locks while it returns the array and reset's it's own internal array. Lock is released afer getAndClear()
List lazyItems = new ArrayList<>();
- for (RuleAgendaItem item : agendaGroup.getAll() ) {
+ for (RuleAgendaItem item : agendaGroup.getActivations() ) {
lazyItems.add(item );
item.getRuleExecutor().cancel(workingMemory, eventsupport);
}
@@ -401,9 +380,8 @@ public boolean setFocus(final InternalAgendaGroup agendaGroup) {
final EventSupport eventsupport = this.workingMemory;
eventsupport.getAgendaEventSupport().fireAgendaGroupPushed( agendaGroup, this.workingMemory );
return true;
- } else {
- return false;
}
+ return false;
}
@Override
@@ -418,7 +396,7 @@ public String getFocusName() {
@Override
public RuleAgendaItem peekNextRule() {
- return (RuleAgendaItem) (this.focusStack.peekLast()).peek();
+ return this.focusStack.peekLast().peek();
}
@Override
@@ -427,7 +405,7 @@ public InternalAgendaGroup getAgendaGroup(final String name) {
}
@Override
- public InternalAgendaGroup getAgendaGroup(final String name, RuleBase kBase) {
+ public InternalAgendaGroup getAgendaGroup(final String name, InternalRuleBase kBase) {
String groupName = (name == null || name.length() == 0) ? InternalAgendaGroup.MAIN : name;
InternalAgendaGroup agendaGroup = this.agendaGroups.get( groupName );
@@ -516,15 +494,6 @@ public boolean removeGroup(InternalAgendaGroup group) {
return existed;
}
- @Override
- public int focusStackSize() {
- int size = 0;
- for ( InternalAgendaGroup group : this.focusStack ) {
- size += group.size();
- }
- return size;
- }
-
@Override
public int agendaSize() {
int size = 0;
diff --git a/drools-core/src/main/java/org/drools/core/common/BaseNode.java b/drools-core/src/main/java/org/drools/core/common/BaseNode.java
index 6acb9652553..08f5375e1b8 100644
--- a/drools-core/src/main/java/org/drools/core/common/BaseNode.java
+++ b/drools-core/src/main/java/org/drools/core/common/BaseNode.java
@@ -1,27 +1,26 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
+import org.drools.base.common.NetworkNode;
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.reteoo.BaseTerminalNode;
import org.drools.core.reteoo.EntryPointNode;
import org.drools.core.reteoo.LeftTupleSource;
import org.drools.core.reteoo.ObjectSource;
@@ -33,19 +32,24 @@
import org.drools.core.reteoo.builder.BuildContext;
import org.kie.api.definition.rule.Rule;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
/**
* The base class for all Rete nodes.
*/
public abstract class BaseNode
implements
- NetworkNode {
+ NetworkNode {
protected int id;
protected int memoryId = -1;
- protected RuleBasePartitionId partitionId;
- protected boolean partitionsEnabled;
+ protected RuleBasePartitionId partitionId;
protected Set associations;
private Map associatedTerminals;
@@ -65,12 +69,10 @@ public BaseNode() {
* The unique id
*/
public BaseNode(final int id,
- final RuleBasePartitionId partitionId,
- final boolean partitionsEnabled) {
+ final RuleBasePartitionId partitionId) {
super();
this.id = id;
this.partitionId = partitionId;
- this.partitionsEnabled = partitionsEnabled;
this.associations = new HashSet<>();
this.associatedTerminals = new HashMap<>();
}
@@ -168,10 +170,6 @@ public void setPartitionId(BuildContext context, RuleBasePartitionId partitionId
this.partitionId = partitionId;
}
- public void setPartitionsEnabled( boolean partitionsEnabled ) {
- this.partitionsEnabled = partitionsEnabled;
- }
-
/**
* Associates this node with the give rule
*/
@@ -203,11 +201,13 @@ public boolean isAssociatedWith( Rule rule ) {
return this.associations.contains( rule );
}
- public void addAssociatedTerminal(TerminalNode terminalNode) {
- associatedTerminals.put(terminalNode.getId(), terminalNode);
+ @Override
+ public void addAssociatedTerminal(BaseTerminalNode terminalNode) {
+ associatedTerminals.put(terminalNode.getId(),(TerminalNode) terminalNode);
}
- public void removeAssociatedTerminal(TerminalNode terminalNode) {
+ @Override
+ public void removeAssociatedTerminal(BaseTerminalNode terminalNode) {
associatedTerminals.remove(terminalNode.getId());
}
@@ -215,7 +215,7 @@ public int getAssociatedTerminalsSize() {
return associatedTerminals.size();
}
- public boolean hasAssociatedTerminal(NetworkNode terminalNode) {
+ public boolean hasAssociatedTerminal(BaseTerminalNode terminalNode) {
return associatedTerminals.containsKey(terminalNode.getId());
}
diff --git a/drools-core/src/main/java/org/drools/core/common/BetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/BetaConstraints.java
index e6689926c76..89fdbaefbbb 100644
--- a/drools-core/src/main/java/org/drools/core/common/BetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/BetaConstraints.java
@@ -1,32 +1,36 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.Externalizable;
import java.util.List;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.reteoo.BetaMemory;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
public interface BetaConstraints
extends
@@ -40,10 +44,10 @@ void updateFromTuple(ContextEntry[] context,
void updateFromFactHandle(ContextEntry[] context,
ReteEvaluator reteEvaluator,
- InternalFactHandle handle);
+ FactHandle handle);
boolean isAllowedCachedLeft(ContextEntry[] context,
- InternalFactHandle handle);
+ FactHandle handle);
boolean isAllowedCachedRight(ContextEntry[] context,
Tuple tuple);
@@ -65,7 +69,7 @@ BetaMemory createBetaMemory(final RuleBaseConfiguration config,
void resetFactHandle(final ContextEntry[] context);
- BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties);
+ BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties);
void init(BuildContext context, short betaNodeType);
void initIndexes(int depth, short betaNodeType, RuleBaseConfiguration config);
diff --git a/drools-core/src/main/java/org/drools/core/common/ClassAwareObjectStore.java b/drools-core/src/main/java/org/drools/core/common/ClassAwareObjectStore.java
index e88f53ca581..99a95e86b07 100644
--- a/drools-core/src/main/java/org/drools/core/common/ClassAwareObjectStore.java
+++ b/drools-core/src/main/java/org/drools/core/common/ClassAwareObjectStore.java
@@ -1,21 +1,24 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
-import org.drools.core.factmodel.traits.CoreWrapper;
+import org.drools.base.factmodel.traits.CoreWrapper;
import org.kie.api.runtime.ClassObjectFilter;
import org.kie.api.runtime.ObjectFilter;
diff --git a/drools-core/src/main/java/org/drools/core/common/ConcurrentNodeMemories.java b/drools-core/src/main/java/org/drools/core/common/ConcurrentNodeMemories.java
index 2cc670aa46a..b1199fdafd7 100644
--- a/drools-core/src/main/java/org/drools/core/common/ConcurrentNodeMemories.java
+++ b/drools-core/src/main/java/org/drools/core/common/ConcurrentNodeMemories.java
@@ -1,30 +1,32 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
+import org.drools.core.impl.InternalRuleBase;
+import org.drools.core.reteoo.SegmentMemory;
+import org.kie.internal.runtime.StatefulKnowledgeSession;
+
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.drools.core.impl.RuleBase;
-import org.drools.core.reteoo.SegmentMemory;
-import org.kie.internal.runtime.StatefulKnowledgeSession;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* A concurrent implementation for the node memories interface
@@ -33,10 +35,10 @@ public class ConcurrentNodeMemories implements NodeMemories {
private AtomicReferenceArray memories;
- private final Lock lock = new ReentrantLock();
- private final RuleBase ruleBase;
+ private final ReadWriteLock lock = new ReentrantReadWriteLock();
+ private final InternalRuleBase ruleBase;
- public ConcurrentNodeMemories( RuleBase ruleBase) {
+ public ConcurrentNodeMemories( InternalRuleBase ruleBase) {
this.ruleBase = ruleBase;
this.memories = new AtomicReferenceArray<>( this.ruleBase.getMemoryCount() );
}
@@ -52,7 +54,7 @@ public void clear() {
}
public void resetAllMemories(StatefulKnowledgeSession session) {
- RuleBase kBase = (RuleBase) session.getKieBase();
+ InternalRuleBase kBase = (InternalRuleBase) session.getKieBase();
Set smemSet = new HashSet<>();
for (int i = 0; i < memories.length(); i++) {
@@ -66,7 +68,7 @@ public void resetAllMemories(StatefulKnowledgeSession session) {
smemSet.forEach(smem -> resetSegmentMemory(session, kBase, smem));
}
- private void resetSegmentMemory(StatefulKnowledgeSession session, RuleBase kBase, SegmentMemory smem) {
+ private void resetSegmentMemory(StatefulKnowledgeSession session, InternalRuleBase kBase, SegmentMemory smem) {
if (smem != null) {
smem.reset(kBase.getSegmentPrototype(smem));
if (smem.isSegmentLinked()) {
@@ -83,15 +85,11 @@ private void resetSegmentMemory(StatefulKnowledgeSession session, RuleBase kBase
*/
public Memory getNodeMemory(MemoryFactory node, ReteEvaluator reteEvaluator) {
if( node.getMemoryId() >= this.memories.length() ) {
- resize( node );
- }
- Memory memory = this.memories.get( node.getMemoryId() );
-
- if( memory == null ) {
- memory = createNodeMemory( node, reteEvaluator );
+ resize( node.getMemoryId() );
}
- return memory;
+ Memory memory = this.memories.get( node.getMemoryId() );
+ return memory != null ? memory : createNodeMemory( node, reteEvaluator );
}
@@ -101,43 +99,32 @@ public Memory getNodeMemory(MemoryFactory node, ReteEvaluator reteEvaluator) {
*/
private Memory createNodeMemory( MemoryFactory node, ReteEvaluator reteEvaluator ) {
try {
- this.lock.lock();
+ this.lock.readLock().lock();
// need to try again in a synchronized code block to make sure
// it was not created yet
- Memory memory = this.memories.get( node.getMemoryId() );
- if( memory == null ) {
- memory = node.createMemory( this.ruleBase.getRuleBaseConfiguration(), reteEvaluator );
-
- if( !this.memories.compareAndSet( node.getMemoryId(), null, memory ) ) {
- memory = this.memories.get( node.getMemoryId() );
- }
-
- }
- return memory;
+ Memory memory = node.createMemory( this.ruleBase.getRuleBaseConfiguration(), reteEvaluator );
+ return this.memories.compareAndSet( node.getMemoryId(), null, memory ) ?
+ memory :
+ this.memories.get( node.getMemoryId() );
} finally {
- this.lock.unlock();
-
+ this.lock.readLock().unlock();
}
}
- /**
- * @param node
- */
- private void resize( MemoryFactory node ) {
+ private void resize( int newSize ) {
try {
- this.lock.lock();
- if( node.getMemoryId() >= this.memories.length() ) {
+ this.lock.writeLock().lock();
+ if ( newSize >= this.memories.length() ) {
// adding some buffer for new nodes, so that we reduce array copies
- int size = Math.max( this.ruleBase.getMemoryCount(), node.getMemoryId() + 32 );
- AtomicReferenceArray newMem = new AtomicReferenceArray<>( size );
- for ( int i = 0; i < this.memories.length(); i++ ) {
- newMem.set( i,
- this.memories.get( i ) );
+ int size = Math.max(this.ruleBase.getMemoryCount(), newSize + 32);
+ AtomicReferenceArray newMem = new AtomicReferenceArray<>(size);
+ for (int i = 0; i < this.memories.length(); i++) {
+ newMem.set(i, this.memories.get(i));
}
this.memories = newMem;
}
} finally {
- this.lock.unlock();
+ this.lock.writeLock().unlock();
}
}
diff --git a/drools-core/src/main/java/org/drools/core/common/DefaultBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/DefaultBetaConstraints.java
index 97ca4c128b7..e67af52c930 100644
--- a/drools-core/src/main/java/org/drools/core/common/DefaultBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/DefaultBetaConstraints.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.IOException;
@@ -21,23 +23,26 @@
import java.io.ObjectOutput;
import java.util.Arrays;
import java.util.List;
-
+import java.util.Optional;
+
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.IndexableConstraint;
+import org.drools.base.rule.MutableTypeConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.BetaMemory;
import org.drools.core.reteoo.Tuple;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.IndexableConstraint;
-import org.drools.core.rule.MutableTypeConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
import org.drools.core.util.index.IndexFactory;
+import org.kie.api.runtime.rule.FactHandle;
import org.kie.internal.conf.IndexPrecedenceOption;
-import static org.drools.core.reteoo.PropertySpecificUtil.getEmptyPropertyReactiveMask;
-import static org.drools.core.util.index.IndexUtil.compositeAllowed;
-import static org.drools.core.util.index.IndexUtil.isIndexableForNode;
+import static org.drools.base.reteoo.PropertySpecificUtil.getEmptyPropertyReactiveMask;
+import static org.drools.base.util.index.IndexUtil.compositeAllowed;
+import static org.drools.base.util.index.IndexUtil.isIndexableForNode;
public class DefaultBetaConstraints
@@ -155,7 +160,7 @@ public void updateFromTuple(final ContextEntry[] context,
*/
public void updateFromFactHandle(final ContextEntry[] context,
final ReteEvaluator reteEvaluator,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
for (ContextEntry aContext : context) {
aContext.updateFromFactHandle(reteEvaluator, handle);
}
@@ -177,7 +182,7 @@ public void resetFactHandle(final ContextEntry[] context) {
* @see org.kie.common.BetaNodeConstraints#isAllowedCachedLeft(java.lang.Object)
*/
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
for (int i = indexed; i < constraints.length; i++) {
if ( !constraints[i].isAllowedCachedLeft(context[i], handle) ) {
return false;
@@ -261,10 +266,10 @@ public BetaConstraints getOriginalConstraint() {
throw new UnsupportedOperationException();
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
BitMask mask = getEmptyPropertyReactiveMask(settableProperties.size());
for (BetaNodeFieldConstraint constraint : constraints) {
- mask = mask.setAll(constraint.getListenedPropertyMask(modifiedType, settableProperties));
+ mask = mask.setAll(constraint.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties));
}
return mask;
}
diff --git a/drools-core/src/main/java/org/drools/core/common/EventFactHandle.java b/drools-core/src/main/java/org/drools/core/common/DefaultEventHandle.java
similarity index 58%
rename from drools-core/src/main/java/org/drools/core/common/EventFactHandle.java
rename to drools-core/src/main/java/org/drools/core/common/DefaultEventHandle.java
index 939575cd538..a905894d59c 100644
--- a/drools-core/src/main/java/org/drools/core/common/EventFactHandle.java
+++ b/drools-core/src/main/java/org/drools/core/common/DefaultEventHandle.java
@@ -1,30 +1,32 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import java.util.concurrent.atomic.AtomicInteger;
-
+import org.drools.base.rule.EntryPointId;
+import org.drools.base.time.JobHandle;
import org.drools.core.WorkingMemoryEntryPoint;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.time.JobHandle;
import org.drools.core.time.TimerService;
+import org.drools.core.time.impl.DefaultJobHandle;
import org.drools.core.util.LinkedList;
+import org.kie.api.runtime.rule.EventHandle;
-public class EventFactHandle extends DefaultFactHandle implements Comparable {
+public class DefaultEventHandle extends DefaultFactHandle implements EventHandle, Comparable {
private static final long serialVersionUID = 510l;
@@ -34,25 +36,25 @@ public class EventFactHandle extends DefaultFactHandle implements Comparable jobs = new LinkedList<>();
- private final transient LinkedList jobs = new LinkedList<>();
-
- // ----------------------------------------------------------------------
- // Constructors
- // ----------------------------------------------------------------------
-
- public EventFactHandle() {
+ public DefaultEventHandle() {
super();
this.startTimestamp = 0;
this.duration = 0;
}
+ public DefaultEventHandle(long id, EntryPointId entryPointId) {
+ super(id, null);
+ this.startTimestamp = 0;
+ this.duration = 0;
+ this.entryPointId = entryPointId;
+ }
+
/**
* Creates a new event fact handle.
*
@@ -62,28 +64,24 @@ public EventFactHandle() {
* @param timestamp the timestamp of the occurrence of this event
* @param duration the duration of this event. May be 0 (zero) in case this is a primitive event.
*/
- public EventFactHandle(long id,
- Object object,
- long recency,
- long timestamp,
- long duration,
- WorkingMemoryEntryPoint wmEntryPoint ) {
+ public DefaultEventHandle(long id,
+ Object object,
+ long recency,
+ long timestamp,
+ long duration,
+ WorkingMemoryEntryPoint wmEntryPoint) {
super( id, object, recency, wmEntryPoint );
this.startTimestamp = timestamp;
this.duration = duration;
-
- if ( wmEntryPoint.getKnowledgeBase() != null && wmEntryPoint.getKnowledgeBase().getRuleBaseConfiguration().isMultithreadEvaluation() ) {
- notExpiredPartitions = new AtomicInteger( RuleBasePartitionId.PARALLEL_PARTITIONS_NUMBER );
- }
}
- protected EventFactHandle(long id,
- int identityHashCode,
- Object object,
- long recency,
- long timestamp,
- long duration,
- EntryPointId entryPointId ) {
+ protected DefaultEventHandle(long id,
+ int identityHashCode,
+ Object object,
+ long recency,
+ long timestamp,
+ long duration,
+ EntryPointId entryPointId) {
super( id, identityHashCode, object, recency, entryPointId );
this.startTimestamp = timestamp;
@@ -138,7 +136,7 @@ public long getEndTimestamp() {
return this.startTimestamp + this.duration;
}
- public EventFactHandle getLinkedFactHandle() {
+ public DefaultEventHandle getLinkedFactHandle() {
return linkedFactHandle;
}
@@ -169,14 +167,6 @@ public boolean isExpired() {
}
}
- public boolean expirePartition() {
- if ( linkedFactHandle != null ) {
- return linkedFactHandle.expirePartition();
- } else {
- return notExpiredPartitions == null || notExpiredPartitions.decrementAndGet() == 0;
- }
- }
-
public void setExpired(boolean expired) {
if ( linkedFactHandle != null ) {
linkedFactHandle.setExpired(expired);
@@ -201,38 +191,6 @@ public void setPendingRemoveFromStore(boolean pendingRemove) {
}
}
- public long getActivationsCount() {
- if ( linkedFactHandle != null ) {
- return linkedFactHandle.getActivationsCount();
- } else {
- return activationsCount;
- }
- }
-
- public void setActivationsCount(long activationsCount) {
- if ( linkedFactHandle != null ) {
- linkedFactHandle.setActivationsCount( activationsCount );
- } else {
- this.activationsCount = activationsCount;
- }
- }
-
- public void increaseActivationsCount() {
- if ( linkedFactHandle != null ) {
- linkedFactHandle.increaseActivationsCount();
- } else {
- this.activationsCount++;
- }
- }
-
- public void decreaseActivationsCount() {
- if ( linkedFactHandle != null ) {
- linkedFactHandle.decreaseActivationsCount();
- } else {
- this.activationsCount--;
- }
- }
-
public void increaseOtnCount() {
otnCount++;
}
@@ -249,15 +207,14 @@ public void setOtnCount( int otnCount ) {
this.otnCount = otnCount;
}
- public EventFactHandle clone() {
- EventFactHandle clone = new EventFactHandle( getId(),
- getIdentityHashCode(),
- getObject(),
- getRecency(),
- getStartTimestamp(),
- getDuration(),
- getEntryPointId() );
- clone.setActivationsCount( getActivationsCount() );
+ public DefaultEventHandle clone() {
+ DefaultEventHandle clone = new DefaultEventHandle(getId(),
+ getIdentityHashCode(),
+ getObject(),
+ getRecency(),
+ getStartTimestamp(),
+ getDuration(),
+ getEntryPointId() );
clone.setOtnCount( getOtnCount() );
clone.setExpired( isExpired() );
clone.setEqualityKey( getEqualityKey() );
@@ -267,26 +224,25 @@ public EventFactHandle clone() {
return clone;
}
- private EventFactHandle cloneWithoutTuples() {
- EventFactHandle clone = new EventFactHandle( getId(),
- getIdentityHashCode(),
- getObject(),
- getRecency(),
- getStartTimestamp(),
- getDuration(),
- getEntryPointId() );
- clone.setActivationsCount( getActivationsCount() );
+ private DefaultEventHandle cloneWithoutTuples() {
+ DefaultEventHandle clone = new DefaultEventHandle(getId(),
+ getIdentityHashCode(),
+ getObject(),
+ getRecency(),
+ getStartTimestamp(),
+ getDuration(),
+ getEntryPointId() );
clone.setOtnCount( getOtnCount() );
clone.setExpired( isExpired() );
clone.setEqualityKey( getEqualityKey() );
- clone.linkedTuples = this.linkedTuples.newInstance();
+ clone.linkedTuples = this.linkedTuples.cloneEmpty();
clone.setObjectHashCode(getObjectHashCode());
clone.wmEntryPoint = this.wmEntryPoint;
return clone;
}
- public EventFactHandle cloneAndLink() {
- EventFactHandle clone = cloneWithoutTuples();
+ public DefaultEventHandle cloneAndLink() {
+ DefaultEventHandle clone = cloneWithoutTuples();
clone.linkedFactHandle = this;
return clone;
}
@@ -303,17 +259,17 @@ public void quickCloneUpdate(DefaultFactHandle clone) {
clone.setNegated( isNegated() );
}
- public int compareTo(EventFactHandle e) {
+ public int compareTo(DefaultEventHandle e) {
return (getStartTimestamp() < e.getStartTimestamp()) ? -1 : (getStartTimestamp() == e.getStartTimestamp() ? 0 : 1);
}
- public void addJob(JobHandle job) {
+ public void addJob(DefaultJobHandle job) {
synchronized (jobs) {
jobs.add(job);
}
}
- public void removeJob(JobHandle job) {
+ public void removeJob(DefaultJobHandle job) {
synchronized (jobs) {
// the job could have been already removed if the event has been just retracted
// and then the unscheduleAllJobs method has been invoked concurrently
diff --git a/drools-core/src/main/java/org/drools/core/common/DefaultFactHandle.java b/drools-core/src/main/java/org/drools/core/common/DefaultFactHandle.java
index f7d14914f27..c3a8820eec1 100644
--- a/drools-core/src/main/java/org/drools/core/common/DefaultFactHandle.java
+++ b/drools-core/src/main/java/org/drools/core/common/DefaultFactHandle.java
@@ -1,42 +1,45 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import java.util.Objects;
-import java.util.function.Consumer;
-import java.util.function.Predicate;
-import java.util.stream.Stream;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-
+import org.drools.base.factmodel.traits.TraitTypeEnum;
+import org.drools.base.rule.EntryPointId;
import org.drools.core.WorkingMemoryEntryPoint;
-import org.drools.core.factmodel.traits.TraitTypeEnum;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.ObjectTypeNode;
import org.drools.core.reteoo.RightTuple;
-import org.drools.core.rule.EntryPointId;
+import org.drools.core.reteoo.RightTupleImpl;
import org.drools.core.reteoo.Tuple;
import org.drools.core.util.AbstractBaseLinkedListNode;
import org.drools.util.StringUtils;
import org.kie.api.runtime.rule.FactHandle;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Objects;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+import java.util.stream.Stream;
+
/**
* Implementation of FactHandle.
*/
@@ -46,10 +49,6 @@ public class DefaultFactHandle extends AbstractBaseLinkedListNode K as( Class klass ) throws ClassCastException {
+ public K as(Class klass) throws ClassCastException {
if ( klass.isAssignableFrom( object.getClass() ) ) {
return (K) object;
}
@@ -365,9 +354,9 @@ public WorkingMemoryEntryPoint getEntryPoint(ReteEvaluator reteEvaluator) {
return wmEntryPoint;
}
- protected void setLinkedTuples( RuleBase kbase ) {
- linkedTuples = kbase != null && kbase.getRuleBaseConfiguration().isMultithreadEvaluation() ?
- new CompositeLinkedTuples() :
+ protected void setLinkedTuples(InternalRuleBase kbase) {
+ linkedTuples = kbase != null && kbase.isPartitioned() ?
+ new CompositeLinkedTuples(kbase.getParallelEvaluationSlotsCount()) :
new SingleLinkedTuples();
}
@@ -387,10 +376,6 @@ public void removeLeftTuple( LeftTuple leftTuple ) {
linkedTuples.removeLeftTuple( leftTuple );
}
- public void addFirstRightTuple( RightTuple rightTuple ) {
- linkedTuples.addFirstRightTuple( rightTuple );
- }
-
public void addLastRightTuple( RightTuple rightTuple ) {
linkedTuples.addLastRightTuple( rightTuple );
}
@@ -424,8 +409,8 @@ public static DefaultFactHandle createFromExternalFormat( String externalFormat
DefaultFactHandle handle;
if (FACT_FORMAT_VERSION.equals( elements[0]) ) {
handle = new DefaultFactHandle();
- } else if (EventFactHandle.EVENT_FORMAT_VERSION.equals( elements[0])) {
- handle = new EventFactHandle();
+ } else if (DefaultEventHandle.EVENT_FORMAT_VERSION.equals(elements[0])) {
+ handle = new DefaultEventHandle();
} else {
throw new RuntimeException( "Unknown fact handle version format: " + elements[0]);
}
@@ -483,7 +468,7 @@ public SingleLinkedTuples clone() {
}
@Override
- public LinkedTuples newInstance() {
+ public LinkedTuples cloneEmpty() {
return new SingleLinkedTuples();
}
@@ -495,14 +480,13 @@ public boolean hasTuples() {
@Override
public void addFirstLeftTuple( LeftTuple leftTuple ) {
LeftTuple previous = firstLeftTuple;
+ leftTuple.setHandlePrevious( null );
if ( previous == null ) {
// no other LeftTuples, just add.
- leftTuple.setHandlePrevious( null );
leftTuple.setHandleNext( null );
firstLeftTuple = leftTuple;
lastLeftTuple = leftTuple;
} else {
- leftTuple.setHandlePrevious( null );
leftTuple.setHandleNext( previous );
previous.setHandlePrevious( leftTuple );
firstLeftTuple = leftTuple;
@@ -517,13 +501,12 @@ public void addLastLeftTuple( LeftTuple leftTuple ) {
leftTuple.setHandlePrevious( null );
leftTuple.setHandleNext( null );
firstLeftTuple = leftTuple;
- lastLeftTuple = leftTuple;
} else {
leftTuple.setHandlePrevious( previous );
leftTuple.setHandleNext( null );
previous.setHandleNext( leftTuple );
- lastLeftTuple = leftTuple;
}
+ lastLeftTuple = leftTuple;
}
@Override
@@ -622,12 +605,11 @@ public void removeLeftTuple( LeftTuple leftTuple ) {
public void addFirstRightTuple( RightTuple rightTuple ) {
RightTuple previousFirst = firstRightTuple;
firstRightTuple = rightTuple;
+ rightTuple.setHandlePrevious( null );
if ( previousFirst == null ) {
- rightTuple.setHandlePrevious( null );
rightTuple.setHandleNext( null );
lastRightTuple = rightTuple;
} else {
- rightTuple.setHandlePrevious( null );
rightTuple.setHandleNext( previousFirst );
previousFirst.setHandlePrevious( rightTuple );
}
@@ -636,26 +618,25 @@ public void addFirstRightTuple( RightTuple rightTuple ) {
@Override
public void addLastRightTuple( RightTuple rightTuple ) {
RightTuple previousLast = lastRightTuple;
- if( previousLast == null ){
+ if ( previousLast == null ) {
rightTuple.setHandlePrevious( null );
rightTuple.setHandleNext( null );
firstRightTuple = rightTuple;
- lastRightTuple = rightTuple;
} else {
rightTuple.setHandlePrevious( previousLast );
rightTuple.setHandleNext( null );
previousLast.setHandleNext( rightTuple );
- lastRightTuple = rightTuple;
}
+ lastRightTuple = rightTuple;
}
@Override
public void removeRightTuple( RightTuple rightTuple ) {
- RightTuple previous = rightTuple.getHandlePrevious();
- RightTuple next = rightTuple.getHandleNext();
+ RightTupleImpl previous = rightTuple.getHandlePrevious();
+ RightTupleImpl next = rightTuple.getHandleNext();
if ( previous != null && next != null ) {
- // remove from middle
+ // remove from middle
previous.setHandleNext( next );
next.setHandlePrevious( previous );
} else if ( next != null ) {
@@ -689,25 +670,13 @@ public void clearRightTuples() {
@Override
public void forEachRightTuple(Consumer rightTupleConsumer) {
- for (RightTuple rightTuple = firstRightTuple; rightTuple != null; ) {
- RightTuple nextRightTuple = rightTuple.getHandleNext();
+ for (RightTupleImpl rightTuple = (RightTupleImpl) firstRightTuple; rightTuple != null; ) {
+ RightTupleImpl nextRightTuple = rightTuple.getHandleNext();
rightTupleConsumer.accept( rightTuple );
rightTuple = nextRightTuple;
}
}
- @Override
- public RightTuple findFirstRightTuple(Predicate rightTuplePredicate ) {
- for (RightTuple rightTuple = firstRightTuple; rightTuple != null; ) {
- RightTuple nextRightTuple = rightTuple.getHandleNext();
- if (rightTuplePredicate.test( rightTuple )) {
- return rightTuple;
- }
- rightTuple = nextRightTuple;
- }
- return null;
- }
-
@Override
public void forEachLeftTuple(Consumer leftTupleConsumer) {
for ( LeftTuple leftTuple = firstLeftTuple; leftTuple != null; ) {
@@ -737,15 +706,6 @@ LeftTuple getFirstLeftTuple() {
return firstLeftTuple;
}
- @Override
- public void setFirstLeftTuple( LeftTuple firstLeftTuple, int partition ) {
- setFirstLeftTuple( firstLeftTuple );
- }
-
- void setFirstLeftTuple( LeftTuple firstLeftTuple ) {
- this.firstLeftTuple = firstLeftTuple;
- }
-
@Override
public RightTuple getFirstRightTuple(int partition) {
return getFirstRightTuple();
@@ -758,23 +718,34 @@ RightTuple getFirstRightTuple() {
public static class CompositeLinkedTuples implements LinkedTuples {
- private final SingleLinkedTuples[] partitionedTuples = new SingleLinkedTuples[RuleBasePartitionId.PARALLEL_PARTITIONS_NUMBER];
+ private final LinkedTuples[] partitionedTuples;
- public CompositeLinkedTuples() {
- for (int i = 0; i < partitionedTuples.length; i++) {
- partitionedTuples[i] = new SingleLinkedTuples();
+ public CompositeLinkedTuples(int parallelEvaluationSlotsCount) {
+ this.partitionedTuples = new LinkedTuples[parallelEvaluationSlotsCount];
+ }
+
+ private LinkedTuples getPartitionedTuple(int partition) {
+ LinkedTuples tuples = partitionedTuples[partition];
+ return tuples != null ? tuples : DummyLinkedTuples.INSTANCE;
+ }
+
+ private LinkedTuples getOrCreatePartitionedTuple(int partition) {
+ LinkedTuples tuples = partitionedTuples[partition];
+ if (tuples == null) {
+ tuples = ( partitionedTuples[partition] = new SingleLinkedTuples() );
}
+ return tuples;
}
@Override
- public LinkedTuples newInstance() {
- return new CompositeLinkedTuples();
+ public LinkedTuples cloneEmpty() {
+ return new CompositeLinkedTuples(partitionedTuples.length);
}
@Override
public boolean hasTuples() {
for (int i = 0; i < partitionedTuples.length; i++) {
- if (partitionedTuples[i].hasTuples()) {
+ if (getPartitionedTuple(i).hasTuples()) {
return true;
}
}
@@ -783,51 +754,55 @@ public boolean hasTuples() {
@Override
public LinkedTuples clone() {
- CompositeLinkedTuples clone = new CompositeLinkedTuples();
+ CompositeLinkedTuples clone = new CompositeLinkedTuples(partitionedTuples.length);
for (int i = 0; i < partitionedTuples.length; i++) {
- clone.partitionedTuples[i] = partitionedTuples[i].clone();
+ clone.partitionedTuples[i] = partitionedTuples[i] == null ? null : partitionedTuples[i].clone();
}
return clone;
}
- private LinkedTuples getPartitionTuples(Tuple tuple) {
- return partitionedTuples[tuple.getTupleSink().getPartitionId().getParallelEvaluationSlot()];
+ private LinkedTuples getPartitionedTuple(Tuple tuple) {
+ return getPartitionedTuple(tuple.getTupleSink().getPartitionId().getParallelEvaluationSlot());
+ }
+
+ private LinkedTuples getOrCreatePartitionedTuple(Tuple tuple) {
+ return getOrCreatePartitionedTuple(tuple.getTupleSink().getPartitionId().getParallelEvaluationSlot());
}
@Override
public void addFirstLeftTuple( LeftTuple leftTuple ) {
- getPartitionTuples(leftTuple).addFirstLeftTuple( leftTuple );
+ getOrCreatePartitionedTuple(leftTuple).addFirstLeftTuple( leftTuple );
}
@Override
public void addLastLeftTuple( LeftTuple leftTuple ) {
- getPartitionTuples(leftTuple).addLastLeftTuple( leftTuple );
+ getOrCreatePartitionedTuple(leftTuple).addLastLeftTuple( leftTuple );
}
@Override
public void addTupleInPosition( Tuple tuple ) {
- getPartitionTuples(tuple).addTupleInPosition( tuple );
+ getOrCreatePartitionedTuple(tuple).addTupleInPosition( tuple );
}
@Override
public void removeLeftTuple( LeftTuple leftTuple ) {
- getPartitionTuples(leftTuple).removeLeftTuple( leftTuple );
+ getPartitionedTuple(leftTuple).removeLeftTuple( leftTuple );
}
@Override
public void addFirstRightTuple( RightTuple rightTuple ) {
- getPartitionTuples(rightTuple).addFirstRightTuple( rightTuple );
+ getOrCreatePartitionedTuple(rightTuple).addFirstRightTuple( rightTuple );
}
@Override
public void addLastRightTuple( RightTuple rightTuple ) {
- getPartitionTuples(rightTuple).addLastRightTuple( rightTuple );
+ getOrCreatePartitionedTuple(rightTuple).addLastRightTuple( rightTuple );
}
@Override
public void removeRightTuple( RightTuple rightTuple ) {
if (rightTuple.getTupleSink() != null) {
- getPartitionTuples( rightTuple ).removeRightTuple( rightTuple );
+ getPartitionedTuple( rightTuple ).removeRightTuple( rightTuple );
}
}
@@ -839,7 +814,7 @@ public void clearLeftTuples() {
}
public void clearLeftTuples(int partition) {
- partitionedTuples[partition].clearLeftTuples();
+ getPartitionedTuple(partition).clearLeftTuples();
}
@Override
@@ -850,7 +825,7 @@ public void clearRightTuples() {
}
public void clearRightTuples(int partition) {
- partitionedTuples[partition].clearRightTuples();
+ getPartitionedTuple(partition).clearRightTuples();
}
@Override
@@ -861,16 +836,7 @@ public void forEachRightTuple( Consumer rightTupleConsumer ) {
}
public void forEachRightTuple( int partition, Consumer rightTupleConsumer ) {
- partitionedTuples[partition].forEachRightTuple( rightTupleConsumer );
- }
-
- @Override
- public RightTuple findFirstRightTuple( Predicate rightTuplePredicate ) {
- return Stream.of( partitionedTuples )
- .map( t -> t.findFirstRightTuple( rightTuplePredicate ) )
- .filter( Objects::nonNull )
- .findFirst()
- .orElse( null );
+ getPartitionedTuple(partition).forEachRightTuple( rightTupleConsumer );
}
@Override
@@ -881,11 +847,11 @@ public void forEachLeftTuple( Consumer leftTupleConsumer ) {
}
public void forEachLeftTuple( int partition, Consumer leftTupleConsumer ) {
- partitionedTuples[partition].forEachLeftTuple( leftTupleConsumer );
+ getPartitionedTuple(partition).forEachLeftTuple( leftTupleConsumer );
}
@Override
- public LeftTuple findFirstLeftTuple( Predicate lefttTuplePredicate ) {
+ public LeftTuple findFirstLeftTuple(Predicate lefttTuplePredicate ) {
return Stream.of( partitionedTuples )
.map( t -> t.findFirstLeftTuple( lefttTuplePredicate ) )
.filter( Objects::nonNull )
@@ -895,17 +861,94 @@ public LeftTuple findFirstLeftTuple( Predicate lefttTuplePredicate )
@Override
public LeftTuple getFirstLeftTuple(int partition) {
- return partitionedTuples[partition].getFirstLeftTuple();
+ return ((SingleLinkedTuples) partitionedTuples[partition]).getFirstLeftTuple();
}
@Override
- public void setFirstLeftTuple( LeftTuple firstLeftTuple, int partition ) {
- partitionedTuples[partition].setFirstLeftTuple(firstLeftTuple);
+ public RightTuple getFirstRightTuple(int partition) {
+ return ((SingleLinkedTuples) partitionedTuples[partition]).getFirstRightTuple();
+ }
+ }
+
+ public static class DummyLinkedTuples implements LinkedTuples {
+
+ private static final DummyLinkedTuples INSTANCE = new DummyLinkedTuples();
+
+ @Override
+ public LinkedTuples clone() {
+ return this;
+ }
+
+ @Override
+ public LinkedTuples cloneEmpty() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean hasTuples() {
+ return false;
+ }
+
+ @Override
+ public void addFirstLeftTuple(LeftTuple leftTuple) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void addLastLeftTuple(LeftTuple leftTuple) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void addTupleInPosition(Tuple tuple) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeLeftTuple(LeftTuple leftTuple) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void addFirstRightTuple(RightTuple rightTuple) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void addLastRightTuple(RightTuple rightTuple) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeRightTuple(RightTuple rightTuple) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void clearLeftTuples() { }
+
+ @Override
+ public void clearRightTuples() { }
+
+ @Override
+ public void forEachRightTuple(Consumer rightTupleConsumer) { }
+
+ @Override
+ public void forEachLeftTuple(Consumer leftTupleConsumer) { }
+
+ @Override
+ public LeftTuple findFirstLeftTuple(Predicate leftTuplePredicate) {
+ return null;
+ }
+
+ @Override
+ public LeftTuple getFirstLeftTuple(int partition) {
+ return null;
}
@Override
public RightTuple getFirstRightTuple(int partition) {
- return partitionedTuples[partition].getFirstRightTuple();
+ return null;
}
}
@@ -914,11 +957,6 @@ public void forEachRightTuple(Consumer rightTupleConsumer) {
linkedTuples.forEachRightTuple( rightTupleConsumer );
}
- @Override
- public RightTuple findFirstRightTuple(Predicate rightTuplePredicate ) {
- return linkedTuples.findFirstRightTuple( rightTuplePredicate );
- }
-
@Override
public void forEachLeftTuple(Consumer leftTupleConsumer) {
linkedTuples.forEachLeftTuple( leftTupleConsumer );
@@ -937,15 +975,6 @@ public LeftTuple getFirstLeftTuple() {
throw new UnsupportedOperationException();
}
- @Override
- public void setFirstLeftTuple( LeftTuple firstLeftTuple ) {
- if (linkedTuples instanceof SingleLinkedTuples) {
- ( (SingleLinkedTuples) linkedTuples ).setFirstLeftTuple( firstLeftTuple );
- } else {
- throw new UnsupportedOperationException();
- }
- }
-
@Override
public RightTuple getFirstRightTuple() {
if (linkedTuples instanceof SingleLinkedTuples) {
@@ -968,16 +997,8 @@ public LinkedTuples detachLinkedTuples() {
@Override
public LinkedTuples detachLinkedTuplesForPartition(int i) {
- LinkedTuples detached = ( (CompositeLinkedTuples) linkedTuples ).partitionedTuples[i];
- ( (CompositeLinkedTuples) linkedTuples ).partitionedTuples[i] = new SingleLinkedTuples();
+ LinkedTuples detached = ( (CompositeLinkedTuples) linkedTuples ).getPartitionedTuple(i);
+ ( (CompositeLinkedTuples) linkedTuples ).partitionedTuples[i] = null;
return detached;
}
-
- public InternalFactHandle getParentHandle() {
- return parentHandle;
- }
-
- public void setParentHandle( InternalFactHandle parentHandle ) {
- this.parentHandle = parentHandle;
- }
}
diff --git a/drools-core/src/main/java/org/drools/core/common/DisconnectedFactHandle.java b/drools-core/src/main/java/org/drools/core/common/DisconnectedFactHandle.java
index e1e365627c0..2710924f631 100644
--- a/drools-core/src/main/java/org/drools/core/common/DisconnectedFactHandle.java
+++ b/drools-core/src/main/java/org/drools/core/common/DisconnectedFactHandle.java
@@ -1,26 +1,33 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.function.Consumer;
-import java.util.function.Predicate;
+import org.drools.base.factmodel.traits.TraitTypeEnum;
+import org.drools.base.rule.EntryPointId;
+import org.drools.core.WorkingMemoryEntryPoint;
+import org.drools.core.base.ArrayElements;
+import org.drools.core.base.DroolsQueryImpl;
+import org.drools.core.reteoo.LeftTuple;
+import org.drools.core.reteoo.RightTuple;
+import org.drools.core.reteoo.Tuple;
+import org.kie.api.runtime.rule.FactHandle;
+
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@@ -28,16 +35,12 @@
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
-
-import org.drools.core.WorkingMemoryEntryPoint;
-import org.drools.core.base.ArrayElements;
-import org.drools.core.base.DroolsQuery;
-import org.drools.core.factmodel.traits.TraitTypeEnum;
-import org.drools.core.reteoo.LeftTuple;
-import org.drools.core.reteoo.RightTuple;
-import org.drools.core.reteoo.Tuple;
-import org.drools.core.rule.EntryPointId;
-import org.kie.api.runtime.rule.FactHandle;
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
@XmlRootElement(name="disconnected-fact-handle")
@XmlAccessorType(XmlAccessType.NONE)
@@ -66,7 +69,7 @@ public class DisconnectedFactHandle
private long recency;
/**
- * This could be a {@link DroolsQuery} object or other almost-impossible-to-serialize class
+ * This could be a {@link DroolsQueryImpl} object or other almost-impossible-to-serialize class
*/
@XmlElement
private Object object;
@@ -157,7 +160,7 @@ public void setNegated(boolean negated) {
}
@Override
- public K as( Class klass ) throws ClassCastException {
+ public K as(Class klass) throws ClassCastException {
throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_ERROR_MESSAGE);
}
@@ -174,15 +177,10 @@ public boolean isPendingRemoveFromStore() {
public void forEachRightTuple( Consumer rightTupleConsumer ) { }
@Override
- public void forEachLeftTuple( Consumer leftTupleConsumer ) { }
+ public void forEachLeftTuple( Consumer leftTupleConsumer) { }
@Override
- public RightTuple findFirstRightTuple( Predicate rightTuplePredicate ) {
- return null;
- }
-
- @Override
- public LeftTuple findFirstLeftTuple( Predicate lefttTuplePredicate ) {
+ public LeftTuple findFirstLeftTuple(Predicate lefttTuplePredicate ) {
return null;
}
@@ -260,10 +258,6 @@ public void setEqualityKey(EqualityKey key) {
throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_ERROR_MESSAGE);
}
- public void setFirstLeftTuple(LeftTuple leftTuple) {
- throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_ERROR_MESSAGE);
- }
-
@Override
public LinkedTuples getLinkedTuples() {
throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_ERROR_MESSAGE);
@@ -364,10 +358,6 @@ public void clearRightTuples() {
throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_ERROR_MESSAGE);
}
- public void addFirstRightTuple(RightTuple rightTuple) {
- throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_ERROR_MESSAGE);
- }
-
public void addLastRightTuple(RightTuple rightTuple) {
throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_ERROR_MESSAGE);
}
diff --git a/drools-core/src/main/java/org/drools/core/common/DoubleBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/DoubleBetaConstraints.java
index 46e670fb7f8..ea7cd3226dd 100644
--- a/drools-core/src/main/java/org/drools/core/common/DoubleBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/DoubleBetaConstraints.java
@@ -1,31 +1,36 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.List;
+import java.util.Optional;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.MutableTypeConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.MutableTypeConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
import org.kie.internal.conf.IndexPrecedenceOption;
public class DoubleBetaConstraints extends MultipleBetaConstraint {
@@ -83,7 +88,7 @@ public void updateFromTuple(final ContextEntry[] context,
*/
public void updateFromFactHandle(final ContextEntry[] context,
final ReteEvaluator reteEvaluator,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
context[0].updateFromFactHandle( reteEvaluator,
handle );
context[1].updateFromFactHandle( reteEvaluator,
@@ -104,7 +109,7 @@ public void resetFactHandle(final ContextEntry[] context) {
* @see org.kie.common.BetaNodeConstraints#isAllowedCachedLeft(java.lang.Object)
*/
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
return (indexed[0] || constraints[0].isAllowedCachedLeft( context[0], handle )) &&
(indexed[1] || constraints[1].isAllowedCachedLeft( context[1], handle ));
}
@@ -157,9 +162,9 @@ public BetaConstraints getOriginalConstraint() {
throw new UnsupportedOperationException();
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
- return constraints[0].getListenedPropertyMask(modifiedType, settableProperties)
- .setAll(constraints[1].getListenedPropertyMask(modifiedType, settableProperties));
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
+ return constraints[0].getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties)
+ .setAll(constraints[1].getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties));
}
public void registerEvaluationContext(BuildContext buildContext) {
diff --git a/drools-core/src/main/java/org/drools/core/common/DoubleNonIndexSkipBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/DoubleNonIndexSkipBetaConstraints.java
index 227560d2711..24a4a32b26a 100644
--- a/drools-core/src/main/java/org/drools/core/common/DoubleNonIndexSkipBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/DoubleNonIndexSkipBetaConstraints.java
@@ -1,35 +1,40 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.List;
+import java.util.Optional;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.MutableTypeConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.reteoo.BetaMemory;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.MutableTypeConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
public class DoubleNonIndexSkipBetaConstraints
implements
@@ -88,7 +93,7 @@ public void updateFromTuple(ContextEntry[] context,
public void updateFromFactHandle(ContextEntry[] context,
ReteEvaluator reteEvaluator,
- InternalFactHandle handle) {
+ FactHandle handle) {
constraints.updateFromFactHandle( context, reteEvaluator, handle );
}
@@ -135,7 +140,7 @@ public String toString() {
}
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
return this.constraint0.isAllowedCachedLeft( context[0],
handle ) && this.constraint1.isAllowedCachedLeft( context[1],
handle );
@@ -146,9 +151,9 @@ public boolean isAllowedCachedRight(ContextEntry[] context,
return this.constraints.isAllowedCachedRight( context, tuple );
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
- return constraint0.getListenedPropertyMask(modifiedType, settableProperties)
- .setAll(constraint1.getListenedPropertyMask(modifiedType, settableProperties));
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
+ return constraint0.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties)
+ .setAll(constraint1.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties));
}
public boolean isLeftUpdateOptimizationAllowed() {
diff --git a/drools-core/src/main/java/org/drools/core/common/DroolsObjectInput.java b/drools-core/src/main/java/org/drools/core/common/DroolsObjectInput.java
deleted file mode 100644
index c384d0032d1..00000000000
--- a/drools-core/src/main/java/org/drools/core/common/DroolsObjectInput.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.common;
-
-import java.io.ObjectInput;
-
-import org.drools.core.impl.RuleBase;
-
-public interface DroolsObjectInput extends ObjectInput {
- ClassLoader getParentClassLoader();
- ClassLoader getClassLoader();
- void setClassLoader(ClassLoader classLoader);
-
- RuleBase getRuleBase();
- void setRuleBase(RuleBase kBase);
-
- void setWorkingMemory(InternalWorkingMemory workingMemory);
- InternalWorkingMemory getWorkingMemory();
-
- Package getPackage();
- void setPackage(Package pkg);
-}
diff --git a/drools-core/src/main/java/org/drools/core/common/DroolsObjectStreamConstants.java b/drools-core/src/main/java/org/drools/core/common/DroolsObjectStreamConstants.java
deleted file mode 100644
index a009118a9b9..00000000000
--- a/drools-core/src/main/java/org/drools/core/common/DroolsObjectStreamConstants.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.common;
-
-public interface DroolsObjectStreamConstants {
- int STREAM_MAGIC = 0x001500d2;
- short STREAM_VERSION = 400;
-
- byte RT_CLASS = 11;
- byte RT_SERIALIZABLE = 12;
- byte RT_REFERENCE = 13;
- byte RT_EMPTY_SET = 14;
- byte RT_EMPTY_LIST = 15;
- byte RT_EMPTY_MAP = 16;
- byte RT_MAP = 17;
- byte RT_ARRAY = 18;
- byte RT_STRING = 19;
- byte RT_NULL = 20;
- byte RT_COLLECTION = 21;
- byte RT_EXTERNALIZABLE = 22;
- byte RT_ATOMICREFERENCEARRAY = 30;
-}
diff --git a/drools-core/src/main/java/org/drools/core/common/EmptyBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/EmptyBetaConstraints.java
index 92002e5aec6..4665629fc78 100644
--- a/drools-core/src/main/java/org/drools/core/common/EmptyBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/EmptyBetaConstraints.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.IOException;
@@ -21,17 +23,19 @@
import java.io.ObjectOutput;
import java.util.List;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.reteoo.BetaMemory;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
import org.drools.core.util.index.TupleList;
+import org.kie.api.runtime.rule.FactHandle;
-import static org.drools.core.reteoo.PropertySpecificUtil.getEmptyPropertyReactiveMask;
+import static org.drools.base.reteoo.PropertySpecificUtil.getEmptyPropertyReactiveMask;
public class EmptyBetaConstraints
implements
@@ -71,7 +75,7 @@ public void updateFromTuple(final ContextEntry[] context,
*/
public void updateFromFactHandle(final ContextEntry[] context,
final ReteEvaluator reteEvaluator,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
}
public void resetTuple(final ContextEntry[] context) {
@@ -84,7 +88,7 @@ public void resetFactHandle(final ContextEntry[] context) {
* @see org.kie.common.BetaNodeConstraints#isAllowedCachedLeft(java.lang.Object)
*/
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
return true;
}
@@ -152,7 +156,7 @@ public BetaConstraints getOriginalConstraint() {
throw new UnsupportedOperationException();
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
return getEmptyPropertyReactiveMask(settableProperties.size());
}
diff --git a/drools-core/src/main/java/org/drools/core/common/EndOperationListener.java b/drools-core/src/main/java/org/drools/core/common/EndOperationListener.java
index 2133160a651..0b8d8139422 100644
--- a/drools-core/src/main/java/org/drools/core/common/EndOperationListener.java
+++ b/drools-core/src/main/java/org/drools/core/common/EndOperationListener.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
diff --git a/drools-core/src/main/java/org/drools/core/common/EntryPointFactory.java b/drools-core/src/main/java/org/drools/core/common/EntryPointFactory.java
index 964fe3478d3..b4a980cfafa 100644
--- a/drools-core/src/main/java/org/drools/core/common/EntryPointFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/EntryPointFactory.java
@@ -1,24 +1,26 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.drools.core.EntryPointsManager;
import org.drools.core.reteoo.EntryPointNode;
-import org.drools.core.rule.EntryPointId;
+import org.drools.base.rule.EntryPointId;
public interface EntryPointFactory {
diff --git a/drools-core/src/main/java/org/drools/core/common/EqualityKey.java b/drools-core/src/main/java/org/drools/core/common/EqualityKey.java
index cdb21d221cc..227479112ee 100644
--- a/drools-core/src/main/java/org/drools/core/common/EqualityKey.java
+++ b/drools-core/src/main/java/org/drools/core/common/EqualityKey.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/common/EventSupport.java b/drools-core/src/main/java/org/drools/core/common/EventSupport.java
index fe0453566f6..506fe27791a 100644
--- a/drools-core/src/main/java/org/drools/core/common/EventSupport.java
+++ b/drools-core/src/main/java/org/drools/core/common/EventSupport.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.Collection;
diff --git a/drools-core/src/main/java/org/drools/core/common/FactHandleClassStore.java b/drools-core/src/main/java/org/drools/core/common/FactHandleClassStore.java
index b83ebf6f7b3..43f08728668 100644
--- a/drools-core/src/main/java/org/drools/core/common/FactHandleClassStore.java
+++ b/drools-core/src/main/java/org/drools/core/common/FactHandleClassStore.java
@@ -1,21 +1,25 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.Iterator;
-public interface FactHandleClassStore {
+public interface FactHandleClassStore {
Iterator iterator();
}
diff --git a/drools-core/src/main/java/org/drools/core/common/IdentityObjectStore.java b/drools-core/src/main/java/org/drools/core/common/IdentityObjectStore.java
index cf1bf920178..52edbca8683 100644
--- a/drools-core/src/main/java/org/drools/core/common/IdentityObjectStore.java
+++ b/drools-core/src/main/java/org/drools/core/common/IdentityObjectStore.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.IdentityHashMap;
diff --git a/drools-core/src/main/java/org/drools/core/common/InternalActivationGroup.java b/drools-core/src/main/java/org/drools/core/common/InternalActivationGroup.java
index 40bbdcbbe4d..7e65ffb19a9 100644
--- a/drools-core/src/main/java/org/drools/core/common/InternalActivationGroup.java
+++ b/drools-core/src/main/java/org/drools/core/common/InternalActivationGroup.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.Iterator;
diff --git a/drools-core/src/main/java/org/drools/core/common/InternalAgenda.java b/drools-core/src/main/java/org/drools/core/common/InternalAgenda.java
index 02fb2c9c880..e5b8c8bd621 100644
--- a/drools-core/src/main/java/org/drools/core/common/InternalAgenda.java
+++ b/drools-core/src/main/java/org/drools/core/common/InternalAgenda.java
@@ -1,28 +1,30 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import java.util.Iterator;
-import java.util.Map;
-
import org.drools.core.phreak.PropagationEntry;
import org.kie.api.runtime.rule.Agenda;
import org.kie.api.runtime.rule.AgendaFilter;
+import java.util.Iterator;
+import java.util.Map;
+
public interface InternalAgenda extends Agenda, ActivationsManager {
/**
@@ -34,8 +36,10 @@ public interface InternalAgenda extends Agenda, ActivationsManager {
/**
* Sets the Agenda's focus to the specified AgendaGroup
+ *
+ * @return true if the AgendaGroup is changed
*/
- void setFocus(String name);
+ boolean setFocus(String name);
/**
* Activates the RuleFlowGroup with the given name.
@@ -80,12 +84,8 @@ public interface InternalAgenda extends Agenda, ActivationsManager {
*/
String getFocusName();
- int fireNextItem(AgendaFilter filter, int fireCount, int fireLimit);
-
boolean isDeclarativeAgenda();
- void setWorkingMemory(final InternalWorkingMemory workingMemory);
-
/**
* Fires all activations currently in agenda that match the given agendaFilter
* until the fireLimit is reached or no more activations exist.
diff --git a/drools-core/src/main/java/org/drools/core/common/InternalAgendaGroup.java b/drools-core/src/main/java/org/drools/core/common/InternalAgendaGroup.java
index eaa69c51c0a..8042993155d 100644
--- a/drools-core/src/main/java/org/drools/core/common/InternalAgendaGroup.java
+++ b/drools-core/src/main/java/org/drools/core/common/InternalAgendaGroup.java
@@ -1,32 +1,30 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
+import org.drools.core.phreak.RuleAgendaItem;
+
import java.util.Collection;
import java.util.Map;
-import org.drools.core.phreak.RuleAgendaItem;
public interface InternalAgendaGroup extends org.kie.api.runtime.rule.AgendaGroup {
- /**
- * Static reference to determine the default AgendaGroup name.
- */
- String MAIN = "MAIN";
-
/**
* @return
* The int total number of activations
@@ -73,8 +71,6 @@ public interface InternalAgendaGroup extends org.kie.api.runtime.rule.AgendaGrou
void setActive(boolean activate);
- Collection getAll();
-
void setActivatedForRecency(long recency);
long getActivatedForRecency();
diff --git a/drools-core/src/main/java/org/drools/core/common/InternalFactHandle.java b/drools-core/src/main/java/org/drools/core/common/InternalFactHandle.java
index 74bf60bfd60..ba247a32492 100644
--- a/drools-core/src/main/java/org/drools/core/common/InternalFactHandle.java
+++ b/drools-core/src/main/java/org/drools/core/common/InternalFactHandle.java
@@ -1,33 +1,36 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import java.io.Serializable;
-import java.util.function.Consumer;
-import java.util.function.Predicate;
-
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.factmodel.traits.TraitTypeEnum;
+import org.drools.base.rule.EntryPointId;
import org.drools.core.WorkingMemoryEntryPoint;
-import org.drools.core.factmodel.traits.TraitTypeEnum;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.RightTuple;
-import org.drools.core.rule.EntryPointId;
import org.drools.core.reteoo.Tuple;
import org.kie.api.runtime.rule.FactHandle;
+import java.io.Serializable;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+
public interface InternalFactHandle
extends
FactHandle, Cloneable, Serializable {
@@ -107,8 +110,6 @@ default String getEntryPointName() {
void clearRightTuples();
- void addFirstRightTuple( RightTuple rightTuple );
-
void addLastRightTuple( RightTuple rightTuple );
void removeRightTuple( RightTuple rightTuple );
@@ -118,19 +119,14 @@ default String getEntryPointName() {
boolean isNegated();
void setNegated(boolean negated);
- K as( Class klass ) throws ClassCastException;
-
boolean isExpired();
boolean isPendingRemoveFromStore();
void forEachRightTuple(Consumer rightTupleConsumer );
void forEachLeftTuple(Consumer leftTupleConsumer);
- RightTuple findFirstRightTuple(Predicate rightTuplePredicate );
LeftTuple findFirstLeftTuple(Predicate lefttTuplePredicate );
- void setFirstLeftTuple( LeftTuple firstLeftTuple );
-
LinkedTuples detachLinkedTuples();
LinkedTuples detachLinkedTuplesForPartition(int i);
@@ -142,7 +138,7 @@ default boolean hasMatches() {
interface LinkedTuples extends Serializable {
LinkedTuples clone();
- LinkedTuples newInstance();
+ LinkedTuples cloneEmpty();
boolean hasTuples();
@@ -162,20 +158,15 @@ interface LinkedTuples extends Serializable {
void clearRightTuples();
void forEachRightTuple(Consumer rightTupleConsumer);
- RightTuple findFirstRightTuple(Predicate rightTuplePredicate );
void forEachLeftTuple(Consumer leftTupleConsumer);
LeftTuple findFirstLeftTuple(Predicate leftTuplePredicate );
- LeftTuple getFirstLeftTuple( int partition);
- void setFirstLeftTuple( LeftTuple firstLeftTuple, int partition );
+ LeftTuple getFirstLeftTuple(int partition);
default LeftTuple getFirstLeftTuple(RuleBasePartitionId partitionId) {
return getFirstLeftTuple( partitionId.getParallelEvaluationSlot() );
}
- default void setFirstLeftTuple( LeftTuple firstLeftTuple, RuleBasePartitionId partitionId ) {
- setFirstLeftTuple( firstLeftTuple, partitionId.getParallelEvaluationSlot() );
- }
RightTuple getFirstRightTuple(int partition);
@@ -184,14 +175,6 @@ default RightTuple getFirstRightTuple(RuleBasePartitionId partitionId) {
}
}
- default InternalFactHandle getParentHandle() {
- return null;
- }
-
- default void setParentHandle( InternalFactHandle parentHandle ) {
- throw new UnsupportedOperationException();
- }
-
static InternalFactHandle dummyFactHandleOf(Object object) {
return new DummyFactHandle( object );
}
@@ -314,7 +297,6 @@ public WorkingMemoryEntryPoint getEntryPoint( ReteEvaluator reteEvaluator ) {
throw new UnsupportedOperationException();
}
-
@Override
public InternalFactHandle clone() {
throw new UnsupportedOperationException();
@@ -355,11 +337,6 @@ public void clearRightTuples() {
throw new UnsupportedOperationException();
}
- @Override
- public void addFirstRightTuple( RightTuple rightTuple ) {
- throw new UnsupportedOperationException();
- }
-
@Override
public void addLastRightTuple( RightTuple rightTuple ) {
throw new UnsupportedOperationException();
@@ -386,7 +363,7 @@ public void setNegated( boolean negated ) {
}
@Override
- public K as( Class klass ) throws ClassCastException {
+ public K as(Class klass) throws ClassCastException {
throw new UnsupportedOperationException();
}
@@ -411,17 +388,7 @@ public void forEachLeftTuple( Consumer leftTupleConsumer ) {
}
@Override
- public RightTuple findFirstRightTuple( Predicate rightTuplePredicate ) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public LeftTuple findFirstLeftTuple( Predicate lefttTuplePredicate ) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void setFirstLeftTuple( LeftTuple firstLeftTuple ) {
+ public LeftTuple findFirstLeftTuple(Predicate lefttTuplePredicate ) {
throw new UnsupportedOperationException();
}
diff --git a/drools-core/src/main/java/org/drools/core/common/InternalKnowledgeRuntime.java b/drools-core/src/main/java/org/drools/core/common/InternalKnowledgeRuntime.java
index f901209fd4d..e1634f0aed6 100644
--- a/drools-core/src/main/java/org/drools/core/common/InternalKnowledgeRuntime.java
+++ b/drools-core/src/main/java/org/drools/core/common/InternalKnowledgeRuntime.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
import org.drools.core.runtime.process.InternalProcessRuntime;
diff --git a/drools-core/src/main/java/org/drools/core/common/InternalRuleFlowGroup.java b/drools-core/src/main/java/org/drools/core/common/InternalRuleFlowGroup.java
index 2c959e356a2..33d4be62198 100644
--- a/drools-core/src/main/java/org/drools/core/common/InternalRuleFlowGroup.java
+++ b/drools-core/src/main/java/org/drools/core/common/InternalRuleFlowGroup.java
@@ -1,68 +1,22 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
public interface InternalRuleFlowGroup extends InternalAgendaGroup, RuleFlowGroup {
-
-// void setWorkingMemory(InternalWorkingMemory workingMemory);
-//
-// InternalWorkingMemory getWorkingMemory();
-//
-// void addActivation(Activation activation);
-//
-// void removeActivation(final Activation activation);
-//
-// void clear();
-//
-// /**
-// * Checks if this ruleflow group is active and should automatically deactivate.
-// * If the queue is empty, it deactivates the group.
-// */
-// public void deactivateIfEmpty();
-//
-// /**
-// * Activates or deactivates this RuleFlowGroup.
-// * When activating, all activations of this RuleFlowGroup are added
-// * to the agenda.
-// * As long as the RuleFlowGroup remains active,
-// * its activations are automatically added to the agenda.
-// * When deactivating, all activations of this RuleFlowGroup are removed
-// * to the agenda.
-// * As long as the RuleFlowGroup remains deactive,
-// * its activations are not added to the agenda.
-// */
-// void setActive(boolean active);
-//
-// boolean isActive();
-//
-// void addNodeInstance(String processInstanceId, String nodeInstanceId);
-//
-// void removeNodeInstance(String processInstanceId, String nodeInstanceId);
-//
-// public Activation[] getActivations();
-//
-// Map getNodeInstances();
-//
-// public void setActivatedForRecency(long recency);
-//
-// public long getActivatedForRecency();
-//
-// public void setClearedForRecency(long recency);
-//
-// public long getClearedForRecency();
-
}
diff --git a/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemory.java b/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemory.java
index af13b91d4b5..950a6c7f602 100644
--- a/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemory.java
+++ b/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.Collection;
diff --git a/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemoryActions.java b/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemoryActions.java
index d2ef24f6fe0..dfa1f316901 100644
--- a/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemoryActions.java
+++ b/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemoryActions.java
@@ -1,32 +1,34 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.Collection;
import org.drools.core.WorkingMemoryEntryPoint;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.factmodel.traits.Thing;
-import org.drools.core.factmodel.traits.TraitableBean;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.factmodel.traits.Thing;
+import org.drools.base.factmodel.traits.TraitableBean;
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.rule.consequence.InternalMatch;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
import org.kie.api.runtime.rule.FactHandle;
-import org.drools.core.beliefsystem.Mode;
+import org.drools.base.beliefsystem.Mode;
public interface InternalWorkingMemoryActions
extends
diff --git a/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemoryEntryPoint.java b/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemoryEntryPoint.java
index 6f647563634..ebf3a72985c 100644
--- a/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemoryEntryPoint.java
+++ b/drools-core/src/main/java/org/drools/core/common/InternalWorkingMemoryEntryPoint.java
@@ -1,28 +1,30 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.drools.core.WorkingMemoryEntryPoint;
import org.drools.core.base.TraitHelper;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.ObjectTypeConf;
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.rule.consequence.InternalMatch;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
import org.kie.api.runtime.rule.FactHandle;
public interface InternalWorkingMemoryEntryPoint extends WorkingMemoryEntryPoint {
@@ -68,14 +70,13 @@ PropagationContext delete(InternalFactHandle handle,
Object object,
ObjectTypeConf typeConf,
RuleImpl rule,
- InternalMatch internalMatch);
-
- PropagationContext delete(InternalFactHandle handle,
- Object object,
- ObjectTypeConf typeConf,
- RuleImpl rule,
- InternalMatch internalMatch,
TerminalNode terminalNode);
+ PropagationContext immediateDelete(InternalFactHandle handle,
+ Object object,
+ ObjectTypeConf typeConf,
+ RuleImpl rule,
+ TerminalNode terminalNode);
+
void removeFromObjectStore(InternalFactHandle handle);
}
diff --git a/drools-core/src/main/java/org/drools/core/common/MapObjectStore.java b/drools-core/src/main/java/org/drools/core/common/MapObjectStore.java
index 1d07be3450f..ee8770e000d 100644
--- a/drools-core/src/main/java/org/drools/core/common/MapObjectStore.java
+++ b/drools-core/src/main/java/org/drools/core/common/MapObjectStore.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/common/MapStorage.java b/drools-core/src/main/java/org/drools/core/common/MapStorage.java
index 9bc24637b2b..bf3a1a23400 100644
--- a/drools-core/src/main/java/org/drools/core/common/MapStorage.java
+++ b/drools-core/src/main/java/org/drools/core/common/MapStorage.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.Collection;
diff --git a/drools-core/src/main/java/org/drools/core/common/Memory.java b/drools-core/src/main/java/org/drools/core/common/Memory.java
index d2033aca027..12a1b9d5c49 100644
--- a/drools-core/src/main/java/org/drools/core/common/Memory.java
+++ b/drools-core/src/main/java/org/drools/core/common/Memory.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
import org.drools.core.phreak.RuntimeSegmentUtilities;
diff --git a/drools-core/src/main/java/org/drools/core/common/MemoryFactory.java b/drools-core/src/main/java/org/drools/core/common/MemoryFactory.java
index 0063d51160b..df086cf19c4 100644
--- a/drools-core/src/main/java/org/drools/core/common/MemoryFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/MemoryFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.drools.core.RuleBaseConfiguration;
diff --git a/drools-core/src/main/java/org/drools/core/common/MissingDependencyException.java b/drools-core/src/main/java/org/drools/core/common/MissingDependencyException.java
deleted file mode 100644
index 1b015ceff66..00000000000
--- a/drools-core/src/main/java/org/drools/core/common/MissingDependencyException.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2021. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.common;
-
-public class MissingDependencyException extends RuntimeException {
-
- public MissingDependencyException(String message) {
- super(message);
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/common/MultipleBetaConstraint.java b/drools-core/src/main/java/org/drools/core/common/MultipleBetaConstraint.java
index 8e24babb5cb..99e76625ffb 100644
--- a/drools-core/src/main/java/org/drools/core/common/MultipleBetaConstraint.java
+++ b/drools-core/src/main/java/org/drools/core/common/MultipleBetaConstraint.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
import java.io.IOException;
@@ -22,14 +25,14 @@
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.reteoo.BetaMemory;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.IndexableConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.IndexableConstraint;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.util.index.IndexFactory;
import org.kie.internal.conf.IndexPrecedenceOption;
-import static org.drools.core.util.index.IndexUtil.compositeAllowed;
-import static org.drools.core.util.index.IndexUtil.isIndexableForNode;
+import static org.drools.base.util.index.IndexUtil.compositeAllowed;
+import static org.drools.base.util.index.IndexUtil.isIndexableForNode;
public abstract class MultipleBetaConstraint implements BetaConstraints {
protected BetaNodeFieldConstraint[] constraints;
diff --git a/drools-core/src/main/java/org/drools/core/common/NetworkNode.java b/drools-core/src/main/java/org/drools/core/common/NetworkNode.java
deleted file mode 100644
index 0633a6947da..00000000000
--- a/drools-core/src/main/java/org/drools/core/common/NetworkNode.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.common;
-
-import java.io.Serializable;
-
-import org.drools.core.reteoo.TerminalNode;
-import org.kie.api.definition.rule.Rule;
-
-/**
- * Interface used to expose generic information on Rete nodes outside of he package. It is used
- * for exposing information events.
- */
-public interface NetworkNode extends Serializable {
-
- /**
- * Returns the unique id that represents the node in the Rete network
- */
- int getId();
-
- /**
- * Returns the partition ID to which this node belongs to
- */
- RuleBasePartitionId getPartitionId();
-
- short getType();
-
- Rule[] getAssociatedRules();
-
- boolean isAssociatedWith( Rule rule );
-
- void addAssociatedTerminal(TerminalNode terminalNode);
- void removeAssociatedTerminal(TerminalNode terminalNode);
-
- int getAssociatedTerminalsSize();
-
- boolean hasAssociatedTerminal(NetworkNode terminalNode);
-
- NetworkNode[] getSinks();
-}
diff --git a/drools-core/src/main/java/org/drools/core/common/NodeMemories.java b/drools-core/src/main/java/org/drools/core/common/NodeMemories.java
index c6f581102b1..03a564a76f7 100644
--- a/drools-core/src/main/java/org/drools/core/common/NodeMemories.java
+++ b/drools-core/src/main/java/org/drools/core/common/NodeMemories.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
+import org.drools.base.common.NetworkNode;
import org.kie.internal.runtime.StatefulKnowledgeSession;
/**
diff --git a/drools-core/src/main/java/org/drools/core/common/ObjectFactory.java b/drools-core/src/main/java/org/drools/core/common/ObjectFactory.java
index 236d78023e1..d3c1b5d3e70 100644
--- a/drools-core/src/main/java/org/drools/core/common/ObjectFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/ObjectFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import javax.xml.bind.annotation.XmlRegistry;
diff --git a/drools-core/src/main/java/org/drools/core/common/ObjectStore.java b/drools-core/src/main/java/org/drools/core/common/ObjectStore.java
index 95436d76b85..2ea6c0157eb 100644
--- a/drools-core/src/main/java/org/drools/core/common/ObjectStore.java
+++ b/drools-core/src/main/java/org/drools/core/common/ObjectStore.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.kie.api.internal.utils.KieService;
diff --git a/drools-core/src/main/java/org/drools/core/common/ObjectStoreWrapper.java b/drools-core/src/main/java/org/drools/core/common/ObjectStoreWrapper.java
index 476e8dea589..42390ff52d1 100644
--- a/drools-core/src/main/java/org/drools/core/common/ObjectStoreWrapper.java
+++ b/drools-core/src/main/java/org/drools/core/common/ObjectStoreWrapper.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.ArrayList;
diff --git a/drools-core/src/main/java/org/drools/core/common/ObjectTypeConfigurationRegistry.java b/drools-core/src/main/java/org/drools/core/common/ObjectTypeConfigurationRegistry.java
index 5ccaf1edc51..7bfdc976948 100644
--- a/drools-core/src/main/java/org/drools/core/common/ObjectTypeConfigurationRegistry.java
+++ b/drools-core/src/main/java/org/drools/core/common/ObjectTypeConfigurationRegistry.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.Serializable;
@@ -21,24 +23,26 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.facttemplates.Fact;
-import org.drools.core.impl.RuleBase;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.facttemplates.Fact;
+import org.drools.base.facttemplates.FactImpl;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.ClassObjectTypeConf;
import org.drools.core.reteoo.FactTemplateTypeConf;
import org.drools.core.reteoo.ObjectTypeConf;
-import org.drools.core.rule.EntryPointId;
+import org.drools.base.rule.EntryPointId;
+import org.drools.core.reteoo.RuleTerminalNodeLeftTuple;
import org.drools.core.rule.consequence.InternalMatch;
-import org.drools.core.base.ObjectType;
+import org.drools.base.base.ObjectType;
public class ObjectTypeConfigurationRegistry implements Serializable {
private static final long serialVersionUID = 510l;
private final Map typeConfMap = new ConcurrentHashMap<>();
- private final transient RuleBase ruleBase;
+ private final InternalRuleBase ruleBase;
- public ObjectTypeConfigurationRegistry(RuleBase ruleBase) {
+ public ObjectTypeConfigurationRegistry(InternalRuleBase ruleBase) {
this.ruleBase = ruleBase;
}
@@ -63,12 +67,18 @@ public ObjectTypeConf getOrCreateObjectTypeConf(EntryPointId entrypoint, Object
return conf;
}
+ // Avoid secondary super cache invalidation by testing for abstract classes first
+ // Then interfaces
+ // See: https://issues.redhat.com/browse/DROOLS-7521
private Object getKey( Object object ) {
- if ( object instanceof InternalMatch) {
+ if (object instanceof RuleTerminalNodeLeftTuple) {
return ClassObjectType.Match_ObjectType.getClassType();
- }
- if ( object instanceof Fact) {
+ } else if (object instanceof FactImpl) {
+ return ((FactImpl) object).getFactTemplate().getName();
+ } else if (object instanceof Fact) {
return ((Fact) object).getFactTemplate().getName();
+ } else if (object instanceof InternalMatch) {
+ return ClassObjectType.Match_ObjectType.getClassType();
}
return object.getClass();
}
diff --git a/drools-core/src/main/java/org/drools/core/common/PhreakPropagationContext.java b/drools-core/src/main/java/org/drools/core/common/PhreakPropagationContext.java
index c0a7443b417..76122e30f60 100644
--- a/drools-core/src/main/java/org/drools/core/common/PhreakPropagationContext.java
+++ b/drools-core/src/main/java/org/drools/core/common/PhreakPropagationContext.java
@@ -1,39 +1,46 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.base.ObjectType;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.reteoo.PropertySpecificUtil;
+import org.drools.base.rule.EntryPointId;
+import org.drools.base.rule.TypeDeclaration;
+import org.drools.core.marshalling.MarshallerReaderContext;
+import org.drools.core.reteoo.TerminalNode;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
+
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Collections;
import java.util.List;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.marshalling.MarshallerReaderContext;
-import org.drools.core.reteoo.PropertySpecificUtil;
-import org.drools.core.reteoo.TerminalNode;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.rule.TypeDeclaration;
-import org.drools.core.base.ObjectType;
-import org.drools.core.util.bitmask.BitMask;
-
-import static org.drools.core.reteoo.PropertySpecificUtil.*;
+import static org.drools.base.reteoo.PropertySpecificUtil.allSetBitMask;
+import static org.drools.base.reteoo.PropertySpecificUtil.getEmptyPropertyReactiveMask;
+import static org.drools.base.reteoo.PropertySpecificUtil.isAllSetPropertyReactiveMask;
+import static org.drools.base.reteoo.PropertySpecificUtil.isPropertySetOnMask;
+import static org.drools.base.reteoo.PropertySpecificUtil.setPropertyOnMask;
public class PhreakPropagationContext
implements
@@ -47,7 +54,7 @@ public class PhreakPropagationContext
private TerminalNode terminalNodeOrigin;
- private InternalFactHandle factHandle;
+ private FactHandle factHandle;
private long propagationNumber;
@@ -177,11 +184,11 @@ public TerminalNode getTerminalNodeOrigin() {
return terminalNodeOrigin;
}
- public InternalFactHandle getFactHandle() {
+ public FactHandle getFactHandle() {
return this.factHandle;
}
- public void setFactHandle(InternalFactHandle factHandle) {
+ public void setFactHandle(FactHandle factHandle) {
this.factHandle = factHandle;
}
@@ -207,10 +214,6 @@ public BitMask getModificationMask() {
return modificationMask;
}
- public void setModificationMask( BitMask modificationMask ) {
- this.modificationMask = modificationMask;
- }
-
public PropagationContext adaptModificationMaskForObjectType(ObjectType type, ReteEvaluator reteEvaluator) {
if (isAllSetPropertyReactiveMask(originalMask) || originalMask.isSet(PropertySpecificUtil.TRAITABLE_BIT) || !(type instanceof ClassObjectType)) {
return this;
diff --git a/drools-core/src/main/java/org/drools/core/common/PhreakPropagationContextFactory.java b/drools-core/src/main/java/org/drools/core/common/PhreakPropagationContextFactory.java
index 685d1531b25..514bb19edf9 100644
--- a/drools-core/src/main/java/org/drools/core/common/PhreakPropagationContextFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/PhreakPropagationContextFactory.java
@@ -1,28 +1,31 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
import java.io.Serializable;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.marshalling.MarshallerReaderContext;
import org.drools.core.reteoo.RuntimeComponentFactory;
import org.drools.core.reteoo.TerminalNode;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.base.rule.EntryPointId;
+import org.drools.util.bitmask.BitMask;
public class PhreakPropagationContextFactory implements PropagationContextFactory, Serializable {
diff --git a/drools-core/src/main/java/org/drools/core/common/PriorityQueueAgendaGroupFactory.java b/drools-core/src/main/java/org/drools/core/common/PriorityQueueAgendaGroupFactory.java
index 768295cd5a2..ba26dda301d 100644
--- a/drools-core/src/main/java/org/drools/core/common/PriorityQueueAgendaGroupFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/PriorityQueueAgendaGroupFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.Externalizable;
@@ -21,7 +23,7 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
public class PriorityQueueAgendaGroupFactory implements AgendaGroupFactory, Externalizable {
@@ -36,7 +38,7 @@ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundExcept
public void writeExternal(ObjectOutput out) throws IOException { }
- public InternalAgendaGroup createAgendaGroup(String name, RuleBase kBase) {
+ public InternalAgendaGroup createAgendaGroup(String name, InternalRuleBase kBase) {
return new AgendaGroupQueueImpl( name, kBase );
}
}
diff --git a/drools-core/src/main/java/org/drools/core/common/PropagationContext.java b/drools-core/src/main/java/org/drools/core/common/PropagationContext.java
index 49a4a31de62..fa5a672b472 100644
--- a/drools-core/src/main/java/org/drools/core/common/PropagationContext.java
+++ b/drools-core/src/main/java/org/drools/core/common/PropagationContext.java
@@ -1,29 +1,32 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import java.io.Externalizable;
-
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.base.ObjectType;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.rule.EntryPointId;
import org.drools.core.marshalling.MarshallerReaderContext;
import org.drools.core.reteoo.TerminalNode;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.base.ObjectType;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
+
+import java.io.Externalizable;
public interface PropagationContext extends Externalizable {
@@ -42,14 +45,13 @@ enum Type {
/**
* @return fact handle that was inserted, updated or retracted that created the PropagationContext
*/
- InternalFactHandle getFactHandle();
- void setFactHandle(InternalFactHandle factHandle);
+ FactHandle getFactHandle();
+ void setFactHandle(FactHandle factHandle);
EntryPointId getEntryPoint();
BitMask getModificationMask();
PropagationContext adaptModificationMaskForObjectType(ObjectType type, ReteEvaluator reteEvaluator);
- void setModificationMask(BitMask mask);
MarshallerReaderContext getReaderContext();
diff --git a/drools-core/src/main/java/org/drools/core/common/PropagationContextFactory.java b/drools-core/src/main/java/org/drools/core/common/PropagationContextFactory.java
index 822c183153c..3338b93e206 100644
--- a/drools-core/src/main/java/org/drools/core/common/PropagationContextFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/PropagationContextFactory.java
@@ -1,25 +1,28 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.marshalling.MarshallerReaderContext;
import org.drools.core.reteoo.TerminalNode;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.base.rule.EntryPointId;
+import org.drools.util.bitmask.BitMask;
public interface PropagationContextFactory {
diff --git a/drools-core/src/main/java/org/drools/core/common/QuadroupleBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/QuadroupleBetaConstraints.java
index cf6065739a1..e662d567682 100644
--- a/drools-core/src/main/java/org/drools/core/common/QuadroupleBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/QuadroupleBetaConstraints.java
@@ -1,31 +1,36 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.List;
+import java.util.Optional;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.MutableTypeConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.MutableTypeConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
import org.kie.internal.conf.IndexPrecedenceOption;
public class QuadroupleBetaConstraints extends MultipleBetaConstraint {
@@ -87,7 +92,7 @@ public void updateFromTuple(final ContextEntry[] context,
*/
public void updateFromFactHandle(final ContextEntry[] context,
final ReteEvaluator reteEvaluator,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
context[0].updateFromFactHandle(reteEvaluator,
handle);
context[1].updateFromFactHandle(reteEvaluator,
@@ -116,7 +121,7 @@ public void resetFactHandle(final ContextEntry[] context) {
* @see org.kie.common.BetaNodeConstraints#isAllowedCachedLeft(java.lang.Object)
*/
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
return (indexed[0] || constraints[0].isAllowedCachedLeft(context[0], handle)) &&
(indexed[1] || constraints[1].isAllowedCachedLeft(context[1], handle)) &&
(indexed[2] || constraints[2].isAllowedCachedLeft( context[2], handle )) &&
@@ -181,11 +186,11 @@ public BetaConstraints getOriginalConstraint() {
throw new UnsupportedOperationException();
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
- return constraints[0].getListenedPropertyMask(modifiedType, settableProperties)
- .setAll(constraints[1].getListenedPropertyMask(modifiedType, settableProperties))
- .setAll(constraints[2].getListenedPropertyMask(modifiedType, settableProperties))
- .setAll(constraints[3].getListenedPropertyMask(modifiedType, settableProperties));
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
+ return constraints[0].getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties)
+ .setAll(constraints[1].getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties))
+ .setAll(constraints[2].getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties))
+ .setAll(constraints[3].getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties));
}
public void registerEvaluationContext(BuildContext buildContext) {
diff --git a/drools-core/src/main/java/org/drools/core/common/QuadroupleNonIndexSkipBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/QuadroupleNonIndexSkipBetaConstraints.java
index dc4a3ef7728..75c22f20a9f 100644
--- a/drools-core/src/main/java/org/drools/core/common/QuadroupleNonIndexSkipBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/QuadroupleNonIndexSkipBetaConstraints.java
@@ -1,35 +1,40 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.List;
+import java.util.Optional;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.MutableTypeConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.reteoo.BetaMemory;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.MutableTypeConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
public class QuadroupleNonIndexSkipBetaConstraints
implements
@@ -94,7 +99,7 @@ public void updateFromTuple(ContextEntry[] context,
public void updateFromFactHandle(ContextEntry[] context,
ReteEvaluator reteEvaluator,
- InternalFactHandle handle) {
+ FactHandle handle) {
constraints.updateFromFactHandle(context, reteEvaluator, handle);
}
@@ -141,7 +146,7 @@ public String toString() {
}
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
return this.constraint0.isAllowedCachedLeft(context[0], handle)
&& this.constraint1.isAllowedCachedLeft(context[1], handle)
&& this.constraint2.isAllowedCachedLeft(context[2], handle)
@@ -153,11 +158,11 @@ public boolean isAllowedCachedRight(ContextEntry[] context,
return this.constraints.isAllowedCachedRight(context, tuple);
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
- return constraint0.getListenedPropertyMask(modifiedType, settableProperties)
- .setAll(constraint1.getListenedPropertyMask(modifiedType, settableProperties))
- .setAll(constraint2.getListenedPropertyMask(modifiedType, settableProperties))
- .setAll(constraint3.getListenedPropertyMask(modifiedType, settableProperties));
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
+ return constraint0.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties)
+ .setAll(constraint1.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties))
+ .setAll(constraint2.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties))
+ .setAll(constraint3.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties));
}
public boolean isLeftUpdateOptimizationAllowed() {
diff --git a/drools-core/src/main/java/org/drools/core/common/QueryElementFactHandle.java b/drools-core/src/main/java/org/drools/core/common/QueryElementFactHandle.java
index d6b72a241ce..7bbb6e16bc7 100644
--- a/drools-core/src/main/java/org/drools/core/common/QueryElementFactHandle.java
+++ b/drools-core/src/main/java/org/drools/core/common/QueryElementFactHandle.java
@@ -1,35 +1,37 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import java.util.Arrays;
-import java.util.function.Consumer;
-import java.util.function.Predicate;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
+import org.drools.base.factmodel.traits.TraitTypeEnum;
+import org.drools.base.rule.EntryPointId;
import org.drools.core.WorkingMemoryEntryPoint;
-import org.drools.core.factmodel.traits.TraitTypeEnum;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.RightTuple;
-import org.drools.core.rule.EntryPointId;
import org.drools.core.reteoo.Tuple;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import java.util.Arrays;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+
@XmlAccessorType(XmlAccessType.NONE)
public class QueryElementFactHandle
implements
@@ -151,9 +153,6 @@ public void setEqualityKey(EqualityKey key) {
throw new UnsupportedOperationException( "QueryElementFactHandle does not support this method" );
}
- public void setFirstLeftTuple(LeftTuple leftTuple) {
- }
-
@Override
public LinkedTuples getLinkedTuples() {
return null;
@@ -246,10 +245,6 @@ public void clearRightTuples() {
throw new UnsupportedOperationException( "QueryElementFactHandle does not support this method" );
}
- public void addFirstRightTuple( RightTuple rightTuple ) {
- throw new UnsupportedOperationException( "QueryElementFactHandle does not support this method" );
- }
-
public void addLastRightTuple( RightTuple rightTuple ) {
throw new UnsupportedOperationException( "QueryElementFactHandle does not support this method" );
}
@@ -263,7 +258,7 @@ public void removeRightTuple( RightTuple rightTuple ) {
}
@Override
- public K as( Class klass ) throws ClassCastException {
+ public K as(Class klass) throws ClassCastException {
throw new UnsupportedOperationException( "QueryElementFactHandle does not yet support this method" );
}
@@ -280,15 +275,10 @@ public boolean isPendingRemoveFromStore() {
public void forEachRightTuple( Consumer rightTupleConsumer ) { }
@Override
- public void forEachLeftTuple( Consumer leftTupleConsumer ) { }
-
- @Override
- public RightTuple findFirstRightTuple( Predicate rightTuplePredicate ) {
- return null;
- }
+ public void forEachLeftTuple( Consumer leftTupleConsumer) { }
@Override
- public LeftTuple findFirstLeftTuple( Predicate lefttTuplePredicate ) {
+ public LeftTuple findFirstLeftTuple(Predicate lefttTuplePredicate ) {
return null;
}
}
diff --git a/drools-core/src/main/java/org/drools/core/common/ReteEvaluator.java b/drools-core/src/main/java/org/drools/core/common/ReteEvaluator.java
index 89ed1d5fc07..d7e9f5aec90 100644
--- a/drools-core/src/main/java/org/drools/core/common/ReteEvaluator.java
+++ b/drools-core/src/main/java/org/drools/core/common/ReteEvaluator.java
@@ -1,38 +1,36 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.function.Consumer;
-
+import org.drools.base.base.ValueResolver;
+import org.drools.base.rule.EntryPointId;
import org.drools.core.RuleSessionConfiguration;
import org.drools.core.SessionConfiguration;
import org.drools.core.WorkingMemoryEntryPoint;
import org.drools.core.event.AgendaEventSupport;
import org.drools.core.event.RuleEventListenerSupport;
import org.drools.core.event.RuleRuntimeEventSupport;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.phreak.PropagationEntry;
import org.drools.core.reteoo.ObjectTypeConf;
import org.drools.core.reteoo.RuntimeComponentFactory;
-import org.drools.core.rule.EntryPointId;
import org.drools.core.rule.accessor.FactHandleFactory;
-import org.drools.core.rule.accessor.GlobalResolver;
import org.drools.core.rule.consequence.KnowledgeHelper;
import org.drools.core.time.TimerService;
import org.drools.core.time.impl.TimerJobInstance;
@@ -43,7 +41,11 @@
import org.kie.api.runtime.rule.QueryResults;
import org.kie.api.time.SessionClock;
-public interface ReteEvaluator {
+import java.util.Collection;
+import java.util.Collections;
+import java.util.function.Consumer;
+
+public interface ReteEvaluator extends ValueResolver {
enum InternalOperationType{ FIRE, INSERT, UPDATE, DELETE, SET_GLOBAL }
@@ -51,7 +53,7 @@ enum InternalOperationType{ FIRE, INSERT, UPDATE, DELETE, SET_GLOBAL }
ActivationsManager getActivationsManager();
- RuleBase getKnowledgeBase();
+ InternalRuleBase getKnowledgeBase();
Collection extends EntryPoint> getEntryPoints();
@@ -67,10 +69,10 @@ default WorkingMemoryEntryPoint getDefaultEntryPoint() {
NodeMemories getNodeMemories();
- GlobalResolver getGlobalResolver();
default Object getGlobal(String identifier) {
return getGlobalResolver().resolveGlobal( identifier );
}
+
default void setGlobal(String identifier, Object value) {
getGlobalResolver().setGlobal(identifier, value);
}
@@ -123,6 +125,9 @@ default boolean isSequential() {
default void startOperation(InternalOperationType operationType) { }
default void endOperation(InternalOperationType operationType) { }
+ boolean isTMSEnabled();
+ void enableTMS();
+
default KnowledgeHelper createKnowledgeHelper() {
return RuntimeComponentFactory.get().createKnowledgeHelper(this);
}
diff --git a/drools-core/src/main/java/org/drools/core/common/RuleBasePartitionId.java b/drools-core/src/main/java/org/drools/core/common/RuleBasePartitionId.java
deleted file mode 100644
index 162facbcd49..00000000000
--- a/drools-core/src/main/java/org/drools/core/common/RuleBasePartitionId.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.common;
-
-import org.kie.api.concurrent.KieExecutors;
-
-import java.io.Serializable;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * A class to identify RuleBase partitions
- */
-public final class RuleBasePartitionId implements Serializable {
-
- private static final long serialVersionUID = 510l;
-
- public static final int PARALLEL_PARTITIONS_NUMBER = KieExecutors.Pool.SIZE;
-
- public static final RuleBasePartitionId MAIN_PARTITION = new RuleBasePartitionId( 0 );
-
- private static final AtomicInteger PARTITION_COUNTER = new AtomicInteger( 1 );
-
- private final int id;
-
- private RuleBasePartitionId( int id ) {
- this.id = id;
- }
-
- public int getId() {
- return id;
- }
-
- public int getParallelEvaluationSlot() {
- return id % PARALLEL_PARTITIONS_NUMBER;
- }
-
- @Override
- public int hashCode() {
- return id;
- }
-
- @Override
- public boolean equals(Object obj) {
- return this == obj || (obj instanceof RuleBasePartitionId && id == ((RuleBasePartitionId)obj).id);
- }
-
- public String toString() {
- return "Partition(" + (id == 0 ? "MAIN" : id) + ")";
- }
-
- public static RuleBasePartitionId createPartition() {
- return new RuleBasePartitionId( PARTITION_COUNTER.getAndIncrement() );
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/common/RuleFlowGroup.java b/drools-core/src/main/java/org/drools/core/common/RuleFlowGroup.java
index 1b764fc525c..7718880cf29 100644
--- a/drools-core/src/main/java/org/drools/core/common/RuleFlowGroup.java
+++ b/drools-core/src/main/java/org/drools/core/common/RuleFlowGroup.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
public interface RuleFlowGroup extends org.kie.api.runtime.rule.RuleFlowGroup {
diff --git a/drools-core/src/main/java/org/drools/core/common/RuleFlowGroupListener.java b/drools-core/src/main/java/org/drools/core/common/RuleFlowGroupListener.java
index 31f7868ed20..64352f37411 100644
--- a/drools-core/src/main/java/org/drools/core/common/RuleFlowGroupListener.java
+++ b/drools-core/src/main/java/org/drools/core/common/RuleFlowGroupListener.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
public interface RuleFlowGroupListener {
diff --git a/drools-core/src/main/java/org/drools/core/common/SingleBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/SingleBetaConstraints.java
index 11443f54b76..46346e156f8 100644
--- a/drools-core/src/main/java/org/drools/core/common/SingleBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/SingleBetaConstraints.java
@@ -1,37 +1,42 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.List;
-
+import java.util.Optional;
+
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.MutableTypeConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
+import org.drools.base.util.index.IndexUtil;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.reteoo.BetaMemory;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.MutableTypeConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
import org.drools.core.util.index.IndexFactory;
-import org.drools.core.util.index.IndexUtil;
+import org.kie.api.runtime.rule.FactHandle;
public class SingleBetaConstraints
implements
@@ -122,7 +127,7 @@ public void updateFromTuple(final ContextEntry[] context,
*/
public void updateFromFactHandle(final ContextEntry[] context,
final ReteEvaluator reteEvaluator,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
context[0].updateFromFactHandle(reteEvaluator, handle);
}
@@ -130,7 +135,7 @@ public void updateFromFactHandle(final ContextEntry[] context,
* @see org.kie.common.BetaNodeConstraints#isAllowedCachedLeft(java.lang.Object)
*/
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
return this.indexed || this.constraint.isAllowedCachedLeft(context[0],
handle);
}
@@ -208,8 +213,8 @@ public BetaConstraints getOriginalConstraint() {
throw new UnsupportedOperationException();
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
- return constraint.getListenedPropertyMask(modifiedType, settableProperties);
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
+ return constraint.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties);
}
public boolean isLeftUpdateOptimizationAllowed() {
diff --git a/drools-core/src/main/java/org/drools/core/common/SingleNonIndexSkipBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/SingleNonIndexSkipBetaConstraints.java
index 546653f87e2..8a13e34194b 100644
--- a/drools-core/src/main/java/org/drools/core/common/SingleNonIndexSkipBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/SingleNonIndexSkipBetaConstraints.java
@@ -1,35 +1,40 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.List;
+import java.util.Optional;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.MutableTypeConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.reteoo.BetaMemory;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.MutableTypeConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
public class SingleNonIndexSkipBetaConstraints
implements
@@ -87,7 +92,7 @@ public void updateFromTuple(ContextEntry[] context,
public void updateFromFactHandle(ContextEntry[] context,
ReteEvaluator reteEvaluator,
- InternalFactHandle handle) {
+ FactHandle handle) {
constraints.updateFromFactHandle( context, reteEvaluator, handle );
}
@@ -134,7 +139,7 @@ public String toString() {
}
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
return this.constraint.isAllowedCachedLeft( context[0],
handle );
}
@@ -144,8 +149,8 @@ public boolean isAllowedCachedRight(ContextEntry[] context,
return this.constraints.isAllowedCachedRight( context, tuple );
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
- return constraint.getListenedPropertyMask(modifiedType, settableProperties);
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
+ return constraint.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties);
}
public boolean isLeftUpdateOptimizationAllowed() {
diff --git a/drools-core/src/main/java/org/drools/core/common/Storage.java b/drools-core/src/main/java/org/drools/core/common/Storage.java
index f2709c8875a..e534d2ade79 100644
--- a/drools-core/src/main/java/org/drools/core/common/Storage.java
+++ b/drools-core/src/main/java/org/drools/core/common/Storage.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.Collection;
diff --git a/drools-core/src/main/java/org/drools/core/common/TripleBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/TripleBetaConstraints.java
index dac15218b15..179284acee6 100644
--- a/drools-core/src/main/java/org/drools/core/common/TripleBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/TripleBetaConstraints.java
@@ -1,31 +1,36 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.List;
+import java.util.Optional;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.MutableTypeConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.MutableTypeConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
import org.kie.internal.conf.IndexPrecedenceOption;
public class TripleBetaConstraints extends MultipleBetaConstraint {
@@ -81,11 +86,11 @@ public void updateFromTuple(final ContextEntry[] context,
}
/* (non-Javadoc)
- * @see org.kie.common.BetaNodeConstraints#updateFromFactHandle(org.kie.common.InternalFactHandle)
+ * @see org.kie.common.BetaNodeConstraints#updateFromFactHandle(org.kie.common.FactHandle)
*/
public void updateFromFactHandle(final ContextEntry[] context,
final ReteEvaluator reteEvaluator,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
context[0].updateFromFactHandle(reteEvaluator,
handle);
context[1].updateFromFactHandle(reteEvaluator,
@@ -110,7 +115,7 @@ public void resetFactHandle(final ContextEntry[] context) {
* @see org.kie.common.BetaNodeConstraints#isAllowedCachedLeft(java.lang.Object)
*/
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
return (indexed[0] || constraints[0].isAllowedCachedLeft(context[0], handle)) &&
(indexed[1] || constraints[1].isAllowedCachedLeft(context[1], handle)) &&
(indexed[2] || constraints[2].isAllowedCachedLeft( context[2], handle ));
@@ -169,10 +174,10 @@ public BetaConstraints getOriginalConstraint() {
throw new UnsupportedOperationException();
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
- return constraints[0].getListenedPropertyMask(modifiedType, settableProperties)
- .setAll(constraints[1].getListenedPropertyMask(modifiedType, settableProperties))
- .setAll(constraints[2].getListenedPropertyMask(modifiedType, settableProperties));
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
+ return constraints[0].getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties)
+ .setAll(constraints[1].getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties))
+ .setAll(constraints[2].getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties));
}
public void registerEvaluationContext(BuildContext buildContext) {
diff --git a/drools-core/src/main/java/org/drools/core/common/TripleNonIndexSkipBetaConstraints.java b/drools-core/src/main/java/org/drools/core/common/TripleNonIndexSkipBetaConstraints.java
index e545bbd5a2f..cc84cab3e9d 100644
--- a/drools-core/src/main/java/org/drools/core/common/TripleNonIndexSkipBetaConstraints.java
+++ b/drools-core/src/main/java/org/drools/core/common/TripleNonIndexSkipBetaConstraints.java
@@ -1,35 +1,40 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.List;
+import java.util.Optional;
+import org.drools.base.base.ObjectType;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.MutableTypeConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.reteoo.BetaMemory;
-import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.MutableTypeConstraint;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.core.reteoo.builder.BuildContext;
+import org.drools.util.bitmask.BitMask;
+import org.kie.api.runtime.rule.FactHandle;
public class TripleNonIndexSkipBetaConstraints
implements
@@ -92,7 +97,7 @@ public void updateFromTuple(ContextEntry[] context,
public void updateFromFactHandle(ContextEntry[] context,
ReteEvaluator reteEvaluator,
- InternalFactHandle handle) {
+ FactHandle handle) {
constraints.updateFromFactHandle( context, reteEvaluator, handle );
}
@@ -139,7 +144,7 @@ public String toString() {
}
public boolean isAllowedCachedLeft(final ContextEntry[] context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
return this.constraint0.isAllowedCachedLeft( context[0],
handle ) && this.constraint1.isAllowedCachedLeft( context[1],
handle ) && this.constraint2.isAllowedCachedLeft( context[2],
@@ -151,10 +156,10 @@ public boolean isAllowedCachedRight(ContextEntry[] context,
return this.constraints.isAllowedCachedRight( context, tuple );
}
- public BitMask getListenedPropertyMask(ObjectType modifiedType, List settableProperties) {
- return constraint0.getListenedPropertyMask(modifiedType, settableProperties)
- .setAll(constraint1.getListenedPropertyMask(modifiedType, settableProperties))
- .setAll(constraint2.getListenedPropertyMask(modifiedType, settableProperties));
+ public BitMask getListenedPropertyMask(Pattern pattern, ObjectType modifiedType, List settableProperties) {
+ return constraint0.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties)
+ .setAll(constraint1.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties))
+ .setAll(constraint2.getListenedPropertyMask(Optional.of(pattern), modifiedType, settableProperties));
}
public boolean isLeftUpdateOptimizationAllowed() {
diff --git a/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystem.java b/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystem.java
index d7e595869ed..7a42609d38c 100644
--- a/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystem.java
+++ b/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystem.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.util.Collection;
diff --git a/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystemFactory.java b/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystemFactory.java
index 54eb9f99616..87890df027d 100644
--- a/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystemFactory.java
+++ b/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystemFactory.java
@@ -1,25 +1,28 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.lang.annotation.Annotation;
import java.util.function.Predicate;
-import org.drools.core.definitions.rule.impl.QueryImpl;
+import org.drools.base.common.MissingDependencyException;
+import org.drools.base.definitions.rule.impl.QueryImpl;
import org.kie.api.internal.utils.KieService;
public interface TruthMaintenanceSystemFactory extends KieService {
diff --git a/drools-core/src/main/java/org/drools/core/common/TupleSets.java b/drools-core/src/main/java/org/drools/core/common/TupleSets.java
index 7780ce85e5d..0ffec334d6d 100644
--- a/drools-core/src/main/java/org/drools/core/common/TupleSets.java
+++ b/drools-core/src/main/java/org/drools/core/common/TupleSets.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.drools.core.reteoo.Tuple;
diff --git a/drools-core/src/main/java/org/drools/core/common/TupleSetsImpl.java b/drools-core/src/main/java/org/drools/core/common/TupleSetsImpl.java
index bee7c1dc72d..7ad4ceb857d 100644
--- a/drools-core/src/main/java/org/drools/core/common/TupleSetsImpl.java
+++ b/drools-core/src/main/java/org/drools/core/common/TupleSetsImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.drools.core.reteoo.Tuple;
diff --git a/drools-core/src/main/java/org/drools/core/common/TupleStartEqualsConstraint.java b/drools-core/src/main/java/org/drools/core/common/TupleStartEqualsConstraint.java
index 4a77c7ec38b..7ed4fdf16eb 100755
--- a/drools-core/src/main/java/org/drools/core/common/TupleStartEqualsConstraint.java
+++ b/drools-core/src/main/java/org/drools/core/common/TupleStartEqualsConstraint.java
@@ -1,30 +1,35 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import org.drools.base.base.ValueResolver;
+import org.drools.base.reteoo.BaseTuple;
import org.drools.core.reteoo.LeftTuple;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.reteoo.Tuple;
+import org.kie.api.runtime.rule.FactHandle;
/**
* Checks if one tuple is the start subtuple of other tuple.
@@ -88,14 +93,14 @@ public ContextEntry createContextEntry() {
}
public boolean isAllowedCachedLeft(final ContextEntry context,
- final InternalFactHandle handle) {
+ final FactHandle handle) {
// object MUST be a ReteTuple
int size = ((TupleStartEqualsConstraintContextEntry) context).compareSize;
final Tuple tuple = ((Tuple) handle.getObject()).getSubTuple( size );
return ((TupleStartEqualsConstraintContextEntry) context).leftTuple.getSubTuple(size).equals(tuple);
}
- public boolean isAllowedCachedRight(final Tuple tuple,
+ public boolean isAllowedCachedRight(final BaseTuple tuple,
final ContextEntry context) {
LeftTuple nonEmptyLeftTuple = (LeftTuple) tuple.skipEmptyHandles();
return nonEmptyLeftTuple.equals( ((TupleStartEqualsConstraintContextEntry) context).rightTuple.getSubTuple(nonEmptyLeftTuple.size()));
@@ -159,14 +164,14 @@ public void setNext(final ContextEntry entry) {
this.entry = entry;
}
- public void updateFromTuple(final ReteEvaluator reteEvaluator,
- final Tuple tuple) {
- this.leftTuple = tuple.skipEmptyHandles();
+ public void updateFromTuple(final ValueResolver valueResolver,
+ final BaseTuple tuple) {
+ this.leftTuple = (Tuple) tuple.skipEmptyHandles();
this.compareSize = leftTuple.size();
}
- public void updateFromFactHandle(final ReteEvaluator reteEvaluator,
- final InternalFactHandle handle) {
+ public void updateFromFactHandle(final ValueResolver valueResolver,
+ final FactHandle handle) {
// if it is not a rete tuple, then there is a bug in the engine...
// it MUST be a rete tuple
this.rightTuple = ((LeftTuple) handle.getObject()).skipEmptyHandles();
diff --git a/drools-core/src/main/java/org/drools/core/common/UpdateContext.java b/drools-core/src/main/java/org/drools/core/common/UpdateContext.java
index ea61e2a6db8..60c1a26b183 100644
--- a/drools-core/src/main/java/org/drools/core/common/UpdateContext.java
+++ b/drools-core/src/main/java/org/drools/core/common/UpdateContext.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.common;
import java.util.ArrayDeque;
diff --git a/drools-core/src/main/java/org/drools/core/common/WorkingMemoryAction.java b/drools-core/src/main/java/org/drools/core/common/WorkingMemoryAction.java
index 6c37a64c94a..3f8acc5546d 100644
--- a/drools-core/src/main/java/org/drools/core/common/WorkingMemoryAction.java
+++ b/drools-core/src/main/java/org/drools/core/common/WorkingMemoryAction.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.common;
import org.drools.core.phreak.PropagationEntry;
diff --git a/drools-core/src/main/java/org/drools/core/concurrent/AbstractGroupEvaluator.java b/drools-core/src/main/java/org/drools/core/concurrent/AbstractGroupEvaluator.java
new file mode 100644
index 00000000000..41d0cff889d
--- /dev/null
+++ b/drools-core/src/main/java/org/drools/core/concurrent/AbstractGroupEvaluator.java
@@ -0,0 +1,81 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.core.concurrent;
+
+import org.drools.core.common.ActivationsManager;
+import org.drools.core.common.InternalAgendaGroup;
+import org.drools.core.phreak.RuleAgendaItem;
+import org.drools.core.rule.consequence.KnowledgeHelper;
+import org.kie.api.runtime.rule.AgendaFilter;
+
+public abstract class AbstractGroupEvaluator implements GroupEvaluator {
+ protected final ActivationsManager activationsManager;
+
+ private final boolean sequential;
+
+ private KnowledgeHelper knowledgeHelper;
+
+ private boolean haltEvaluation;
+
+ public AbstractGroupEvaluator(ActivationsManager activationsManager) {
+ this.activationsManager = activationsManager;
+ this.sequential = activationsManager.getReteEvaluator().getKnowledgeBase().getRuleBaseConfiguration().isSequential();
+ this.knowledgeHelper = newKnowledgeHelper();
+ }
+
+ public final int evaluateAndFire( InternalAgendaGroup group, AgendaFilter filter, int fireCount, int fireLimit ) {
+ startEvaluation(group);
+ RuleAgendaItem item = nextActivation(group);
+ int loopFireCount = 0;
+ while (item != null && !haltEvaluation && (fireLimit < 0 || (fireCount + loopFireCount) < fireLimit)) {
+ activationsManager.evaluateQueriesForRule( item );
+ loopFireCount += item.getRuleExecutor().evaluateNetworkAndFire(activationsManager, filter, fireCount, fireLimit);
+ activationsManager.flushPropagations();
+ item = nextActivation(group);
+ }
+ return loopFireCount;
+ }
+
+ private KnowledgeHelper newKnowledgeHelper() {
+ return activationsManager.getReteEvaluator().createKnowledgeHelper();
+ }
+
+ private RuleAgendaItem nextActivation(InternalAgendaGroup group) {
+ return sequential ? group.remove() : group.peek();
+ }
+
+ @Override
+ public KnowledgeHelper getKnowledgeHelper() {
+ return knowledgeHelper;
+ }
+
+ @Override
+ public void resetKnowledgeHelper() {
+ knowledgeHelper = newKnowledgeHelper();
+ }
+
+ @Override
+ public void haltEvaluation() {
+ haltEvaluation = true;
+ }
+
+ protected void startEvaluation(InternalAgendaGroup group) {
+ haltEvaluation = false;
+ }
+}
diff --git a/drools-core/src/main/java/org/drools/core/concurrent/AbstractRuleEvaluator.java b/drools-core/src/main/java/org/drools/core/concurrent/AbstractRuleEvaluator.java
deleted file mode 100644
index c7ef91cf107..00000000000
--- a/drools-core/src/main/java/org/drools/core/concurrent/AbstractRuleEvaluator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.concurrent;
-
-import org.drools.core.common.ActivationsManager;
-import org.drools.core.phreak.RuleAgendaItem;
-import org.drools.core.rule.consequence.KnowledgeHelper;
-import org.kie.api.runtime.rule.AgendaFilter;
-
-public class AbstractRuleEvaluator {
- private final ActivationsManager activationsManager;
-
- public AbstractRuleEvaluator(ActivationsManager activationsManager) {
- this.activationsManager = activationsManager;
- }
-
- protected int internalEvaluateAndFire( AgendaFilter filter, int fireCount, int fireLimit, RuleAgendaItem item ) {
- activationsManager.evaluateQueriesForRule( item );
- return item.getRuleExecutor().evaluateNetworkAndFire(activationsManager, filter, fireCount, fireLimit);
- }
-
- protected KnowledgeHelper newKnowledgeHelper() {
- return activationsManager.getReteEvaluator().createKnowledgeHelper();
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/concurrent/ExecutorProviderImpl.java b/drools-core/src/main/java/org/drools/core/concurrent/ExecutorProviderImpl.java
index 999f2da1de4..03767e866d3 100644
--- a/drools-core/src/main/java/org/drools/core/concurrent/ExecutorProviderImpl.java
+++ b/drools-core/src/main/java/org/drools/core/concurrent/ExecutorProviderImpl.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.concurrent;
import java.util.concurrent.CompletionService;
diff --git a/drools-core/src/main/java/org/drools/core/concurrent/GroupEvaluator.java b/drools-core/src/main/java/org/drools/core/concurrent/GroupEvaluator.java
new file mode 100644
index 00000000000..0f17766059a
--- /dev/null
+++ b/drools-core/src/main/java/org/drools/core/concurrent/GroupEvaluator.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.core.concurrent;
+
+import org.drools.core.common.InternalAgendaGroup;
+import org.drools.core.rule.consequence.KnowledgeHelper;
+import org.kie.api.runtime.rule.AgendaFilter;
+
+public interface GroupEvaluator {
+ int evaluateAndFire( InternalAgendaGroup group, AgendaFilter filter, int fireCount, int fireLimit );
+
+ KnowledgeHelper getKnowledgeHelper();
+
+ void resetKnowledgeHelper();
+
+ void haltEvaluation();
+}
diff --git a/drools-core/src/main/java/org/drools/core/concurrent/ParallelGroupEvaluator.java b/drools-core/src/main/java/org/drools/core/concurrent/ParallelGroupEvaluator.java
new file mode 100644
index 00000000000..78e20bb8121
--- /dev/null
+++ b/drools-core/src/main/java/org/drools/core/concurrent/ParallelGroupEvaluator.java
@@ -0,0 +1,67 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.core.concurrent;
+
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.core.common.ActivationsManager;
+import org.drools.core.common.InternalAgendaGroup;
+import org.drools.core.phreak.RuleAgendaItem;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import static org.drools.base.common.PartitionsManager.MIN_PARALLEL_THRESHOLD;
+import static org.drools.base.common.PartitionsManager.doOnForkJoinPool;
+
+public class ParallelGroupEvaluator extends AbstractGroupEvaluator {
+
+ public ParallelGroupEvaluator(ActivationsManager activationsManager ) {
+ super(activationsManager);
+ }
+
+ protected void startEvaluation(InternalAgendaGroup group) {
+ super.startEvaluation(group);
+ parallelPreEvaluation(group);
+ }
+
+ private void parallelPreEvaluation(InternalAgendaGroup group) {
+ Collection activations = group.getActivations();
+ if (activations.size() < MIN_PARALLEL_THRESHOLD) {
+ // avoid parallel evaluation if there aren't enough activations ...
+ return;
+ }
+
+ Map> partitionedActivations = activations.stream().collect(Collectors.groupingBy(RuleAgendaItem::getPartition));
+ if (partitionedActivations.size() < MIN_PARALLEL_THRESHOLD) {
+ // ... or partitions
+ return;
+ }
+
+ // This will evaluate all the RuleAgendaItem (grouped by partitions) in parallel, also resetting
+ // their dirty flag. After this AbstractGroupEvaluator#evaluateAndFire loop will attempt re-evaluating
+ // those items again, but finding them not dirty it won't have any performance impact allowing a direct firing.
+ doOnForkJoinPool(() ->
+ partitionedActivations.values().parallelStream()
+ .forEach( items -> items
+ .forEach( item -> item.getRuleExecutor().evaluateNetworkIfDirty(activationsManager) ) )
+ );
+ }
+}
diff --git a/drools-core/src/main/java/org/drools/core/concurrent/ParallelRuleEvaluator.java b/drools-core/src/main/java/org/drools/core/concurrent/ParallelRuleEvaluator.java
deleted file mode 100644
index dcb882385ef..00000000000
--- a/drools-core/src/main/java/org/drools/core/concurrent/ParallelRuleEvaluator.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.concurrent;
-
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CompletionService;
-import java.util.concurrent.Future;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import org.drools.core.common.ActivationsManager;
-import org.drools.core.common.InternalAgendaGroup;
-import org.drools.core.common.RuleBasePartitionId;
-import org.drools.core.phreak.RuleAgendaItem;
-import org.drools.core.rule.consequence.KnowledgeHelper;
-import org.kie.api.runtime.rule.AgendaFilter;
-import org.kie.internal.concurrent.ExecutorProviderFactory;
-
-public class ParallelRuleEvaluator extends AbstractRuleEvaluator implements RuleEvaluator {
-
- private static final RuleAgendaItem POISON_PILL = new RuleAgendaItem();
-
- private final int evaluatorsNr = RuleBasePartitionId.PARALLEL_PARTITIONS_NUMBER;
-
- private RuleEvaluatorCallable[] evaluators = new RuleEvaluatorCallable[evaluatorsNr];
- private Future[] results = new Future[evaluatorsNr];
-
- private AgendaFilter filter;
- private int fireCount;
- private int fireLimit;
-
- public ParallelRuleEvaluator( ActivationsManager activationsManager ) {
- super(activationsManager);
- for (int i = 0; i < evaluatorsNr; i++) {
- evaluators[i] = new RuleEvaluatorCallable();
- }
- }
-
- private static class Completion {
- private static final CompletionService service = ExecutorProviderFactory.getExecutorProvider().getCompletionService();
- }
-
- @Override
- public int evaluateAndFire( AgendaFilter filter,
- int fireCount,
- int fireLimit,
- InternalAgendaGroup group ) {
- this.filter = filter;
- this.fireCount = fireCount;
- this.fireLimit = fireLimit;
-
- for ( RuleAgendaItem item : group.getActivations() ) {
- int index = item.getPartition().getParallelEvaluationSlot();
- RuleEvaluatorCallable evaluator = evaluators[index];
- evaluator.enqueue( item );
- if ( !evaluator.running ) {
- evaluator.running = true;
- results[index] = Completion.service.submit( evaluator );
- }
- }
-
- int localFireCount = 0;
- for (int i = 0; i < evaluatorsNr; i++) {
- if (results[i] != null) {
- try {
- evaluators[i].enqueue( POISON_PILL );
- localFireCount += results[i].get();
- } catch (Exception e) {
- throw new RuntimeException( e );
- } finally {
- results[i] = null;
- }
- }
- }
-
- return localFireCount;
- }
-
- @Override
- public KnowledgeHelper getKnowledgeHelper() {
- throw new UnsupportedOperationException();
- }
-
- public class RuleEvaluatorCallable implements Callable {
- private final BlockingQueue queue = new LinkedBlockingQueue<>();
-
- private final KnowledgeHelper knowledgeHelper = newKnowledgeHelper();
-
- private boolean running = false;
-
- @Override
- public Integer call() {
- int count = 0;
- while (true) {
- try {
- RuleAgendaItem item = queue.take();
- if (item == POISON_PILL) {
- break;
- }
- count += internalEvaluateAndFire( filter, fireCount, fireLimit, item );
- } catch (InterruptedException e) {
- throw new RuntimeException( e );
- }
- }
- running = false;
- return count;
- }
-
- private void enqueue(RuleAgendaItem item) {
- if (!queue.offer( item )) {
- throw new IllegalStateException("Cannot insert item into the queue! There is no space left in the queue.");
- }
- }
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/concurrent/RuleEvaluator.java b/drools-core/src/main/java/org/drools/core/concurrent/RuleEvaluator.java
deleted file mode 100644
index b943abae63e..00000000000
--- a/drools-core/src/main/java/org/drools/core/concurrent/RuleEvaluator.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.concurrent;
-
-import org.drools.core.common.InternalAgendaGroup;
-import org.drools.core.rule.consequence.KnowledgeHelper;
-import org.kie.api.runtime.rule.AgendaFilter;
-
-public interface RuleEvaluator {
- int evaluateAndFire( AgendaFilter filter,
- int fireCount,
- int fireLimit,
- InternalAgendaGroup group );
-
- KnowledgeHelper getKnowledgeHelper();
-}
diff --git a/drools-core/src/main/java/org/drools/core/concurrent/SequentialGroupEvaluator.java b/drools-core/src/main/java/org/drools/core/concurrent/SequentialGroupEvaluator.java
new file mode 100644
index 00000000000..1bdfbaf9cc0
--- /dev/null
+++ b/drools-core/src/main/java/org/drools/core/concurrent/SequentialGroupEvaluator.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.core.concurrent;
+
+import org.drools.core.common.ActivationsManager;
+
+public class SequentialGroupEvaluator extends AbstractGroupEvaluator {
+
+ public SequentialGroupEvaluator(ActivationsManager activationsManager) {
+ super(activationsManager);
+ }
+}
+
diff --git a/drools-core/src/main/java/org/drools/core/concurrent/SequentialRuleEvaluator.java b/drools-core/src/main/java/org/drools/core/concurrent/SequentialRuleEvaluator.java
deleted file mode 100644
index 5059db2597b..00000000000
--- a/drools-core/src/main/java/org/drools/core/concurrent/SequentialRuleEvaluator.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.concurrent;
-
-import org.drools.core.common.ActivationsManager;
-import org.drools.core.common.InternalAgendaGroup;
-import org.drools.core.phreak.RuleAgendaItem;
-import org.drools.core.rule.consequence.KnowledgeHelper;
-import org.kie.api.runtime.rule.AgendaFilter;
-
-public class SequentialRuleEvaluator extends AbstractRuleEvaluator implements RuleEvaluator {
-
- private final boolean sequential;
-
- private final KnowledgeHelper knowledgeHelper;
-
- public SequentialRuleEvaluator( ActivationsManager activationsManager ) {
- super(activationsManager);
- sequential = activationsManager.getReteEvaluator().getKnowledgeBase().getRuleBaseConfiguration().isSequential();
- knowledgeHelper = newKnowledgeHelper();
- }
-
- @Override
- public int evaluateAndFire( AgendaFilter filter,
- int fireCount,
- int fireLimit,
- InternalAgendaGroup group ) {
- RuleAgendaItem item = sequential ? (RuleAgendaItem) group.remove() : (RuleAgendaItem) group.peek();
- return item != null ? internalEvaluateAndFire( filter, fireCount, fireLimit, item ) : 0;
- }
-
- public KnowledgeHelper getKnowledgeHelper() {
- return knowledgeHelper;
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/conflict/MatchConflictResolver.java b/drools-core/src/main/java/org/drools/core/conflict/MatchConflictResolver.java
index 74036c191ec..970844be4c8 100644
--- a/drools-core/src/main/java/org/drools/core/conflict/MatchConflictResolver.java
+++ b/drools-core/src/main/java/org/drools/core/conflict/MatchConflictResolver.java
@@ -1,24 +1,26 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.conflict;
import java.io.Serializable;
-import org.drools.core.rule.consequence.ConflictResolver;
+import org.drools.base.rule.consequence.ConflictResolver;
import org.drools.core.rule.consequence.InternalMatch;
import org.kie.api.definition.rule.Rule;
diff --git a/drools-core/src/main/java/org/drools/core/conflict/RuleAgendaConflictResolver.java b/drools-core/src/main/java/org/drools/core/conflict/RuleAgendaConflictResolver.java
index d94e1e72fba..46120530241 100644
--- a/drools-core/src/main/java/org/drools/core/conflict/RuleAgendaConflictResolver.java
+++ b/drools-core/src/main/java/org/drools/core/conflict/RuleAgendaConflictResolver.java
@@ -1,25 +1,27 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.conflict;
import java.io.Serializable;
import org.drools.core.phreak.RuleAgendaItem;
-import org.drools.core.rule.consequence.ConflictResolver;
+import org.drools.base.rule.consequence.ConflictResolver;
import org.kie.api.definition.rule.Rule;
public class RuleAgendaConflictResolver implements ConflictResolver, Serializable {
diff --git a/drools-core/src/main/java/org/drools/core/event/AbstractEventSupport.java b/drools-core/src/main/java/org/drools/core/event/AbstractEventSupport.java
index 7e054003c78..ff8a7036c25 100644
--- a/drools-core/src/main/java/org/drools/core/event/AbstractEventSupport.java
+++ b/drools-core/src/main/java/org/drools/core/event/AbstractEventSupport.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/event/ActivationCancelledEvent.java b/drools-core/src/main/java/org/drools/core/event/ActivationCancelledEvent.java
index 1775e30c5e4..721f2400a5f 100644
--- a/drools-core/src/main/java/org/drools/core/event/ActivationCancelledEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/ActivationCancelledEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.drools.core.rule.consequence.InternalMatch;
diff --git a/drools-core/src/main/java/org/drools/core/event/ActivationCreatedEvent.java b/drools-core/src/main/java/org/drools/core/event/ActivationCreatedEvent.java
index ff6a2317c73..e25202ba876 100644
--- a/drools-core/src/main/java/org/drools/core/event/ActivationCreatedEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/ActivationCreatedEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.drools.core.rule.consequence.InternalMatch;
diff --git a/drools-core/src/main/java/org/drools/core/event/ActivationEvent.java b/drools-core/src/main/java/org/drools/core/event/ActivationEvent.java
index 58c8c859f17..33d81d32836 100644
--- a/drools-core/src/main/java/org/drools/core/event/ActivationEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/ActivationEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import java.util.EventObject;
diff --git a/drools-core/src/main/java/org/drools/core/event/AfterActivationFiredEvent.java b/drools-core/src/main/java/org/drools/core/event/AfterActivationFiredEvent.java
index 458f965c4a9..071e95419fd 100644
--- a/drools-core/src/main/java/org/drools/core/event/AfterActivationFiredEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/AfterActivationFiredEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.drools.core.rule.consequence.InternalMatch;
diff --git a/drools-core/src/main/java/org/drools/core/event/AgendaEventSupport.java b/drools-core/src/main/java/org/drools/core/event/AgendaEventSupport.java
index 0d91b5752e8..cfdaef56dc4 100644
--- a/drools-core/src/main/java/org/drools/core/event/AgendaEventSupport.java
+++ b/drools-core/src/main/java/org/drools/core/event/AgendaEventSupport.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.drools.core.common.InternalAgendaGroup;
diff --git a/drools-core/src/main/java/org/drools/core/event/AgendaGroupEvent.java b/drools-core/src/main/java/org/drools/core/event/AgendaGroupEvent.java
index 4078bf2cd77..a2b7cf40f90 100644
--- a/drools-core/src/main/java/org/drools/core/event/AgendaGroupEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/AgendaGroupEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import java.util.EventObject;
diff --git a/drools-core/src/main/java/org/drools/core/event/AgendaGroupPoppedEvent.java b/drools-core/src/main/java/org/drools/core/event/AgendaGroupPoppedEvent.java
index 2c947b06e3b..f715ffcc3be 100644
--- a/drools-core/src/main/java/org/drools/core/event/AgendaGroupPoppedEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/AgendaGroupPoppedEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.drools.core.common.InternalAgendaGroup;
diff --git a/drools-core/src/main/java/org/drools/core/event/AgendaGroupPushedEvent.java b/drools-core/src/main/java/org/drools/core/event/AgendaGroupPushedEvent.java
index 04d8c765e86..abb18cb5c88 100644
--- a/drools-core/src/main/java/org/drools/core/event/AgendaGroupPushedEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/AgendaGroupPushedEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.drools.core.common.InternalAgendaGroup;
diff --git a/drools-core/src/main/java/org/drools/core/event/BeforeActivationFiredEvent.java b/drools-core/src/main/java/org/drools/core/event/BeforeActivationFiredEvent.java
index 93b2953f487..28ea85f16d2 100644
--- a/drools-core/src/main/java/org/drools/core/event/BeforeActivationFiredEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/BeforeActivationFiredEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
diff --git a/drools-core/src/main/java/org/drools/core/event/DebugAgendaEventListener.java b/drools-core/src/main/java/org/drools/core/event/DebugAgendaEventListener.java
index 44ec82465dc..64c9ddf4d84 100644
--- a/drools-core/src/main/java/org/drools/core/event/DebugAgendaEventListener.java
+++ b/drools-core/src/main/java/org/drools/core/event/DebugAgendaEventListener.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.kie.api.event.rule.AfterMatchFiredEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/DebugProcessEventListener.java b/drools-core/src/main/java/org/drools/core/event/DebugProcessEventListener.java
index beb19ad4959..5d2cc3ba6fb 100644
--- a/drools-core/src/main/java/org/drools/core/event/DebugProcessEventListener.java
+++ b/drools-core/src/main/java/org/drools/core/event/DebugProcessEventListener.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.kie.api.event.process.ProcessCompletedEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/DebugRuleRuntimeEventListener.java b/drools-core/src/main/java/org/drools/core/event/DebugRuleRuntimeEventListener.java
index be617c70e0b..45b42dad8db 100644
--- a/drools-core/src/main/java/org/drools/core/event/DebugRuleRuntimeEventListener.java
+++ b/drools-core/src/main/java/org/drools/core/event/DebugRuleRuntimeEventListener.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.kie.api.event.rule.ObjectDeletedEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/DefaultAgendaEventListener.java b/drools-core/src/main/java/org/drools/core/event/DefaultAgendaEventListener.java
index 5dcc2a53492..a2576762b70 100644
--- a/drools-core/src/main/java/org/drools/core/event/DefaultAgendaEventListener.java
+++ b/drools-core/src/main/java/org/drools/core/event/DefaultAgendaEventListener.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.kie.api.event.rule.*;
diff --git a/drools-core/src/main/java/org/drools/core/event/DefaultProcessEventListener.java b/drools-core/src/main/java/org/drools/core/event/DefaultProcessEventListener.java
index 8b9df4c44e6..bf561a2dc0e 100644
--- a/drools-core/src/main/java/org/drools/core/event/DefaultProcessEventListener.java
+++ b/drools-core/src/main/java/org/drools/core/event/DefaultProcessEventListener.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.kie.api.event.process.ProcessCompletedEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/DefaultRuleRuntimeEventListener.java b/drools-core/src/main/java/org/drools/core/event/DefaultRuleRuntimeEventListener.java
index bc52f6c4626..020939cb1ff 100644
--- a/drools-core/src/main/java/org/drools/core/event/DefaultRuleRuntimeEventListener.java
+++ b/drools-core/src/main/java/org/drools/core/event/DefaultRuleRuntimeEventListener.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.kie.api.event.rule.ObjectDeletedEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/KnowledgeBaseEvent.java b/drools-core/src/main/java/org/drools/core/event/KnowledgeBaseEvent.java
index c9f85a722ea..5c19d3d2bf9 100644
--- a/drools-core/src/main/java/org/drools/core/event/KnowledgeBaseEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/KnowledgeBaseEvent.java
@@ -1,36 +1,38 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import java.util.EventObject;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.impl.RuleBase;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.core.impl.InternalRuleBase;
public class KnowledgeBaseEvent extends EventObject {
private static final long serialVersionUID = 510l;
- private final RuleBase kBase;
+ private final InternalRuleBase kBase;
private final InternalKnowledgePackage pkg;
private final RuleImpl rule;
private final String function;
- public KnowledgeBaseEvent(final RuleBase kBase) {
+ public KnowledgeBaseEvent(final InternalRuleBase kBase) {
super( kBase );
this.kBase = kBase;
this.pkg = null;
@@ -38,7 +40,7 @@ public KnowledgeBaseEvent(final RuleBase kBase) {
this.function = null;
}
- public KnowledgeBaseEvent(final RuleBase kBase,
+ public KnowledgeBaseEvent(final InternalRuleBase kBase,
final InternalKnowledgePackage pkg) {
super( kBase );
this.kBase = kBase;
@@ -47,7 +49,7 @@ public KnowledgeBaseEvent(final RuleBase kBase,
this.function = null;
}
- public KnowledgeBaseEvent(final RuleBase kBase,
+ public KnowledgeBaseEvent(final InternalRuleBase kBase,
final InternalKnowledgePackage pkg,
final RuleImpl rule) {
super( kBase );
@@ -57,7 +59,7 @@ public KnowledgeBaseEvent(final RuleBase kBase,
this.function = null;
}
- public KnowledgeBaseEvent(final RuleBase kBase,
+ public KnowledgeBaseEvent(final InternalRuleBase kBase,
final InternalKnowledgePackage pkg,
final String function) {
super( kBase );
@@ -67,7 +69,7 @@ public KnowledgeBaseEvent(final RuleBase kBase,
this.function = function;
}
- public RuleBase getKnowledgeBase() {
+ public InternalRuleBase getKnowledgeBase() {
return this.kBase;
}
diff --git a/drools-core/src/main/java/org/drools/core/event/RuleEventListenerSupport.java b/drools-core/src/main/java/org/drools/core/event/RuleEventListenerSupport.java
index 2dd72e4d9cc..827f8667a1c 100644
--- a/drools-core/src/main/java/org/drools/core/event/RuleEventListenerSupport.java
+++ b/drools-core/src/main/java/org/drools/core/event/RuleEventListenerSupport.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.kie.api.runtime.rule.Match;
diff --git a/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupActivatedEvent.java b/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupActivatedEvent.java
index bb17fc57738..b7717c519d4 100644
--- a/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupActivatedEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupActivatedEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.drools.core.common.RuleFlowGroup;
diff --git a/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupDeactivatedEvent.java b/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupDeactivatedEvent.java
index b089aecfd86..33390cd4ebd 100644
--- a/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupDeactivatedEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupDeactivatedEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.drools.core.common.RuleFlowGroup;
diff --git a/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupEvent.java b/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupEvent.java
index fbe995795a2..7c16f8fb065 100644
--- a/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/RuleFlowGroupEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import java.util.EventObject;
diff --git a/drools-core/src/main/java/org/drools/core/event/RuleRuntimeEventSupport.java b/drools-core/src/main/java/org/drools/core/event/RuleRuntimeEventSupport.java
index c90ad6bd103..853521411fe 100644
--- a/drools-core/src/main/java/org/drools/core/event/RuleRuntimeEventSupport.java
+++ b/drools-core/src/main/java/org/drools/core/event/RuleRuntimeEventSupport.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import org.drools.core.common.InternalWorkingMemory;
diff --git a/drools-core/src/main/java/org/drools/core/event/WorkingMemoryEvent.java b/drools-core/src/main/java/org/drools/core/event/WorkingMemoryEvent.java
index 9148970165b..e04a1a6975d 100644
--- a/drools-core/src/main/java/org/drools/core/event/WorkingMemoryEvent.java
+++ b/drools-core/src/main/java/org/drools/core/event/WorkingMemoryEvent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event;
import java.util.EventObject;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterFunctionRemovedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterFunctionRemovedEventImpl.java
index 51b9d5541ad..92d3d3ef4b0 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterFunctionRemovedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterFunctionRemovedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKiePackageAddedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKiePackageAddedEventImpl.java
index 8487ad3e302..cd091cd49a8 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKiePackageAddedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKiePackageAddedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKiePackageRemovedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKiePackageRemovedEventImpl.java
index 01f9592d46d..2ddd514a362 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKiePackageRemovedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKiePackageRemovedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKnowledgeBaseLockedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKnowledgeBaseLockedEventImpl.java
index 23c5e8f9ac0..55a988379d2 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKnowledgeBaseLockedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKnowledgeBaseLockedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKnowledgeBaseUnlockedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKnowledgeBaseUnlockedEventImpl.java
index 133c64d3c77..9181ff86399 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKnowledgeBaseUnlockedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterKnowledgeBaseUnlockedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterProcessAddedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterProcessAddedEventImpl.java
index 25074aa8fac..d891bf4a3a6 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterProcessAddedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterProcessAddedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterProcessRemovedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterProcessRemovedEventImpl.java
index 3d17d06237b..0c877a60233 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterProcessRemovedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterProcessRemovedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterRuleAddedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterRuleAddedEventImpl.java
index 5dcc1e20d11..1b2e870f6a7 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterRuleAddedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterRuleAddedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterRuleRemovedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterRuleRemovedEventImpl.java
index f0536c21bd3..392c129c2e8 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterRuleRemovedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/AfterRuleRemovedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeFunctionRemovedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeFunctionRemovedEventImpl.java
index 8701e1a613b..82f1bf1ecc1 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeFunctionRemovedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeFunctionRemovedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKiePackageAddedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKiePackageAddedEventImpl.java
index c3a953a4789..31aa34ed017 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKiePackageAddedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKiePackageAddedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKiePackageRemovedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKiePackageRemovedEventImpl.java
index b6c1e39cc1e..42bb740ccf4 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKiePackageRemovedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKiePackageRemovedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKnowledgeBaseLockedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKnowledgeBaseLockedEventImpl.java
index 746b614e0e7..2e28676ac90 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKnowledgeBaseLockedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKnowledgeBaseLockedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKnowledgeBaseUnlockedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKnowledgeBaseUnlockedEventImpl.java
index 9e384917295..f71c544b6d6 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKnowledgeBaseUnlockedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeKnowledgeBaseUnlockedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeProcessAddedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeProcessAddedEventImpl.java
index b185d18007b..08b215a746d 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeProcessAddedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeProcessAddedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeProcessRemovedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeProcessRemovedEventImpl.java
index b09bae8180a..47bd75a38b6 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeProcessRemovedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeProcessRemovedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeRuleAddedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeRuleAddedEventImpl.java
index 14831bf3858..040c51a357c 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeRuleAddedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeRuleAddedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeRuleRemovedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeRuleRemovedEventImpl.java
index e9d51b8cd42..c33ba8d0266 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeRuleRemovedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/BeforeRuleRemovedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/KnowledgeBaseEventImpl.java b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/KnowledgeBaseEventImpl.java
index 2986007bc7a..fd082aa012d 100644
--- a/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/KnowledgeBaseEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/knowlegebase/impl/KnowledgeBaseEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.knowlegebase.impl;
import org.kie.api.KieBase;
diff --git a/drools-core/src/main/java/org/drools/core/event/package-info.java b/drools-core/src/main/java/org/drools/core/event/package-info.java
index a6f1ba9058b..92a0304dced 100644
--- a/drools-core/src/main/java/org/drools/core/event/package-info.java
+++ b/drools-core/src/main/java/org/drools/core/event/package-info.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2013 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
/**
*
* Events provide all sorts of call backs to monitor the engine as it is running.
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationCancelledEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationCancelledEventImpl.java
index 8f8bfc6c259..4bc9ee60a46 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationCancelledEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationCancelledEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import org.kie.api.event.rule.MatchCancelledCause;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationCreatedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationCreatedEventImpl.java
index bc5c8520e9c..668d1e24060 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationCreatedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationCreatedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import org.kie.api.event.rule.MatchCreatedEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationEventImpl.java
index 5a23a9ed5b6..90bd4b36d65 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/ActivationEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/AfterActivationFiredEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/AfterActivationFiredEventImpl.java
index 1d2f93348a9..80335e8c87c 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/AfterActivationFiredEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/AfterActivationFiredEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import org.kie.api.event.rule.AfterMatchFiredEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupEventImpl.java
index 716eb87780e..13c34ed874d 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupPoppedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupPoppedEventImpl.java
index c2c8f36f7e0..79690433808 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupPoppedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupPoppedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import org.kie.api.event.rule.AgendaGroupPoppedEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupPushedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupPushedEventImpl.java
index 8996aff15c3..4da2c8c0d6e 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupPushedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/AgendaGroupPushedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import org.kie.api.event.rule.AgendaGroupPushedEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/BeforeActivationFiredEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/BeforeActivationFiredEventImpl.java
index 0afac0b5ec9..02d5a0a44fd 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/BeforeActivationFiredEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/BeforeActivationFiredEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import org.kie.api.event.rule.BeforeMatchFiredEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectDeletedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectDeletedEventImpl.java
index df0b3c3a8c6..8b05740eb92 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectDeletedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectDeletedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.IOException;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectInsertedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectInsertedEventImpl.java
index d8bfd268bf8..55e3999f0c7 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectInsertedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectInsertedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.IOException;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectUpdatedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectUpdatedEventImpl.java
index b367265d9a8..88f65543cd0 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectUpdatedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/ObjectUpdatedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.IOException;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupActivatedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupActivatedEventImpl.java
index 471cec1a9b6..f47f5b6ff33 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupActivatedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupActivatedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import org.kie.api.event.rule.RuleFlowGroupActivatedEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupDeactivatedEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupDeactivatedEventImpl.java
index 6a0e1df9121..911ba97d4e0 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupDeactivatedEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupDeactivatedEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupEventImpl.java
index 0d4e8b8fe37..ac1e34a3cf2 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleFlowGroupEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleRuntimeEventImpl.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleRuntimeEventImpl.java
index 8aed2cd2565..3af8971441b 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleRuntimeEventImpl.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/RuleRuntimeEventImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableActivation.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableActivation.java
index e22d584c49d..001c4556134 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableActivation.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableActivation.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.Externalizable;
@@ -25,9 +27,9 @@
import java.util.List;
import org.drools.core.common.InternalFactHandle;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.RuleTerminalNodeLeftTuple;
-import org.drools.core.rule.Declaration;
+import org.drools.base.rule.Declaration;
import org.drools.core.rule.consequence.InternalMatch;
import org.drools.core.common.PropagationContext;
import org.kie.api.definition.rule.Rule;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableAgendaGroup.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableAgendaGroup.java
index 4c1a6ae500a..1f7f0614b58 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableAgendaGroup.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableAgendaGroup.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableRuleFlowGroup.java b/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableRuleFlowGroup.java
index df3057e762a..ed7643b1717 100644
--- a/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableRuleFlowGroup.java
+++ b/drools-core/src/main/java/org/drools/core/event/rule/impl/SerializableRuleFlowGroup.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.event.rule.impl;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/AccessibleFact.java b/drools-core/src/main/java/org/drools/core/factmodel/AccessibleFact.java
deleted file mode 100644
index da5d0074c18..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/AccessibleFact.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.factmodel;
-
-public interface AccessibleFact {
- Object getValue(String fieldName);
- void setValue(String fieldName, Object value);
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/GeneratedFact.java b/drools-core/src/main/java/org/drools/core/factmodel/GeneratedFact.java
deleted file mode 100644
index 583031ad8ba..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/GeneratedFact.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.drools.core.factmodel;
-
-/**
- * This is a marker interface implemented by classes dinamically generated from declared types or facts
- */
-public interface GeneratedFact {
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/Alias.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/Alias.java
deleted file mode 100644
index 093cf69b4f7..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/Alias.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.drools.core.factmodel.traits;
-
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention( value = RetentionPolicy.RUNTIME )
-@Target( value = ElementType.FIELD )
-public @interface Alias {
-
- String value();
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/CoreWrapper.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/CoreWrapper.java
deleted file mode 100644
index f0f631261c0..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/CoreWrapper.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.factmodel.traits;
-
-public interface CoreWrapper extends TraitableBean> {
-
- void init( K core );
-
- K getCore();
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/Thing.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/Thing.java
deleted file mode 100644
index bfa2ea83c6a..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/Thing.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.factmodel.traits;
-
-import java.util.Map;
-
-@Trait
-public interface Thing {
-
- Map getFields();
-
- K getCore();
-
- boolean isTop();
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/Trait.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/Trait.java
deleted file mode 100644
index e6d67ea8a5c..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/Trait.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.factmodel.traits;
-
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target( value = ElementType.TYPE)
-public @interface Trait {
-
- Class impl() default NullMixin.class;
-
- class NullMixin {
- private NullMixin() {}
- }
-
- boolean logical() default false;
-
- MixinConflictResolutionStrategy mixinSolveConflicts() default MixinConflictResolutionStrategy.DECLARATION_ORDER;
-
- enum MixinConflictResolutionStrategy {
- DECLARATION_ORDER, ERROR_ON_CONFLICT
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitFactory.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitFactory.java
deleted file mode 100644
index e35fa5de9b9..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitFactory.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.factmodel.traits;
-
-public interface TraitFactory {
-
- boolean isRuntimeClass( String resourceName );
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitField.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitField.java
deleted file mode 100644
index 65002322cd2..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitField.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.factmodel.traits;
-
-import java.util.Set;
-
-public interface TraitField {
-
- Set> getRangeTypes();
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitType.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitType.java
deleted file mode 100644
index 3d68803d37a..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitType.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2013 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.factmodel.traits;
-
-
-import java.util.BitSet;
-
-public interface TraitType {
-
- BitSet _getTypeCode();
-
- boolean _isVirtual();
-
- String traitNameField = "__$$trait_Name";
-
- String _getTraitName();
-
- boolean _hasTypeCode( BitSet typeCode );
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitTypeEnum.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitTypeEnum.java
deleted file mode 100644
index 0ee9def74b6..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitTypeEnum.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.drools.core.factmodel.traits;
-
-
-public enum TraitTypeEnum {
-
- TRAIT, // trait proxy
- TRAITABLE, // native traitable bean
- LEGACY_TRAITABLE, // legacy class marked as traitable, bean not yet traited (needs wrapping/injection to provide data structures
- WRAPPED_TRAITABLE, // legacy class wrapped by a proxy to provide the core data structures.
- NON_TRAIT // not marked as trait/traitable
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitTypeMap.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitTypeMap.java
deleted file mode 100644
index 727f19b1738..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitTypeMap.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.factmodel.traits;
-
-import java.util.BitSet;
-import java.util.Collection;
-
-public interface TraitTypeMap, C> {
-
- K putSafe(String key, K value);
-
- Collection removeCascade(String traitName);
-
- Collection removeCascade(BitSet code);
-
- Collection getMostSpecificTraits();
-
- BitSet getCurrentTypeCode();
-
- void setBottomCode(BitSet code);
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitTypeMapConstants.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitTypeMapConstants.java
deleted file mode 100644
index 5257f05fbbf..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/TraitTypeMapConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.factmodel.traits;
-
-public interface TraitTypeMapConstants {
-
- String TYPE_NAME = "org/drools/traits/core/factmodel/TraitTypeMapImpl";
-}
diff --git a/drools-core/src/main/java/org/drools/core/factmodel/traits/Traitable.java b/drools-core/src/main/java/org/drools/core/factmodel/traits/Traitable.java
deleted file mode 100644
index 01a16938687..00000000000
--- a/drools-core/src/main/java/org/drools/core/factmodel/traits/Traitable.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2011 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.drools.core.factmodel.traits;
-
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention( value = RetentionPolicy.RUNTIME )
-@Target( value = ElementType.TYPE )
-public @interface Traitable {
-
- boolean logical() default false;
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/facttemplates/Event.java b/drools-core/src/main/java/org/drools/core/facttemplates/Event.java
deleted file mode 100644
index a5d0233a81e..00000000000
--- a/drools-core/src/main/java/org/drools/core/facttemplates/Event.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.facttemplates;
-
-import java.util.concurrent.TimeUnit;
-
-public interface Event extends Fact {
-
- long getTimestamp();
-
- long getExpiration();
-
- Event withExpiration( long value, TimeUnit unit );
-
- default boolean isEvent() {
- return true;
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/facttemplates/Fact.java b/drools-core/src/main/java/org/drools/core/facttemplates/Fact.java
deleted file mode 100644
index e2392042bd3..00000000000
--- a/drools-core/src/main/java/org/drools/core/facttemplates/Fact.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.facttemplates;
-
-import java.util.Map;
-
-public interface Fact {
-
- Object get(String name);
-
- void set(String name, Object value);
-
- Map asMap();
-
- FactTemplate getFactTemplate();
-
- default boolean isEvent() {
- return false;
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplate.java b/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplate.java
deleted file mode 100644
index 94f246dedad..00000000000
--- a/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplate.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.facttemplates;
-
-import java.io.Externalizable;
-import java.util.Collection;
-
-import org.drools.core.definitions.InternalKnowledgePackage;
-
-
-public interface FactTemplate
- extends
- Externalizable {
-
- InternalKnowledgePackage getPackage();
-
- /**
- * The name of the template may be the fully qualified
- * class name, or an alias.
- * @return
- */
- String getName();
-
- /**
- * templates may have 1 or more slots. A slot is a named
- * pattern with a specific type of value.
- * @return
- */
- int getNumberOfFields();
-
- Collection getFieldNames();
-
- /**
- * Return the slot with the String name
- * @return
- */
- FieldTemplate getFieldTemplate(String name);
-
- /**
- * Get the pattern index with the given name
- * @param name
- * @return
- */
- int getFieldTemplateIndex(String name);
-
- Fact createFact();
-}
diff --git a/drools-core/src/main/java/org/drools/core/facttemplates/FieldTemplate.java b/drools-core/src/main/java/org/drools/core/facttemplates/FieldTemplate.java
deleted file mode 100644
index b53f801c364..00000000000
--- a/drools-core/src/main/java/org/drools/core/facttemplates/FieldTemplate.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.facttemplates;
-
-import org.drools.core.base.ValueType;
-
-public interface FieldTemplate {
-
- String getName();
-
- ValueType getValueType();
-
-}
diff --git a/drools-core/src/main/java/org/drools/core/impl/AbstractRuntime.java b/drools-core/src/main/java/org/drools/core/impl/AbstractRuntime.java
index 7de72ba7675..28d704db46f 100644
--- a/drools-core/src/main/java/org/drools/core/impl/AbstractRuntime.java
+++ b/drools-core/src/main/java/org/drools/core/impl/AbstractRuntime.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.impl;
import org.kie.api.event.KieRuntimeEventManager;
diff --git a/drools-core/src/main/java/org/drools/core/impl/ActivationsManagerImpl.java b/drools-core/src/main/java/org/drools/core/impl/ActivationsManagerImpl.java
index 817af24bebd..328e0e5c4df 100644
--- a/drools-core/src/main/java/org/drools/core/impl/ActivationsManagerImpl.java
+++ b/drools-core/src/main/java/org/drools/core/impl/ActivationsManagerImpl.java
@@ -1,40 +1,38 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.impl;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
+import org.drools.base.definitions.rule.impl.QueryImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.common.ActivationGroupImpl;
import org.drools.core.common.ActivationGroupNode;
import org.drools.core.common.ActivationsFilter;
import org.drools.core.common.ActivationsManager;
import org.drools.core.common.AgendaGroupsManager;
+import org.drools.core.common.InternalActivationGroup;
import org.drools.core.common.InternalAgendaGroup;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.InternalWorkingMemoryEntryPoint;
+import org.drools.core.common.PropagationContext;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.concurrent.RuleEvaluator;
-import org.drools.core.concurrent.SequentialRuleEvaluator;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.core.concurrent.GroupEvaluator;
+import org.drools.core.concurrent.SequentialGroupEvaluator;
import org.drools.core.event.AgendaEventSupport;
import org.drools.core.phreak.ExecutableEntry;
import org.drools.core.phreak.PropagationEntry;
@@ -47,17 +45,20 @@
import org.drools.core.reteoo.PathMemory;
import org.drools.core.reteoo.RuleTerminalNodeLeftTuple;
import org.drools.core.reteoo.TerminalNode;
-import org.drools.core.definitions.rule.impl.QueryImpl;
import org.drools.core.rule.consequence.InternalMatch;
-import org.drools.core.common.InternalActivationGroup;
import org.drools.core.rule.consequence.KnowledgeHelper;
-import org.drools.core.common.PropagationContext;
-import org.drools.core.reteoo.Tuple;
import org.drools.util.StringUtils;
import org.kie.api.conf.EventProcessingOption;
import org.kie.api.event.rule.MatchCancelledCause;
import org.kie.api.runtime.rule.AgendaFilter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
public class ActivationsManagerImpl implements ActivationsManager {
private final ReteEvaluator reteEvaluator;
@@ -71,7 +72,7 @@ public class ActivationsManagerImpl implements ActivationsManager {
private final PropagationList propagationList;
- private final RuleEvaluator ruleEvaluator;
+ private final GroupEvaluator groupEvaluator;
private boolean firing = false;
@@ -85,7 +86,7 @@ public ActivationsManagerImpl(ReteEvaluator reteEvaluator) {
this.reteEvaluator = reteEvaluator;
this.agendaGroupsManager = new AgendaGroupsManager.SimpleAgendaGroupsManager(reteEvaluator);
this.propagationList = new SynchronizedPropagationList(reteEvaluator);
- this.ruleEvaluator = new SequentialRuleEvaluator( this );
+ this.groupEvaluator = new SequentialGroupEvaluator( this );
if (reteEvaluator.getKnowledgeBase().getRuleBaseConfiguration().getEventProcessingMode() == EventProcessingOption.STREAM) {
expirationContexts = new ArrayList<>();
}
@@ -189,7 +190,6 @@ public void cancelActivation(InternalMatch internalMatch) {
if (internalMatch.getActivationGroupNode() != null ) {
internalMatch.getActivationGroupNode().getActivationGroup().removeActivation(internalMatch);
}
- ((Tuple) internalMatch).decreaseActivationCountForEvents();
getAgendaEventSupport().fireActivationCancelled(internalMatch, reteEvaluator, MatchCancelledCause.WME_MODIFY);
}
@@ -259,7 +259,17 @@ public void evaluateQueriesForRule(RuleAgendaItem item) {
@Override
public KnowledgeHelper getKnowledgeHelper() {
- return ruleEvaluator.getKnowledgeHelper();
+ return groupEvaluator.getKnowledgeHelper();
+ }
+
+ @Override
+ public void resetKnowledgeHelper() {
+ groupEvaluator.resetKnowledgeHelper();
+ }
+
+ @Override
+ public void haltGroupEvaluation() {
+ groupEvaluator.haltEvaluation();
}
@Override
@@ -298,7 +308,7 @@ private int fireLoop(AgendaFilter agendaFilter, int fireLimit, RestHandler restH
// only fire rules while the limit has not reached.
// if halt is called, then isFiring will be false.
// The while loop may continue to loop, to keep flushing the action propagation queue
- returnedFireCount = ruleEvaluator.evaluateAndFire( agendaFilter, fireCount, fireLimit, group );
+ returnedFireCount = groupEvaluator.evaluateAndFire( group, agendaFilter, fireCount, fireLimit );
fireCount += returnedFireCount;
limitReached = ( fireLimit > 0 && fireCount >= fireLimit );
@@ -330,7 +340,7 @@ private boolean flushExpirations() {
}
private void doRetract( PropagationContext ectx ) {
- InternalFactHandle factHandle = ectx.getFactHandle();
+ InternalFactHandle factHandle = (InternalFactHandle) ectx.getFactHandle();
ObjectTypeNode.retractLeftTuples( factHandle, ectx, reteEvaluator );
ObjectTypeNode.retractRightTuples( factHandle, ectx, reteEvaluator );
if ( factHandle.isPendingRemoveFromStore() ) {
diff --git a/drools-core/src/main/java/org/drools/core/impl/EnvironmentFactory.java b/drools-core/src/main/java/org/drools/core/impl/EnvironmentFactory.java
index cd6a88f87ee..04a2a0960f7 100644
--- a/drools-core/src/main/java/org/drools/core/impl/EnvironmentFactory.java
+++ b/drools-core/src/main/java/org/drools/core/impl/EnvironmentFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.impl;
import org.drools.core.marshalling.ClassObjectMarshallingStrategyAcceptor;
diff --git a/drools-core/src/main/java/org/drools/core/impl/EnvironmentImpl.java b/drools-core/src/main/java/org/drools/core/impl/EnvironmentImpl.java
index aac41087e5a..23567f6a7ff 100644
--- a/drools-core/src/main/java/org/drools/core/impl/EnvironmentImpl.java
+++ b/drools-core/src/main/java/org/drools/core/impl/EnvironmentImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.impl;
import java.util.HashMap;
diff --git a/drools-core/src/main/java/org/drools/core/impl/InternalKieContainer.java b/drools-core/src/main/java/org/drools/core/impl/InternalKieContainer.java
index b1c9b4246f5..e99b6f8c169 100644
--- a/drools-core/src/main/java/org/drools/core/impl/InternalKieContainer.java
+++ b/drools-core/src/main/java/org/drools/core/impl/InternalKieContainer.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2017 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.impl;
import java.io.InputStream;
diff --git a/drools-core/src/main/java/org/drools/core/impl/RuleBase.java b/drools-core/src/main/java/org/drools/core/impl/InternalRuleBase.java
similarity index 80%
rename from drools-core/src/main/java/org/drools/core/impl/RuleBase.java
rename to drools-core/src/main/java/org/drools/core/impl/InternalRuleBase.java
index ad2c72e4eb4..92d2dca90ce 100644
--- a/drools-core/src/main/java/org/drools/core/impl/RuleBase.java
+++ b/drools-core/src/main/java/org/drools/core/impl/InternalRuleBase.java
@@ -1,37 +1,35 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.impl;
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Future;
-
+import org.drools.base.RuleBase;
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.rule.InvalidPatternException;
+import org.drools.base.rule.TypeDeclaration;
+import org.drools.base.ruleunit.RuleUnitDescriptionRegistry;
import org.drools.core.KieBaseConfigurationImpl;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.base.ClassFieldAccessorCache;
import org.drools.core.common.InternalWorkingMemory;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.common.RuleBasePartitionId;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.AsyncReceiveNode;
import org.drools.core.reteoo.EntryPointNode;
import org.drools.core.reteoo.LeftTupleNode;
@@ -40,10 +38,7 @@
import org.drools.core.reteoo.ReteooBuilder;
import org.drools.core.reteoo.SegmentMemory;
import org.drools.core.reteoo.SegmentMemory.SegmentPrototype;
-import org.drools.core.rule.InvalidPatternException;
-import org.drools.core.rule.TypeDeclaration;
import org.drools.core.rule.accessor.FactHandleFactory;
-import org.drools.core.ruleunit.RuleUnitDescriptionRegistry;
import org.kie.api.KieBaseConfiguration;
import org.kie.api.builder.ReleaseId;
import org.kie.api.definition.KiePackage;
@@ -54,7 +49,15 @@
import org.kie.api.io.Resource;
import org.kie.api.runtime.KieSessionConfiguration;
-public interface RuleBase {
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+public interface InternalRuleBase extends RuleBase {
Collection getKiePackages();
KiePackage getKiePackage( String packageName );
@@ -80,6 +83,8 @@ public interface RuleBase {
String getId();
RuleBasePartitionId createNewPartitionId();
+ boolean isPartitioned();
+ int getParallelEvaluationSlotsCount();
RuleBaseConfiguration getRuleBaseConfiguration();
diff --git a/drools-core/src/main/java/org/drools/core/impl/KieBaseUpdate.java b/drools-core/src/main/java/org/drools/core/impl/KieBaseUpdate.java
index e9f87aa838b..8c58ebb3bb2 100644
--- a/drools-core/src/main/java/org/drools/core/impl/KieBaseUpdate.java
+++ b/drools-core/src/main/java/org/drools/core/impl/KieBaseUpdate.java
@@ -1,24 +1,27 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.impl;
import java.util.ArrayList;
import java.util.List;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
public class KieBaseUpdate {
private final List rulesToBeRemoved;
diff --git a/drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseImpl.java b/drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseImpl.java
index fdf209671e6..064ad42c7d0 100644
--- a/drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseImpl.java
+++ b/drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseImpl.java
@@ -1,50 +1,43 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.impl;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Queue;
-import java.util.Set;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.Future;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.common.PartitionsManager;
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.factmodel.ClassDefinition;
+import org.drools.base.rule.DialectRuntimeRegistry;
+import org.drools.base.rule.EntryPointId;
+import org.drools.base.rule.Function;
+import org.drools.base.rule.ImportDeclaration;
+import org.drools.base.rule.InvalidPatternException;
+import org.drools.base.rule.TypeDeclaration;
+import org.drools.base.rule.WindowDeclaration;
+import org.drools.base.ruleunit.RuleUnitDescriptionRegistry;
import org.drools.core.KieBaseConfigurationImpl;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.SessionConfiguration;
import org.drools.core.base.ClassFieldAccessorCache;
-import org.drools.core.base.ClassObjectType;
import org.drools.core.common.InternalWorkingMemory;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.common.RuleBasePartitionId;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.factmodel.ClassDefinition;
import org.drools.core.management.DroolsManagementAgent;
import org.drools.core.phreak.BuildtimeSegmentUtilities;
import org.drools.core.phreak.EagerPhreakBuilder.Add;
@@ -65,16 +58,8 @@
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.reteoo.builder.BuildContext;
import org.drools.core.reteoo.builder.NodeFactory;
-import org.drools.core.rule.DialectRuntimeRegistry;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.rule.Function;
-import org.drools.core.rule.ImportDeclaration;
-import org.drools.core.rule.InvalidPatternException;
import org.drools.core.rule.JavaDialectRuntimeData;
-import org.drools.core.rule.TypeDeclaration;
-import org.drools.core.rule.WindowDeclaration;
import org.drools.core.rule.accessor.FactHandleFactory;
-import org.drools.core.ruleunit.RuleUnitDescriptionRegistry;
import org.drools.wiring.api.classloader.ProjectClassLoader;
import org.kie.api.KieBaseConfiguration;
import org.kie.api.builder.ReleaseId;
@@ -94,19 +79,35 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Queue;
+import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.Future;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
import static org.drools.core.phreak.PhreakBuilder.isEagerSegmentCreation;
-import static org.drools.util.BitMaskUtil.isSet;
+import static org.drools.util.bitmask.BitMaskUtil.isSet;
import static org.drools.util.ClassUtils.convertClassToResourcePath;
-public class KnowledgeBaseImpl implements RuleBase {
+public class KnowledgeBaseImpl implements InternalRuleBase {
- protected static final transient Logger logger = LoggerFactory.getLogger(KnowledgeBaseImpl.class);
+ protected static final Logger logger = LoggerFactory.getLogger(KnowledgeBaseImpl.class);
private Set addedEntryNodeCache;
private Set removedEntryNodeCache;
- // ------------------------------------------------------------
- // Instance members
- // ------------------------------------------------------------
+
private String id;
private KieBaseConfiguration config;
@@ -151,6 +152,10 @@ public class KnowledgeBaseImpl implements RuleBase {
private boolean hasMultipleAgendaGroups = false;
+ private final PartitionsManager partitionsManager = new PartitionsManager();
+
+ private boolean partitioned;
+
public KnowledgeBaseImpl() { }
public KnowledgeBaseImpl(final String id,
@@ -449,8 +454,26 @@ public void kBaseInternal_addPackages(Collection clone
ruleUnitDescriptionRegistry.add(newPkg.getRuleUnitDescriptionLoader());
}
- if (ruleBaseConfig.isMultithreadEvaluation() && !hasMultiplePartitions()) {
- disableMultithreadEvaluation("The rete network cannot be partitioned: disabling multithread evaluation");
+ if (ruleBaseConfig.isParallelEvaluation()) {
+ setupParallelEvaluation();
+ }
+ }
+
+ private void setupParallelEvaluation() {
+ if (!partitionsManager.hasParallelEvaluation()) {
+ disableParallelEvaluation("The rete network cannot be partitioned: disabling multithread evaluation");
+ return;
+ }
+ partitionsManager.init();
+ this.partitioned = true;
+
+ if (ruleBaseConfig.isParallelExecution()) {
+ for (EntryPointNode epn : rete.getEntryPointNodes().values()) {
+ epn.setupParallelExecution(this);
+ for (ObjectTypeNode otn : epn.getObjectTypeNodes().values()) {
+ otn.setupParallelExecution(this);
+ }
+ }
}
}
@@ -478,41 +501,28 @@ public void processAllTypesDeclaration( Collection pkg
}
}
- private void checkMultithreadedEvaluation( RuleImpl rule ) {
- if (ruleBaseConfig.isMultithreadEvaluation()) {
+ private void checkParallelEvaluation(RuleImpl rule) {
+ if (ruleBaseConfig.isParallelEvaluation()) {
if (!rule.isMainAgendaGroup()) {
- disableMultithreadEvaluation( "Agenda-groups are not supported with multithread evaluation: disabling it" );
+ disableParallelEvaluation( "Agenda-groups are not supported with parallel execution: disabling it" );
} else if (rule.getActivationGroup() != null) {
- disableMultithreadEvaluation( "Activation-groups are not supported with multithread evaluation: disabling it" );
- } else if (!rule.getSalience().isDefault()) {
- disableMultithreadEvaluation( "Salience is not supported with multithread evaluation: disabling it" );
+ disableParallelEvaluation( "Activation-groups are not supported with parallel execution: disabling it" );
+ } else if (!rule.getSalience().isDefault() && ruleBaseConfig.isParallelExecution()) {
+ disableParallelEvaluation( "Salience is not supported with parallel execution: disabling it" );
} else if (rule.isQuery()) {
- disableMultithreadEvaluation( "Queries are not supported with multithread evaluation: disabling it" );
- }
- }
- }
-
- private boolean hasMultiplePartitions() {
- for (EntryPointNode entryPointNode : rete.getEntryPointNodes().values()) {
- for ( ObjectTypeNode otn : entryPointNode.getObjectTypeNodes().values() ) {
- ObjectSinkPropagator sink = otn.getObjectSinkPropagator();
- if (sink instanceof CompositePartitionAwareObjectSinkAdapter && ( (CompositePartitionAwareObjectSinkAdapter) sink ).getUsedPartitionsCount() > 1) {
- return true;
- }
+ disableParallelEvaluation( "Queries are not supported with parallel execution: disabling it" );
}
}
- return false;
}
public boolean hasMultipleAgendaGroups() {
return hasMultipleAgendaGroups;
}
- private void disableMultithreadEvaluation(String warningMessage) {
+ private void disableParallelEvaluation(String warningMessage) {
ruleBaseConfig.enforceSingleThreadEvaluation();
logger.warn( warningMessage );
for (EntryPointNode entryPointNode : rete.getEntryPointNodes().values()) {
- entryPointNode.setPartitionsEnabled( false );
for (ObjectTypeNode otn : entryPointNode.getObjectTypeNodes().values()) {
ObjectSinkPropagator sink = otn.getObjectSinkPropagator();
if (sink instanceof CompositePartitionAwareObjectSinkAdapter) {
@@ -842,7 +852,6 @@ protected void setupRete() {
// always add the default entry point
EntryPointNode epn = nodeFactory.buildEntryPointNode(this.reteooBuilder.getNodeIdsGenerator().getNextId(),
RuleBasePartitionId.MAIN_PARTITION,
- ruleBaseConfig.isMultithreadEvaluation(),
this.rete,
EntryPointId.DEFAULT);
epn.attach();
@@ -850,7 +859,6 @@ protected void setupRete() {
BuildContext context = new BuildContext(this, Collections.emptyList());
context.setCurrentEntryPoint(epn.getEntryPoint());
context.setTupleMemoryEnabled(true);
- context.setObjectTypeNodeMemoryEnabled(true);
context.setPartitionId(RuleBasePartitionId.MAIN_PARTITION);
ObjectTypeNode otn = nodeFactory.buildObjectTypeNode(this.reteooBuilder.getNodeIdsGenerator().getNextId(),
@@ -1030,7 +1038,7 @@ public void kBaseInternal_addRules(Collection extends Rule> rules, Collection<
for (Rule r : rules) {
RuleImpl rule = (RuleImpl) r;
- checkMultithreadedEvaluation( rule );
+ checkParallelEvaluation( rule );
this.hasMultipleAgendaGroups |= !rule.isMainAgendaGroup();
terminalNodes.addAll(this.reteooBuilder.addRule(rule, wms));
}
@@ -1179,8 +1187,19 @@ private void addReloadDialectDatas( DialectRuntimeRegistry registry ) {
this.reloadPackageCompilationData.offer( registry );
}
+ @Override
public RuleBasePartitionId createNewPartitionId() {
- return RuleBasePartitionId.createPartition();
+ return partitionsManager.createNewPartitionId();
+ }
+
+ @Override
+ public boolean isPartitioned() {
+ return partitioned;
+ }
+
+ @Override
+ public int getParallelEvaluationSlotsCount() {
+ return partitionsManager.getParallelEvaluationSlotsCount();
}
public FactType getFactType(String packageName, String typeName) {
diff --git a/drools-core/src/main/java/org/drools/core/impl/RuleBaseFactory.java b/drools-core/src/main/java/org/drools/core/impl/RuleBaseFactory.java
index ea610c9aa53..85e7f73343e 100644
--- a/drools-core/src/main/java/org/drools/core/impl/RuleBaseFactory.java
+++ b/drools-core/src/main/java/org/drools/core/impl/RuleBaseFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.impl;
import java.util.Properties;
@@ -54,7 +56,7 @@
* properties.setProperty( "org.kie.sequential", "true");
*
*
- * @see RuleBase
+ * @see InternalRuleBase
*/
public class RuleBaseFactory {
@@ -63,7 +65,7 @@ public class RuleBaseFactory {
* @return
* The KnowledgeBase
*/
- public static RuleBase newRuleBase() {
+ public static InternalRuleBase newRuleBase() {
return newRuleBase( UUID.randomUUID().toString() );
}
@@ -79,7 +81,7 @@ public static RuleBase newRuleBase() {
* @return
* The KnowledgeBase
*/
- public static RuleBase newRuleBase(String kbaseId) {
+ public static InternalRuleBase newRuleBase(String kbaseId) {
return newRuleBase( kbaseId, RuleBaseFactory.newKnowledgeBaseConfiguration() );
}
@@ -88,7 +90,7 @@ public static RuleBase newRuleBase(String kbaseId) {
* @return
* The KnowledgeBase
*/
- public static RuleBase newRuleBase(KieBaseConfiguration conf) {
+ public static InternalRuleBase newRuleBase(KieBaseConfiguration conf) {
return newRuleBase( UUID.randomUUID().toString(), conf );
}
@@ -104,8 +106,8 @@ public static RuleBase newRuleBase(KieBaseConfiguration conf) {
* @return
* The KnowledgeBase
*/
- public static RuleBase newRuleBase(String kbaseId, KieBaseConfiguration conf) {
- return new KnowledgeBaseImpl( kbaseId, (CompositeBaseConfiguration) conf);
+ public static InternalRuleBase newRuleBase(String kbaseId, KieBaseConfiguration conf) {
+ return new KnowledgeBaseImpl(kbaseId, (CompositeBaseConfiguration) conf);
}
/**
diff --git a/drools-core/src/main/java/org/drools/core/impl/WorkingMemoryReteExpireAction.java b/drools-core/src/main/java/org/drools/core/impl/WorkingMemoryReteExpireAction.java
index c8492e5aff4..29949977ac1 100644
--- a/drools-core/src/main/java/org/drools/core/impl/WorkingMemoryReteExpireAction.java
+++ b/drools-core/src/main/java/org/drools/core/impl/WorkingMemoryReteExpireAction.java
@@ -1,59 +1,64 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.impl;
-import java.io.IOException;
-
+import org.drools.core.common.DefaultEventHandle;
import org.drools.core.common.DefaultFactHandle;
-import org.drools.core.common.EventFactHandle;
-import org.drools.core.common.InternalWorkingMemoryEntryPoint;
+import org.drools.core.common.PropagationContext;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.WorkingMemoryAction;
import org.drools.core.marshalling.MarshallerReaderContext;
import org.drools.core.phreak.PropagationEntry;
import org.drools.core.reteoo.ObjectTypeNode;
-import org.drools.core.common.PropagationContext;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
import static org.drools.core.common.PhreakPropagationContextFactory.createPropagationContextForFact;
public class WorkingMemoryReteExpireAction
extends PropagationEntry.AbstractPropagationEntry
- implements WorkingMemoryAction {
+ implements WorkingMemoryAction, Externalizable {
- protected EventFactHandle factHandle;
+ protected DefaultEventHandle factHandle;
protected ObjectTypeNode node;
- protected WorkingMemoryReteExpireAction() { }
+ public WorkingMemoryReteExpireAction() { }
- public WorkingMemoryReteExpireAction(final EventFactHandle factHandle) {
+ public WorkingMemoryReteExpireAction(final DefaultEventHandle factHandle) {
this.factHandle = factHandle;
}
- public WorkingMemoryReteExpireAction(final EventFactHandle factHandle,
+ public WorkingMemoryReteExpireAction(final DefaultEventHandle factHandle,
final ObjectTypeNode node) {
this(factHandle);
this.node = node;
factHandle.increaseOtnCount();
}
- public EventFactHandle getFactHandle() {
+ public DefaultEventHandle getFactHandle() {
return factHandle;
}
- public void setFactHandle(EventFactHandle factHandle) {
+ public void setFactHandle(DefaultEventHandle factHandle) {
this.factHandle = factHandle;
}
@@ -66,7 +71,7 @@ public void setNode(ObjectTypeNode node) {
}
public WorkingMemoryReteExpireAction(MarshallerReaderContext context) throws IOException {
- this.factHandle = (EventFactHandle)context.getHandles().get(context.readLong());
+ this.factHandle = (DefaultEventHandle)context.getHandles().get(context.readLong());
final int nodeId = context.readInt();
this.node = (ObjectTypeNode) context.getSinks().get(nodeId);
}
@@ -85,19 +90,14 @@ public void internalExecute(ReteEvaluator reteEvaluator) {
ObjectTypeNode.expireRightTuple(rt);
} );
- expireFactHandle( reteEvaluator, factHandle );
+ expireFactHandle( factHandle );
}
- private static void expireFactHandle( ReteEvaluator reteEvaluator, EventFactHandle factHandle ) {
+ private static void expireFactHandle( DefaultEventHandle factHandle) {
factHandle.decreaseOtnCount();
- if (factHandle.getOtnCount() == 0) {
+ if (factHandle.getOtnCount() <= 0) {
factHandle.setExpired( true );
- if (factHandle.getActivationsCount() == 0) {
- String epId = factHandle.getEntryPointName();
- ( (InternalWorkingMemoryEntryPoint) reteEvaluator.getEntryPoint( epId ) ).removeFromObjectStore( factHandle );
- } else {
- factHandle.setPendingRemoveFromStore( true );
- }
+ factHandle.setPendingRemoveFromStore( true );
}
}
@@ -116,11 +116,21 @@ public String toString() {
return "Expiration of " + factHandle.getObject();
}
+ @Override
+ public void writeExternal(ObjectOutput out) throws IOException {
+ out.writeObject(new DefaultEventHandle(factHandle.getId(), factHandle.getEntryPointId())); // only for STORES_ONLY strategy. Just keep id and entryPointId to be rewired
+ }
+
+ @Override
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+ this.factHandle = (DefaultEventHandle) in.readObject();
+ }
+
public static class PartitionAwareWorkingMemoryReteExpireAction extends PropagationEntry.AbstractPartitionedPropagationEntry {
- private final EventFactHandle factHandle;
+ private final DefaultEventHandle factHandle;
private final ObjectTypeNode node;
- public PartitionAwareWorkingMemoryReteExpireAction(EventFactHandle factHandle, ObjectTypeNode node, int partition) {
+ public PartitionAwareWorkingMemoryReteExpireAction(DefaultEventHandle factHandle, ObjectTypeNode node, int partition) {
super( partition );
this.factHandle = factHandle;
this.node = node;
@@ -143,7 +153,7 @@ public void internalExecute(ReteEvaluator reteEvaluator ) {
});
if (isMainPartition()) {
- expireFactHandle( reteEvaluator, factHandle );
+ expireFactHandle( factHandle );
}
}
diff --git a/drools-core/src/main/java/org/drools/core/management/DroolsManagementAgent.java b/drools-core/src/main/java/org/drools/core/management/DroolsManagementAgent.java
index eb4e1b3cab9..86314c34ae0 100644
--- a/drools-core/src/main/java/org/drools/core/management/DroolsManagementAgent.java
+++ b/drools-core/src/main/java/org/drools/core/management/DroolsManagementAgent.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.management;
import java.lang.management.ManagementFactory;
@@ -26,7 +28,7 @@
import javax.management.StandardMBean;
import org.drools.core.common.InternalWorkingMemory;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.RuntimeComponentFactory;
import org.kie.api.builder.model.KieSessionModel;
import org.kie.api.event.KieRuntimeEventManager;
@@ -35,7 +37,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static org.drools.core.util.Drools.isNativeImage;
+import static org.drools.base.util.Drools.isNativeImage;
/**
* The main management agent for Drools. The purpose of this
@@ -56,7 +58,7 @@ static DroolsManagementAgent getInstance() {
return DroolsManagementAgentHolder.INSTANCE;
}
- static ObjectName createObjectNameFor(RuleBase kbase) {
+ static ObjectName createObjectNameFor(InternalRuleBase kbase) {
return DroolsManagementAgent.createObjectName(
DroolsManagementAgent.createObjectNameBy(kbase.getContainerId())
+ ",kbaseId=" + ObjectName.quote(kbase.getId())
@@ -98,9 +100,9 @@ static String ksessionType(KieSessionModel.KieSessionType ksessionType) {
long getNextKnowledgeSessionId();
- void registerKnowledgeBase(RuleBase kbase);
+ void registerKnowledgeBase(InternalRuleBase kbase);
- void unregisterKnowledgeBase(RuleBase kbase);
+ void unregisterKnowledgeBase(InternalRuleBase kbase);
void registerKnowledgeSessionUnderName(CBSKey cbsKey, KieRuntimeEventManager ksession);
@@ -228,7 +230,7 @@ public synchronized long getNextKnowledgeSessionId() {
}
@Override
- public void registerKnowledgeBase(RuleBase kbase) {
+ public void registerKnowledgeBase(InternalRuleBase kbase) {
KnowledgeBaseMonitoring mbean = new KnowledgeBaseMonitoring( kbase );
registerMBean( kbase,
mbean,
@@ -236,7 +238,7 @@ public void registerKnowledgeBase(RuleBase kbase) {
}
@Override
- public void unregisterKnowledgeBase(RuleBase kbase) {
+ public void unregisterKnowledgeBase(InternalRuleBase kbase) {
unregisterMBeansFromOwner(kbase);
}
@@ -405,12 +407,12 @@ public long getNextKnowledgeSessionId() {
}
@Override
- public void registerKnowledgeBase(RuleBase kbase) {
+ public void registerKnowledgeBase(InternalRuleBase kbase) {
}
@Override
- public void unregisterKnowledgeBase(RuleBase kbase) {
+ public void unregisterKnowledgeBase(InternalRuleBase kbase) {
}
diff --git a/drools-core/src/main/java/org/drools/core/management/GenericKieSessionMonitoringImpl.java b/drools-core/src/main/java/org/drools/core/management/GenericKieSessionMonitoringImpl.java
index 016320eb040..5346e90ad3c 100644
--- a/drools-core/src/main/java/org/drools/core/management/GenericKieSessionMonitoringImpl.java
+++ b/drools-core/src/main/java/org/drools/core/management/GenericKieSessionMonitoringImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.management;
import java.util.Collections;
diff --git a/drools-core/src/main/java/org/drools/core/management/KieBaseConfigurationMonitor.java b/drools-core/src/main/java/org/drools/core/management/KieBaseConfigurationMonitor.java
index 1a2777ae976..a12a65b93c6 100644
--- a/drools-core/src/main/java/org/drools/core/management/KieBaseConfigurationMonitor.java
+++ b/drools-core/src/main/java/org/drools/core/management/KieBaseConfigurationMonitor.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.management;
import org.drools.core.RuleBaseConfiguration;
@@ -105,13 +107,6 @@ public boolean isMBeansEnabled() {
return kieBaseConf.getOption(MBeansOption.KEY).isEnabled();
}
- /* (non-Javadoc)
- * @see org.kie.api.management.KBaseConfigurationMonitorMBean#isMultithreadEvaluation()
- */
- public boolean isMultithreadEvaluation() {
- return ruleBaseConf.isMultithreadEvaluation();
- }
-
/* (non-Javadoc)
* @see org.kie.api.management.KBaseConfigurationMonitorMBean#isRemoveIdentities()
*/
diff --git a/drools-core/src/main/java/org/drools/core/management/KnowledgeBaseMonitoring.java b/drools-core/src/main/java/org/drools/core/management/KnowledgeBaseMonitoring.java
index f1d7b8bd16f..1cf3657fb88 100644
--- a/drools-core/src/main/java/org/drools/core/management/KnowledgeBaseMonitoring.java
+++ b/drools-core/src/main/java/org/drools/core/management/KnowledgeBaseMonitoring.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.management;
import java.lang.reflect.Type;
@@ -49,11 +51,9 @@
import javax.management.openmbean.TabularDataSupport;
import javax.management.openmbean.TabularType;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.EntryPointNode;
import org.drools.core.reteoo.ObjectTypeNode;
-import org.kie.api.KieBaseConfiguration;
import org.kie.api.management.KieBaseConfigurationMonitorMBean;
import org.kie.api.management.ObjectTypeNodeMonitorMBean;
import org.slf4j.Logger;
@@ -79,7 +79,7 @@ public class KnowledgeBaseMonitoring
// ************************************************************************************************
// MBean attributes
//
- private RuleBase kbase;
+ private InternalRuleBase kbase;
private ObjectName name;
private OpenMBeanInfoSupport info;
@@ -113,7 +113,7 @@ public class KnowledgeBaseMonitoring
// ************************************************************************************************
// Constructor
- public KnowledgeBaseMonitoring(RuleBase kbase) {
+ public KnowledgeBaseMonitoring(InternalRuleBase kbase) {
this.kbase = kbase;
this.name = DroolsManagementAgent.createObjectNameFor(kbase);
diff --git a/drools-core/src/main/java/org/drools/core/management/ObjectTypeNodeMonitor.java b/drools-core/src/main/java/org/drools/core/management/ObjectTypeNodeMonitor.java
index bc2615e6311..d842fd30318 100644
--- a/drools-core/src/main/java/org/drools/core/management/ObjectTypeNodeMonitor.java
+++ b/drools-core/src/main/java/org/drools/core/management/ObjectTypeNodeMonitor.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.management;
import org.drools.core.reteoo.ObjectTypeNode;
diff --git a/drools-core/src/main/java/org/drools/core/marshalling/ClassObjectMarshallingStrategyAcceptor.java b/drools-core/src/main/java/org/drools/core/marshalling/ClassObjectMarshallingStrategyAcceptor.java
index a43fd110f25..d4195e28de4 100644
--- a/drools-core/src/main/java/org/drools/core/marshalling/ClassObjectMarshallingStrategyAcceptor.java
+++ b/drools-core/src/main/java/org/drools/core/marshalling/ClassObjectMarshallingStrategyAcceptor.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.marshalling;
import java.util.HashMap;
diff --git a/drools-core/src/main/java/org/drools/core/marshalling/MarshallerReaderContext.java b/drools-core/src/main/java/org/drools/core/marshalling/MarshallerReaderContext.java
index eeb9d38bca5..edec31bbe66 100644
--- a/drools-core/src/main/java/org/drools/core/marshalling/MarshallerReaderContext.java
+++ b/drools-core/src/main/java/org/drools/core/marshalling/MarshallerReaderContext.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.marshalling;
import java.io.ObjectInput;
@@ -23,11 +27,11 @@
import org.drools.core.common.InternalWorkingMemory;
import org.drools.core.common.QueryElementFactHandle;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.phreak.PhreakTimerNode.Scheduler;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.ObjectTypeConf;
-import org.drools.core.rule.EntryPointId;
+import org.drools.base.rule.EntryPointId;
import org.drools.core.common.PropagationContext;
import org.drools.core.reteoo.Tuple;
import org.kie.api.marshalling.ObjectMarshallingStrategy;
@@ -39,7 +43,7 @@ public interface MarshallerReaderContext extends ObjectInput {
Scheduler removeTimerNodeScheduler( int nodeId, TupleKey key );
InternalWorkingMemory getWorkingMemory();
- RuleBase getKnowledgeBase();
+ InternalRuleBase getKnowledgeBase();
Map getHandles();
Map getTerminalTupleMap();
ActivationsFilter getFilter();
diff --git a/drools-core/src/main/java/org/drools/core/marshalling/MarshallerWriteContext.java b/drools-core/src/main/java/org/drools/core/marshalling/MarshallerWriteContext.java
index 00564dfe1b2..28c8b6d14bc 100644
--- a/drools-core/src/main/java/org/drools/core/marshalling/MarshallerWriteContext.java
+++ b/drools-core/src/main/java/org/drools/core/marshalling/MarshallerWriteContext.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.marshalling;
import java.io.ObjectOutput;
@@ -19,14 +23,14 @@
import org.drools.core.common.BaseNode;
import org.drools.core.common.InternalWorkingMemory;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.kie.api.marshalling.ObjectMarshallingStrategy;
import org.kie.api.marshalling.ObjectMarshallingStrategyStore;
import org.kie.api.runtime.Environment;
public interface MarshallerWriteContext extends ObjectOutput {
- RuleBase getKnowledgeBase();
+ InternalRuleBase getKnowledgeBase();
ObjectMarshallingStrategyStore getObjectMarshallingStrategyStore();
diff --git a/drools-core/src/main/java/org/drools/core/marshalling/SerializablePlaceholderResolverStrategy.java b/drools-core/src/main/java/org/drools/core/marshalling/SerializablePlaceholderResolverStrategy.java
index 499ab77436b..a84339f4e59 100644
--- a/drools-core/src/main/java/org/drools/core/marshalling/SerializablePlaceholderResolverStrategy.java
+++ b/drools-core/src/main/java/org/drools/core/marshalling/SerializablePlaceholderResolverStrategy.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.marshalling;
import java.io.IOException;
diff --git a/drools-core/src/main/java/org/drools/core/marshalling/TupleKey.java b/drools-core/src/main/java/org/drools/core/marshalling/TupleKey.java
index 8385b432bab..a46d6e8a030 100644
--- a/drools-core/src/main/java/org/drools/core/marshalling/TupleKey.java
+++ b/drools-core/src/main/java/org/drools/core/marshalling/TupleKey.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.marshalling;
import java.util.Arrays;
diff --git a/drools-core/src/main/java/org/drools/core/package-info.java b/drools-core/src/main/java/org/drools/core/package-info.java
index 71be29eec10..0e74e2d2171 100644
--- a/drools-core/src/main/java/org/drools/core/package-info.java
+++ b/drools-core/src/main/java/org/drools/core/package-info.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2013 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
/**
*
* This is the engine that works off binary RuleBases, you will mostly use WorkingMemory, RuleBase and RuleBaseFactory
diff --git a/drools-core/src/main/java/org/drools/core/phreak/AbstractReactiveObject.java b/drools-core/src/main/java/org/drools/core/phreak/AbstractReactiveObject.java
index 78b0eef3426..04489697c9f 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/AbstractReactiveObject.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/AbstractReactiveObject.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
-import org.drools.core.reteoo.Tuple;
+import org.drools.base.phreak.ReactiveObject;
+import org.drools.base.reteoo.BaseTuple;
import java.util.Collection;
import java.util.Collections;
@@ -24,17 +27,17 @@
public class AbstractReactiveObject implements ReactiveObject {
- private Collection lts;
+ private Collection tuples;
- public void addLeftTuple(Tuple leftTuple) {
- if (lts == null) {
- lts = new HashSet<>();
+ public void addTuple(BaseTuple tuple) {
+ if (tuples == null) {
+ tuples = new HashSet<>();
}
- lts.add(leftTuple);
+ tuples.add(tuple);
}
- public Collection getLeftTuples() {
- return lts != null ? lts : Collections.emptyList();
+ public Collection getTuples() {
+ return tuples != null ? tuples : Collections.emptyList();
}
protected void notifyModification() {
@@ -42,7 +45,7 @@ protected void notifyModification() {
}
@Override
- public void removeLeftTuple(Tuple leftTuple) {
- lts.remove(leftTuple);
+ public void removeTuple(BaseTuple tuple) {
+ tuples.remove(tuple);
}
}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/BuildtimeSegmentUtilities.java b/drools-core/src/main/java/org/drools/core/phreak/BuildtimeSegmentUtilities.java
index 77347346194..ab794a071bc 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/BuildtimeSegmentUtilities.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/BuildtimeSegmentUtilities.java
@@ -1,25 +1,28 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.ArrayList;
import java.util.List;
-import org.drools.core.common.NetworkNode;
-import org.drools.core.impl.RuleBase;
+import org.drools.base.common.NetworkNode;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.AsyncReceiveNode;
import org.drools.core.reteoo.AsyncSendNode;
import org.drools.core.reteoo.BetaNode;
@@ -32,7 +35,7 @@
import org.drools.core.reteoo.LeftTupleSinkNode;
import org.drools.core.reteoo.LeftTupleSinkPropagator;
import org.drools.core.reteoo.LeftTupleSource;
-import org.drools.core.reteoo.NodeTypeEnums;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.reteoo.NotNode;
import org.drools.core.reteoo.PathEndNode;
import org.drools.core.reteoo.PathEndNode.PathMemSpec;
@@ -116,7 +119,7 @@ public static long getPathAllLinkedMaskTest(SegmentPrototype[] smems, PathEndNod
return allLinkedMaskTest;
}
- public static SegmentPrototype[] createPathProtoMemories(TerminalNode tn, TerminalNode removingTn, RuleBase rbase) {
+ public static SegmentPrototype[] createPathProtoMemories(TerminalNode tn, TerminalNode removingTn, InternalRuleBase rbase) {
// Will initialise all segments in a path
SegmentPrototype[] smems = createLeftTupleNodeProtoMemories(tn, removingTn, rbase);
@@ -128,7 +131,7 @@ public static SegmentPrototype[] createPathProtoMemories(TerminalNode tn, Termin
return smems;
}
- public static SegmentPrototype[] createLeftTupleNodeProtoMemories(LeftTupleNode lts, TerminalNode removingTn, RuleBase rbase) {
+ public static SegmentPrototype[] createLeftTupleNodeProtoMemories(LeftTupleNode lts, TerminalNode removingTn, InternalRuleBase rbase) {
LeftTupleNode segmentRoot = lts;
LeftTupleNode segmentTip = lts;
List smems = new ArrayList<>();
@@ -187,7 +190,7 @@ static LeftTupleNode getFirstConditionalBranchNode(LeftTupleNode tupleSource) {
/**
* Initialises the NodeSegment memory for all nodes in the segment.
*/
- public static SegmentPrototype createSegmentMemory(LeftTupleNode segmentRoot, LeftTupleNode segmentTip, int recordBefore, TerminalNode removingTn, RuleBase rbase) {
+ public static SegmentPrototype createSegmentMemory(LeftTupleNode segmentRoot, LeftTupleNode segmentTip, int recordBefore, TerminalNode removingTn, InternalRuleBase rbase) {
LeftTupleNode node = segmentRoot;
int nodeTypesInSegment = 0;
@@ -351,7 +354,7 @@ private static long processLiaNode(LeftInputAdapterNode tupleSource, List memories, List nodes,
- long nodePosMask, long allLinkedTestMask, boolean updateNodeBit, TerminalNode removingTn, RuleBase rbase) {
+ long nodePosMask, long allLinkedTestMask, boolean updateNodeBit, TerminalNode removingTn, InternalRuleBase rbase) {
RightInputAdapterNode riaNode = null;
if (betaNode.isRightInputIsRiaNode()) {
// there is a subnetwork, so create all it's segment memory prototypes
diff --git a/drools-core/src/main/java/org/drools/core/phreak/EagerPhreakBuilder.java b/drools-core/src/main/java/org/drools/core/phreak/EagerPhreakBuilder.java
index ff1145fd724..c77f8674551 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/EagerPhreakBuilder.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/EagerPhreakBuilder.java
@@ -1,41 +1,35 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Objects;
-import java.util.Set;
-import java.util.stream.Collectors;
-
+import org.drools.base.common.NetworkNode;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.WorkingMemory;
-import org.drools.core.common.EventFactHandle;
+import org.drools.core.common.DefaultEventHandle;
import org.drools.core.common.InternalAgenda;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.InternalWorkingMemory;
import org.drools.core.common.Memory;
-import org.drools.core.common.NetworkNode;
import org.drools.core.common.PropagationContext;
import org.drools.core.common.PropagationContextFactory;
import org.drools.core.common.TupleSets;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.AccumulateNode.AccumulateContext;
import org.drools.core.reteoo.AccumulateNode.AccumulateMemory;
import org.drools.core.reteoo.AlphaTerminalNode;
@@ -47,11 +41,9 @@
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleNode;
import org.drools.core.reteoo.LeftTupleSinkNode;
-import org.drools.core.reteoo.NodeTypeEnums;
import org.drools.core.reteoo.ObjectSink;
import org.drools.core.reteoo.ObjectSource;
import org.drools.core.reteoo.ObjectTypeNode;
-import org.drools.core.reteoo.ObjectTypeNode.ObjectTypeNodeMemory;
import org.drools.core.reteoo.PathEndNode;
import org.drools.core.reteoo.PathEndNode.PathMemSpec;
import org.drools.core.reteoo.PathMemory;
@@ -71,6 +63,16 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Collectors;
+
import static org.drools.core.phreak.BuildtimeSegmentUtilities.isAssociatedWith;
public class EagerPhreakBuilder implements PhreakBuilder {
@@ -82,7 +84,7 @@ public class EagerPhreakBuilder implements PhreakBuilder {
* For add tuples are processed after the segments and pmems have been adjusted
*/
@Override
- public void addRule(TerminalNode tn, Collection wms, RuleBase kBase) {
+ public void addRule(TerminalNode tn, Collection wms, InternalRuleBase kBase) {
if (log.isTraceEnabled()) {
log.trace("Adding Rule {}", tn.getRule().getName());
}
@@ -125,7 +127,7 @@ public void addRule(TerminalNode tn, Collection wms, Rule
* Note the
*/
@Override
- public void removeRule(TerminalNode tn, Collection wms, RuleBase kBase) {
+ public void removeRule(TerminalNode tn, Collection wms, InternalRuleBase kBase) {
if (log.isTraceEnabled()) {
log.trace("Removing Rule {}", tn.getRule().getName());
}
@@ -268,7 +270,7 @@ public static void insertLiaFacts(LeftTupleNode startNode, InternalWorkingMemory
}
}
- public static SegmentPrototype processSplit(LeftTupleNode splitNode, RuleBase kbase, Collection wms, Set smemsToNotify) {
+ public static SegmentPrototype processSplit(LeftTupleNode splitNode, InternalRuleBase kbase, Collection wms, Set smemsToNotify) {
LeftTupleNode segmentRoot = BuildtimeSegmentUtilities.findSegmentRoot(splitNode);
SegmentPrototype proto1 = kbase.getSegmentPrototype(segmentRoot);
if ( proto1.getTipNode() != splitNode) {
@@ -390,7 +392,7 @@ public static void splitSegment(InternalWorkingMemory wm, SegmentMemory sm1, Seg
notifyImpactedSegments(sm2, wm, smemsToNotify);
}
- public static SegmentPrototype splitSegment(SegmentPrototype proto1, LeftTupleNode splitNode, RuleBase kbase, Collection wms, Set smemsToNotify) {
+ public static SegmentPrototype splitSegment(SegmentPrototype proto1, LeftTupleNode splitNode, InternalRuleBase kbase, Collection wms, Set smemsToNotify) {
boolean proto1WasEager = proto1.requiresEager();
// Create the new segment proto
@@ -529,7 +531,7 @@ private static void splitBitMasks(SegmentPrototype sm1, SegmentPrototype sm2) {
private static void addNewPaths(List exclBranchRoots, TerminalNode tn,
- Collection wms, RuleBase kBase,
+ Collection wms, InternalRuleBase kBase,
Set smemsToNotify) {
// create protos
BuildtimeSegmentUtilities.createPathProtoMemories(tn, null, kBase);
@@ -619,7 +621,7 @@ public static boolean isInsideSubnetwork(PathEndNode endNode, SegmentPrototype s
}
public static class Remove {
- private static void removeExistingPaths(List exclBranchRoots, TerminalNode tn, Collection wms, RuleBase kbase) {
+ private static void removeExistingPaths(List exclBranchRoots, TerminalNode tn, Collection wms, InternalRuleBase kbase) {
// update existing SegmentProtos (before removing path branch root) to remove EndNodes
// for nodes after, just remove them from the cache
for ( PathEndNode endNode : tn.getPathEndNodes() ) {
@@ -717,7 +719,7 @@ private static void removeExistingPaths(List exclBranchRoots, TerminalNode
}
- private static void processMerges(LeftTupleNode splitNode, TerminalNode tn, RuleBase kBase, Collection wms, Set visited, Set smemsToNotify) {
+ private static void processMerges(LeftTupleNode splitNode, TerminalNode tn, InternalRuleBase kBase, Collection wms, Set visited, Set smemsToNotify) {
// it's possible for a rule to have multiple exclBranches, pointing to the same parent. So need to ensure it's processed once.
if ( !visited.add(splitNode.getId())) {
return;
@@ -753,7 +755,7 @@ private static void processMerges(LeftTupleNode splitNode, TerminalNode tn, Rule
}
}
- public static void mergeSegments(SegmentPrototype proto1, SegmentPrototype proto2, RuleBase kbase, Collection wms) {
+ public static void mergeSegments(SegmentPrototype proto1, SegmentPrototype proto2, InternalRuleBase kbase, Collection wms) {
boolean proto2WasEager = proto2.requiresEager();
LeftTupleNode[] origNodes = proto1.getNodesInSegment();
@@ -870,10 +872,10 @@ private static void mergeSegment(SegmentPrototype proto1, Memory m1, SegmentProt
sm1.setNodeMemories(mems);
- mergeSegment(sm1, sm2, proto1, origNodes, wm);
+ mergeSegment(sm1, sm2, proto1, origNodes);
}
- private static void mergeSegment(SegmentMemory sm1, SegmentMemory sm2, SegmentPrototype proto1, LeftTupleNode[] origNodes, InternalWorkingMemory wm) {
+ private static void mergeSegment(SegmentMemory sm1, SegmentMemory sm2, SegmentPrototype proto1, LeftTupleNode[] origNodes) {
if (sm1.getTipNode().getType() == NodeTypeEnums.LeftInputAdapterNode && !sm2.getStagedLeftTuples().isEmpty()) {
// If a rule has not been linked, lia can still have child segments with staged tuples that did not get flushed
// these are safe to just move to the parent SegmentMemory
@@ -983,7 +985,7 @@ private static void deleteFactsFromRightInput(BetaNode bn, InternalWorkingMemory
if (source instanceof WindowNode) {
WindowNode.WindowMemory memory = (WindowNode.WindowMemory) wm.getNodeMemories().peekNodeMemory(source);
if (memory != null) {
- for (EventFactHandle factHandle : memory.getFactHandles()) {
+ for (DefaultEventHandle factHandle : memory.getFactHandles()) {
factHandle.forEachRightTuple(rt -> {
if (source.equals(rt.getTupleSink())) {
rt.unlinkFromRightParent();
@@ -1065,7 +1067,7 @@ private static void processLeftTuples(LeftTupleNode node, boolean insert, Termin
Tuple lt = BetaNode.getFirstTuple(bm.getLeftTupleMemory(), it);
for (; lt != null; lt = (LeftTuple) it.next(lt)) {
AccumulateContext accctx = (AccumulateContext) lt.getContextObject();
- visitChild(accctx.getResultLeftTuple(), insert, wm, tn);
+ visitChild((LeftTuple) accctx.getResultLeftTuple(), insert, wm, tn);
}
} else if (NodeTypeEnums.ExistsNode == node.getType() &&
!((BetaNode) node).isRightInputIsRiaNode()) { // do not process exists with subnetworks
@@ -1116,10 +1118,9 @@ private static void processLeftTuplesOnLian( InternalWorkingMemory wm, boolean i
while (os.getType() != NodeTypeEnums.ObjectTypeNode) {
os = os.getParentObjectSource();
}
- ObjectTypeNode otn = (ObjectTypeNode) os;
- final ObjectTypeNodeMemory omem = wm.getNodeMemory(otn); // For some reason cannot move this to peek, as TruthMaintenanceTEst.testLogicalInsertionsDynamicRule fails
- Iterator it = omem.iterator();
+ ObjectTypeNode otn = (ObjectTypeNode) os;
+ Iterator it = otn.getFactHandlesIterator(wm);
while (it.hasNext()) {
InternalFactHandle fh = it.next();
fh.forEachLeftTuple( lt -> {
@@ -1153,7 +1154,7 @@ private static void visitChild(InternalWorkingMemory wm, boolean insert, Termina
private static void visitChild(LeftTuple lt, boolean insert, InternalWorkingMemory wm, TerminalNode tn) {
LeftTuple prevLt = null;
- LeftTupleSinkNode sink = lt.getTupleSink();
+ LeftTupleSinkNode sink = (LeftTupleSinkNode) lt.getTupleSink();
for ( ; sink != null; sink = sink.getNextLeftTupleSinkNode() ) {
if ( lt != null ) {
@@ -1192,10 +1193,10 @@ private static void visitChild(LeftTuple lt, boolean insert, InternalWorkingMemo
}
}
- private static void insertPeerRightTuple( LeftTuple lt, InternalWorkingMemory wm, TerminalNode tn, boolean insert ) {
+ private static void insertPeerRightTuple(LeftTuple lt, InternalWorkingMemory wm, TerminalNode tn, boolean insert ) {
// There's a shared RightInputAdapterNode, so check if one of its sinks is associated only to the new rule
LeftTuple prevLt = null;
- RightInputAdapterNode rian = lt.getTupleSink();
+ RightInputAdapterNode rian = (RightInputAdapterNode) lt.getTupleSink();
for (ObjectSink sink : rian.getObjectSinkPropagator().getSinks()) {
if (lt != null) {
@@ -1259,7 +1260,7 @@ private static void iterateLeftTuple(LeftTuple lt, InternalWorkingMemory wm) {
}
} else {
if (lt.getContextObject() instanceof AccumulateContext) {
- LeftTuple resultLt = (( AccumulateContext ) lt.getContextObject()).getResultLeftTuple();
+ LeftTuple resultLt = (LeftTuple) (( AccumulateContext ) lt.getContextObject()).getResultLeftTuple();
if (resultLt != null) {
iterateLeftTuple( resultLt, wm );
}
@@ -1296,7 +1297,7 @@ static void deleteLeftTuple(LeftTuple removingLt, LeftTuple removingLt2, LeftTup
return;
}
- InternalFactHandle fh = removingLt.getFactHandle();
+ InternalFactHandle fh = (InternalFactHandle) removingLt.getFactHandle();
// This is the first LT in a peer chain. Only this LT is hooked into the left and right parent LT and RT and
// if it's the root (form the lian) it will be hooked itno the FH.
@@ -1306,7 +1307,7 @@ static void deleteLeftTuple(LeftTuple removingLt, LeftTuple removingLt2, LeftTup
LeftTuple rightPrevious = removingLt.getRightParentPrevious();
LeftTuple rightNext = removingLt.getRightParentNext();
- LeftTuple leftParent = removingLt.getLeftParent();
+ LeftTuple leftParent = removingLt.getLeftParent();
RightTuple rightParent = removingLt.getRightParent();
// This tuple is the first peer and thus is linked into the left parent LT.
diff --git a/drools-core/src/main/java/org/drools/core/phreak/ExecutableEntry.java b/drools-core/src/main/java/org/drools/core/phreak/ExecutableEntry.java
index f8ed67b5ef6..2ba0bb63bcd 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/ExecutableEntry.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/ExecutableEntry.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
public interface ExecutableEntry {
diff --git a/drools-core/src/main/java/org/drools/core/phreak/LazyPhreakBuilder.java b/drools-core/src/main/java/org/drools/core/phreak/LazyPhreakBuilder.java
index 4866eb62b68..418dbf4d7fb 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/LazyPhreakBuilder.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/LazyPhreakBuilder.java
@@ -1,32 +1,26 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.drools.core.common.EventFactHandle;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.reteoo.NodeTypeEnums;
+import org.drools.core.common.DefaultEventHandle;
import org.drools.core.common.InternalAgenda;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.InternalWorkingMemory;
@@ -36,8 +30,7 @@
import org.drools.core.common.PropagationContextFactory;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.TupleSets;
-import org.drools.core.definitions.rule.impl.RuleImpl;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.AbstractTerminalNode;
import org.drools.core.reteoo.AccumulateNode;
import org.drools.core.reteoo.AccumulateNode.AccumulateContext;
@@ -58,11 +51,9 @@
import org.drools.core.reteoo.LeftTupleSink;
import org.drools.core.reteoo.LeftTupleSinkNode;
import org.drools.core.reteoo.LeftTupleSource;
-import org.drools.core.reteoo.NodeTypeEnums;
import org.drools.core.reteoo.ObjectSink;
import org.drools.core.reteoo.ObjectSource;
import org.drools.core.reteoo.ObjectTypeNode;
-import org.drools.core.reteoo.ObjectTypeNode.ObjectTypeNodeMemory;
import org.drools.core.reteoo.PathEndNode;
import org.drools.core.reteoo.PathMemory;
import org.drools.core.reteoo.QueryElementNode;
@@ -82,6 +73,16 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
import static org.drools.core.phreak.BuildtimeSegmentUtilities.JOIN_NODE_BIT;
import static org.drools.core.phreak.BuildtimeSegmentUtilities.NOT_NODE_BIT;
import static org.drools.core.phreak.BuildtimeSegmentUtilities.REACTIVE_EXISTS_NODE_BIT;
@@ -106,7 +107,7 @@ class LazyPhreakBuilder implements PhreakBuilder {
* For add tuples are processed after the segments and pmems have been adjusted
*/
@Override
- public void addRule(TerminalNode tn, Collection wms, RuleBase kBase) {
+ public void addRule(TerminalNode tn, Collection wms, InternalRuleBase kBase) {
if (log.isTraceEnabled()) {
log.trace("Adding Rule {}", tn.getRule().getName());
}
@@ -166,7 +167,7 @@ public void addRule(TerminalNode tn, Collection wms, Rule
* For remove tuples are processed before the segments and pmems have been adjusted
*/
@Override
- public void removeRule( TerminalNode tn, Collection wms, RuleBase kBase) {
+ public void removeRule( TerminalNode tn, Collection wms, InternalRuleBase kBase) {
if (log.isTraceEnabled()) {
log.trace("Removing Rule {}", tn.getRule().getName());
}
@@ -772,7 +773,7 @@ private static void deleteFactsFromRightInput(BetaNode bn, InternalWorkingMemory
ObjectSource source = bn.getRightInput();
if (source instanceof WindowNode) {
WindowNode.WindowMemory memory = wm.getNodeMemory(((WindowNode) source));
- for (EventFactHandle factHandle : memory.getFactHandles()) {
+ for (DefaultEventHandle factHandle : memory.getFactHandles()) {
factHandle.forEachRightTuple( rt -> {
if (source.equals(rt.getTupleSink())) {
rt.unlinkFromRightParent();
@@ -827,26 +828,25 @@ private static void processLeftTuples(LeftTupleNode node, InternalWorkingMemory
Tuple lt = BetaNode.getFirstTuple(bm.getLeftTupleMemory(), it);
for (; lt != null; lt = (LeftTuple) it.next(lt)) {
AccumulateContext accctx = (AccumulateContext) lt.getContextObject();
- visitChild(accctx.getResultLeftTuple(), insert, wm, rule);
+ visitChild( (LeftTuple) accctx.getResultLeftTuple(), insert, wm, rule);
}
- } else if (NodeTypeEnums.ExistsNode == node.getType() &&
- !((BetaNode)node).isRightInputIsRiaNode()) { // do not process exists with subnetworks
+ } else if (NodeTypeEnums.ExistsNode == node.getType() && !node.isRightInputIsRiaNode()) { // do not process exists with subnetworks
// If there is a subnetwork, then there is no populated RTM, but the LTM is populated,
- // so this would be procsssed in the "else".
+ // so this would be processed in the "else".
bm = (BetaMemory) wm.getNodeMemory((MemoryFactory) node);
FastIterator it = bm.getRightTupleMemory().fullFastIterator(); // done off the RightTupleMemory, as exists only have unblocked tuples on the left side
- RightTuple rt = (RightTuple) BetaNode.getFirstTuple(bm.getRightTupleMemory(), it);
- for (; rt != null; rt = (RightTuple) it.next(rt)) {
+ for (RightTuple rt = (RightTuple) BetaNode.getFirstTuple(bm.getRightTupleMemory(), it); rt != null; rt = (RightTuple) it.next(rt)) {
for (LeftTuple lt = rt.getBlocked(); lt != null; lt = lt.getBlockedNext()) {
- visitChild(wm, insert, rule, it, lt);
+ visitLeftTuple(wm, insert, rule, lt);
}
}
} else {
bm = (BetaMemory) wm.getNodeMemory((MemoryFactory) node);
FastIterator it = bm.getLeftTupleMemory().fullFastIterator();
- Tuple lt = BetaNode.getFirstTuple(bm.getLeftTupleMemory(), it);
- visitChild(wm, insert, rule, it, lt);
+ for (LeftTuple lt = (LeftTuple)BetaNode.getFirstTuple(bm.getLeftTupleMemory(), it); lt != null; lt = (LeftTuple) it.next(lt)) {
+ visitLeftTuple(wm, insert, rule, lt);
+ }
}
return;
} else if (NodeTypeEnums.FromNode == node.getType()) {
@@ -874,14 +874,9 @@ private static void processLeftTuplesOnLian( InternalWorkingMemory wm, boolean i
while (os.getType() != NodeTypeEnums.ObjectTypeNode) {
os = os.getParentObjectSource();
}
- ObjectTypeNode otn = (ObjectTypeNode) os;
- final ObjectTypeNodeMemory omem = wm.getNodeMemory(otn);
- if (omem == null) {
- // no OTN memory yet, i.e. no inserted matching objects, so no Tuples to process
- return;
- }
- Iterator it = omem.iterator();
+ ObjectTypeNode otn = (ObjectTypeNode) os;
+ Iterator it = otn.getFactHandlesIterator(wm);
while (it.hasNext()) {
InternalFactHandle fh = it.next();
fh.forEachLeftTuple( lt -> {
@@ -891,31 +886,27 @@ private static void processLeftTuplesOnLian( InternalWorkingMemory wm, boolean i
if (lt.getTupleSource().isAssociatedWith(rule)) {
visitChild(lt, insert, wm, rule);
- if (lt.getHandlePrevious() != null) {
+ if (lt.getHandlePrevious() != null && nextLt != null) {
lt.getHandlePrevious().setHandleNext( nextLt );
- if (nextLt != null) {
- nextLt.setHandlePrevious( lt.getHandlePrevious() );
- }
+ nextLt.setHandlePrevious( lt.getHandlePrevious() );
}
}
});
}
}
- private static void visitChild(InternalWorkingMemory wm, boolean insert, Rule rule, FastIterator it, Tuple lt) {
- for (; lt != null; lt = (LeftTuple) it.next(lt)) {
- LeftTuple childLt = lt.getFirstChild();
- while (childLt != null) {
- LeftTuple nextLt = childLt.getHandleNext();
- visitChild(childLt, insert, wm, rule);
- childLt = nextLt;
- }
+ private static void visitLeftTuple(InternalWorkingMemory wm, boolean insert, Rule rule, LeftTuple lt) {
+ LeftTuple childLt = lt.getFirstChild();
+ while (childLt != null) {
+ LeftTuple nextLt = childLt.getHandleNext();
+ visitChild(childLt, insert, wm, rule);
+ childLt = nextLt;
}
}
private static void visitChild(LeftTuple lt, boolean insert, InternalWorkingMemory wm, Rule rule) {
LeftTuple prevLt = null;
- LeftTupleSinkNode sink = lt.getTupleSink();
+ LeftTupleSinkNode sink = (LeftTupleSinkNode) lt.getTupleSink();
for ( ; sink != null; sink = sink.getNextLeftTupleSinkNode() ) {
@@ -958,7 +949,7 @@ private static void visitChild(LeftTuple lt, boolean insert, InternalWorkingMemo
private static void insertPeerRightTuple( LeftTuple lt, InternalWorkingMemory wm, Rule rule, boolean insert ) {
// There's a shared RightInputAdaterNode, so check if one of its sinks is associated only to the new rule
LeftTuple prevLt = null;
- RightInputAdapterNode rian = lt.getTupleSink();
+ RightInputAdapterNode rian = (RightInputAdapterNode) lt.getTupleSink();
for (ObjectSink sink : rian.getObjectSinkPropagator().getSinks()) {
if (lt != null) {
@@ -1020,7 +1011,7 @@ private static void iterateLeftTuple(LeftTuple lt, InternalWorkingMemory wm) {
}
} else {
if (lt.getContextObject() instanceof AccumulateContext) {
- LeftTuple resultLt = (( AccumulateContext ) lt.getContextObject()).getResultLeftTuple();
+ LeftTuple resultLt = (LeftTuple) (( AccumulateContext ) lt.getContextObject()).getResultLeftTuple();
if (resultLt != null) {
iterateLeftTuple( resultLt, wm );
}
@@ -1260,7 +1251,7 @@ private static class PathEndNodeMemories {
List otherPmems = new ArrayList<>();
}
- private static PathEndNodes getPathEndNodes(RuleBase kBase,
+ private static PathEndNodes getPathEndNodes(InternalRuleBase kBase,
LeftTupleNode lt,
TerminalNode tn,
Rule processedRule,
@@ -1283,7 +1274,7 @@ private static PathEndNodes getPathEndNodes(RuleBase kBase,
return endNodes;
}
- private static void collectPathEndNodes(RuleBase kBase,
+ private static void collectPathEndNodes(InternalRuleBase kBase,
LeftTupleNode lt,
PathEndNodes endNodes,
TerminalNode tn,
@@ -1332,7 +1323,7 @@ private static void collectPathEndNodes(RuleBase kBase,
}
}
- private static void invalidateRootNode( RuleBase kBase, LeftTupleNode lt ) {
+ private static void invalidateRootNode(InternalRuleBase kBase, LeftTupleNode lt) {
while (!isRootNode( lt, null )) {
lt = lt.getLeftTupleSource();
}
@@ -1502,7 +1493,7 @@ private static SegmentMemory createSegmentMemory(LeftTupleSource segmentRoot, Re
private static boolean processQueryNode(QueryElementNode queryNode, ReteEvaluator reteEvaluator, LeftTupleSource segmentRoot, SegmentMemory smem, List memories, long nodePosMask) {
// Initialize the QueryElementNode and have it's memory reference the actual query SegmentMemory
- SegmentMemory querySmem = getQuerySegmentMemory(reteEvaluator, segmentRoot, queryNode);
+ SegmentMemory querySmem = getQuerySegmentMemory(reteEvaluator, queryNode);
QueryElementNode.QueryElementNodeMemory queryNodeMem = smem.createNodeMemory(queryNode, reteEvaluator);
queryNodeMem.setNodePosMaskBit(nodePosMask);
queryNodeMem.setQuerySegmentMemory(querySmem);
@@ -1655,7 +1646,7 @@ private static int updateRiaAndTerminalMemory( LeftTupleSource lt,
}
} else if (NodeTypeEnums.isTerminalNode(sink)) {
- pmem = (PathMemory) reteEvaluator.getNodeMemory((MemoryFactory) sink);
+ pmem = reteEvaluator.getNodeMemory((AbstractTerminalNode) sink);
}
if (pmem != null && smem.getPos() < pmem.getSegmentMemories().length) {
diff --git a/drools-core/src/main/java/org/drools/core/phreak/LeftTupleEntry.java b/drools-core/src/main/java/org/drools/core/phreak/LeftTupleEntry.java
index 98729699863..eecff317b6f 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/LeftTupleEntry.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/LeftTupleEntry.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.Memory;
@@ -22,7 +25,7 @@
import org.drools.core.common.PropagationContext;
public class LeftTupleEntry implements TupleEntry {
- private final LeftTuple lt;
+ private final LeftTuple lt;
private final PropagationContext pctx;
private final Memory nodeMemory;
private final int propagationType;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakAccumulateNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakAccumulateNode.java
index 1edc85f1faf..e350f760052 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakAccumulateNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakAccumulateNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.BetaConstraints;
@@ -22,21 +25,23 @@
import org.drools.core.common.TupleSetsImpl;
import org.drools.core.reteoo.AccumulateNode;
import org.drools.core.reteoo.AccumulateNode.AccumulateContext;
-import org.drools.core.reteoo.AccumulateNode.AccumulateContextEntry;
+import org.drools.base.reteoo.AccumulateContextEntry;
import org.drools.core.reteoo.AccumulateNode.AccumulateMemory;
import org.drools.core.reteoo.AccumulateNode.BaseAccumulation;
import org.drools.core.reteoo.BetaMemory;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleSink;
import org.drools.core.reteoo.RightTuple;
+import org.drools.core.reteoo.RightTupleImpl;
import org.drools.core.reteoo.TupleMemory;
-import org.drools.core.rule.Accumulate;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
+import org.drools.base.rule.Accumulate;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
import org.drools.core.common.PropagationContext;
import org.drools.core.reteoo.Tuple;
import org.drools.core.util.AbstractHashTable;
import org.drools.core.util.FastIterator;
+import org.kie.api.runtime.rule.FactHandle;
import static org.drools.core.phreak.RuleNetworkEvaluator.normalizeStagedTuples;
@@ -169,8 +174,8 @@ private void doLeftInserts(AccumulateNode accNode,
FastIterator rightIt = accNode.getRightIterator(rtm);
- for (RightTuple rightTuple = accNode.getFirstRightTuple(leftTuple, rtm, rightIt); rightTuple != null; ) {
- RightTuple nextRightTuple = (RightTuple) rightIt.next(rightTuple);
+ for (RightTupleImpl rightTuple = accNode.getFirstRightTuple(leftTuple, rtm, rightIt); rightTuple != null; ) {
+ RightTupleImpl nextRightTuple = (RightTupleImpl) rightIt.next(rightTuple);
if (constraints.isAllowedCachedLeft(contextEntry,
rightTuple.getFactHandleForEvaluation())) {
@@ -573,8 +578,8 @@ private void doLeftDeletes(AccumulateNode accNode,
protected void propagateDelete( TupleSets trgLeftTuples, TupleSets stagedLeftTuples, Object accPropCtx ) {
AccumulateContextEntry entry = (AccumulateContextEntry) accPropCtx;
if ( entry.isPropagated() ) {
- normalizeStagedTuples( stagedLeftTuples, entry.getResultLeftTuple() );
- trgLeftTuples.addDelete( entry.getResultLeftTuple() );
+ normalizeStagedTuples( stagedLeftTuples, (LeftTuple) entry.getResultLeftTuple() );
+ trgLeftTuples.addDelete( (LeftTuple) entry.getResultLeftTuple() );
}
}
@@ -642,7 +647,7 @@ protected final void propagateResult(AccumulateNode accNode, LeftTupleSink sink,
if ( !allowNullPropagation && result == null) {
if ( accPropCtx.isPropagated()) {
// retract
- trgLeftTuples.addDelete( accPropCtx.getResultLeftTuple());
+ trgLeftTuples.addDelete( (LeftTuple) accPropCtx.getResultLeftTuple());
accPropCtx.setPropagated( false );
}
return;
@@ -653,7 +658,7 @@ protected final void propagateResult(AccumulateNode accNode, LeftTupleSink sink,
accPropCtx.setResultFactHandle(handle);
accPropCtx.setResultLeftTuple( sink.createLeftTuple(handle, leftTuple, sink ));
} else {
- accPropCtx.getResultFactHandle().setObject( createResult(accNode, key, result) );
+ ((InternalFactHandle)accPropCtx.getResultFactHandle()).setObject( createResult(accNode, key, result) );
}
// First alpha node filters
@@ -675,7 +680,7 @@ protected final void propagateResult(AccumulateNode accNode, LeftTupleSink sink,
}
- LeftTuple childLeftTuple = accPropCtx.getResultLeftTuple();
+ LeftTuple childLeftTuple = (LeftTuple) accPropCtx.getResultLeftTuple();
childLeftTuple.setPropagationContext( propagationContext != null ? propagationContext : leftTuple.getPropagationContext() );
if ( accPropCtx.isPropagated()) {
@@ -712,7 +717,7 @@ private void addMatch(final AccumulateNode accNode,
final boolean useLeftMemory,
final boolean leftPropagation) {
LeftTuple tuple = leftTuple;
- InternalFactHandle handle = rightTuple.getFactHandle();
+ InternalFactHandle handle = (InternalFactHandle) rightTuple.getFactHandle();
if (accNode.isRightInputIsRiaNode()) {
// if there is a subnetwork, handle must be unwrapped
@@ -767,7 +772,7 @@ private boolean removeMatch(final AccumulateNode accNode,
match.unlinkFromRightParent();
// if there is a subnetwork, we need to unwrap the object from inside the tuple
- InternalFactHandle handle = rightTuple.getFactHandle();
+ FactHandle handle = rightTuple.getFactHandle();
LeftTuple tuple = leftParent;
if (accNode.isRightInputIsRiaNode()) {
tuple = (LeftTuple) rightTuple;
@@ -779,7 +784,6 @@ private boolean removeMatch(final AccumulateNode accNode,
accctx,
tuple,
handle,
- rightParent,
match,
reteEvaluator);
if (!reversed) {
@@ -813,7 +817,7 @@ protected void reaccumulateForLeftTuple(final AccumulateNode accNode,
for (LeftTuple childMatch = leftParent.getFirstChild(); childMatch != null; childMatch = childMatch.getHandleNext()) {
RightTuple rightTuple = childMatch.getRightParent();
- InternalFactHandle childHandle = rightTuple.getFactHandle();
+ FactHandle childHandle = rightTuple.getFactHandle();
LeftTuple tuple = leftParent;
if (accNode.isRightInputIsRiaNode()) {
// if there is a subnetwork, handle must be unwrapped
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakAsyncReceiveNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakAsyncReceiveNode.java
index c4afccb4938..1ad8fed76da 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakAsyncReceiveNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakAsyncReceiveNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.BetaConstraints;
@@ -23,7 +26,7 @@
import org.drools.core.reteoo.AsyncReceiveNode.AsyncReceiveMemory;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleSink;
-import org.drools.core.rule.ContextEntry;
+import org.drools.base.rule.ContextEntry;
import org.drools.core.util.index.TupleList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -70,7 +73,7 @@ private static void doPropagateChildLeftTuples(AsyncReceiveNode node,
ContextEntry[] context = betaConstraints.createContext();
TupleList leftTuples = memory.getInsertOrUpdateLeftTuples();
- for ( LeftTuple leftTuple = (LeftTuple) leftTuples.getFirst(); leftTuple != null; leftTuple = ( LeftTuple ) leftTuple.getNext() ) {
+ for ( LeftTuple leftTuple = (LeftTuple) leftTuples.getFirst(); leftTuple != null; leftTuple = (LeftTuple) leftTuple.getNext() ) {
betaConstraints.updateFromTuple(context, reteEvaluator, leftTuple);
@@ -78,7 +81,7 @@ private static void doPropagateChildLeftTuples(AsyncReceiveNode node,
InternalFactHandle factHandle = reteEvaluator.getFactHandleFactory().newFactHandle( message, node.getObjectTypeConf( reteEvaluator ), reteEvaluator, null );
if ( isAllowed( factHandle, node.getAlphaConstraints(), reteEvaluator ) ) {
if (betaConstraints.isAllowedCachedLeft(context, factHandle)) {
- LeftTuple childLeftTuple = sink.createLeftTuple( factHandle, leftTuple, sink );
+ LeftTuple childLeftTuple = sink.createLeftTuple(factHandle, leftTuple, sink );
childLeftTuple.setPropagationContext( leftTuple.getPropagationContext() );
trgLeftTuples.addInsert( childLeftTuple );
}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakAsyncSendNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakAsyncSendNode.java
index 7675e7f087d..5c79b3b5383 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakAsyncSendNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakAsyncSendNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.LinkedHashMap;
@@ -28,9 +31,9 @@
import org.drools.core.reteoo.AsyncSendNode.AsyncSendMemory;
import org.drools.core.reteoo.BetaMemory;
import org.drools.core.reteoo.LeftTuple;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
-import org.drools.core.rule.accessor.DataProvider;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
+import org.drools.base.rule.accessor.DataProvider;
import org.drools.core.common.PropagationContext;
import org.kie.internal.concurrent.ExecutorProviderFactory;
@@ -92,12 +95,11 @@ public void doLeftInserts(AsyncSendNode node,
betaConstraints.resetTuple(context);
}
- private void fetchAndSendResults( AsyncSendNode node, AsyncSendMemory memory, ReteEvaluator reteEvaluator,
- ContextEntry[] context, BetaConstraints betaConstraints, AlphaNodeFieldConstraint[] alphaConstraints,
- DataProvider dataProvider, Class> resultClass, LeftTuple leftTuple, PropagationContext propagationContext ) {
+ private void fetchAndSendResults(AsyncSendNode node, AsyncSendMemory memory, ReteEvaluator reteEvaluator,
+ ContextEntry[] context, BetaConstraints betaConstraints, AlphaNodeFieldConstraint[] alphaConstraints,
+ DataProvider dataProvider, Class> resultClass, LeftTuple leftTuple, PropagationContext propagationContext ) {
for (final java.util.Iterator> it = dataProvider.getResults(leftTuple,
reteEvaluator,
- propagationContext,
memory.providerContext); it.hasNext(); ) {
final Object object = it.next();
if ( (object == null) || !resultClass.isAssignableFrom( object.getClass() ) ) {
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakBranchNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakBranchNode.java
index 3e9508b1254..7d4eefe156b 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakBranchNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakBranchNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.ActivationsManager;
@@ -112,7 +115,7 @@ public void doLeftUpdates(ConditionalBranchNode branchNode,
RuleTerminalNode oldRtn = null;
if (branchTuples.rtnLeftTuple != null) {
- oldRtn = branchTuples.rtnLeftTuple.getTupleSink();
+ oldRtn = (RuleTerminalNode) branchTuples.rtnLeftTuple.getTupleSink();
}
ConditionalExecution conditionalExecution = branchEvaluator.evaluate(leftTuple, activationsManager.getReteEvaluator(), cbm.context);
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakBuilder.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakBuilder.java
index a1e5ce39cfe..b2db030c71a 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakBuilder.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakBuilder.java
@@ -1,24 +1,27 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
import java.util.Collection;
import org.drools.core.common.InternalWorkingMemory;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.reteoo.TerminalNode;
import static org.drools.util.Config.getConfig;
@@ -33,8 +36,8 @@ static boolean isEagerSegmentCreation() {
return Holder.EAGER_SEGMENT_CREATION;
}
- void addRule(TerminalNode tn, Collection wms, RuleBase kBase);
- void removeRule(TerminalNode tn, Collection wms, RuleBase kBase);
+ void addRule(TerminalNode tn, Collection wms, InternalRuleBase kBase);
+ void removeRule(TerminalNode tn, Collection wms, InternalRuleBase kBase);
class Holder {
private static final boolean EAGER_SEGMENT_CREATION = Boolean.parseBoolean(getConfig("drools.useEagerSegmentCreation", "false"));
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakEvalNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakEvalNode.java
index e32bffc23c8..f062cbf8072 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakEvalNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakEvalNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.ReteEvaluator;
@@ -21,7 +24,7 @@
import org.drools.core.reteoo.EvalConditionNode.EvalMemory;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleSink;
-import org.drools.core.rule.EvalCondition;
+import org.drools.base.rule.EvalCondition;
import static org.drools.core.phreak.RuleNetworkEvaluator.normalizeStagedTuples;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakExistsNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakExistsNode.java
index e17b22eff69..dbd0714b2d2 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakExistsNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakExistsNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.BetaConstraints;
@@ -24,7 +27,7 @@
import org.drools.core.reteoo.LeftTupleSink;
import org.drools.core.reteoo.RightTuple;
import org.drools.core.reteoo.TupleMemory;
-import org.drools.core.rule.ContextEntry;
+import org.drools.base.rule.ContextEntry;
import org.drools.core.common.PropagationContext;
import org.drools.core.util.FastIterator;
@@ -158,9 +161,9 @@ public void doRightInserts(ExistsNode existsNode,
reteEvaluator,
rightTuple.getFactHandleForEvaluation() );
- for ( LeftTuple leftTuple = existsNode.getFirstLeftTuple( rightTuple, ltm, it ); leftTuple != null; ) {
+ for ( LeftTuple leftTuple = existsNode.getFirstLeftTuple(rightTuple, ltm, it ); leftTuple != null; ) {
// preserve next now, in case we remove this leftTuple
- LeftTuple temp = (LeftTuple) it.next( leftTuple );
+ LeftTuple temp = (LeftTuple) it.next(leftTuple );
if ( leftTuple.getStagedType() == LeftTuple.UPDATE ) {
// ignore, as it will get processed via left iteration. Children cannot be processed twice
@@ -307,7 +310,7 @@ public void doRightUpdates(ExistsNode existsNode,
if ( ltm != null && ltm.size() > 0 ) {
FastIterator leftIt = existsNode.getLeftIterator( ltm );
- LeftTuple firstLeftTuple = existsNode.getFirstLeftTuple( rightTuple, ltm, leftIt );
+ LeftTuple firstLeftTuple = existsNode.getFirstLeftTuple(rightTuple, ltm, leftIt );
constraints.updateFromFactHandle( contextEntry,
reteEvaluator,
@@ -317,7 +320,7 @@ public void doRightUpdates(ExistsNode existsNode,
// first process non-blocked tuples, as we know only those ones are in the left memory.
for ( LeftTuple leftTuple = firstLeftTuple; leftTuple != null; ) {
// preserve next now, in case we remove this leftTuple
- LeftTuple temp = (LeftTuple) leftIt.next( leftTuple );
+ LeftTuple temp = (LeftTuple) leftIt.next(leftTuple );
if ( leftTuple.getStagedType() == LeftTuple.UPDATE ) {
// ignore, as it will get processed via left iteration. Children cannot be processed twice
@@ -504,7 +507,7 @@ public void doRightDeletes(ExistsNode existsNode,
}
}
- private static void insertChildLeftTuple( LeftTupleSink sink, TupleSets trgLeftTuples, LeftTuple leftTuple, PropagationContext pctx, boolean useLeftMemory ) {
+ private static void insertChildLeftTuple(LeftTupleSink sink, TupleSets trgLeftTuples, LeftTuple leftTuple, PropagationContext pctx, boolean useLeftMemory ) {
if (!leftTuple.isExpired()) {
trgLeftTuples.addInsert( sink.createLeftTuple( leftTuple, sink, pctx, useLeftMemory ) );
}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakFromNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakFromNode.java
index 1d7d714db70..5445933b343 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakFromNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakFromNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.HashMap;
@@ -20,23 +23,25 @@
import java.util.Map;
import org.drools.core.common.BetaConstraints;
-import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.TupleSets;
+import org.drools.core.reteoo.AbstractTuple;
import org.drools.core.reteoo.BetaMemory;
import org.drools.core.reteoo.FromNode;
import org.drools.core.reteoo.FromNode.FromMemory;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleSink;
import org.drools.core.reteoo.RightTuple;
+import org.drools.core.reteoo.RightTupleImpl;
import org.drools.core.reteoo.TupleMemory;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
-import org.drools.core.rule.accessor.DataProvider;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
+import org.drools.base.rule.accessor.DataProvider;
import org.drools.core.common.PropagationContext;
import org.drools.core.reteoo.Tuple;
import org.drools.core.util.FastIterator;
import org.drools.core.util.LinkedList;
+import org.kie.api.runtime.rule.FactHandle;
import static org.drools.core.phreak.PhreakJoinNode.updateChildLeftTuple;
@@ -95,7 +100,6 @@ public void doLeftInserts(FromNode fromNode,
betaConstraints.updateFromTuple(context, reteEvaluator, leftTuple);
for (final java.util.Iterator> it = dataProvider.getResults(leftTuple, reteEvaluator,
- propagationContext,
fm.providerContext); it.hasNext(); ) {
final Object object = it.next();
if ( (object == null) || !resultClass.isAssignableFrom( object.getClass() ) ) {
@@ -139,20 +143,20 @@ public void doLeftUpdates(FromNode fromNode,
PropagationContext propagationContext = leftTuple.getPropagationContext();
- final Map previousMatches = (Map) leftTuple.getContextObject();
- final Map newMatches = new HashMap<>();
+ final Map previousMatches = (Map) leftTuple.getContextObject();
+ final Map newMatches = new HashMap<>();
leftTuple.setContextObject( newMatches );
betaConstraints.updateFromTuple(context, reteEvaluator, leftTuple);
- FastIterator rightIt = LinkedList.fastIterator;
- for (final java.util.Iterator> it = dataProvider.getResults(leftTuple, reteEvaluator, propagationContext, fm.providerContext); it.hasNext(); ) {
+ FastIterator rightIt = LinkedList.fastIterator;
+ for (final java.util.Iterator> it = dataProvider.getResults(leftTuple, reteEvaluator, fm.providerContext); it.hasNext(); ) {
final Object object = it.next();
if ( (object == null) || !resultClass.isAssignableFrom( object.getClass() ) ) {
continue; // skip anything if it not assignable
}
- RightTuple rightTuple = previousMatches.remove(object);
+ RightTupleImpl rightTuple = previousMatches.remove(object);
if (rightTuple == null) {
// new match, propagate assert
@@ -161,8 +165,7 @@ public void doLeftUpdates(FromNode fromNode,
// previous match, so reevaluate and propagate modify
if (rightIt.next(rightTuple) != null) {
// handle the odd case where more than one object has the same hashcode/equals value
- previousMatches.put(object,
- (RightTuple) rightIt.next(rightTuple));
+ previousMatches.put(object, (RightTupleImpl) rightIt.next(rightTuple));
rightTuple.setNext(null);
}
}
@@ -175,8 +178,8 @@ public void doLeftUpdates(FromNode fromNode,
}
}
- for (RightTuple rightTuple : previousMatches.values()) {
- for (RightTuple current = rightTuple; current != null; current = (RightTuple) rightIt.next(current)) {
+ for (RightTupleImpl rightTuple : previousMatches.values()) {
+ for (RightTupleImpl current = rightTuple; current != null; current = (RightTupleImpl) rightIt.next(current)) {
deleteChildLeftTuple(propagationContext, trgLeftTuples, stagedLeftTuples, current.getFirstChild());
}
}
@@ -215,7 +218,7 @@ public void doLeftDeletes(FromMemory fm,
}
}
- public static boolean isAllowed( InternalFactHandle factHandle,
+ public static boolean isAllowed( FactHandle factHandle,
AlphaNodeFieldConstraint[] alphaConstraints,
ReteEvaluator reteEvaluator,
FromMemory fm ) {
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakGroupByNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakGroupByNode.java
index a2d7b5f423e..026a8db31e3 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakGroupByNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakGroupByNode.java
@@ -1,32 +1,36 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
-import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.TupleSets;
import org.drools.core.reteoo.AccumulateNode;
-import org.drools.core.reteoo.AccumulateNode.AccumulateContextEntry;
+import org.drools.base.reteoo.AccumulateContextEntry;
import org.drools.core.reteoo.AccumulateNode.AccumulateMemory;
import org.drools.core.reteoo.AccumulateNode.GroupByContext;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleSink;
import org.drools.core.reteoo.RightTuple;
-import org.drools.core.rule.Accumulate;
+import org.drools.base.rule.Accumulate;
import org.drools.core.common.PropagationContext;
import org.drools.core.util.index.TupleList;
+import org.kie.api.runtime.rule.FactHandle;
public class PhreakGroupByNode extends PhreakAccumulateNode {
@@ -103,8 +107,8 @@ protected void reaccumulateForLeftTuple(final AccumulateNode accNode,
for (LeftTuple childMatch = (LeftTuple) tupleList.getFirst(); childMatch != null; childMatch = (LeftTuple) childMatch.getNext()) {
RightTuple rightTuple = childMatch.getRightParent();
- InternalFactHandle childHandle = rightTuple.getFactHandle();
- LeftTuple tuple = leftTuple;
+ FactHandle childHandle = rightTuple.getFactHandle();
+ LeftTuple tuple = leftTuple;
if (accNode.isRightInputIsRiaNode()) {
// if there is a subnetwork, handle must be unwrapped
tuple = (LeftTuple) rightTuple;
@@ -133,7 +137,7 @@ protected void reaccumulateForLeftTuple(final AccumulateNode accNode,
}
@Override
- protected void propagateDelete( TupleSets trgLeftTuples, TupleSets stagedLeftTuples, Object accctx ) {
+ protected void propagateDelete(TupleSets trgLeftTuples, TupleSets stagedLeftTuples, Object accctx ) {
GroupByContext groupByContext = (GroupByContext)accctx;
for ( TupleList tupleList : groupByContext.getGroups().values()) {
super.propagateDelete(trgLeftTuples, stagedLeftTuples, tupleList.getContext());
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakJoinNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakJoinNode.java
index 010a282557b..b1cecc77005 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakJoinNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakJoinNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.BetaConstraints;
@@ -24,7 +27,7 @@
import org.drools.core.reteoo.LeftTupleSink;
import org.drools.core.reteoo.RightTuple;
import org.drools.core.reteoo.TupleMemory;
-import org.drools.core.rule.ContextEntry;
+import org.drools.base.rule.ContextEntry;
import org.drools.core.util.AbstractHashTable;
import org.drools.core.util.FastIterator;
@@ -145,7 +148,7 @@ public void doRightInserts(JoinNode joinNode,
reteEvaluator,
rightTuple.getFactHandleForEvaluation() );
- for ( LeftTuple leftTuple = joinNode.getFirstLeftTuple( rightTuple, ltm, it ); leftTuple != null; leftTuple = (LeftTuple) it.next( leftTuple ) ) {
+ for ( LeftTuple leftTuple = joinNode.getFirstLeftTuple(rightTuple, ltm, it ); leftTuple != null; leftTuple = (LeftTuple) it.next(leftTuple ) ) {
if ( leftTuple.getStagedType() == LeftTuple.UPDATE ) {
// ignore, as it will get processed via left iteration. Children cannot be processed twice
continue;
@@ -288,7 +291,7 @@ public void doRightUpdates(JoinNode joinNode,
if ( ltm != null && ltm.size() > 0 ) {
FastIterator it = joinNode.getLeftIterator( ltm );
- LeftTuple leftTuple = joinNode.getFirstLeftTuple( rightTuple, ltm, it );
+ LeftTuple leftTuple = joinNode.getFirstLeftTuple(rightTuple, ltm, it );
constraints.updateFromFactHandle( contextEntry,
reteEvaluator,
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakNetworkNodeFactory.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakNetworkNodeFactory.java
index 43e121425d6..062d441bf29 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakNetworkNodeFactory.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakNetworkNodeFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
import org.kie.api.internal.utils.KieService;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakNetworkNodeFactoryImpl.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakNetworkNodeFactoryImpl.java
index c2fac7cbb65..1c8d023b91f 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakNetworkNodeFactoryImpl.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakNetworkNodeFactoryImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
public class PhreakNetworkNodeFactoryImpl implements PhreakNetworkNodeFactory {
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakNotNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakNotNode.java
index 5e49a443c20..84d5e64dbbe 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakNotNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakNotNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.BetaConstraints;
@@ -24,7 +27,7 @@
import org.drools.core.reteoo.NotNode;
import org.drools.core.reteoo.RightTuple;
import org.drools.core.reteoo.TupleMemory;
-import org.drools.core.rule.ContextEntry;
+import org.drools.base.rule.ContextEntry;
import org.drools.core.common.PropagationContext;
import org.drools.core.util.FastIterator;
@@ -163,9 +166,9 @@ public void doRightInserts(NotNode notNode,
constraints.updateFromFactHandle( contextEntry,
reteEvaluator,
rightTuple.getFactHandleForEvaluation() );
- for ( LeftTuple leftTuple = notNode.getFirstLeftTuple( rightTuple, ltm, it ); leftTuple != null; ) {
+ for ( LeftTuple leftTuple = notNode.getFirstLeftTuple(rightTuple, ltm, it ); leftTuple != null; ) {
// preserve next now, in case we remove this leftTuple
- LeftTuple temp = (LeftTuple) it.next( leftTuple );
+ LeftTuple temp = (LeftTuple) it.next(leftTuple );
if ( leftTuple.getStagedType() == LeftTuple.UPDATE ) {
// ignore, as it will get processed via left iteration. Children cannot be processed twice
@@ -327,13 +330,13 @@ public void doRightUpdates(NotNode notNode,
rightTuple.getFactHandleForEvaluation() );
FastIterator leftIt = notNode.getLeftIterator( ltm );
- LeftTuple firstLeftTuple = notNode.getFirstLeftTuple( rightTuple, ltm, leftIt );
+ LeftTuple firstLeftTuple = notNode.getFirstLeftTuple(rightTuple, ltm, leftIt );
// first process non-blocked tuples, as we know only those ones are in the left memory.
for ( LeftTuple leftTuple = firstLeftTuple; leftTuple != null; ) {
// preserve next now, in case we remove this leftTuple
- LeftTuple temp = (LeftTuple) leftIt.next( leftTuple );
+ LeftTuple temp = (LeftTuple) leftIt.next(leftTuple );
if ( leftTuple.getStagedType() == LeftTuple.UPDATE ) {
// ignore, as it will get processed via left iteration. Children cannot be processed twice
@@ -519,7 +522,7 @@ public void doRightDeletes(NotNode notNode,
constraints.resetTuple(contextEntry);
}
- private static void insertChildLeftTuple( LeftTupleSink sink, TupleSets trgLeftTuples, TupleMemory ltm, LeftTuple leftTuple, PropagationContext pctx, boolean useLeftMemory ) {
+ private static void insertChildLeftTuple(LeftTupleSink sink, TupleSets trgLeftTuples, TupleMemory ltm, LeftTuple leftTuple, PropagationContext pctx, boolean useLeftMemory ) {
if (!leftTuple.isExpired()) {
if (useLeftMemory) {
ltm.add(leftTuple);
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakQueryNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakQueryNode.java
index 80c0d889d28..38e3173f63c 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakQueryNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakQueryNode.java
@@ -1,21 +1,24 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
-import org.drools.core.base.DroolsQuery;
+import org.drools.core.base.DroolsQueryImpl;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.TupleSets;
@@ -65,10 +68,10 @@ public void doLeftInserts(QueryElementNode queryNode,
reteEvaluator,
leftTuple);
- DroolsQuery dquery = queryNode.createDroolsQuery(leftTuple, handle, stackEntry,
- qmem.getSegmentMemory().getPathMemories(),
- qmem,
- stackEntry.getSink(), reteEvaluator);
+ DroolsQueryImpl dquery = queryNode.createDroolsQuery(leftTuple, handle, stackEntry,
+ qmem.getSegmentMemory().getPathMemories(),
+ qmem,
+ stackEntry.getSink(), reteEvaluator);
LeftInputAdapterNode lian = (LeftInputAdapterNode) qmem.getQuerySegmentMemory().getRootNode();
LiaNodeMemory lm = (LiaNodeMemory) qmem.getQuerySegmentMemory().getNodeMemories()[0];
@@ -87,7 +90,7 @@ public void doLeftUpdates(QueryElementNode queryNode,
LeftTuple next = leftTuple.getStagedNext();
InternalFactHandle fh = (InternalFactHandle) leftTuple.getContextObject();
- DroolsQuery dquery = (DroolsQuery) fh.getObject();
+ DroolsQueryImpl dquery = (DroolsQueryImpl) fh.getObject();
dquery.setParameters( queryNode.getActualArguments( leftTuple, reteEvaluator ) );
SegmentMemory qsmem = qmem.getQuerySegmentMemory();
@@ -118,7 +121,7 @@ public void doLeftDeletes(QueryElementNodeMemory qmem,
LeftTuple next = leftTuple.getStagedNext();
InternalFactHandle fh = (InternalFactHandle) leftTuple.getContextObject();
- DroolsQuery dquery = (DroolsQuery) fh.getObject();
+ DroolsQueryImpl dquery = (DroolsQueryImpl) fh.getObject();
if (dquery.isOpen()) {
LeftInputAdapterNode lian = (LeftInputAdapterNode) qmem.getQuerySegmentMemory().getRootNode();
LiaNodeMemory lm = (LiaNodeMemory) qmem.getQuerySegmentMemory().getNodeMemories()[0];
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakQueryTerminalNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakQueryTerminalNode.java
index 3af8b97b638..85b478ffad6 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakQueryTerminalNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakQueryTerminalNode.java
@@ -1,23 +1,26 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.List;
-import org.drools.core.base.DroolsQuery;
+import org.drools.core.base.DroolsQueryImpl;
import org.drools.core.common.ActivationsManager;
import org.drools.core.common.TupleSets;
import org.drools.core.reteoo.LeftTuple;
@@ -67,7 +70,7 @@ public void doLeftInserts(QueryTerminalNode qtnNode,
// find the DroolsQuery object
Tuple rootEntry = leftTuple.getRootTuple();
- DroolsQuery dquery = (DroolsQuery) rootEntry.getFactHandle().getObject();
+ DroolsQueryImpl dquery = (DroolsQueryImpl) rootEntry.getFactHandle().getObject();
dquery.setQuery(qtnNode.getQuery());
if (dquery.getStackEntry() != null) {
checkAndTriggerQueryReevaluation(activationsManager, stack, rootEntry, dquery);
@@ -95,7 +98,7 @@ public void doLeftUpdates(QueryTerminalNode qtnNode,
// find the DroolsQuery object
LeftTuple rootEntry = (LeftTuple) leftTuple.getRootTuple();
- DroolsQuery dquery = (DroolsQuery) rootEntry.getFactHandle().getObject();
+ DroolsQueryImpl dquery = (DroolsQueryImpl) rootEntry.getFactHandle().getObject();
dquery.setQuery(qtnNode.getQuery());
if (dquery.getStackEntry() != null) {
checkAndTriggerQueryReevaluation(activationsManager, stack, rootEntry, dquery);
@@ -124,7 +127,7 @@ public void doLeftDeletes(QueryTerminalNode qtnNode,
// find the DroolsQuery object
LeftTuple rootEntry = (LeftTuple) leftTuple.getRootTuple();
- DroolsQuery dquery = (DroolsQuery) rootEntry.getFactHandle().getObject();
+ DroolsQueryImpl dquery = (DroolsQueryImpl) rootEntry.getFactHandle().getObject();
dquery.setQuery(qtnNode.getQuery());
if (dquery.getStackEntry() != null) {
@@ -142,7 +145,7 @@ public void doLeftDeletes(QueryTerminalNode qtnNode,
}
- public static void checkAndTriggerQueryReevaluation(ActivationsManager activationsManager, LinkedList stack, Tuple rootEntry, DroolsQuery dquery) {
+ public static void checkAndTriggerQueryReevaluation(ActivationsManager activationsManager, LinkedList stack, Tuple rootEntry, DroolsQueryImpl dquery) {
StackEntry stackEntry = dquery.getStackEntry();
if (!isAdded(stack, stackEntry)) {
// Ignore unless stackEntry is not added to stack
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakReactiveFromNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakReactiveFromNode.java
index 09945e0d975..1e6e606bdb0 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakReactiveFromNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakReactiveFromNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.ReteEvaluator;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakRuleTerminalNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakRuleTerminalNode.java
index 9704f5eb27f..1e88d99f8ce 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakRuleTerminalNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakRuleTerminalNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.ActivationsManager;
@@ -20,14 +23,14 @@
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.TupleSets;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.ObjectTypeConf;
import org.drools.core.reteoo.RuleTerminalNode;
import org.drools.core.reteoo.RuleTerminalNodeLeftTuple;
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.common.PropagationContext;
-import org.drools.core.rule.accessor.Salience;
+import org.drools.base.rule.accessor.Salience;
import org.drools.core.reteoo.Tuple;
import org.drools.core.rule.consequence.InternalMatch;
import org.kie.api.definition.rule.Rule;
@@ -98,10 +101,14 @@ public static void doLeftTupleInsert(TerminalNode rtnNode, RuleExecutor executor
return;
}
- PropagationContext pctx = leftTuple.findMostRecentPropagationContext();
-
- if ( rtnNode.getRule().isNoLoop() && sameRules(rtnNode, pctx.getTerminalNodeOrigin()) ) {
- return;
+ PropagationContext pctx;
+ if ( rtnNode.getRule().isNoLoop() ) {
+ pctx = leftTuple.findMostRecentPropagationContext();
+ if ( sameRules(rtnNode, pctx.getTerminalNodeOrigin()) ) {
+ return;
+ }
+ } else {
+ pctx = leftTuple.getPropagationContext();
}
int salienceInt = getSalienceValue(rtnNode, ruleAgendaItem, (InternalMatch) leftTuple, reteEvaluator);
@@ -111,8 +118,8 @@ public static void doLeftTupleInsert(TerminalNode rtnNode, RuleExecutor executor
activationsManager.getAgendaEventSupport().fireActivationCreated(rtnLeftTuple, activationsManager.getReteEvaluator());
- if ( rtnNode.getRule().isLockOnActive() &&
- leftTuple.getPropagationContext().getType() != PropagationContext.Type.RULE_ADDITION ) {
+ if ( rtnNode.getRule().isLockOnActive() && pctx.getType() != PropagationContext.Type.RULE_ADDITION ) {
+ pctx = leftTuple.findMostRecentPropagationContext();
InternalAgendaGroup agendaGroup = executor.getRuleAgendaItem().getAgendaGroup();
if (blockedByLockOnActive(rtnNode.getRule(), pctx, agendaGroup)) {
activationsManager.getAgendaEventSupport().fireActivationCancelled(rtnLeftTuple, reteEvaluator, MatchCancelledCause.FILTER );
@@ -126,7 +133,6 @@ public static void doLeftTupleInsert(TerminalNode rtnNode, RuleExecutor executor
}
executor.addLeftTuple( leftTuple );
- leftTuple.increaseActivationCountForEvents(); // increased here, decreased in Agenda's cancelActivation and fireActivation
activationsManager.addItemToActivationGroup( rtnLeftTuple );
if ( !rtnNode.isFireDirect() && executor.isDeclarativeAgendaEnabled() ) {
@@ -180,15 +186,18 @@ public static void doLeftTupleUpdate(TerminalNode rtnNode, RuleExecutor executor
return;
}
- PropagationContext pctx = leftTuple.findMostRecentPropagationContext();
+ PropagationContext pctx = leftTuple.getPropagationContext();
boolean blocked = false;
- if( executor.isDeclarativeAgendaEnabled() ) {
+ if ( executor.isDeclarativeAgendaEnabled() ) {
if ( rtnLeftTuple.hasBlockers() ) {
blocked = true; // declarativeAgenda still blocking LeftTuple, so don't add back ot list
}
} else {
- blocked = rtnNode.getRule().isNoLoop() && rtnNode.equals(pctx.getTerminalNodeOrigin());
+ if (rtnNode.getRule().isNoLoop()) {
+ pctx = leftTuple.findMostRecentPropagationContext();
+ blocked = rtnNode.equals(pctx.getTerminalNodeOrigin());
+ }
}
int salienceInt = getSalienceValue(rtnNode, executor.getRuleAgendaItem(), (InternalMatch) leftTuple, reteEvaluator);
@@ -200,9 +209,8 @@ public static void doLeftTupleUpdate(TerminalNode rtnNode, RuleExecutor executor
if ( !blocked ) {
boolean addToExector = true;
- if ( rtnNode.getRule().isLockOnActive() &&
- pctx.getType() != PropagationContext.Type.RULE_ADDITION ) {
-
+ if ( rtnNode.getRule().isLockOnActive() && pctx.getType() != PropagationContext.Type.RULE_ADDITION ) {
+ pctx = leftTuple.findMostRecentPropagationContext();
InternalAgendaGroup agendaGroup = executor.getRuleAgendaItem().getAgendaGroup();
if (blockedByLockOnActive(rtnNode.getRule(), pctx, agendaGroup)) {
addToExector = false;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakSubnetworkNotExistsNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakSubnetworkNotExistsNode.java
index 38058386e34..c7aa1a61596 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakSubnetworkNotExistsNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakSubnetworkNotExistsNode.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.TupleSets;
@@ -5,7 +23,7 @@
import org.drools.core.reteoo.BetaNode;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleSink;
-import org.drools.core.reteoo.NodeTypeEnums;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.reteoo.RightTuple;
import org.drools.core.reteoo.SubnetworkTuple;
import org.drools.core.reteoo.TupleMemory;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PhreakTimerNode.java b/drools-core/src/main/java/org/drools/core/phreak/PhreakTimerNode.java
index a32819b95b8..bdaf7ef9211 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PhreakTimerNode.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PhreakTimerNode.java
@@ -1,25 +1,29 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
-import java.util.Date;
-import java.util.List;
-
+import org.drools.base.common.NetworkNode;
+import org.drools.base.time.JobHandle;
+import org.drools.base.time.Trigger;
+import org.drools.base.time.impl.Timer;
import org.drools.core.common.ActivationsManager;
-import org.drools.core.common.NetworkNode;
+import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.PropagationContext;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.TupleSets;
@@ -35,11 +39,8 @@
import org.drools.core.reteoo.Tuple;
import org.drools.core.time.Job;
import org.drools.core.time.JobContext;
-import org.drools.core.time.JobHandle;
import org.drools.core.time.TimerService;
-import org.drools.core.time.Trigger;
import org.drools.core.time.impl.DefaultJobHandle;
-import org.drools.core.time.impl.Timer;
import org.drools.core.util.LinkedList;
import org.drools.core.util.index.TupleList;
import org.kie.api.definition.rule.Rule;
@@ -48,6 +49,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Date;
+import java.util.List;
+
import static org.drools.core.phreak.BuildtimeSegmentUtilities.nextNodePosMask;
import static org.drools.core.phreak.RuleNetworkEvaluator.normalizeStagedTuples;
@@ -174,7 +178,7 @@ public void doLeftDeletes(TimerNode timerNode,
if ( leftTuple.getMemory() != null ) {
leftTuples.remove( leftTuple ); // it gets removed either way.
- if ( pctx.getFactHandle().isExpired() ) {
+ if ( ((InternalFactHandle)pctx.getFactHandle()).isExpired() ) {
// a expire clashes with insert or update, allow it to propagate once, will handle the expire the second time around
doPropagateChildLeftTuple( sink, trgLeftTuples, stagedLeftTuples, leftTuple );
tm.getDeleteLeftTuples().add( leftTuple );
@@ -279,7 +283,7 @@ private void scheduleTimer(TimerNode timerNode,
log.trace( "Timer Fire Now {}", leftTuple );
}
- LeftTuple childLeftTuple = doPropagateChildLeftTuple( sink, trgLeftTuples, stagedLeftTuples, leftTuple );
+ LeftTuple childLeftTuple = doPropagateChildLeftTuple(sink, trgLeftTuples, stagedLeftTuples, leftTuple );
if (childLeftTuple.getStagedType() != LeftTuple.NONE) {
// Flag the newly created childLeftTuple to avoid a reevaluation in case it gets
// rescheduled before the end of this doNode loop
@@ -422,7 +426,7 @@ public void execute( final ReteEvaluator reteEvaluator, boolean needEvaluation )
private void evaluateAndFireRule(PathMemory pmem, ActivationsManager activationsManager) {
RuleExecutor ruleExecutor = pmem.getRuleAgendaItem().getRuleExecutor();
- ruleExecutor.reEvaluateNetwork( activationsManager );
+ ruleExecutor.evaluateNetworkIfDirty( activationsManager );
ruleExecutor.fire( activationsManager );
}
}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PropagationEntry.java b/drools-core/src/main/java/org/drools/core/phreak/PropagationEntry.java
index efc1a735da8..cbd689f1f7f 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PropagationEntry.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PropagationEntry.java
@@ -1,29 +1,30 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
-import java.io.Serializable;
-import java.util.concurrent.CountDownLatch;
-
-import org.drools.core.base.DroolsQuery;
-import org.drools.core.common.EventFactHandle;
+import org.drools.base.facttemplates.Event;
+import org.drools.base.reteoo.NodeTypeEnums;
+import org.drools.core.base.DroolsQueryImpl;
+import org.drools.core.common.DefaultEventHandle;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.PropagationContext;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.facttemplates.Event;
import org.drools.core.impl.WorkingMemoryReteExpireAction;
import org.drools.core.reteoo.ClassObjectTypeConf;
import org.drools.core.reteoo.CompositePartitionAwareObjectSinkAdapter;
@@ -31,18 +32,23 @@
import org.drools.core.reteoo.LeftInputAdapterNode;
import org.drools.core.reteoo.LeftTupleSource;
import org.drools.core.reteoo.ModifyPreviousTuples;
-import org.drools.core.reteoo.NodeTypeEnums;
import org.drools.core.reteoo.ObjectTypeConf;
import org.drools.core.reteoo.ObjectTypeNode;
import org.drools.core.reteoo.PathMemory;
import org.drools.core.reteoo.QueryTerminalNode;
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.time.JobContext;
-import org.drools.core.time.JobHandle;
+import org.drools.core.time.impl.DefaultJobHandle;
import org.drools.core.time.impl.PointInTimeTrigger;
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.concurrent.CountDownLatch;
+
+import static org.drools.base.rule.TypeDeclaration.NEVER_EXPIRES;
import static org.drools.core.reteoo.EntryPointNode.removeRightTuplesMatchingOTN;
-import static org.drools.core.rule.TypeDeclaration.NEVER_EXPIRES;
public interface PropagationEntry {
@@ -66,7 +72,7 @@ default void execute(ReteEvaluator reteEvaluator) {
boolean defersExpiration();
abstract class AbstractPropagationEntry implements PropagationEntry {
- private PropagationEntry next;
+ protected PropagationEntry next;
public void setNext(PropagationEntry next) {
this.next = next;
@@ -142,12 +148,12 @@ public boolean requiresImmediateFlushing() {
class ExecuteQuery extends PropagationEntry.PropagationEntryWithResult {
private final String queryName;
- private final DroolsQuery queryObject;
+ private final DroolsQueryImpl queryObject;
private final InternalFactHandle handle;
private final PropagationContext pCtx;
private final boolean calledFromRHS;
- public ExecuteQuery( String queryName, DroolsQuery queryObject, InternalFactHandle handle, PropagationContext pCtx, boolean calledFromRHS ) {
+ public ExecuteQuery(String queryName, DroolsQueryImpl queryObject, InternalFactHandle handle, PropagationContext pCtx, boolean calledFromRHS) {
this.queryName = queryName;
this.queryObject = queryObject;
this.handle = handle;
@@ -196,12 +202,14 @@ public boolean isCalledFromRHS() {
}
}
- class Insert extends AbstractPropagationEntry implements Serializable {
+ class Insert extends AbstractPropagationEntry implements Externalizable {
private static final ObjectTypeNode.ExpireJob job = new ObjectTypeNode.ExpireJob();
- private final InternalFactHandle handle;
- private final PropagationContext context;
- private final ObjectTypeConf objectTypeConf;
+ private InternalFactHandle handle;
+ private PropagationContext context;
+ private ObjectTypeConf objectTypeConf;
+
+ public Insert() { }
public Insert( InternalFactHandle handle, PropagationContext context, ReteEvaluator reteEvaluator, ObjectTypeConf objectTypeConf) {
this.handle = handle;
@@ -221,6 +229,10 @@ public static void execute( InternalFactHandle handle, PropagationContext contex
}
private static void propagate( InternalFactHandle handle, PropagationContext context, ReteEvaluator reteEvaluator, ObjectTypeConf objectTypeConf ) {
+ if (objectTypeConf == null) {
+ // it can be null after deserialization
+ objectTypeConf = handle.getEntryPoint(reteEvaluator).getObjectTypeConfigurationRegistry().getOrCreateObjectTypeConf(handle.getEntryPointId(), handle.getObject());
+ }
for ( ObjectTypeNode otn : objectTypeConf.getObjectTypeNodes() ) {
otn.propagateAssert( handle, context, reteEvaluator );
}
@@ -255,24 +267,22 @@ private static void scheduleExpiration( ReteEvaluator reteEvaluator, InternalFac
}
// DROOLS-455 the calculation of the effectiveEnd may overflow and become negative
- EventFactHandle eventFactHandle = (EventFactHandle) handle;
+ DefaultEventHandle eventFactHandle = (DefaultEventHandle) handle;
long nextTimestamp = getNextTimestamp( insertionTime, expirationOffset, eventFactHandle );
- WorkingMemoryReteExpireAction action = new WorkingMemoryReteExpireAction( (EventFactHandle) handle, otn );
+ WorkingMemoryReteExpireAction action = new WorkingMemoryReteExpireAction((DefaultEventHandle) handle, otn );
if (nextTimestamp <= reteEvaluator.getTimerService().getCurrentTime()) {
reteEvaluator.addPropagation( action );
} else {
JobContext jobctx = new ObjectTypeNode.ExpireJobContext( action, reteEvaluator );
- JobHandle jobHandle = reteEvaluator.getTimerService()
- .scheduleJob( job,
- jobctx,
- PointInTimeTrigger.createPointInTimeTrigger( nextTimestamp, null ) );
+ DefaultJobHandle jobHandle = (DefaultJobHandle) reteEvaluator.getTimerService()
+ .scheduleJob( job, jobctx, PointInTimeTrigger.createPointInTimeTrigger( nextTimestamp, null ) );
jobctx.setJobHandle( jobHandle );
eventFactHandle.addJob( jobHandle );
}
}
- private static long getNextTimestamp( long insertionTime, long expirationOffset, EventFactHandle eventFactHandle ) {
+ private static long getNextTimestamp( long insertionTime, long expirationOffset, DefaultEventHandle eventFactHandle) {
long effectiveEnd = eventFactHandle.getEndTimestamp() + expirationOffset;
return Math.max( insertionTime, effectiveEnd >= 0 ? effectiveEnd : Long.MAX_VALUE );
}
@@ -285,12 +295,28 @@ public String toString() {
public InternalFactHandle getHandle() {
return handle;
}
+
+ @Override
+ public void writeExternal(ObjectOutput out) throws IOException {
+ out.writeObject(next);
+ out.writeObject(handle);
+ out.writeObject(context);
+ }
+
+ @Override
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+ this.next = (PropagationEntry) in.readObject();
+ this.handle = (InternalFactHandle) in.readObject();
+ this.context = (PropagationContext) in.readObject();
+ }
}
- class Update extends AbstractPropagationEntry {
- private final InternalFactHandle handle;
- private final PropagationContext context;
- private final ObjectTypeConf objectTypeConf;
+ class Update extends AbstractPropagationEntry implements Externalizable {
+ private InternalFactHandle handle;
+ private PropagationContext context;
+ private ObjectTypeConf objectTypeConf;
+
+ public Update(){}
public Update(InternalFactHandle handle, PropagationContext context, ObjectTypeConf objectTypeConf) {
this.handle = handle;
@@ -303,6 +329,10 @@ public void internalExecute(ReteEvaluator reteEvaluator) {
}
public static void execute(InternalFactHandle handle, PropagationContext pctx, ObjectTypeConf objectTypeConf, ReteEvaluator reteEvaluator) {
+ if (objectTypeConf == null) {
+ // it can be null after deserialization
+ objectTypeConf = handle.getEntryPoint(reteEvaluator).getObjectTypeConfigurationRegistry().getOrCreateObjectTypeConf(handle.getEntryPointId(), handle.getObject());
+ }
// make a reference to the previous tuples, then null then on the handle
ModifyPreviousTuples modifyPreviousTuples = new ModifyPreviousTuples( handle.detachLinkedTuples() );
ObjectTypeNode[] cachedNodes = objectTypeConf.getObjectTypeNodes();
@@ -329,6 +359,20 @@ public PropagationEntry getSplitForPartition( int partitionNr ) {
public String toString() {
return "Update of " + handle.getObject();
}
+
+ @Override
+ public void writeExternal(ObjectOutput out) throws IOException {
+ out.writeObject(next);
+ out.writeObject(handle);
+ out.writeObject(context);
+ }
+
+ @Override
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+ this.next = (PropagationEntry) in.readObject();
+ this.handle = (InternalFactHandle) in.readObject();
+ this.context = (PropagationContext) in.readObject();
+ }
}
class PartitionedUpdate extends AbstractPartitionedPropagationEntry {
@@ -379,6 +423,10 @@ public Delete(EntryPointNode epn, InternalFactHandle handle, PropagationContext
}
public void internalExecute(ReteEvaluator reteEvaluator) {
+ execute(reteEvaluator, epn, handle, context, objectTypeConf);
+ }
+
+ public static void execute(ReteEvaluator reteEvaluator, EntryPointNode epn, InternalFactHandle handle, PropagationContext context, ObjectTypeConf objectTypeConf) {
epn.propagateRetract(handle, context, objectTypeConf, reteEvaluator);
}
@@ -423,7 +471,7 @@ public void internalExecute(ReteEvaluator reteEvaluator) {
}
if (handle.isEvent() && isMainPartition()) {
- ((EventFactHandle) handle).unscheduleAllJobs(reteEvaluator);
+ ((DefaultEventHandle) handle).unscheduleAllJobs(reteEvaluator);
}
}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/PropagationList.java b/drools-core/src/main/java/org/drools/core/phreak/PropagationList.java
index 00a3acb7138..73db997171b 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/PropagationList.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/PropagationList.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.Iterator;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/Reactive.java b/drools-core/src/main/java/org/drools/core/phreak/Reactive.java
deleted file mode 100644
index 70d43f96d63..00000000000
--- a/drools-core/src/main/java/org/drools/core/phreak/Reactive.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.drools.core.phreak;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = ElementType.TYPE)
-public @interface Reactive {
-}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/ReactiveCollection.java b/drools-core/src/main/java/org/drools/core/phreak/ReactiveCollection.java
index a3f2c752ee1..8de145e2055 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/ReactiveCollection.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/ReactiveCollection.java
@@ -1,25 +1,29 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.Collection;
import java.util.Iterator;
+import org.drools.base.phreak.ReactiveObject;
import org.drools.core.phreak.ReactiveObjectUtil.ModificationType;
-import org.drools.core.reteoo.Tuple;
+import org.drools.base.reteoo.BaseTuple;
public class ReactiveCollection> extends AbstractReactiveObject implements Collection {
@@ -63,10 +67,10 @@ public boolean containsAll(Collection> c) {
public boolean add(T t) {
boolean result = wrapped.add(t);
if (result) {
- ReactiveObjectUtil.notifyModification(t, getLeftTuples(), ModificationType.ADD);
+ ReactiveObjectUtil.notifyModification(t, getTuples(), ModificationType.ADD);
if (t instanceof ReactiveObject) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) t).addLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) t).addTuple(lts);
}
}
}
@@ -114,11 +118,11 @@ public boolean remove(Object o) {
boolean result = wrapped.remove(o);
if (result) {
if (o instanceof ReactiveObject) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) o).removeLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) o).removeTuple(lts);
}
}
- ReactiveObjectUtil.notifyModification(o, getLeftTuples(), ModificationType.REMOVE);
+ ReactiveObjectUtil.notifyModification(o, getTuples(), ModificationType.REMOVE);
}
return result;
}
@@ -153,11 +157,11 @@ public void remove() {
// the line above either throws UnsupportedOperationException or follows with:
if (last != null) {
if (last instanceof ReactiveObject) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) last).removeLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) last).removeTuple(lts);
}
}
- ReactiveObjectUtil.notifyModification(last, getLeftTuples(), ModificationType.REMOVE);
+ ReactiveObjectUtil.notifyModification(last, getTuples(), ModificationType.REMOVE);
last = null;
}
}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/ReactiveList.java b/drools-core/src/main/java/org/drools/core/phreak/ReactiveList.java
index 2061150aa4d..5e85fa8ad92 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/ReactiveList.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/ReactiveList.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.ArrayList;
@@ -20,8 +23,9 @@
import java.util.List;
import java.util.ListIterator;
+import org.drools.base.phreak.ReactiveObject;
import org.drools.core.phreak.ReactiveObjectUtil.ModificationType;
-import org.drools.core.reteoo.Tuple;
+import org.drools.base.reteoo.BaseTuple;
public class ReactiveList extends ReactiveCollection> implements List{
@@ -38,10 +42,10 @@ public boolean addAll(int index, Collection extends T> c) {
boolean result = wrapped.addAll(index, c);
if (result) {
for ( T element : c ) {
- ReactiveObjectUtil.notifyModification(element, getLeftTuples(), ModificationType.ADD);
- if ( element instanceof ReactiveObject ) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) element).addLeftTuple(lts);
+ ReactiveObjectUtil.notifyModification(element, getTuples(), ModificationType.ADD);
+ if ( element instanceof ReactiveObject) {
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) element).addTuple(lts);
}
}
}
@@ -58,19 +62,19 @@ public T get(int index) {
public T set(int index, T element) {
T previous = wrapped.set(index, element);
if ( previous != element ) { // this is indeed intended != to check by reference
- ReactiveObjectUtil.notifyModification(element, getLeftTuples(), ModificationType.ADD);
+ ReactiveObjectUtil.notifyModification(element, getTuples(), ModificationType.ADD);
if ( element instanceof ReactiveObject ) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) element).addLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) element).addTuple(lts);
}
}
if (previous instanceof ReactiveObject) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) previous).removeLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) previous).removeTuple(lts);
}
}
- ReactiveObjectUtil.notifyModification(previous, getLeftTuples(), ModificationType.REMOVE);
+ ReactiveObjectUtil.notifyModification(previous, getTuples(), ModificationType.REMOVE);
}
return previous;
}
@@ -78,10 +82,10 @@ public T set(int index, T element) {
@Override
public void add(int index, T element) {
wrapped.add(index, element);
- ReactiveObjectUtil.notifyModification(element, getLeftTuples(), ModificationType.ADD);
+ ReactiveObjectUtil.notifyModification(element, getTuples(), ModificationType.ADD);
if ( element instanceof ReactiveObject ) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) element).addLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) element).addTuple(lts);
}
}
}
@@ -90,11 +94,11 @@ public void add(int index, T element) {
public T remove(int index) {
T result = wrapped.remove(index);
if (result instanceof ReactiveObject) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) result).removeLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) result).removeTuple(lts);
}
}
- ReactiveObjectUtil.notifyModification(result, getLeftTuples(), ModificationType.REMOVE);
+ ReactiveObjectUtil.notifyModification(result, getTuples(), ModificationType.REMOVE);
return result;
}
@@ -111,8 +115,8 @@ public int lastIndexOf(Object o) {
@Override
public List subList(int fromIndex, int toIndex) {
ReactiveList result = new ReactiveList<>( wrapped.subList(fromIndex, toIndex) );
- for ( Tuple lts : getLeftTuples() ) {
- result.addLeftTuple( lts );
+ for ( BaseTuple lts : getTuples() ) {
+ result.addTuple(lts);
}
return result;
}
@@ -167,19 +171,19 @@ public void set(T e) {
if ( last != null ) {
wrapped.set(e);
if ( last != e ) { // this is indeed intended != to check by reference
- ReactiveObjectUtil.notifyModification(e, getLeftTuples(), ModificationType.ADD);
+ ReactiveObjectUtil.notifyModification(e, getTuples(), ModificationType.ADD);
if ( e instanceof ReactiveObject ) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) e).addLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) e).addTuple(lts);
}
}
if (last instanceof ReactiveObject) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) last).removeLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) last).removeTuple(lts);
}
}
- ReactiveObjectUtil.notifyModification(last, getLeftTuples(), ModificationType.REMOVE);
+ ReactiveObjectUtil.notifyModification(last, getTuples(), ModificationType.REMOVE);
}
last = e;
}
@@ -189,10 +193,10 @@ public void set(T e) {
public void add(T e) {
wrapped.add(e);
// the line above either throws UnsupportedOperationException or follows with:
- ReactiveObjectUtil.notifyModification(e, getLeftTuples(), ModificationType.ADD);
+ ReactiveObjectUtil.notifyModification(e, getTuples(), ModificationType.ADD);
if ( e instanceof ReactiveObject ) {
- for (Tuple lts : getLeftTuples()) {
- ((ReactiveObject) e).addLeftTuple(lts);
+ for (BaseTuple lts : getTuples()) {
+ ((ReactiveObject) e).addTuple(lts);
}
}
last = null;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/ReactiveObject.java b/drools-core/src/main/java/org/drools/core/phreak/ReactiveObject.java
deleted file mode 100644
index 590b083e754..00000000000
--- a/drools-core/src/main/java/org/drools/core/phreak/ReactiveObject.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.drools.core.phreak;
-
-import org.drools.core.reteoo.Tuple;
-
-import java.util.Collection;
-
-public interface ReactiveObject {
- void addLeftTuple(Tuple leftTuple);
- void removeLeftTuple(Tuple leftTuple);
- Collection getLeftTuples();
-}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/ReactiveObjectUtil.java b/drools-core/src/main/java/org/drools/core/phreak/ReactiveObjectUtil.java
index 7c1b3419286..1501cceedec 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/ReactiveObjectUtil.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/ReactiveObjectUtil.java
@@ -1,32 +1,36 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
import java.util.Collection;
+import org.drools.base.phreak.ReactiveObject;
import org.drools.core.common.BetaConstraints;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
+import org.drools.base.reteoo.BaseTuple;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleSinkNode;
import org.drools.core.reteoo.ReactiveFromNode;
import org.drools.core.reteoo.ReactiveFromNodeLeftTuple;
import org.drools.core.reteoo.RightTupleImpl;
-import org.drools.core.rule.ContextEntry;
+import org.drools.base.rule.ContextEntry;
import org.drools.core.common.PropagationContext;
import org.drools.core.reteoo.Tuple;
@@ -41,21 +45,22 @@ public enum ModificationType {
}
public static void notifyModification(ReactiveObject reactiveObject) {
- notifyModification( reactiveObject, reactiveObject.getLeftTuples(), ModificationType.MODIFY);
+ notifyModification(reactiveObject, reactiveObject.getTuples(), ModificationType.MODIFY);
}
- public static void notifyModification( Object object, Collection leftTuples, ModificationType type ) {
- for (Tuple leftTuple : leftTuples) {
- if (!( (ReactiveFromNodeLeftTuple) leftTuple ).updateModificationState( object, type )) {
+ public static void notifyModification(Object object, Collection leftTuples, ModificationType type) {
+ for (BaseTuple baseTuple : leftTuples) {
+ Tuple tuple = (Tuple) baseTuple;
+ if (!( (ReactiveFromNodeLeftTuple) tuple ).updateModificationState( object, type )) {
continue;
}
- PropagationContext propagationContext = leftTuple.getPropagationContext();
- ReactiveFromNode node = leftTuple.getTupleSink();
+ PropagationContext propagationContext = tuple.getPropagationContext();
+ ReactiveFromNode node = tuple.getTupleSink();
LeftTupleSinkNode sink = node.getSinkPropagator().getFirstLeftTupleSink();
- ReteEvaluator reteEvaluator = propagationContext.getFactHandle().getReteEvaluator();
+ ReteEvaluator reteEvaluator =((InternalFactHandle) propagationContext.getFactHandle()).getReteEvaluator();
- reteEvaluator.addPropagation(new ReactivePropagation(object, (ReactiveFromNodeLeftTuple)leftTuple, propagationContext, node, sink, type));
+ reteEvaluator.addPropagation(new ReactivePropagation(object, (ReactiveFromNodeLeftTuple)tuple, propagationContext, node, sink, type));
}
}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/ReactiveSet.java b/drools-core/src/main/java/org/drools/core/phreak/ReactiveSet.java
index 416b77ea27a..1b7536596f7 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/ReactiveSet.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/ReactiveSet.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.HashSet;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/RightTupleEntry.java b/drools-core/src/main/java/org/drools/core/phreak/RightTupleEntry.java
index f8214ef3e28..3bf3f7e291b 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/RightTupleEntry.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/RightTupleEntry.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.Memory;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/RuleAgendaItem.java b/drools-core/src/main/java/org/drools/core/phreak/RuleAgendaItem.java
index c9a38edd357..ad943b9dded 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/RuleAgendaItem.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/RuleAgendaItem.java
@@ -1,23 +1,26 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
import org.drools.core.common.InternalAgendaGroup;
-import org.drools.core.common.RuleBasePartitionId;
-import org.drools.core.definitions.rule.impl.RuleImpl;
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.PathMemory;
import org.drools.core.reteoo.TerminalNode;
import org.drools.core.util.LinkedList;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/RuleExecutor.java b/drools-core/src/main/java/org/drools/core/phreak/RuleExecutor.java
index 02828be4ff9..29a2121a669 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/RuleExecutor.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/RuleExecutor.java
@@ -1,37 +1,39 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
-import org.drools.core.base.SalienceInteger;
+import org.drools.base.base.SalienceInteger;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.rule.consequence.Consequence;
+import org.drools.base.rule.consequence.ConsequenceException;
import org.drools.core.common.ActivationsManager;
-import org.drools.core.common.EventFactHandle;
import org.drools.core.common.EventSupport;
import org.drools.core.common.InternalActivationGroup;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.conflict.MatchConflictResolver;
import org.drools.core.conflict.RuleAgendaConflictResolver;
-import org.drools.core.definitions.rule.impl.RuleImpl;
import org.drools.core.event.RuleEventListenerSupport;
import org.drools.core.reteoo.PathMemory;
import org.drools.core.reteoo.RuleTerminalNode;
import org.drools.core.reteoo.RuleTerminalNodeLeftTuple;
import org.drools.core.reteoo.Tuple;
-import org.drools.core.rule.consequence.Consequence;
-import org.drools.core.rule.consequence.ConsequenceException;
import org.drools.core.rule.consequence.InternalMatch;
import org.drools.core.rule.consequence.KnowledgeHelper;
import org.drools.core.util.Queue;
@@ -45,15 +47,15 @@
public class RuleExecutor {
- protected static final transient Logger log = LoggerFactory.getLogger(RuleExecutor.class);
+ protected static final Logger log = LoggerFactory.getLogger(RuleExecutor.class);
- private final PathMemory pmem;
- private final RuleAgendaItem ruleAgendaItem;
- private final TupleList tupleList;
- private Queue queue;
- private volatile boolean dirty;
- private final boolean declarativeAgendaEnabled;
- private boolean fireExitedEarly;
+ private final PathMemory pmem;
+ private final RuleAgendaItem ruleAgendaItem;
+ private final TupleList tupleList;
+ private final Queue queue;
+ private volatile boolean dirty;
+ private final boolean declarativeAgendaEnabled;
+ private boolean fireExitedEarly;
public RuleExecutor(final PathMemory pmem,
RuleAgendaItem ruleAgendaItem,
@@ -62,56 +64,52 @@ public RuleExecutor(final PathMemory pmem,
this.ruleAgendaItem = ruleAgendaItem;
this.tupleList = new TupleList();
this.declarativeAgendaEnabled = declarativeAgendaEnabled;
- if (ruleAgendaItem.getRule().getSalience().isDynamic()) {
- queue = QueueFactory.createQueue(MatchConflictResolver.INSTANCE);
- }
- }
-
- public void evaluateNetwork(ActivationsManager activationsManager) {
- RuleNetworkEvaluator.INSTANCE.evaluateNetwork( pmem, this, activationsManager );
- setDirty( false );
+ this.queue = ruleAgendaItem.getRule().getSalience().isDynamic() ? QueueFactory.createQueue(MatchConflictResolver.INSTANCE) : null;
}
public int evaluateNetworkAndFire( ReteEvaluator reteEvaluator,
AgendaFilter filter,
int fireCount,
int fireLimit ) {
- reEvaluateNetwork( reteEvaluator );
+ evaluateNetworkIfDirty( reteEvaluator );
return fire(reteEvaluator, pmem.getActualActivationsManager( reteEvaluator ), filter, fireCount, fireLimit);
}
- public int evaluateNetworkAndFire( ActivationsManager activationsManager,
- AgendaFilter filter,
- int fireCount,
- int fireLimit ) {
- ReteEvaluator reteEvaluator = activationsManager.getReteEvaluator();
-
- reEvaluateNetwork( activationsManager );
+ public int evaluateNetworkAndFire( ActivationsManager activationsManager, AgendaFilter filter, int fireCount, int fireLimit ) {
+ evaluateNetworkIfDirty( activationsManager );
+ ReteEvaluator reteEvaluator = activationsManager.getReteEvaluator();
if ( reteEvaluator.getRuleSessionConfiguration().isDirectFiring() ) {
- RuleTerminalNode rtn = (RuleTerminalNode) pmem.getPathEndNode();
- RuleImpl rule = rtn.getRule();
- int directFirings = tupleList.size();
-
- for (Tuple tuple = tupleList.getFirst(); tuple != null; tuple = tupleList.getFirst()) {
- if (cancelAndContinue(reteEvaluator, rtn, rule, tuple, filter)) {
- directFirings--;
- } else {
- fireActivationEvent(reteEvaluator, activationsManager, (InternalMatch) tuple, ((InternalMatch) tuple).getConsequence());
- }
- removeLeftTuple( tuple );
- }
- ruleAgendaItem.remove();
- return directFirings;
+ return doDirectFirings(activationsManager, filter, reteEvaluator);
}
return fire( reteEvaluator, activationsManager, filter, fireCount, fireLimit );
}
+ private int doDirectFirings(ActivationsManager activationsManager, AgendaFilter filter, ReteEvaluator reteEvaluator) {
+ RuleTerminalNode rtn = (RuleTerminalNode) pmem.getPathEndNode();
+ int directFirings = tupleList.size();
+
+ for (Tuple tuple = tupleList.getFirst(); tuple != null; tuple = tupleList.getFirst()) {
+ if (cancelAndContinue(reteEvaluator, rtn, tuple, filter)) {
+ directFirings--;
+ } else {
+ fireActivationEvent(reteEvaluator, activationsManager, (InternalMatch) tuple, ((InternalMatch) tuple).getConsequence());
+ }
+ removeLeftTuple( tuple );
+ }
+ ruleAgendaItem.remove();
+ return directFirings;
+ }
+
public void fire(ActivationsManager activationsManager) {
fire(activationsManager.getReteEvaluator(), activationsManager, null, 0, Integer.MAX_VALUE);
}
+ public int fire(ActivationsManager activationsManager, AgendaFilter filter, int fireCount, int fireLimit) {
+ return fire(activationsManager.getReteEvaluator(), activationsManager, filter, fireCount, fireLimit);
+ }
+
private int fire( ReteEvaluator reteEvaluator,
ActivationsManager activationsManager,
AgendaFilter filter,
@@ -130,10 +128,9 @@ private int fire( ReteEvaluator reteEvaluator,
}
RuleTerminalNode rtn = (RuleTerminalNode) pmem.getPathEndNode();
- RuleImpl rule = rtn.getRule();
- boolean ruleIsAllMatches = rule.isAllMatches();
+ boolean ruleIsAllMatches = rtn.getRule().isAllMatches();
Tuple tuple = getNextTuple();
-
+
if (ruleIsAllMatches) {
fireConsequenceEvent(reteEvaluator, activationsManager, (InternalMatch) tuple, ActivationsManager.ON_BEFORE_ALL_FIRES_CONSEQUENCE_NAME);
}
@@ -143,7 +140,7 @@ private int fire( ReteEvaluator reteEvaluator,
//check if the rule is not effective or
// if the current Rule is no-loop and the origin rule is the same then return
- if (cancelAndContinue(reteEvaluator, rtn, rule, tuple, filter)) {
+ if (cancelAndContinue(reteEvaluator, rtn, tuple, filter)) {
continue;
}
@@ -174,7 +171,7 @@ private int fire( ReteEvaluator reteEvaluator,
break; // another rule has high priority and is on the agenda, so evaluate it first
}
if (!reteEvaluator.isSequential()) {
- reEvaluateNetwork( activationsManager );
+ evaluateNetworkIfDirty( activationsManager );
}
}
}
@@ -223,14 +220,18 @@ public void removeRuleAgendaItemWhenEmpty(ReteEvaluator reteEvaluator) {
}
}
- public void reEvaluateNetwork(ReteEvaluator reteEvaluator) {
- reEvaluateNetwork(pmem.getActualActivationsManager( reteEvaluator ));
+ public void evaluateNetwork(ActivationsManager activationsManager) {
+ RuleNetworkEvaluator.INSTANCE.evaluateNetwork( pmem, this, activationsManager );
+ setDirty( false );
}
- public void reEvaluateNetwork(ActivationsManager activationsManager) {
+ public void evaluateNetworkIfDirty(ReteEvaluator reteEvaluator) {
+ evaluateNetworkIfDirty(pmem.getActualActivationsManager( reteEvaluator ));
+ }
+
+ public void evaluateNetworkIfDirty(ActivationsManager activationsManager) {
if ( isDirty() ) {
- setDirty(false);
- RuleNetworkEvaluator.INSTANCE.evaluateNetwork(pmem, this, activationsManager);
+ evaluateNetwork(activationsManager);
}
}
@@ -240,11 +241,11 @@ public RuleAgendaItem getRuleAgendaItem() {
private boolean cancelAndContinue(ReteEvaluator reteEvaluator,
RuleTerminalNode rtn,
- RuleImpl rule,
Tuple leftTuple,
AgendaFilter filter) {
// NB. stopped setting the LT.object to Boolean.TRUE, that Reteoo did.
- if ( !rule.isEffective(leftTuple, rtn, reteEvaluator) ) {
+ RuleImpl rule = rtn.getRule();
+ if ( !rule.isEffective(leftTuple, rtn.getEnabledDeclarations(), reteEvaluator) ) {
return true;
}
@@ -272,7 +273,10 @@ private boolean haltRuleFiring(int fireCount,
activationsManager.evaluateEagerList();
RuleAgendaItem nextRule = activationsManager.peekNextRule();
- return nextRule != null && (!ruleAgendaItem.getAgendaGroup().equals( nextRule.getAgendaGroup() ) || !isHigherSalience(nextRule));
+ if (nextRule == ruleAgendaItem || nextRule == null) {
+ return false;
+ }
+ return !ruleAgendaItem.getAgendaGroup().equals( nextRule.getAgendaGroup() ) || !isHigherSalience(nextRule);
}
private boolean isHigherSalience(RuleAgendaItem nextRule) {
@@ -362,27 +366,7 @@ public void fireActivation(ReteEvaluator reteEvaluator, ActivationsManager activ
}
internalMatch.setQueued(false);
- try {
- fireActivationEvent(reteEvaluator, activationsManager, internalMatch, internalMatch.getConsequence());
- } finally {
- // if the tuple contains expired events
- for (Tuple tuple = internalMatch.getTuple().skipEmptyHandles(); tuple != null; tuple = tuple.getParent() ) {
- if ( tuple.getFactHandle().isEvent() ) {
- // can be null for eval, not and exists that have no right input
-
- EventFactHandle handle = ( EventFactHandle ) tuple.getFactHandle();
- // decrease the activation count for the event
- handle.decreaseActivationsCount();
- // handles "expire" only in stream mode.
- if ( handle.expirePartition() && handle.isExpired() &&
- handle.getFirstRightTuple() == null && handle.getActivationsCount() <= 0 ) {
- // and if no more activations, retract the handle
- handle.getEntryPoint( reteEvaluator ).delete( handle );
- }
- }
- }
- }
-
+ fireActivationEvent(reteEvaluator, activationsManager, internalMatch, internalMatch.getConsequence());
activationsManager.getAgendaEventSupport().fireAfterActivationFired(internalMatch, reteEvaluator, beforeMatchFiredEvent);
}
diff --git a/drools-core/src/main/java/org/drools/core/phreak/RuleNetworkEvaluator.java b/drools-core/src/main/java/org/drools/core/phreak/RuleNetworkEvaluator.java
index 6b02d709817..fcd39d5d8b9 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/RuleNetworkEvaluator.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/RuleNetworkEvaluator.java
@@ -1,28 +1,34 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
-import org.drools.core.base.DroolsQuery;
+import java.util.List;
+
+import org.drools.core.base.DroolsQueryImpl;
import org.drools.core.common.ActivationsManager;
import org.drools.core.common.BetaConstraints;
import org.drools.core.common.Memory;
-import org.drools.core.common.NetworkNode;
+import org.drools.base.common.NetworkNode;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.TupleSets;
import org.drools.core.common.TupleSetsImpl;
+import org.drools.core.reteoo.AbstractTerminalNode;
import org.drools.core.reteoo.AccumulateNode;
import org.drools.core.reteoo.AccumulateNode.AccumulateMemory;
import org.drools.core.reteoo.AsyncReceiveNode;
@@ -45,7 +51,7 @@
import org.drools.core.reteoo.LeftTupleSink;
import org.drools.core.reteoo.LeftTupleSinkNode;
import org.drools.core.reteoo.LeftTupleSource;
-import org.drools.core.reteoo.NodeTypeEnums;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.reteoo.NotNode;
import org.drools.core.reteoo.ObjectSink;
import org.drools.core.reteoo.PathMemory;
@@ -56,6 +62,7 @@
import org.drools.core.reteoo.RightInputAdapterNode;
import org.drools.core.reteoo.RightInputAdapterNode.RiaPathMemory;
import org.drools.core.reteoo.RightTuple;
+import org.drools.core.reteoo.RightTupleImpl;
import org.drools.core.reteoo.SegmentMemory;
import org.drools.core.reteoo.SubnetworkTuple;
import org.drools.core.reteoo.TerminalNode;
@@ -63,14 +70,12 @@
import org.drools.core.reteoo.TimerNode.TimerNodeMemory;
import org.drools.core.reteoo.Tuple;
import org.drools.core.reteoo.TupleMemory;
-import org.drools.core.rule.ContextEntry;
+import org.drools.base.rule.ContextEntry;
import org.drools.core.util.FastIterator;
import org.drools.core.util.LinkedList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.List;
-
import static org.drools.core.phreak.BuildtimeSegmentUtilities.nextNodePosMask;
import static org.drools.core.phreak.PhreakNotNode.updateBlockersAndPropagate;
import static org.drools.core.reteoo.BetaNode.getBetaMemory;
@@ -327,7 +332,7 @@ public void innerEval(PathMemory pmem,
boolean terminalNode = true;
switch (node.getType()) {
case NodeTypeEnums.RuleTerminalNode:
- pRtNode.doNode(( TerminalNode ) node, activationsManager, srcTuples, executor);
+ pRtNode.doNode((AbstractTerminalNode) node, activationsManager, srcTuples, executor);
break;
case NodeTypeEnums.QueryTerminalNode:
pQtNode.doNode((QueryTerminalNode) node, activationsManager, srcTuples, stack);
@@ -379,10 +384,10 @@ public void innerEval(PathMemory pmem,
}
}
- public TupleSets evalNode( PathMemory pmem, NetworkNode node, long bit, Memory nodeMem,
- SegmentMemory[] smems, int smemIndex, ActivationsManager activationsManager, LinkedList stack,
- boolean processRian, RuleExecutor executor, TupleSets srcTuples, SegmentMemory smem,
- TupleSets stagedLeftTuples, LeftTupleSinkNode sink ) {
+ public TupleSets evalNode(PathMemory pmem, NetworkNode node, long bit, Memory nodeMem,
+ SegmentMemory[] smems, int smemIndex, ActivationsManager activationsManager, LinkedList stack,
+ boolean processRian, RuleExecutor executor, TupleSets srcTuples, SegmentMemory smem,
+ TupleSets stagedLeftTuples, LeftTupleSinkNode sink ) {
TupleSets trgTuples = new TupleSetsImpl<>();
if ( NodeTypeEnums.isBetaNode( node )) {
boolean exitInnerEval = evalBetaNode(pmem, node, nodeMem, smems, smemIndex, trgTuples, activationsManager, stack, processRian, executor, srcTuples, stagedLeftTuples, sink);
@@ -757,8 +762,8 @@ private void doRiaNode2(ReteEvaluator reteEvaluator,
}
public static void findLeftTupleBlocker(BetaNode betaNode, TupleMemory rtm,
- ContextEntry[] contextEntry, BetaConstraints constraints,
- LeftTuple leftTuple, boolean useLeftMemory) {
+ ContextEntry[] contextEntry, BetaConstraints constraints,
+ LeftTuple leftTuple, boolean useLeftMemory) {
// This method will also remove rightTuples that are from subnetwork where no leftmemory use used
FastIterator it = betaNode.getRightIterator(rtm);
for (RightTuple rightTuple = betaNode.getFirstRightTuple(leftTuple, rtm, it); rightTuple != null; ) {
@@ -791,7 +796,7 @@ public static void unlinkAndDeleteChildLeftTuple( LeftTuple childLeftTuple,
deleteChildLeftTuple( childLeftTuple, trgLeftTuples, stagedLeftTuples );
}
- public static void deleteChildLeftTuple( LeftTuple childLeftTuple, TupleSets trgLeftTuples, TupleSets stagedLeftTuples ) {
+ public static void deleteChildLeftTuple(LeftTuple childLeftTuple, TupleSets trgLeftTuples, TupleSets stagedLeftTuples ) {
if (childLeftTuple.isStagedOnRight()) {
( (SubnetworkTuple) childLeftTuple ).moveStagingFromRightToLeft();
} else {
@@ -964,14 +969,14 @@ public static boolean useLeftMemory(LeftTupleSource tupleSource, Tuple tuple) {
if (!tupleSource.isLeftTupleMemoryEnabled()) {
// This is a hack, to not add closed DroolsQuery objects
Object object = tuple.getRootTuple().getFactHandle().getObject();
- if (!(object instanceof DroolsQuery) || !((DroolsQuery) object).isOpen()) {
+ if (!(object instanceof DroolsQueryImpl) || !((DroolsQueryImpl) object).isOpen()) {
useLeftMemory = false;
}
}
return useLeftMemory;
}
- public static void normalizeStagedTuples( TupleSets stagedLeftTuples, LeftTuple childLeftTuple ) {
+ public static void normalizeStagedTuples(TupleSets stagedLeftTuples, LeftTuple childLeftTuple ) {
if (!childLeftTuple.isStagedOnRight()) {
switch ( childLeftTuple.getStagedType() ) {
// handle clash with already staged entries
diff --git a/drools-core/src/main/java/org/drools/core/phreak/RuntimeSegmentUtilities.java b/drools-core/src/main/java/org/drools/core/phreak/RuntimeSegmentUtilities.java
index 63451180c75..5fdbc510809 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/RuntimeSegmentUtilities.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/RuntimeSegmentUtilities.java
@@ -1,35 +1,37 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
+import org.drools.base.reteoo.NodeTypeEnums;
+import org.drools.base.rule.constraint.QueryNameConstraint;
import org.drools.core.common.Memory;
import org.drools.core.common.MemoryFactory;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.reteoo.AlphaNode;
import org.drools.core.reteoo.BetaNode;
-import org.drools.core.reteoo.EntryPointNode;
import org.drools.core.reteoo.LeftInputAdapterNode;
import org.drools.core.reteoo.LeftInputAdapterNode.LiaNodeMemory;
import org.drools.core.reteoo.LeftTupleNode;
import org.drools.core.reteoo.LeftTupleSinkNode;
import org.drools.core.reteoo.LeftTupleSinkPropagator;
import org.drools.core.reteoo.LeftTupleSource;
-import org.drools.core.reteoo.NodeTypeEnums;
import org.drools.core.reteoo.ObjectSink;
-import org.drools.core.reteoo.ObjectSource;
import org.drools.core.reteoo.ObjectTypeNode;
import org.drools.core.reteoo.PathEndNode;
import org.drools.core.reteoo.PathMemory;
@@ -37,7 +39,6 @@
import org.drools.core.reteoo.RightInputAdapterNode;
import org.drools.core.reteoo.SegmentMemory;
import org.drools.core.reteoo.SegmentMemory.SegmentPrototype;
-import org.drools.core.rule.constraint.QueryNameConstraint;
import static org.drools.core.phreak.EagerPhreakBuilder.isInsideSubnetwork;
@@ -64,7 +65,7 @@ public static SegmentMemory getOrCreateSegmentMemory(Memory memory, LeftTupleNod
smem = restoreSegmentFromPrototype(reteEvaluator, segmentRoot);
if ( smem != null ) {
- if (NodeTypeEnums.isBetaNode(segmentRoot) && ((BetaNode) segmentRoot).isRightInputIsRiaNode()) {
+ if (NodeTypeEnums.isBetaNode(segmentRoot) && segmentRoot.isRightInputIsRiaNode()) {
createRiaSegmentMemory((BetaNode) segmentRoot, reteEvaluator);
}
return smem;
@@ -103,8 +104,9 @@ private static SegmentMemory restoreSegmentFromPrototype(ReteEvaluator reteEvalu
return smem;
}
- public static SegmentMemory getQuerySegmentMemory(ReteEvaluator reteEvaluator, LeftTupleSource segmentRoot, QueryElementNode queryNode) {
- LeftInputAdapterNode liaNode = getQueryLiaNode(queryNode.getQueryElement().getQueryName(), getQueryOtn(segmentRoot));
+ public static SegmentMemory getQuerySegmentMemory(ReteEvaluator reteEvaluator, QueryElementNode queryNode) {
+ ObjectTypeNode queryOtn = reteEvaluator.getDefaultEntryPoint().getEntryPointNode().getQueryNode();
+ LeftInputAdapterNode liaNode = getQueryLiaNode(queryNode.getQueryElement().getQueryName(), queryOtn);
LiaNodeMemory liam = reteEvaluator.getNodeMemory(liaNode);
SegmentMemory querySmem = liam.getSegmentMemory();
if (querySmem == null) {
@@ -206,20 +208,6 @@ public static void initializePathMemory(ReteEvaluator reteEvaluator, PathEndNode
}
}
- private static ObjectTypeNode getQueryOtn(LeftTupleSource lts) {
- while (!(lts instanceof LeftInputAdapterNode)) {
- lts = lts.getLeftTupleSource();
- }
-
- LeftInputAdapterNode liaNode = (LeftInputAdapterNode) lts;
- ObjectSource os = liaNode.getObjectSource();
- while (!(os instanceof EntryPointNode)) {
- os = os.getParentObjectSource();
- }
-
- return ((EntryPointNode) os).getQueryNode();
- }
-
private static LeftInputAdapterNode getQueryLiaNode(String queryName, ObjectTypeNode queryOtn) {
for (ObjectSink sink : queryOtn.getObjectSinkPropagator().getSinks()) {
AlphaNode alphaNode = (AlphaNode) sink;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/SegmentPropagator.java b/drools-core/src/main/java/org/drools/core/phreak/SegmentPropagator.java
index c2d397675a0..2b9ba365f14 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/SegmentPropagator.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/SegmentPropagator.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.Iterator;
@@ -27,7 +30,7 @@
import static org.drools.core.phreak.TupleEvaluationUtil.forceFlushLeftTuple;
import static org.drools.core.phreak.TupleEvaluationUtil.forceFlushWhenRiaNode;
-import static org.drools.core.reteoo.NodeTypeEnums.hasNodeMemory;
+import static org.drools.base.reteoo.NodeTypeEnums.hasNodeMemory;
public class SegmentPropagator {
@@ -139,7 +142,7 @@ private static void updateChildLeftTupleDuringInsert(LeftTuple childLeftTuple, T
}
}
- private static void processPeerDeletes( LeftTuple leftTuple, SegmentMemory firstSmem ) {
+ private static void processPeerDeletes(LeftTuple leftTuple, SegmentMemory firstSmem ) {
for (; leftTuple != null; leftTuple = leftTuple.getStagedNext()) {
SegmentMemory smem = firstSmem.getNext();
if ( smem != null ) {
diff --git a/drools-core/src/main/java/org/drools/core/phreak/StackEntry.java b/drools-core/src/main/java/org/drools/core/phreak/StackEntry.java
index 677fd4e8cfe..e6cb8265bff 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/StackEntry.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/StackEntry.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.Memory;
-import org.drools.core.common.NetworkNode;
+import org.drools.base.common.NetworkNode;
import org.drools.core.common.TupleSets;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleSinkNode;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/SynchronizedBypassPropagationList.java b/drools-core/src/main/java/org/drools/core/phreak/SynchronizedBypassPropagationList.java
index ffbaa91c483..cd94fc298f7 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/SynchronizedBypassPropagationList.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/SynchronizedBypassPropagationList.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import java.util.concurrent.atomic.AtomicBoolean;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/SynchronizedPropagationList.java b/drools-core/src/main/java/org/drools/core/phreak/SynchronizedPropagationList.java
index 84ed5bee35a..ac7899931e4 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/SynchronizedPropagationList.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/SynchronizedPropagationList.java
@@ -1,45 +1,50 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
-import java.util.Iterator;
-
import org.drools.core.common.ReteEvaluator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Iterator;
+
public class SynchronizedPropagationList implements PropagationList {
protected static final Logger log = LoggerFactory.getLogger( SynchronizedPropagationList.class );
- protected final ReteEvaluator reteEvaluator;
+ protected ReteEvaluator reteEvaluator;
protected volatile PropagationEntry head;
protected volatile PropagationEntry tail;
- private volatile boolean disposed = false;
+ protected volatile boolean disposed = false;
- private volatile boolean hasEntriesDeferringExpiration = false;
+ protected volatile boolean hasEntriesDeferringExpiration = false;
- private volatile boolean firingUntilHalt = false;
+ protected volatile boolean firingUntilHalt = false;
public SynchronizedPropagationList(ReteEvaluator reteEvaluator) {
this.reteEvaluator = reteEvaluator;
}
+ public SynchronizedPropagationList(){}
+
@Override
public void addEntry(final PropagationEntry entry) {
if (entry.requiresImmediateFlushing()) {
diff --git a/drools-core/src/main/java/org/drools/core/phreak/ThreadUnsafePropagationList.java b/drools-core/src/main/java/org/drools/core/phreak/ThreadUnsafePropagationList.java
index b8d27ca4238..c169b9fddb8 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/ThreadUnsafePropagationList.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/ThreadUnsafePropagationList.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2021. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
import java.util.Collections;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/TupleEntry.java b/drools-core/src/main/java/org/drools/core/phreak/TupleEntry.java
index dcb3e981fc5..c3dee474621 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/TupleEntry.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/TupleEntry.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.phreak;
import org.drools.core.common.Memory;
diff --git a/drools-core/src/main/java/org/drools/core/phreak/TupleEvaluationUtil.java b/drools-core/src/main/java/org/drools/core/phreak/TupleEvaluationUtil.java
index 6149fd1cc89..c6799544d18 100644
--- a/drools-core/src/main/java/org/drools/core/phreak/TupleEvaluationUtil.java
+++ b/drools-core/src/main/java/org/drools/core/phreak/TupleEvaluationUtil.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.phreak;
import java.util.ArrayList;
@@ -27,7 +30,7 @@
import org.drools.core.reteoo.AbstractTerminalNode;
import org.drools.core.reteoo.LeftTuple;
import org.drools.core.reteoo.LeftTupleNode;
-import org.drools.core.reteoo.NodeTypeEnums;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.reteoo.PathEndNode;
import org.drools.core.reteoo.PathMemory;
import org.drools.core.reteoo.SegmentMemory;
diff --git a/drools-core/src/main/java/org/drools/core/process/AbstractProcessContext.java b/drools-core/src/main/java/org/drools/core/process/AbstractProcessContext.java
index 9ff6556cf7a..2823b2edeec 100644
--- a/drools-core/src/main/java/org/drools/core/process/AbstractProcessContext.java
+++ b/drools-core/src/main/java/org/drools/core/process/AbstractProcessContext.java
@@ -1,17 +1,21 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process;
import org.kie.api.runtime.KieRuntime;
diff --git a/drools-core/src/main/java/org/drools/core/process/ProcessContext.java b/drools-core/src/main/java/org/drools/core/process/ProcessContext.java
index ad1a4a0b04a..f31dd9538d8 100644
--- a/drools-core/src/main/java/org/drools/core/process/ProcessContext.java
+++ b/drools-core/src/main/java/org/drools/core/process/ProcessContext.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process;
import java.util.Collection;
diff --git a/drools-core/src/main/java/org/drools/core/process/WorkItem.java b/drools-core/src/main/java/org/drools/core/process/WorkItem.java
index 64fa60192be..9fdef51c6d6 100644
--- a/drools-core/src/main/java/org/drools/core/process/WorkItem.java
+++ b/drools-core/src/main/java/org/drools/core/process/WorkItem.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process;
import java.util.Map;
diff --git a/drools-core/src/main/java/org/drools/core/process/WorkItemHandler.java b/drools-core/src/main/java/org/drools/core/process/WorkItemHandler.java
index 3399ac4447d..4e1873684f3 100644
--- a/drools-core/src/main/java/org/drools/core/process/WorkItemHandler.java
+++ b/drools-core/src/main/java/org/drools/core/process/WorkItemHandler.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process;
public interface WorkItemHandler extends org.kie.api.runtime.process.WorkItemHandler {
diff --git a/drools-core/src/main/java/org/drools/core/process/WorkItemListener.java b/drools-core/src/main/java/org/drools/core/process/WorkItemListener.java
index 8e9950ae71d..135f10a6b6f 100644
--- a/drools-core/src/main/java/org/drools/core/process/WorkItemListener.java
+++ b/drools-core/src/main/java/org/drools/core/process/WorkItemListener.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process;
import org.kie.api.runtime.process.WorkItem;
diff --git a/drools-core/src/main/java/org/drools/core/process/WorkItemManager.java b/drools-core/src/main/java/org/drools/core/process/WorkItemManager.java
index 191122d9129..f67ec006e41 100644
--- a/drools-core/src/main/java/org/drools/core/process/WorkItemManager.java
+++ b/drools-core/src/main/java/org/drools/core/process/WorkItemManager.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process;
import java.util.Map;
diff --git a/drools-core/src/main/java/org/drools/core/process/WorkItemManagerFactory.java b/drools-core/src/main/java/org/drools/core/process/WorkItemManagerFactory.java
index ba115273123..de1aabbdae5 100644
--- a/drools-core/src/main/java/org/drools/core/process/WorkItemManagerFactory.java
+++ b/drools-core/src/main/java/org/drools/core/process/WorkItemManagerFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process;
import org.drools.core.common.InternalKnowledgeRuntime;
diff --git a/drools-core/src/main/java/org/drools/core/process/impl/DefaultWorkItemManager.java b/drools-core/src/main/java/org/drools/core/process/impl/DefaultWorkItemManager.java
index 92e804ed22a..8df599745a9 100644
--- a/drools-core/src/main/java/org/drools/core/process/impl/DefaultWorkItemManager.java
+++ b/drools-core/src/main/java/org/drools/core/process/impl/DefaultWorkItemManager.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process.impl;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/process/impl/DefaultWorkItemManagerFactory.java b/drools-core/src/main/java/org/drools/core/process/impl/DefaultWorkItemManagerFactory.java
index 6137def8285..f31d34e26be 100644
--- a/drools-core/src/main/java/org/drools/core/process/impl/DefaultWorkItemManagerFactory.java
+++ b/drools-core/src/main/java/org/drools/core/process/impl/DefaultWorkItemManagerFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process.impl;
import java.io.Externalizable;
diff --git a/drools-core/src/main/java/org/drools/core/process/impl/WorkItemImpl.java b/drools-core/src/main/java/org/drools/core/process/impl/WorkItemImpl.java
index aea1ac5d50c..1a080ceeaa4 100644
--- a/drools-core/src/main/java/org/drools/core/process/impl/WorkItemImpl.java
+++ b/drools-core/src/main/java/org/drools/core/process/impl/WorkItemImpl.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.process.impl;
import java.io.Serializable;
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AbstractLeftTupleSinkAdapter.java b/drools-core/src/main/java/org/drools/core/reteoo/AbstractLeftTupleSinkAdapter.java
index 4956a9b69cb..113890a1415 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AbstractLeftTupleSinkAdapter.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AbstractLeftTupleSinkAdapter.java
@@ -1,26 +1,28 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import org.drools.core.common.RuleBasePartitionId;
+import org.drools.base.common.RuleBasePartitionId;
/**
* An abstract super class for the LeftTupleSinkAdapters
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AbstractTerminalNode.java b/drools-core/src/main/java/org/drools/core/reteoo/AbstractTerminalNode.java
index e89b6cd4280..5faba436799 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AbstractTerminalNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AbstractTerminalNode.java
@@ -1,42 +1,45 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.reteoo;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Consumer;
-
+import org.drools.base.base.ObjectType;
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.definitions.rule.impl.RuleImpl;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.GroupElement;
+import org.drools.base.rule.Pattern;
import org.drools.core.RuleBaseConfiguration;
-import org.drools.core.base.ObjectType;
import org.drools.core.common.BaseNode;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.common.RuleBasePartitionId;
import org.drools.core.common.UpdateContext;
-import org.drools.core.definitions.rule.impl.RuleImpl;
import org.drools.core.reteoo.SegmentMemory.SegmentPrototype;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.GroupElement;
-import org.drools.core.rule.Pattern;
-import org.drools.core.util.bitmask.AllSetBitMask;
-import org.drools.core.util.bitmask.BitMask;
-import org.drools.core.util.bitmask.EmptyBitMask;
+import org.drools.util.bitmask.AllSetBitMask;
+import org.drools.util.bitmask.BitMask;
+import org.drools.util.bitmask.EmptyBitMask;
-import static org.drools.core.reteoo.PropertySpecificUtil.isPropertyReactive;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Consumer;
+
+import static org.drools.base.reteoo.PropertySpecificUtil.isPropertyReactive;
public abstract class AbstractTerminalNode extends BaseNode implements TerminalNode {
/** The rule to invoke upon match. */
@@ -77,10 +80,10 @@ public abstract class AbstractTerminalNode extends BaseNode implements TerminalN
public AbstractTerminalNode() { }
- public AbstractTerminalNode(int id, RuleBasePartitionId partitionId, boolean partitionsEnabled, LeftTupleSource source,
+ public AbstractTerminalNode(int id, RuleBasePartitionId partitionId, LeftTupleSource source,
BuildContext context,
RuleImpl rule, GroupElement subrule, int subruleIndex) {
- super(id, partitionId, partitionsEnabled);
+ super(id, partitionId);
this.tupleSource = source;
this.rule = rule;
this.subrule = subrule;
@@ -214,7 +217,7 @@ protected void initDeclaredMask(BuildContext context) {
Pattern pattern = context.getLastBuiltPatterns()[0];
ObjectType objectType = pattern.getObjectType();
- if ( isPropertyReactive(context, objectType) ) {
+ if ( isPropertyReactive(context.getRuleBase(), objectType) ) {
List accessibleProperties = pattern.getAccessibleProperties( context.getRuleBase() );
setDeclaredMask( pattern.getPositiveWatchMask(accessibleProperties) );
setNegativeMask( pattern.getNegativeWatchMask(accessibleProperties) );
@@ -255,8 +258,8 @@ public static PathMemory initPathMemory( PathEndNode pathEndNode, PathMemory pme
}
public LeftTuple createPeer(LeftTuple original) {
- RuleTerminalNodeLeftTuple peer = (RuleTerminalNodeLeftTuple) AgendaComponentFactory.get().createTerminalTuple();
- peer.initPeer( (BaseLeftTuple) original, this );
+ LeftTuple peer = AgendaComponentFactory.get().createTerminalTuple();
+ peer.initPeer(original, this);
original.setPeer( peer );
return peer;
}
@@ -336,15 +339,6 @@ public final boolean hasPathNode(LeftTupleNode node) {
return false;
}
- public final boolean isTerminalNodeOf(LeftTupleNode node) {
- for (PathEndNode pathEndNode : getPathEndNodes()) {
- if (pathEndNode.hasPathNode( node )) {
- return true;
- }
- }
- return false;
- }
-
public LeftTupleSinkPropagator getSinkPropagator() {
return EmptyLeftTupleSinkAdapter.getInstance();
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/BaseTuple.java b/drools-core/src/main/java/org/drools/core/reteoo/AbstractTuple.java
similarity index 65%
rename from drools-core/src/main/java/org/drools/core/reteoo/BaseTuple.java
rename to drools-core/src/main/java/org/drools/core/reteoo/AbstractTuple.java
index 65b739942a3..fe770fb8193 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/BaseTuple.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AbstractTuple.java
@@ -1,27 +1,30 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
-import org.drools.core.common.EventFactHandle;
+import org.drools.core.common.DefaultEventHandle;
import org.drools.core.common.InternalFactHandle;
-import org.drools.core.rule.Declaration;
+import org.drools.base.rule.Declaration;
import org.drools.core.common.PropagationContext;
+import org.kie.api.runtime.rule.FactHandle;
-public abstract class BaseTuple implements Tuple {
+public abstract class AbstractTuple implements Tuple {
private short stagedType;
private Object contextObject;
@@ -34,9 +37,9 @@ public abstract class BaseTuple implements Tuple {
protected Tuple stagedPrevious;
private Tuple previous;
- private Tuple next;
+ private AbstractTuple next;
- protected Sink sink;
+ private Sink sink;
protected Tuple handlePrevious;
protected Tuple handleNext;
@@ -79,12 +82,12 @@ public InternalFactHandle getFactHandle() {
* cloned and linked by a WindowNode
*/
public InternalFactHandle getOriginalFactHandle() {
- InternalFactHandle linkedFH = handle.isEvent() ? ((EventFactHandle)handle).getLinkedFactHandle() : null;
+ InternalFactHandle linkedFH = handle.isEvent() ? ((DefaultEventHandle)handle).getLinkedFactHandle() : null;
return linkedFH != null ? linkedFH : handle;
}
- public void setFactHandle( InternalFactHandle handle ) {
- this.handle = handle;
+ public void setFactHandle( FactHandle handle ) {
+ this.handle = (InternalFactHandle) handle;
}
public PropagationContext getPropagationContext() {
@@ -111,11 +114,11 @@ public void setPrevious(Tuple previous) {
this.previous = previous;
}
- public Tuple getNext() {
+ public AbstractTuple getNext() {
return next;
}
- public void setNext(Tuple next) {
+ public void setNext(AbstractTuple next) {
this.next = next;
}
@@ -126,30 +129,10 @@ public void clear() {
}
@Override
- public InternalFactHandle get( Declaration declaration ) {
+ public FactHandle get(Declaration declaration) {
return get(declaration.getTupleIndex());
}
- @Override
- public void increaseActivationCountForEvents() {
- for ( Tuple entry = skipEmptyHandles(); entry != null; entry = entry.getParent() ) {
- if(entry.getFactHandle().isEvent()) {
- // can be null for eval, not and exists that have no right input
- ((EventFactHandle)entry.getFactHandle()).increaseActivationsCount();
- }
- }
- }
-
- @Override
- public void decreaseActivationCountForEvents() {
- for ( Tuple entry = skipEmptyHandles(); entry != null; entry = entry.getParent() ) {
- if(entry.getFactHandle().isEvent()) {
- // can be null for eval, not and exists that have no right input
- ((EventFactHandle)entry.getFactHandle()).decreaseActivationsCount();
- }
- }
- }
-
@Override
public Tuple getTuple(int index) {
Tuple entry = this;
@@ -199,4 +182,12 @@ public boolean isExpired() {
public void setExpired() {
this.expired = true;
}
+
+ protected Sink getSink() {
+ return sink;
+ }
+
+ protected void setSink(Sink sink) {
+ this.sink = sink;
+ }
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AccumulateNode.java b/drools-core/src/main/java/org/drools/core/reteoo/AccumulateNode.java
index 707e763f3c6..4e95d6b71a5 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AccumulateNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AccumulateNode.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.util.Arrays;
@@ -21,26 +23,28 @@
import java.util.List;
import java.util.Map;
+import org.drools.base.reteoo.AccumulateContextEntry;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.RuleBaseConfiguration;
-import org.drools.core.base.ClassObjectType;
+import org.drools.base.base.ClassObjectType;
import org.drools.core.common.BetaConstraints;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.Memory;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.impl.RuleBase;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.phreak.PhreakAccumulateNode;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.Accumulate;
-import org.drools.core.rule.ContextEntry;
-import org.drools.core.rule.Declaration;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.TypeDeclaration;
-import org.drools.core.rule.accessor.Accumulator;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
-import org.drools.core.base.ObjectType;
+import org.drools.base.rule.Accumulate;
+import org.drools.base.rule.ContextEntry;
+import org.drools.base.rule.Declaration;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.TypeDeclaration;
+import org.drools.base.rule.accessor.Accumulator;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
+import org.drools.base.base.ObjectType;
import org.drools.core.common.PropagationContext;
import org.drools.core.util.AbstractBaseLinkedListNode;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
import org.drools.core.util.index.TupleList;
/**
@@ -92,7 +96,7 @@ public AccumulateNode(final int id,
}
- private void addAccFunctionDeclarationsToLeftMask(RuleBase ruleBase, LeftTupleSource leftInput, Accumulate accumulate ) {
+ private void addAccFunctionDeclarationsToLeftMask(InternalRuleBase ruleBase, LeftTupleSource leftInput, Accumulate accumulate) {
BitMask leftMask = getLeftInferredMask();
ObjectType leftObjectType = leftInput.getObjectType();
if (leftObjectType instanceof ClassObjectType ) {
@@ -281,72 +285,6 @@ public interface BaseAccumulation {
}
- public static class AccumulateContextEntry {
- private Object key;
- private InternalFactHandle resultFactHandle;
- private LeftTuple resultLeftTuple;
- private boolean propagated;
- private Object functionContext;
- private boolean toPropagate;
- private boolean empty = true;
-
- public AccumulateContextEntry(Object key) {
- this.key = key;
- }
-
- public InternalFactHandle getResultFactHandle() {
- return resultFactHandle;
- }
-
- public void setResultFactHandle(InternalFactHandle resultFactHandle) {
- this.resultFactHandle = resultFactHandle;
- }
-
- public LeftTuple getResultLeftTuple() {
- return resultLeftTuple;
- }
-
- public void setResultLeftTuple(LeftTuple resultLeftTuple) {
- this.resultLeftTuple = resultLeftTuple;
- }
-
- public boolean isPropagated() {
- return propagated;
- }
-
- public void setPropagated( boolean propagated ) {
- this.propagated = propagated;
- }
-
- public boolean isToPropagate() {
- return toPropagate;
- }
-
- public void setToPropagate(boolean toPropagate) {
- this.toPropagate = toPropagate;
- }
-
- public Object getFunctionContext() {
- return functionContext;
- }
-
- public void setFunctionContext(Object context) {
- this.functionContext = context;
- }
-
- public Object getKey() {
- return this.key;
- }
-
- public boolean isEmpty() {
- return empty;
- }
-
- public void setEmpty( boolean empty ) {
- this.empty = empty;
- }
- }
-
public static class AccumulateContext extends AccumulateContextEntry implements BaseAccumulation {
private PropagationContext propagationContext;
@@ -468,7 +406,7 @@ public LeftTuple createLeftTuple(LeftTuple leftTuple,
public LeftTuple createPeer(LeftTuple original) {
JoinNodeLeftTuple peer = new JoinNodeLeftTuple();
- peer.initPeer((BaseLeftTuple) original, this);
+ peer.initPeer(original, this);
original.setPeer(peer);
return peer;
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AgendaComponentFactory.java b/drools-core/src/main/java/org/drools/core/reteoo/AgendaComponentFactory.java
index 15a419f6362..30279742fa7 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AgendaComponentFactory.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AgendaComponentFactory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import org.drools.core.common.InternalAgendaGroup;
@@ -46,7 +48,7 @@ static AgendaComponentFactory get() {
return AgendaComponentFactory.Holder.INSTANCE;
}
- public class AgendaComponentFactoryImpl implements AgendaComponentFactory {
+ class AgendaComponentFactoryImpl implements AgendaComponentFactory {
public AgendaComponentFactoryImpl() {
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AlphaNode.java b/drools-core/src/main/java/org/drools/core/reteoo/AlphaNode.java
index d1b14439ec5..8555aa78176 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AlphaNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AlphaNode.java
@@ -1,35 +1,39 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
-import java.util.List;
-
-import org.drools.core.base.ObjectType;
+import org.drools.base.base.ObjectType;
+import org.drools.base.common.NetworkNode;
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.reteoo.BaseTerminalNode;
+import org.drools.base.reteoo.NodeTypeEnums;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.InternalWorkingMemory;
-import org.drools.core.common.NetworkNode;
import org.drools.core.common.PropagationContext;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.common.RuleBasePartitionId;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
import org.kie.api.definition.rule.Rule;
+import java.util.List;
+
/**
* AlphaNodes are nodes in the Rete network used
* to apply FieldConstraint<.code>s on asserted fact
@@ -71,11 +75,10 @@ public AlphaNode(final int id,
final ObjectSource objectSource,
final BuildContext context) {
super(id,
- context.getPartitionId(),
- context.getRuleBase().getRuleBaseConfiguration().isMultithreadEvaluation(),
- objectSource,
- context.getRuleBase().getRuleBaseConfiguration().getAlphaNodeHashingThreshold(),
- context.getRuleBase().getRuleBaseConfiguration().getAlphaNodeRangeIndexThreshold());
+ context.getPartitionId(),
+ objectSource,
+ context.getRuleBase().getRuleBaseConfiguration().getAlphaNodeHashingThreshold(),
+ context.getRuleBase().getRuleBaseConfiguration().getAlphaNodeRangeIndexThreshold());
this.constraint = constraint.cloneIfInUse();
this.constraint.registerEvaluationContext(context);
@@ -279,12 +282,12 @@ public boolean isAssociatedWith(Rule rule) {
}
@Override
- public void addAssociatedTerminal(TerminalNode terminalNode) {
+ public void addAssociatedTerminal(BaseTerminalNode terminalNode) {
sink.addAssociatedTerminal(terminalNode);
}
@Override
- public void removeAssociatedTerminal(TerminalNode terminalNode) {
+ public void removeAssociatedTerminal(BaseTerminalNode terminalNode) {
sink.removeAssociatedTerminal(terminalNode);
}
@@ -294,7 +297,7 @@ public int getAssociatedTerminalsSize() {
}
@Override
- public boolean hasAssociatedTerminal(NetworkNode terminalNode) {
+ public boolean hasAssociatedTerminal(BaseTerminalNode terminalNode) {
return sink.hasAssociatedTerminal(terminalNode);
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AlphaTerminalNode.java b/drools-core/src/main/java/org/drools/core/reteoo/AlphaTerminalNode.java
index 269a7c2c213..c2b9ff969cf 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AlphaTerminalNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AlphaTerminalNode.java
@@ -1,22 +1,26 @@
-/*
- * Copyright (c) 2020. Red Hat, Inc. and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import org.drools.core.common.ActivationsManager;
import org.drools.core.common.InternalFactHandle;
-import org.drools.core.common.NetworkNode;
+import org.drools.base.common.NetworkNode;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.phreak.PhreakRuleTerminalNode;
import org.drools.core.phreak.RuleAgendaItem;
@@ -42,7 +46,7 @@ public void assertObject( InternalFactHandle factHandle, PropagationContext prop
for (int i = 0; i < sinks.length; i++) {
TerminalNode rtn = ( TerminalNode ) sinks[i];
RuleAgendaItem agendaItem = getRuleAgendaItem( reteEvaluator, activationsManager, rtn, true );
- LeftTuple leftTuple = rtn.createLeftTuple( factHandle, true );
+ LeftTuple leftTuple = rtn.createLeftTuple(factHandle, true );
leftTuple.setPropagationContext( propagationContext );
if ( rtn.getRule().getAutoFocus() && !agendaItem.getAgendaGroup().isActive() ) {
@@ -90,7 +94,7 @@ public void modifyObject(InternalFactHandle factHandle, ModifyPreviousTuples mod
public void retractLeftTuple(LeftTuple leftTuple, PropagationContext context, ReteEvaluator reteEvaluator) {
ActivationsManager activationsManager = reteEvaluator.getActivationsManager();
leftTuple.setPropagationContext( context );
- TerminalNode rtn = leftTuple.getTupleSink();
+ TerminalNode rtn = (TerminalNode) leftTuple.getTupleSink();
PhreakRuleTerminalNode.doLeftDelete( activationsManager, getRuleAgendaItem( reteEvaluator, activationsManager, rtn, false ).getRuleExecutor(), leftTuple );
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AsyncMessage.java b/drools-core/src/main/java/org/drools/core/reteoo/AsyncMessage.java
index 82e0ba65549..00ea5c5fea7 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AsyncMessage.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AsyncMessage.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import org.drools.core.common.ReteEvaluator;
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AsyncMessagesCoordinator.java b/drools-core/src/main/java/org/drools/core/reteoo/AsyncMessagesCoordinator.java
index a0f66bff340..00344dfbde9 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AsyncMessagesCoordinator.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AsyncMessagesCoordinator.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.util.ArrayList;
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AsyncReceiveNode.java b/drools-core/src/main/java/org/drools/core/reteoo/AsyncReceiveNode.java
index e1d0e83bee1..dc691de8d95 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AsyncReceiveNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AsyncReceiveNode.java
@@ -1,25 +1,28 @@
-/*
- * Copyright 2005 JBoss Inc
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.common.BetaConstraints;
import org.drools.core.common.EmptyBetaConstraints;
@@ -30,9 +33,9 @@
import org.drools.core.common.UpdateContext;
import org.drools.core.phreak.PropagationEntry;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.AsyncReceive;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
+import org.drools.base.rule.AsyncReceive;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
import org.drools.core.common.PropagationContext;
import org.drools.core.util.AbstractBaseLinkedListNode;
import org.drools.core.util.index.TupleList;
@@ -170,9 +173,9 @@ public AsyncReceiveMemory createMemory( final RuleBaseConfiguration config, Rete
}
@Override
- public LeftTuple createPeer( LeftTuple original ) {
+ public LeftTuple createPeer(LeftTuple original ) {
EvalNodeLeftTuple peer = new EvalNodeLeftTuple();
- peer.initPeer( ( BaseLeftTuple ) original, this );
+ peer.initPeer(original, this);
original.setPeer( peer );
return peer;
}
@@ -230,34 +233,34 @@ public short getType() {
return NodeTypeEnums.AsyncReceiveNode;
}
- public LeftTuple createLeftTuple( InternalFactHandle factHandle,
- boolean leftTupleMemoryEnabled ) {
+ public LeftTuple createLeftTuple(InternalFactHandle factHandle,
+ boolean leftTupleMemoryEnabled ) {
return new EvalNodeLeftTuple( factHandle, this, leftTupleMemoryEnabled );
}
- public LeftTuple createLeftTuple( final InternalFactHandle factHandle,
- final LeftTuple leftTuple,
- final Sink sink ) {
+ public LeftTuple createLeftTuple(final InternalFactHandle factHandle,
+ final LeftTuple leftTuple,
+ final Sink sink ) {
return new EvalNodeLeftTuple( factHandle, leftTuple, sink );
}
@Override
- public LeftTuple createLeftTuple( LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled ) {
+ public LeftTuple createLeftTuple(LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled ) {
return new EvalNodeLeftTuple(leftTuple, sink, pctx, leftTupleMemoryEnabled);
}
- public LeftTuple createLeftTuple( LeftTuple leftTuple,
- RightTuple rightTuple,
- Sink sink ) {
+ public LeftTuple createLeftTuple(LeftTuple leftTuple,
+ RightTuple rightTuple,
+ Sink sink ) {
return new EvalNodeLeftTuple( leftTuple, rightTuple, sink );
}
- public LeftTuple createLeftTuple( LeftTuple leftTuple,
- RightTuple rightTuple,
- LeftTuple currentLeftChild,
- LeftTuple currentRightChild,
- Sink sink,
- boolean leftTupleMemoryEnabled ) {
+ public LeftTuple createLeftTuple(LeftTuple leftTuple,
+ RightTuple rightTuple,
+ LeftTuple currentLeftChild,
+ LeftTuple currentRightChild,
+ Sink sink,
+ boolean leftTupleMemoryEnabled ) {
return new EvalNodeLeftTuple( leftTuple, rightTuple, currentLeftChild, currentRightChild, sink, leftTupleMemoryEnabled );
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/AsyncSendNode.java b/drools-core/src/main/java/org/drools/core/reteoo/AsyncSendNode.java
index b2595aad3d5..148eb323373 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/AsyncSendNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/AsyncSendNode.java
@@ -1,25 +1,28 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Objects;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.common.BetaConstraints;
import org.drools.core.common.EmptyBetaConstraints;
@@ -29,9 +32,9 @@
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.UpdateContext;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.AsyncSend;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
-import org.drools.core.rule.accessor.DataProvider;
+import org.drools.base.rule.AsyncSend;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
+import org.drools.base.rule.accessor.DataProvider;
import org.drools.core.common.PropagationContext;
import org.drools.core.util.AbstractBaseLinkedListNode;
import org.drools.core.util.index.TupleList;
@@ -176,7 +179,7 @@ public T createMemory(final RuleBaseConfiguration config, ReteEvaluator reteEval
@Override
public LeftTuple createPeer(LeftTuple original) {
JoinNodeLeftTuple peer = new JoinNodeLeftTuple();
- peer.initPeer( (BaseLeftTuple) original, this );
+ peer.initPeer(original, this);
original.setPeer( peer );
return peer;
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/BaseLeftTuple.java b/drools-core/src/main/java/org/drools/core/reteoo/BaseLeftTuple.java
deleted file mode 100644
index 5508595332e..00000000000
--- a/drools-core/src/main/java/org/drools/core/reteoo/BaseLeftTuple.java
+++ /dev/null
@@ -1,687 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.drools.core.reteoo;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-
-import org.drools.core.common.InternalFactHandle;
-import org.drools.core.common.PropagationContext;
-import org.drools.core.util.index.TupleList;
-
-/**
- * A parent class for all specific LeftTuple specializations
- *
- */
-public class BaseLeftTuple extends BaseTuple implements LeftTuple {
- private static final long serialVersionUID = 540l;
-
- private int index;
-
- private LeftTuple parent;
-
- // left and right tuples in parent
- private LeftTuple leftParent;
-
- private RightTuple rightParent;
- private LeftTuple rightParentPrevious;
- private LeftTuple rightParentNext;
-
- // children
- private LeftTuple firstChild;
- private LeftTuple lastChild;
-
- // node memory
- protected TupleList memory;
-
- private LeftTuple peer;
-
- private short stagedTypeForQueries;
-
- public BaseLeftTuple() {
- // constructor needed for serialisation
- }
-
- // ------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------
- public BaseLeftTuple(InternalFactHandle factHandle,
- Sink sink,
- boolean leftTupleMemoryEnabled) {
- setFactHandle( factHandle );
- this.sink = sink;
- if ( leftTupleMemoryEnabled ) {
- factHandle.addTupleInPosition( this );
- }
- }
-
- public BaseLeftTuple(InternalFactHandle factHandle,
- LeftTuple leftTuple,
- Sink sink) {
- setFactHandle( factHandle );
- this.index = leftTuple.getIndex() + 1;
- this.parent = leftTuple.getNextParentWithHandle();
- this.leftParent = leftTuple;
- this.sink = sink;
- }
-
- public BaseLeftTuple(LeftTuple leftTuple,
- Sink sink,
- PropagationContext pctx,
- boolean leftTupleMemoryEnabled) {
- this.index = leftTuple.getIndex() + 1;
- this.parent = leftTuple.getNextParentWithHandle();
- this.leftParent = leftTuple;
- setPropagationContext( pctx );
-
- if ( leftTupleMemoryEnabled ) {
- if ( leftTuple.getLastChild() != null ) {
- this.handlePrevious = leftTuple.getLastChild();
- this.handlePrevious.setHandleNext( this );
- } else {
- leftTuple.setFirstChild( this );
- }
- leftTuple.setLastChild( this );
- }
-
- this.sink = sink;
- }
-
- public BaseLeftTuple(LeftTuple leftTuple,
- RightTuple rightTuple,
- Sink sink) {
- this.index = leftTuple.getIndex() + 1;
- this.parent = leftTuple.getNextParentWithHandle();
- this.leftParent = leftTuple;
- this.rightParent = rightTuple;
-
- setFactHandle( rightTuple.getFactHandle() );
- setPropagationContext( rightTuple.getPropagationContext() );
-
- // insert at the end f the list
- if ( leftTuple.getLastChild() != null ) {
- this.handlePrevious = leftTuple.getLastChild();
- this.handlePrevious.setHandleNext( this );
- } else {
- leftTuple.setFirstChild( this );
- }
- leftTuple.setLastChild( this );
-
- // insert at the end of the list
- if ( rightTuple.getLastChild() != null ) {
- this.rightParentPrevious = rightTuple.getLastChild();
- this.rightParentPrevious.setRightParentNext( this );
- } else {
- rightTuple.setFirstChild( this );
- }
- rightTuple.setLastChild( this );
- this.sink = sink;
- }
-
- public BaseLeftTuple(LeftTuple leftTuple,
- RightTuple rightTuple,
- Sink sink,
- boolean leftTupleMemoryEnabled) {
- this( leftTuple,
- rightTuple,
- null,
- null,
- sink,
- leftTupleMemoryEnabled );
- }
-
- public BaseLeftTuple(LeftTuple leftTuple,
- RightTuple rightTuple,
- LeftTuple currentLeftChild,
- LeftTuple currentRightChild,
- Sink sink,
- boolean leftTupleMemoryEnabled) {
- setFactHandle( rightTuple.getFactHandle() );
- this.index = leftTuple.getIndex() + 1;
- this.parent = leftTuple.getNextParentWithHandle();
- this.leftParent = leftTuple;
- this.rightParent = rightTuple;
- setPropagationContext( rightTuple.getPropagationContext() );
-
- if ( leftTupleMemoryEnabled ) {
- if( currentLeftChild == null ) {
- // insert at the end of the list
- if ( leftTuple.getLastChild() != null ) {
- this.handlePrevious = leftTuple.getLastChild();
- this.handlePrevious.setHandleNext( this );
- } else {
- leftTuple.setFirstChild( this );
- }
- leftTuple.setLastChild( this );
- } else {
- // insert before current child
- this.handleNext = currentLeftChild;
- this.handlePrevious = currentLeftChild.getHandlePrevious();
- currentLeftChild.setHandlePrevious( this );
- if( this.handlePrevious == null ) {
- this.leftParent.setFirstChild( this );
- } else {
- this.handlePrevious.setHandleNext( this );
- }
- }
-
- if( currentRightChild == null ) {
- // insert at the end of the list
- if ( rightTuple.getLastChild() != null ) {
- this.rightParentPrevious = rightTuple.getLastChild();
- this.rightParentPrevious.setRightParentNext( this );
- } else {
- rightTuple.setFirstChild( this );
- }
- rightTuple.setLastChild( this );
- } else {
- // insert before current child
- this.rightParentNext = currentRightChild;
- this.rightParentPrevious = currentRightChild.getRightParentPrevious();
- currentRightChild.setRightParentPrevious( this );
- if( this.rightParentPrevious == null ) {
- this.rightParent.setFirstChild( this );
- } else {
- this.rightParentPrevious.setRightParentNext( this );
- }
- }
- }
-
- this.sink = sink;
- }
-
- @Override
- public LeftTuple getNextParentWithHandle() {
- // if parent is null, then we are LIAN
- return (handle!=null) ? this : parent != null ? parent.getNextParentWithHandle() : this;
- }
-
- @Override
- public void reAdd() {
- getFactHandle().addLastLeftTuple( this );
- }
-
- @Override
- public void reAddLeft() {
- // The parent can never be the FactHandle (root LeftTuple) as that is handled by reAdd()
- // make sure we aren't already at the end
- if ( this.handleNext != null ) {
- if ( this.handlePrevious != null ) {
- // remove the current LeftTuple from the middle of the chain
- this.handlePrevious.setHandleNext( this.handleNext );
- this.handleNext.setHandlePrevious( this.handlePrevious );
- } else {
- if( this.leftParent.getFirstChild() == this ) {
- // remove the current LeftTuple from start start of the chain
- this.leftParent.setFirstChild( getHandleNext() );
- }
- this.handleNext.setHandlePrevious( null );
- }
- // re-add to end
- this.handlePrevious = this.leftParent.getLastChild();
- this.handlePrevious.setHandleNext( this );
- this.leftParent.setLastChild( this );
- this.handleNext = null;
- }
- }
-
- @Override
- public void reAddRight() {
- // make sure we aren't already at the end
- if ( this.rightParentNext != null ) {
- if ( this.rightParentPrevious != null ) {
- // remove the current LeftTuple from the middle of the chain
- this.rightParentPrevious.setRightParentNext( this.rightParentNext );
- this.rightParentNext.setRightParentPrevious( this.rightParentPrevious );
- } else {
- if( this.rightParent.getFirstChild() == this ) {
- // remove the current LeftTuple from the start of the chain
- this.rightParent.setFirstChild( this.rightParentNext );
- }
- this.rightParentNext.setRightParentPrevious( null );
- }
- // re-add to end
- this.rightParentPrevious = this.rightParent.getLastChild();
- this.rightParentPrevious.setRightParentNext( this );
- this.rightParent.setLastChild( this );
- this.rightParentNext = null;
- }
- }
-
- @Override
- public void unlinkFromLeftParent() {
- LeftTuple previousParent = getHandlePrevious();
- LeftTuple nextParent = getHandleNext();
-
- if ( previousParent != null && nextParent != null ) {
- //remove from middle
- this.handlePrevious.setHandleNext( nextParent );
- this.handleNext.setHandlePrevious( previousParent );
- } else if ( nextParent != null ) {
- //remove from first
- if ( this.leftParent != null ) {
- this.leftParent.setFirstChild( nextParent );
- } else {
- // This is relevant to the root node and only happens at rule removal time
- getFactHandle().removeLeftTuple( this );
- }
- nextParent.setHandlePrevious( null );
- } else if ( previousParent != null ) {
- //remove from end
- if ( this.leftParent != null ) {
- this.leftParent.setLastChild( previousParent );
- } else {
- // relevant to the root node, as here the parent is the FactHandle, only happens at rule removal time
- getFactHandle().removeLeftTuple( this );
- }
- previousParent.setHandleNext( null );
- } else {
- // single remaining item, no previous or next
- if( leftParent != null ) {
- this.leftParent.setFirstChild( null );
- this.leftParent.setLastChild( null );
- } else {
- // it is a root tuple - only happens during rule removal
- getFactHandle().removeLeftTuple( this );
- }
- }
-
- this.handlePrevious = null;
- this.handleNext = null;
- }
-
- @Override
- public void unlinkFromRightParent() {
- if ( this.rightParent == null ) {
- // no right parent;
- return;
- }
-
- LeftTuple previousParent = this.rightParentPrevious;
- LeftTuple nextParent = this.rightParentNext;
-
- if ( previousParent != null && nextParent != null ) {
- // remove from middle
- this.rightParentPrevious.setRightParentNext( this.rightParentNext );
- this.rightParentNext.setRightParentPrevious( this.rightParentPrevious );
- } else if ( nextParent != null ) {
- // remove from the start
- this.rightParent.setFirstChild( nextParent );
- nextParent.setRightParentPrevious( null );
- } else if ( previousParent != null ) {
- // remove from end
- this.rightParent.setLastChild( previousParent );
- previousParent.setRightParentNext( null );
- } else {
- // single remaining item, no previous or next
- this.rightParent.setFirstChild( null );
- this.rightParent.setLastChild( null );
- }
-
- this.rightParentPrevious = null;
- this.rightParentNext = null;
- }
-
- @Override
- public int getIndex() {
- return this.index;
- }
-
- @Override
- public LeftTupleSink getTupleSink() {
- return (LeftTupleSink)sink;
- }
-
- /* Had to add the set method because sink adapters must override
- * the tuple sink set when the tuple was created.
- */
- @Override
- public void setLeftTupleSink( LeftTupleSink sink ) {
- this.sink = sink;
- }
-
- @Override
- public LeftTuple getLeftParent() {
- return leftParent;
- }
-
- @Override
- public void setLeftParent(LeftTuple leftParent) {
- this.leftParent = leftParent;
- }
-
- @Override
- public LeftTuple getHandlePrevious() {
- return (LeftTuple) handlePrevious;
- }
-
- @Override
- public LeftTuple getHandleNext() {
- return (LeftTuple) handleNext;
- }
-
- @Override
- public RightTuple getRightParent() {
- return rightParent;
- }
-
- @Override
- public void setRightParent(RightTuple rightParent) {
- this.rightParent = rightParent;
- }
-
- @Override
- public LeftTuple getRightParentPrevious() {
- return rightParentPrevious;
- }
-
- @Override
- public void setRightParentPrevious(LeftTuple rightParentLeft) {
- this.rightParentPrevious = rightParentLeft;
- }
-
- @Override
- public LeftTuple getRightParentNext() {
- return rightParentNext;
- }
-
- @Override
- public void setRightParentNext(LeftTuple rightParentRight) {
- this.rightParentNext = rightParentRight;
- }
-
- @Override
- public InternalFactHandle get(int index) {
- LeftTuple entry = this;
- while ( entry.getIndex() != index) {
- entry = entry.getParent();
- }
- return entry.getFactHandle();
- }
-
- public InternalFactHandle[] toFactHandles() {
- // always use the count of the node that created join (not the sink target)
- InternalFactHandle[] handles = new InternalFactHandle[((LeftTupleSinkNode)sink).getLeftTupleSource().getObjectCount()];
- LeftTuple entry = (LeftTuple) skipEmptyHandles();
- for(int i = handles.length-1; i >= 0; i--) {
- handles[i] = entry.getFactHandle();
- entry = entry.getParent();
- }
- return handles;
- }
-
- public Object[] toObjects(boolean reverse) {
- // always use the count of the node that created join (not the sink target)
- Object[] objs = new Object[((LeftTupleSinkNode)sink).getLeftTupleSource().getObjectCount()];
- LeftTuple entry = (LeftTuple) skipEmptyHandles();
-
- if (!reverse) {
- for (int i = objs.length - 1; i >= 0; i--) {
- objs[i] = entry.getFactHandle().getObject();
- entry = entry.getParent();
- }
- } else {
- for (int i = 0; i < objs.length; i++) {
- objs[i] = entry.getFactHandle().getObject();
- entry = entry.getParent();
- }
- }
-
- return objs;
- }
-
- public void clearBlocker() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void setBlocker(RightTuple blocker) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public RightTuple getBlocker() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public LeftTuple getBlockedPrevious() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void setBlockedPrevious(LeftTuple blockerPrevious) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public LeftTuple getBlockedNext() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void setBlockedNext(LeftTuple blockerNext) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String toString() {
- final StringBuilder buffer = new StringBuilder();
-
- Tuple entry = skipEmptyHandles();;
- while ( entry != null ) {
- //buffer.append( entry.handle );
- buffer.append(entry.getFactHandle());
- if ( entry.getParent() != null ) {
- buffer.append("\n");
- }
- entry = entry.getParent();
- }
- return buffer.toString();
- }
-
- @Override
- public int hashCode() {
- return getFactHandle() == null ? 0 : getFactHandle().hashCode();
- }
-
- @Override
- public boolean equals(Object object) {
- if (object == this) {
- return true;
- }
-
- if (!(object instanceof LeftTuple)) {
- return false;
- }
-
- LeftTuple other = ( (LeftTuple) object );
-
- // A LeftTuple is only the same if it has the same hashCode, factId and parent
- if ( this.hashCode() != other.hashCode() || getFactHandle() != other.getFactHandle() ) {
- return false;
- }
-
- if ( this.parent == null ) {
- return (other.getParent() == null);
- } else {
- return this.parent.equals( other.getParent() );
- }
- }
-
- @Override
- public int size() {
- return this.index + 1;
- }
-
- @Override
- public LeftTuple getFirstChild() {
- return firstChild;
- }
-
- @Override
- public void setFirstChild(LeftTuple firstChild) {
- this.firstChild = firstChild;
- }
-
- @Override
- public LeftTuple getLastChild() {
- return lastChild;
- }
-
- @Override
- public void setLastChild(LeftTuple lastChild) {
- this.lastChild = lastChild;
- }
-
- @Override
- public TupleList getMemory() {
- return this.memory;
- }
-
- @Override
- public void setMemory(TupleList memory) {
- this.memory = memory;
- }
-
- @Override
- public LeftTuple getStagedNext() {
- return (LeftTuple) stagedNext;
- }
-
- @Override
- public LeftTuple getStagedPrevious() {
- return (LeftTuple) stagedPrevious;
- }
-
- @Override
- public void clearStaged() {
- super.clearStaged();
- if (getContextObject() == Boolean.TRUE) {
- setContextObject( null );
- }
- }
-
- @Override
- public LeftTuple getPeer() {
- return peer;
- }
-
- @Override
- public void setPeer(LeftTuple peer) {
- this.peer = peer;
- }
-
- @Override
- public LeftTuple getSubTuple(final int elements) {
- LeftTuple entry = this;
- if ( elements <= this.size() ) {
- final int lastindex = elements - 1;
-
- while ( entry.getIndex() != lastindex ) {
- // This uses getLeftParent, instead of getParent, as the subnetwork tuple
- // parent could be any node
- entry = entry.getParent();
- }
- }
- return entry;
- }
-
- @Override
- public LeftTuple getParent() {
- return parent;
- }
-
- protected String toExternalString() {
- StringBuilder builder = new StringBuilder();
- builder.append( String.format( "%08X", System.identityHashCode( this ) ) ).append( ":" );
- long[] ids = new long[this.index+1];
- Tuple entry = skipEmptyHandles();;
- while( entry != null ) {
- ids[entry.getIndex()] = entry.getFactHandle().getId();
- entry = entry.getParent();
- }
- builder.append( Arrays.toString( ids ) )
- .append( " sink=" )
- .append( this.sink.getClass().getSimpleName() )
- .append( "(" ).append( sink.getId() ).append( ")" );
- return builder.toString();
- }
-
- @Override
- public void clear() {
- super.clear();
- this.memory = null;
- }
-
- public void initPeer(BaseLeftTuple original, LeftTupleSink sink) {
- this.index = original.index;
- this.parent = original.parent;
- this.leftParent = original.leftParent;
-
- setFactHandle( original.getFactHandle() );
- setPropagationContext( original.getPropagationContext() );
- this.sink = sink;
- }
-
- @Override
- public Object getObject(int index) {
- return get(index).getObject();
- }
-
- @Override
- public ObjectTypeNode.Id getInputOtnId() {
- return sink != null ? getTupleSink().getLeftInputOtnId() : null;
- }
-
- @Override
- public LeftTupleSource getTupleSource() {
- return sink != null ? getTupleSink().getLeftTupleSource() : null;
- }
-
- public short getStagedTypeForQueries() {
- return stagedTypeForQueries;
- }
-
- public void setStagedTypeForQueries( short stagedTypeForQueries ) {
- this.stagedTypeForQueries = stagedTypeForQueries;
- }
-
- public boolean isStagedOnRight() {
- return false;
- }
-
- @Override
- public Collection getAccumulatedObjects() {
- if (getFirstChild() == null) {
- return Collections.emptyList();
- }
- Collection result = new ArrayList<>();
- if ( getContextObject() instanceof AccumulateNode.AccumulateContext ) {
- for (LeftTuple child = getFirstChild(); child != null; child = child.getHandleNext()) {
- result.add(child.getContextObject());
- }
- }
- if ( getFirstChild().getRightParent() instanceof SubnetworkTuple ) {
- LeftTuple leftParent = (( SubnetworkTuple ) getFirstChild().getRightParent()).getLeftParent();
- result.addAll( leftParent.getAccumulatedObjects() );
- }
- return result;
- }
-}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/BetaMemory.java b/drools-core/src/main/java/org/drools/core/reteoo/BetaMemory.java
index eda532d6a45..a77dae57cfb 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/BetaMemory.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/BetaMemory.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import org.drools.core.common.Memory;
@@ -21,7 +23,7 @@
import org.drools.core.common.TupleSets;
import org.drools.core.common.TupleSetsImpl;
import org.drools.core.reteoo.RightInputAdapterNode.RiaPathMemory;
-import org.drools.core.rule.ContextEntry;
+import org.drools.base.rule.ContextEntry;
import org.drools.core.util.AbstractBaseLinkedListNode;
public class BetaMemory extends AbstractBaseLinkedListNode
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/BetaNode.java b/drools-core/src/main/java/org/drools/core/reteoo/BetaNode.java
index 785dc2c7d52..a7bb30f9ea8 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/BetaNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/BetaNode.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.util.ArrayList;
@@ -21,8 +23,9 @@
import java.util.List;
import java.util.Objects;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.RuleBaseConfiguration;
-import org.drools.core.base.ObjectType;
+import org.drools.base.base.ObjectType;
import org.drools.core.common.BetaConstraints;
import org.drools.core.common.DoubleBetaConstraints;
import org.drools.core.common.DoubleNonIndexSkipBetaConstraints;
@@ -33,7 +36,7 @@
import org.drools.core.common.QuadroupleBetaConstraints;
import org.drools.core.common.QuadroupleNonIndexSkipBetaConstraints;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.common.RuleBasePartitionId;
+import org.drools.base.common.RuleBasePartitionId;
import org.drools.core.common.SingleBetaConstraints;
import org.drools.core.common.SingleNonIndexSkipBetaConstraints;
import org.drools.core.common.TripleBetaConstraints;
@@ -42,20 +45,20 @@
import org.drools.core.common.UpdateContext;
import org.drools.core.reteoo.AccumulateNode.AccumulateMemory;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.IndexableConstraint;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.constraint.BetaNodeFieldConstraint;
+import org.drools.base.rule.IndexableConstraint;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.BetaNodeFieldConstraint;
import org.drools.core.util.FastIterator;
-import org.drools.core.util.bitmask.AllSetBitMask;
-import org.drools.core.util.bitmask.BitMask;
-import org.drools.core.util.bitmask.EmptyBitMask;
-import org.drools.core.util.index.IndexUtil;
+import org.drools.util.bitmask.AllSetBitMask;
+import org.drools.util.bitmask.BitMask;
+import org.drools.util.bitmask.EmptyBitMask;
+import org.drools.base.util.index.IndexUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.drools.core.phreak.RuleNetworkEvaluator.doUpdatesReorderChildLeftTuple;
import static org.drools.core.phreak.TupleEvaluationUtil.flushLeftTupleIfNecessary;
-import static org.drools.core.reteoo.PropertySpecificUtil.isPropertyReactive;
+import static org.drools.base.reteoo.PropertySpecificUtil.isPropertyReactive;
public abstract class BetaNode extends LeftTupleSource
implements
@@ -165,11 +168,11 @@ protected void initDeclaredMask(BuildContext context,
if (!isRightInputIsRiaNode()) {
ObjectType objectType = pattern.getObjectType();
- if (isPropertyReactive(context, objectType)) {
+ if (isPropertyReactive(context.getRuleBase(), objectType)) {
rightListenedProperties = pattern.getListenedProperties();
List accessibleProperties = pattern.getAccessibleProperties( context.getRuleBase() );
rightDeclaredMask = pattern.getPositiveWatchMask(accessibleProperties);
- rightDeclaredMask = rightDeclaredMask.setAll(constraints.getListenedPropertyMask(objectType, accessibleProperties));
+ rightDeclaredMask = rightDeclaredMask.setAll(constraints.getListenedPropertyMask(pattern, objectType, accessibleProperties));
rightNegativeMask = pattern.getNegativeWatchMask(accessibleProperties);
} else {
// if property reactive is not on, then accept all modification propagations
@@ -367,7 +370,7 @@ public void setRightInput( ObjectSource rightInput ) {
rightInputIsRiaNode = NodeTypeEnums.RightInputAdapterNode == rightInput.getType();
}
- public FastIterator getRightIterator( TupleMemory memory ) {
+ public FastIterator getRightIterator( TupleMemory memory ) {
if ( this.indexedUnificationJoin ) {
return memory.fullFastIterator();
} else {
@@ -375,17 +378,17 @@ public FastIterator getRightIterator( TupleMemory memory ) {
}
}
- public RightTuple getFirstRightTuple(final Tuple leftTuple,
+ public RightTupleImpl getFirstRightTuple(final Tuple leftTuple,
final TupleMemory memory,
final FastIterator it) {
if ( this.indexedUnificationJoin ) {
- return (RightTuple) it.next( null );
+ return (RightTupleImpl) it.next( null );
} else {
- return (RightTuple) memory.getFirst(leftTuple);
+ return (RightTupleImpl) memory.getFirst(leftTuple);
}
}
- public FastIterator getLeftIterator(TupleMemory memory) {
+ public FastIterator getLeftIterator(TupleMemory memory) {
if (rightInputIsRiaNode) {
return FastIterator.NullFastIterator.INSTANCE;
} else {
@@ -404,7 +407,7 @@ public LeftTuple getFirstLeftTuple(final RightTuple rightTuple,
return getStartTuple((SubnetworkTuple)rightTuple);
} else {
if ( this.indexedUnificationJoin ) {
- return (LeftTuple) it.next( null );
+ return (LeftTuple) it.next(null );
} else {
return (LeftTuple) memory.getFirst(rightTuple);
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/ClassObjectTypeConf.java b/drools-core/src/main/java/org/drools/core/reteoo/ClassObjectTypeConf.java
index 307074d9c70..810e8a01b73 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/ClassObjectTypeConf.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/ClassObjectTypeConf.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.beans.PropertyChangeListener;
@@ -27,20 +29,19 @@
import java.util.List;
import org.drools.core.WorkingMemoryEntryPoint;
-import org.drools.core.base.ClassObjectType;
-import org.drools.core.base.DroolsQuery;
-import org.drools.core.base.ObjectType;
+import org.drools.base.base.ClassObjectType;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.impl.RuleBase;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.core.impl.InternalRuleBase;
+import org.drools.base.rule.EntryPointId;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.core.rule.accessor.FactHandleFactory;
import org.drools.core.rule.consequence.InternalMatch;
-import org.drools.core.util.TimeIntervalParser;
+import org.drools.base.util.TimeIntervalParser;
import org.kie.api.definition.type.Expires;
import org.kie.api.definition.type.Role;
import org.kie.api.definition.type.Role.Type;
+import org.drools.base.base.ObjectType;
public class ClassObjectTypeConf
implements
@@ -74,7 +75,7 @@ public ClassObjectTypeConf() {
public ClassObjectTypeConf(final EntryPointId entryPoint,
final Class< ? > clazz,
- final RuleBase ruleBase) {
+ final InternalRuleBase ruleBase) {
this.cls = (InternalMatch.class.isAssignableFrom(clazz) ) ? ClassObjectType.Match_ObjectType.getClassType() : clazz;
this.entryPoint = entryPoint;
@@ -91,7 +92,7 @@ public ClassObjectTypeConf(final EntryPointId entryPoint,
if (isEvent) {
Expires expires = clazz.getAnnotation(Expires.class);
if (expires != null) {
- expirationOffset = TimeIntervalParser.parseSingle( expires.value() );
+ expirationOffset = TimeIntervalParser.parseSingle(expires.value());
}
}
}
@@ -194,12 +195,7 @@ private ObjectTypeNode[] getMatchingObjectTypes(final Class> clazz) {
final List cache = new ArrayList<>();
for ( ObjectTypeNode node : rete.getObjectTypeNodes( this.entryPoint ).values() ) {
- if ( clazz == DroolsQuery.class ) {
- // for query objects only add direct matches
- if ( ((ClassObjectType)node.getObjectType()).getClassType() == clazz ) {
- cache.add( node );
- }
- } else if ( node.isAssignableFrom( new ClassObjectType( clazz ) ) ) {
+ if ( node.isAssignableFrom( new ClassObjectType( clazz ) ) ) {
cache.add( node );
}
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/CompositeLeftTupleSinkAdapter.java b/drools-core/src/main/java/org/drools/core/reteoo/CompositeLeftTupleSinkAdapter.java
index a639e1c215c..aa90d48adc4 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/CompositeLeftTupleSinkAdapter.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/CompositeLeftTupleSinkAdapter.java
@@ -1,23 +1,25 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import org.drools.core.common.BaseNode;
-import org.drools.core.common.RuleBasePartitionId;
+import org.drools.base.common.RuleBasePartitionId;
import java.io.IOException;
import java.io.ObjectInput;
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/CompositeObjectSinkAdapter.java b/drools-core/src/main/java/org/drools/core/reteoo/CompositeObjectSinkAdapter.java
index d732815442c..0dfe1e5226c 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/CompositeObjectSinkAdapter.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/CompositeObjectSinkAdapter.java
@@ -1,21 +1,37 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
+import org.drools.base.base.ValueType;
+import org.drools.base.common.NetworkNode;
+import org.drools.base.reteoo.NodeTypeEnums;
+import org.drools.base.rule.IndexableConstraint;
+import org.drools.base.rule.accessor.FieldValue;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
+import org.drools.base.util.index.ConstraintTypeOperator;
+import org.drools.core.common.BaseNode;
+import org.drools.core.common.InternalFactHandle;
+import org.drools.core.common.PropagationContext;
+import org.drools.core.common.ReteEvaluator;
+import org.drools.core.util.index.AlphaRangeIndex;
+
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
@@ -28,20 +44,7 @@
import java.util.Map;
import java.util.Objects;
-import org.drools.core.base.ValueType;
-import org.drools.core.common.BaseNode;
-import org.drools.core.common.InternalFactHandle;
-import org.drools.core.common.NetworkNode;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.rule.IndexableConstraint;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
-import org.drools.core.rule.accessor.FieldValue;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.common.PropagationContext;
-import org.drools.core.util.index.AlphaRangeIndex;
-import org.drools.core.util.index.IndexUtil.ConstraintType;
-
-import static org.drools.core.util.index.IndexUtil.isBigDecimalEqualityConstraint;
+import static org.drools.base.util.index.IndexUtil.isBigDecimalEqualityConstraint;
public class CompositeObjectSinkAdapter implements ObjectSinkPropagator {
@@ -206,10 +209,10 @@ static ReadAccessor getHashableAccessor(AlphaNode alphaNode) {
}
private static boolean isHashable( IndexableConstraint indexableConstraint ) {
- return indexableConstraint.getConstraintType() == ConstraintType.EQUAL && indexableConstraint.getField() != null &&
+ return indexableConstraint.getConstraintType() == ConstraintTypeOperator.EQUAL && indexableConstraint.getField() != null &&
indexableConstraint.getFieldExtractor().getValueType() != ValueType.OBJECT_TYPE &&
- !isBigDecimalEqualityConstraint(indexableConstraint) &&
- // our current implementation does not support hashing of deeply nested properties
+ !isBigDecimalEqualityConstraint(indexableConstraint) &&
+ // our current implementation does not support hashing of deeply nested properties
indexableConstraint.getFieldExtractor().getIndex() >= 0;
}
@@ -472,7 +475,7 @@ private boolean isRangeIndexable(AlphaNode alphaNode) {
AlphaNodeFieldConstraint fieldConstraint = alphaNode.getConstraint();
if (fieldConstraint instanceof IndexableConstraint) {
IndexableConstraint indexableConstraint = (IndexableConstraint) fieldConstraint;
- ConstraintType constraintType = indexableConstraint.getConstraintType();
+ ConstraintTypeOperator constraintType = indexableConstraint.getConstraintType();
return (constraintType.isAscending() || constraintType.isDescending()) &&
indexableConstraint.getField() != null && !indexableConstraint.getField().isNull() &&
indexableConstraint.getFieldExtractor().getValueType() != ValueType.OBJECT_TYPE &&
@@ -900,7 +903,7 @@ public static class HashKey implements Externalizable {
private int index;
private Object value;
- private boolean isNull;
+ private boolean isNull = false;
private int hashCode;
public HashKey() { }
@@ -938,12 +941,17 @@ public void setValue(final int index,
final Object value,
final ReadAccessor extractor) {
this.index = index;
- isNull = extractor.isNullValue( null, value );
+ Object extractedValue = extractor.getValue( null, value );
- if ( !isNull ) {
- this.value = extractor.getValue( null, value );
- this.setHashCode( this.value != null ? this.value.hashCode() : 0 );
+ if ( extractedValue != null ) {
+ try {
+ this.setHashCode(extractedValue.hashCode());
+ } catch (UnsupportedOperationException e) {
+ this.setHashCode( 0 );
+ }
+ this.value = extractedValue;
} else {
+ this.isNull = true;
this.setHashCode( 0 );
}
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/CompositePartitionAwareObjectSinkAdapter.java b/drools-core/src/main/java/org/drools/core/reteoo/CompositePartitionAwareObjectSinkAdapter.java
index 73ef72aed48..3e6da453c65 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/CompositePartitionAwareObjectSinkAdapter.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/CompositePartitionAwareObjectSinkAdapter.java
@@ -1,21 +1,35 @@
-/*
- * Copyright 2016 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.reteoo.NodeTypeEnums;
+import org.drools.base.rule.IndexableConstraint;
+import org.drools.base.rule.accessor.ReadAccessor;
+import org.drools.core.common.ActivationsManager;
+import org.drools.core.common.BaseNode;
+import org.drools.core.common.InternalFactHandle;
+import org.drools.core.common.PropagationContext;
+import org.drools.core.common.ReteEvaluator;
+import org.drools.core.phreak.PropagationEntry;
+import org.drools.core.reteoo.CompositeObjectSinkAdapter.FieldIndex;
+
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
@@ -24,27 +38,17 @@
import java.util.Map;
import java.util.stream.Stream;
-import org.drools.core.common.ActivationsManager;
-import org.drools.core.common.BaseNode;
-import org.drools.core.common.InternalFactHandle;
-import org.drools.core.common.ReteEvaluator;
-import org.drools.core.common.RuleBasePartitionId;
-import org.drools.core.phreak.PropagationEntry;
-import org.drools.core.reteoo.CompositeObjectSinkAdapter.FieldIndex;
-import org.drools.core.rule.IndexableConstraint;
-import org.drools.core.rule.accessor.ReadAccessor;
-import org.drools.core.common.PropagationContext;
-
public class CompositePartitionAwareObjectSinkAdapter implements ObjectSinkPropagator {
- private final ObjectSinkPropagator[] partitionedPropagators = new ObjectSinkPropagator[RuleBasePartitionId.PARALLEL_PARTITIONS_NUMBER];
+ private final ObjectSinkPropagator[] partitionedPropagators;
private boolean hashed = true;
private CompositeObjectSinkAdapter.FieldIndex fieldIndex;
private Map hashedSinkMap;
- public CompositePartitionAwareObjectSinkAdapter() {
+ public CompositePartitionAwareObjectSinkAdapter(int parallelEvaluationSlotsCount) {
+ this.partitionedPropagators = new ObjectSinkPropagator[parallelEvaluationSlotsCount];
Arrays.fill(partitionedPropagators, EmptyObjectSinkAdapter.getInstance());
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/ConditionalBranchEvaluator.java b/drools-core/src/main/java/org/drools/core/reteoo/ConditionalBranchEvaluator.java
index 7e55edb64e4..3cbcca39019 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/ConditionalBranchEvaluator.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/ConditionalBranchEvaluator.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.reteoo;
import java.io.Externalizable;
@@ -21,8 +24,8 @@
import java.io.ObjectOutput;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.common.RuleBasePartitionId;
-import org.drools.core.rule.EvalCondition;
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.rule.EvalCondition;
public class ConditionalBranchEvaluator implements Externalizable {
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/ConditionalBranchNode.java b/drools-core/src/main/java/org/drools/core/reteoo/ConditionalBranchNode.java
index 10285521bf8..150a0771cfe 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/ConditionalBranchNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/ConditionalBranchNode.java
@@ -1,18 +1,21 @@
-/*
- * Copyright 2015 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.drools.core.reteoo;
import java.io.Externalizable;
@@ -20,6 +23,7 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.Memory;
@@ -108,7 +112,7 @@ public ConditionalBranchMemory createMemory(final RuleBaseConfiguration config,
@Override
public LeftTuple createPeer(LeftTuple original) {
EvalNodeLeftTuple peer = new EvalNodeLeftTuple();
- peer.initPeer( (BaseLeftTuple) original, this );
+ peer.initPeer(original, this);
original.setPeer( peer );
return peer;
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/CoreComponentFactory.java b/drools-core/src/main/java/org/drools/core/reteoo/CoreComponentFactory.java
index 6c1dafc72b8..1fadf22084a 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/CoreComponentFactory.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/CoreComponentFactory.java
@@ -1,22 +1,25 @@
-/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
-import org.drools.core.definitions.InternalKnowledgePackage;
-import org.drools.core.definitions.impl.KnowledgePackageImpl;
+import org.drools.base.definitions.InternalKnowledgePackage;
+import org.drools.base.definitions.impl.KnowledgePackageImpl;
import org.drools.core.reteoo.builder.NodeFactory;
import org.drools.core.reteoo.builder.PhreakNodeFactory;
import org.kie.api.internal.utils.KieService;
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/EmptyLeftTupleSinkAdapter.java b/drools-core/src/main/java/org/drools/core/reteoo/EmptyLeftTupleSinkAdapter.java
index 5fb4b8d7df5..22319622907 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/EmptyLeftTupleSinkAdapter.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/EmptyLeftTupleSinkAdapter.java
@@ -1,23 +1,25 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import org.drools.core.common.BaseNode;
-import org.drools.core.common.RuleBasePartitionId;
+import org.drools.base.common.RuleBasePartitionId;
import java.io.IOException;
import java.io.ObjectInput;
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/EmptyObjectSinkAdapter.java b/drools-core/src/main/java/org/drools/core/reteoo/EmptyObjectSinkAdapter.java
index 61a718068c9..9bb2b1b27ea 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/EmptyObjectSinkAdapter.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/EmptyObjectSinkAdapter.java
@@ -1,29 +1,31 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
import org.drools.core.common.BaseNode;
import org.drools.core.common.InternalFactHandle;
-import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.PropagationContext;
+import org.drools.core.common.ReteEvaluator;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
public class EmptyObjectSinkAdapter implements ObjectSinkPropagator {
@@ -58,12 +60,6 @@ public void propagateAssertObject(final InternalFactHandle factHandle,
}
- public void propagateRetractObject(final InternalFactHandle handle,
- final PropagationContext context,
- final ReteEvaluator reteEvaluator,
- final boolean useHash) {
- }
-
public void propagateModifyObject(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/EntryPointNode.java b/drools-core/src/main/java/org/drools/core/reteoo/EntryPointNode.java
index 1aa70cf61f6..16551ad8276 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/EntryPointNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/EntryPointNode.java
@@ -1,44 +1,48 @@
-/*
- * Copyright 2007 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
+import org.drools.base.base.ClassObjectType;
+import org.drools.base.base.ObjectType;
+import org.drools.base.common.RuleBasePartitionId;
+import org.drools.base.reteoo.NodeTypeEnums;
+import org.drools.base.rule.EntryPointId;
import org.drools.core.WorkingMemoryEntryPoint;
-import org.drools.core.base.ClassObjectType;
import org.drools.core.common.BaseNode;
-import org.drools.core.common.EventFactHandle;
+import org.drools.core.common.DefaultEventHandle;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.InternalWorkingMemory;
import org.drools.core.common.ObjectTypeConfigurationRegistry;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.common.RuleBasePartitionId;
+import org.drools.core.common.PropagationContext;
+import org.drools.core.impl.InternalRuleBase;
import org.drools.core.phreak.PropagationEntry;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.base.ObjectType;
-import org.drools.core.common.PropagationContext;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.BitMask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
/**
* A node that is an entry point into the Rete network.
*
@@ -51,9 +55,7 @@
* @see ObjectTypeNode
*/
public class EntryPointNode extends ObjectSource implements ObjectSink {
- // ------------------------------------------------------------
- // Instance members
- // ------------------------------------------------------------
+
private static final long serialVersionUID = 510l;
@@ -75,6 +77,8 @@ public class EntryPointNode extends ObjectSource implements ObjectSink {
private ObjectTypeConfigurationRegistry typeConfReg;
+ private boolean parallelExecution = false;
+
// ------------------------------------------------------------
// Constructors
// ------------------------------------------------------------
@@ -87,19 +91,16 @@ public EntryPointNode(final int id,
final BuildContext context) {
this( id,
context.getPartitionId(),
- context.getRuleBase().getRuleBaseConfiguration().isMultithreadEvaluation(),
objectSource,
context.getCurrentEntryPoint() ); // irrelevant for this node, since it overrides sink management
}
public EntryPointNode(final int id,
final RuleBasePartitionId partitionId,
- final boolean partitionsEnabled,
final ObjectSource objectSource,
final EntryPointId entryPoint) {
super( id,
partitionId,
- partitionsEnabled,
objectSource,
999,
999); // irrelevant for this node, since it overrides sink management
@@ -114,6 +115,10 @@ public EntryPointNode(final int id,
// Instance methods
// ------------------------------------------------------------
+ public void setupParallelExecution(InternalRuleBase kbase) {
+ parallelExecution = true;
+ }
+
public ObjectTypeConfigurationRegistry getTypeConfReg() {
return typeConfReg;
}
@@ -128,9 +133,6 @@ public short getType() {
public EntryPointId getEntryPoint() {
return entryPoint;
}
- void setEntryPoint(EntryPointId entryPoint) {
- this.entryPoint = entryPoint;
- }
public ObjectTypeNode getQueryNode() {
if ( queryNode == null ) {
@@ -190,9 +192,9 @@ public void assertObject(final InternalFactHandle handle,
log.trace("Insert {}", handle.toString());
}
- if ( partitionsEnabled || !reteEvaluator.isThreadSafe() ) {
- // In case of multithreaded evaluation the CompositePartitionAwareObjectSinkAdapter
- // used by the OTNs will take care of enqueueing this inseretion on the propagation queues
+ if ( parallelExecution || !reteEvaluator.isThreadSafe() ) {
+ // In case of parallel execution the CompositePartitionAwareObjectSinkAdapter
+ // used by the OTNs will take care of enqueueing this insertion on the propagation queues
// of the different agendas
PropagationEntry.Insert.execute( handle, context, reteEvaluator, objectTypeConf );
} else {
@@ -288,10 +290,8 @@ public void assertObject(final InternalFactHandle factHandle,
* @param reteEvaluator
* The working memory session.
*/
- public void retractObject(final InternalFactHandle handle,
- final PropagationContext context,
- final ObjectTypeConf objectTypeConf,
- final ReteEvaluator reteEvaluator) {
+ public void retractObject(InternalFactHandle handle, PropagationContext context,
+ ObjectTypeConf objectTypeConf, ReteEvaluator reteEvaluator) {
if ( log.isTraceEnabled() ) {
log.trace( "Delete {}", handle.toString() );
}
@@ -299,6 +299,15 @@ public void retractObject(final InternalFactHandle handle,
reteEvaluator.addPropagation(new PropagationEntry.Delete(this, handle, context, objectTypeConf));
}
+ public void immediateDeleteObject(InternalFactHandle handle, PropagationContext context,
+ ObjectTypeConf objectTypeConf, ReteEvaluator reteEvaluator) {
+ if ( log.isTraceEnabled() ) {
+ log.trace( "Delete {}", handle.toString() );
+ }
+
+ PropagationEntry.Delete.execute(reteEvaluator, this, handle, context, objectTypeConf);
+ }
+
public void propagateRetract(InternalFactHandle handle, PropagationContext context, ObjectTypeConf objectTypeConf, ReteEvaluator reteEvaluator) {
ObjectTypeNode[] cachedNodes = objectTypeConf.getObjectTypeNodes();
@@ -314,7 +323,7 @@ public void propagateRetract(InternalFactHandle handle, PropagationContext conte
}
if (handle.isEvent()) {
- ((EventFactHandle) handle).unscheduleAllJobs(reteEvaluator);
+ ((DefaultEventHandle) handle).unscheduleAllJobs(reteEvaluator);
}
}
@@ -379,20 +388,16 @@ public boolean equals(final Object object) {
this.entryPoint.equals( ( (EntryPointNode) object ).entryPoint ) );
}
- public void updateSink(final ObjectSink sink,
- final PropagationContext context,
- final InternalWorkingMemory workingMemory) {
+ public void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory) {
final ObjectTypeNode node = (ObjectTypeNode) sink;
-
final ObjectType newObjectType = node.getObjectType();
-
WorkingMemoryEntryPoint wmEntryPoint = workingMemory.getEntryPoint( this.entryPoint.getEntryPointId() );
for ( ObjectTypeConf objectTypeConf : wmEntryPoint.getObjectTypeConfigurationRegistry().values() ) {
if ( objectTypeConf.getConcreteObjectTypeNode() != null && newObjectType.isAssignableFrom( objectTypeConf.getConcreteObjectTypeNode().getObjectType() ) ) {
objectTypeConf.resetCache();
ObjectTypeNode sourceNode = objectTypeConf.getConcreteObjectTypeNode();
- Iterator it = workingMemory.getNodeMemory( sourceNode ).iterator();
+ Iterator it = sourceNode.getFactHandlesIterator(workingMemory);
while ( it.hasNext() ) {
sink.assertObject( it.next(), context, workingMemory );
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/EvalConditionNode.java b/drools-core/src/main/java/org/drools/core/reteoo/EvalConditionNode.java
index b6a03453507..3a1f0acceb6 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/EvalConditionNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/EvalConditionNode.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2005 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.io.Externalizable;
@@ -23,6 +25,7 @@
import java.util.HashMap;
import java.util.Map;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.Memory;
@@ -30,9 +33,9 @@
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.UpdateContext;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.EvalCondition;
+import org.drools.base.rule.EvalCondition;
import org.drools.core.common.PropagationContext;
-import org.drools.core.rule.RuleComponent;
+import org.drools.base.rule.RuleComponent;
import org.drools.core.util.AbstractBaseLinkedListNode;
import org.kie.api.definition.rule.Rule;
@@ -139,7 +142,7 @@ public EvalMemory createMemory(final RuleBaseConfiguration config, ReteEvaluator
@Override
public LeftTuple createPeer(LeftTuple original) {
EvalNodeLeftTuple peer = new EvalNodeLeftTuple();
- peer.initPeer( (BaseLeftTuple) original, this );
+ peer.initPeer(original, this);
original.setPeer( peer );
return peer;
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/EvalNodeLeftTuple.java b/drools-core/src/main/java/org/drools/core/reteoo/EvalNodeLeftTuple.java
index 63fabc0c24f..5de80c9576a 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/EvalNodeLeftTuple.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/EvalNodeLeftTuple.java
@@ -1,27 +1,27 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.PropagationContext;
-import java.util.Arrays;
-
-public class EvalNodeLeftTuple extends BaseLeftTuple {
+public class EvalNodeLeftTuple extends LeftTuple {
private static final long serialVersionUID = 540l;
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/ExistsNode.java b/drools-core/src/main/java/org/drools/core/reteoo/ExistsNode.java
index 735fde0d6be..65a2add3d04 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/ExistsNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/ExistsNode.java
@@ -1,21 +1,24 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.common.BetaConstraints;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
@@ -101,7 +104,7 @@ public LeftTuple createLeftTuple(LeftTuple leftTuple,
public LeftTuple createPeer(LeftTuple original) {
NotNodeLeftTuple peer = new NotNodeLeftTuple();
- peer.initPeer( (BaseLeftTuple) original, this );
+ peer.initPeer(original, this);
original.setPeer( peer );
return peer;
}
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/FactTemplateTypeConf.java b/drools-core/src/main/java/org/drools/core/reteoo/FactTemplateTypeConf.java
index 878d7520cbb..60566ec838d 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/FactTemplateTypeConf.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/FactTemplateTypeConf.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.io.Externalizable;
@@ -22,16 +24,16 @@
import java.io.ObjectOutput;
import org.drools.core.WorkingMemoryEntryPoint;
-import org.drools.core.base.ObjectType;
+import org.drools.base.base.ObjectType;
import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.ReteEvaluator;
-import org.drools.core.facttemplates.Event;
-import org.drools.core.facttemplates.Fact;
-import org.drools.core.facttemplates.FactTemplate;
-import org.drools.core.facttemplates.FactTemplateObjectType;
-import org.drools.core.impl.RuleBase;
-import org.drools.core.rule.EntryPointId;
-import org.drools.core.rule.TypeDeclaration;
+import org.drools.base.facttemplates.Event;
+import org.drools.base.facttemplates.Fact;
+import org.drools.base.facttemplates.FactTemplate;
+import org.drools.base.facttemplates.FactTemplateObjectType;
+import org.drools.core.impl.InternalRuleBase;
+import org.drools.base.rule.EntryPointId;
+import org.drools.base.rule.TypeDeclaration;
import org.drools.core.rule.accessor.FactHandleFactory;
public class FactTemplateTypeConf
@@ -41,7 +43,7 @@ public class FactTemplateTypeConf
private static final long serialVersionUID = 510l;
- private transient RuleBase ruleBase;
+ private transient InternalRuleBase ruleBase;
private ObjectType objectType;
private FactTemplate factTemplate;
@@ -58,7 +60,7 @@ public FactTemplateTypeConf() {
public FactTemplateTypeConf(final EntryPointId entryPoint,
final FactTemplate factTemplate,
- final RuleBase ruleBase) {
+ final InternalRuleBase ruleBase) {
this.ruleBase = ruleBase;
this.factTemplate = factTemplate;
this.entryPoint = entryPoint;
@@ -68,7 +70,7 @@ public FactTemplateTypeConf(final EntryPointId entryPoint,
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
- ruleBase = (RuleBase) in.readObject();
+ ruleBase = (InternalRuleBase) in.readObject();
factTemplate = (FactTemplate) in.readObject();
concreteObjectTypeNode = (ObjectTypeNode) in.readObject();
cache = (ObjectTypeNode[]) in.readObject();
diff --git a/drools-core/src/main/java/org/drools/core/reteoo/FromNode.java b/drools-core/src/main/java/org/drools/core/reteoo/FromNode.java
index 9de2ee4d94d..95d46da03f7 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/FromNode.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/FromNode.java
@@ -1,19 +1,21 @@
-/*
- * Copyright 2010 Red Hat, Inc. and/or its affiliates.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.drools.core.reteoo;
import java.io.Serializable;
@@ -23,6 +25,7 @@
import java.util.Map;
import java.util.Objects;
+import org.drools.base.reteoo.NodeTypeEnums;
import org.drools.core.RuleBaseConfiguration;
import org.drools.core.common.BetaConstraints;
import org.drools.core.common.EmptyBetaConstraints;
@@ -32,21 +35,21 @@
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.UpdateContext;
import org.drools.core.reteoo.builder.BuildContext;
-import org.drools.core.rule.From;
-import org.drools.core.rule.Pattern;
-import org.drools.core.rule.constraint.AlphaNodeFieldConstraint;
-import org.drools.core.rule.accessor.DataProvider;
-import org.drools.core.base.ObjectType;
+import org.drools.base.rule.From;
+import org.drools.base.rule.Pattern;
+import org.drools.base.rule.constraint.AlphaNodeFieldConstraint;
+import org.drools.base.rule.accessor.DataProvider;
+import org.drools.base.base.ObjectType;
import org.drools.core.common.PropagationContext;
import org.drools.core.util.AbstractBaseLinkedListNode;
-import org.drools.core.util.bitmask.AllSetBitMask;
-import org.drools.core.util.bitmask.BitMask;
+import org.drools.util.bitmask.AllSetBitMask;
+import org.drools.util.bitmask.BitMask;
import org.drools.core.util.index.TupleList;
-import static org.drools.core.reteoo.PropertySpecificUtil.calculateNegativeMask;
-import static org.drools.core.reteoo.PropertySpecificUtil.calculatePositiveMask;
-import static org.drools.core.reteoo.PropertySpecificUtil.getAccessibleProperties;
-import static org.drools.core.reteoo.PropertySpecificUtil.isPropertyReactive;
+import static org.drools.base.reteoo.PropertySpecificUtil.calculateNegativeMask;
+import static org.drools.base.reteoo.PropertySpecificUtil.calculatePositiveMask;
+import static org.drools.base.reteoo.PropertySpecificUtil.getAccessibleProperties;
+import static org.drools.base.reteoo.PropertySpecificUtil.isPropertyReactive;
public class FromNode