Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

allow to provide a configuration when creating a KieBase or a KieSession

  • Loading branch information...
commit 91f8aac17cef01b76ff76eb52a6a754ef78f226c 1 parent 02775a4
mariofusco authored April 09, 2013

Showing 37 changed files with 97 additions and 72 deletions. Show diff stats Hide diff stats

  1. 2  drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderImpl.java
  2. 82  drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerImpl.java
  3. 2  drools-compiler/src/test/java/org/drools/compiler/CommonTestMethodBase.java
  4. 2  drools-compiler/src/test/java/org/drools/compiler/conf/KnowledgeBaseConfigurationTest.java
  5. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/AnnotationsTest.java
  6. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/CepEspTest.java
  7. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/DeclarativeAgendaTest.java
  8. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/DynamicRulesTest.java
  9. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/FailureOnRemovalTest.java
  10. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/LinkingTest.java
  11. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MBeansMonitoringTest.java
  12. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MVELTest.java
  13. 5  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MiscTest.java
  14. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MiscTest2.java
  15. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MultithreadTest.java
  16. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/PseudoClockEventsTest.java
  17. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/SegmentCreationTest.java
  18. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/StreamsTest.java
  19. 3  drools-compiler/src/test/java/org/drools/compiler/integrationtests/TruthMaintenanceTest.java
  20. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/UnmarshallingTest.java
  21. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/marshalling/FactHandleMarshallingTest.java
  22. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/marshalling/MarshallingTest.java
  23. 2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/sequential/SequentialTest.java
  24. 9  drools-compiler/src/test/java/org/drools/compiler/integrationtests/waltz/Waltz.java
  25. 2  drools-compiler/src/test/java/org/drools/compiler/phreak/PhreakLiaNodeTest.java
  26. 6  drools-core/src/main/java/org/drools/core/RuleBaseConfiguration.java
  27. 2  drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseFactoryServiceImpl.java
  28. 2  drools-core/src/test/java/org/drools/core/reteoo/NodeSegmentUnlinkingTest.java
  29. 2  drools-core/src/test/java/org/drools/core/reteoo/RuleUnlinkingTest.java
  30. 2  drools-core/src/test/java/org/drools/core/reteoo/RuleUnlinkingWithSegmentMemoryTest.java
  31. 2  drools-core/src/test/java/org/drools/core/util/ObjectHashMapTest.java
  32. 2  drools-examples/src/main/java/org/drools/benchmark/waltzdb/WaltzDbBenchmark.java
  33. 2  drools-examples/src/main/java/org/drools/examples/sudoku/rules/DroolsUtil.java
  34. 2  drools-examples/src/main/java/org/drools/games/adventures/GameEngine.java
  35. 2  drools-examples/src/main/java/org/drools/games/pong/PongMain.java
  36. 2  drools-persistence-jpa/src/test/java/org/drools/persistence/marshalling/util/TestMarshallingUtilsTest.java
  37. 2  drools-persistence-jpa/src/test/java/org/drools/persistence/timer/integrationtests/TimerAndCalendarTest.java
2  drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieBuilderImpl.java
@@ -18,7 +18,7 @@
18 18
 import org.drools.core.rule.TypeMetaInfo;
19 19
 import org.drools.compiler.kproject.xml.MinimalPomParser;
20 20
 import org.drools.compiler.kproject.xml.PomModel;
21  
-import org.kie.internal.KieBaseConfiguration;
  21
+import org.kie.api.KieBaseConfiguration;
22 22
 import org.kie.api.KieServices;
23 23
 import org.kie.internal.KnowledgeBaseFactory;
24 24
 import org.kie.internal.builder.InternalKieBuilder;
82  drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/KieContainerImpl.java
@@ -4,7 +4,7 @@
4 4
 import org.drools.compiler.kproject.models.KieBaseModelImpl;
5 5
 import org.drools.compiler.kproject.models.KieSessionModelImpl;
6 6
 import org.kie.api.KieBase;
7  
-import org.kie.internal.KieBaseConfiguration;
  7
+import org.kie.api.KieBaseConfiguration;
8 8
 import org.kie.internal.KnowledgeBaseFactory;
9 9
 import org.kie.api.builder.KieModule;
10 10
 import org.kie.api.builder.KieRepository;
@@ -78,7 +78,7 @@ public KieBase getKieBase(String kBaseName) {
78 78
         KieBase kBase = kBases.get( kBaseName );
79 79
         if ( kBase == null ) {
80 80
             ResultsImpl msgs = new ResultsImpl();
81  
-            kBase = createKieBase(kBaseName, kProject, msgs);
  81
+            kBase = createKieBase(kBaseName, kProject, msgs, null);
82 82
             if ( kBase == null ) {
83 83
                 // build error, throw runtime exception
84 84
                 throw new RuntimeException( "Error while creating KieBase" + msgs.filterMessages( Level.ERROR  ) );
@@ -91,7 +91,25 @@ public KieBase getKieBase(String kBaseName) {
91 91
         return kBase;
92 92
     }
93 93
 
94  
-    private KieBase createKieBase(String kBaseName, KieProject kieProject, ResultsImpl messages) {
  94
+    public KieBase newKieBase(KieBaseConfiguration conf) {
  95
+        KieBaseModel defaultKieBaseModel = kProject.getDefaultKieBaseModel();
  96
+        if (defaultKieBaseModel == null) {
  97
+            throw new RuntimeException("Cannot find a defualt KieBase");
  98
+        }
  99
+        return newKieBase(defaultKieBaseModel.getName(), conf);
  100
+    }
  101
+
  102
+    public KieBase newKieBase(String kBaseName, KieBaseConfiguration conf) {
  103
+        ResultsImpl msgs = new ResultsImpl();
  104
+        KieBase kBase = createKieBase(kBaseName, kProject, msgs, conf);
  105
+        if ( kBase == null ) {
  106
+            // build error, throw runtime exception
  107
+            throw new RuntimeException( "Error while creating KieBase" + msgs.filterMessages( Level.ERROR  ) );
  108
+        }
  109
+        return kBase;
  110
+    }
  111
+
  112
+    private KieBase createKieBase(String kBaseName, KieProject kieProject, ResultsImpl messages, KieBaseConfiguration conf) {
95 113
         KieBaseModelImpl kBaseModel = (KieBaseModelImpl) kProject.getKieBaseModel(kBaseName);
96 114
         CompositeClassLoader cl = kieProject.getClassLoader(); // the most clone the CL, as each builder and rbase populates it
97 115
 
@@ -110,7 +128,7 @@ private KieBase createKieBase(String kBaseName, KieProject kieProject, ResultsIm
110 128
         // if we get to here, then we know the pkgs is now cached
111 129
         pkgs = kModule.getKnowledgePackagesForKieBase(kBaseModel.getName());
112 130
 
113  
-        InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase( getKnowledgeBaseConfiguration(kBaseModel, cl) );
  131
+        InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase( conf != null ? conf : getKnowledgeBaseConfiguration(kBaseModel, cl) );
114 132
 
115 133
         kBase.addKnowledgePackages( pkgs );
116 134
         return kBase;
@@ -124,43 +142,51 @@ private KieBaseConfiguration getKnowledgeBaseConfiguration(KieBaseModelImpl kBas
124 142
     }
125 143
 
126 144
     public KieSession newKieSession() {
127  
-        return newKieSession((Environment)null);
  145
+        return newKieSession((Environment)null, (KieSessionConfiguration)null);
128 146
     }
129 147
 
130 148
     public KieSession getKieSession() {
131  
-        KieSessionModel defaultKieSessionModel = kProject.getDefaultKieSession();
132  
-        if (defaultKieSessionModel == null) {
133  
-            throw new RuntimeException("Cannot find a defualt KieSession");
134  
-        }
  149
+        KieSessionModel defaultKieSessionModel = findKieSessionModel("Cannot find a defualt KieSession");
135 150
         return getKieSession(defaultKieSessionModel.getName());
136 151
     }
137 152
 
  153
+    public KieSession newKieSession(KieSessionConfiguration conf) {
  154
+        return newKieSession((Environment)null, conf);
  155
+    }
  156
+
138 157
     public KieSession newKieSession(Environment environment) {
  158
+        return newKieSession(environment, (KieSessionConfiguration)null);
  159
+    }
  160
+
  161
+    public KieSession newKieSession(Environment environment, KieSessionConfiguration conf) {
  162
+        KieSessionModel defaultKieSessionModel = findKieSessionModel("Cannot find a defualt KieSession");
  163
+        return newKieSession(defaultKieSessionModel.getName(), environment, conf);
  164
+    }
  165
+
  166
+    private KieSessionModel findKieSessionModel(String errorMessage) {
139 167
         KieSessionModel defaultKieSessionModel = kProject.getDefaultKieSession();
140 168
         if (defaultKieSessionModel == null) {
141 169
             throw new RuntimeException("Cannot find a defualt KieSession");
142 170
         }
143  
-        return newKieSession(defaultKieSessionModel.getName(), environment);
  171
+        return defaultKieSessionModel;
144 172
     }
145 173
 
146 174
     public StatelessKieSession newStatelessKieSession() {
147  
-        KieSessionModel defaultKieSessionModel = kProject.getDefaultStatelessKieSession();
148  
-        if (defaultKieSessionModel == null) {
149  
-            throw new RuntimeException("Cannot find a defualt StatelessKieSession");
150  
-        }
151  
-        return newStatelessKieSession(defaultKieSessionModel.getName());
  175
+        return newStatelessKieSession((KieSessionConfiguration)null);
  176
+    }
  177
+
  178
+    public StatelessKieSession newStatelessKieSession(KieSessionConfiguration conf) {
  179
+        KieSessionModel defaultKieSessionModel = findKieSessionModel("Cannot find a defualt StatelessKieSession");
  180
+        return newStatelessKieSession(defaultKieSessionModel.getName(), conf);
152 181
     }
153 182
 
154 183
     public StatelessKieSession getStatelessKieSession() {
155  
-        KieSessionModel defaultKieSessionModel = kProject.getDefaultStatelessKieSession();
156  
-        if (defaultKieSessionModel == null) {
157  
-            throw new RuntimeException("Cannot find a defualt StatelessKieSession");
158  
-        }
  184
+        KieSessionModel defaultKieSessionModel = findKieSessionModel("Cannot find a defualt StatelessKieSession");
159 185
         return getStatelessKieSession(defaultKieSessionModel.getName());
160 186
     }
161 187
 
162 188
     public KieSession newKieSession(String kSessionName) {
163  
-        return newKieSession(kSessionName, null);
  189
+        return newKieSession(kSessionName, null, null);
164 190
     }
165 191
 
166 192
     public KieSession getKieSession(String kSessionName) {
@@ -169,6 +195,14 @@ public KieSession getKieSession(String kSessionName) {
169 195
     }
170 196
 
171 197
     public KieSession newKieSession(String kSessionName, Environment environment) {
  198
+        return newKieSession(kSessionName, environment, null);
  199
+    }
  200
+
  201
+    public KieSession newKieSession(String kSessionName, KieSessionConfiguration conf) {
  202
+        return newKieSession(kSessionName, null, conf);
  203
+    }
  204
+
  205
+    public KieSession newKieSession(String kSessionName, Environment environment, KieSessionConfiguration conf) {
172 206
         KieSessionModelImpl kSessionModel = (KieSessionModelImpl) getKieSessionModel(kSessionName);
173 207
         if ( kSessionModel == null ) {
174 208
             log.error("Unknown KieSession name: " + kSessionName);
@@ -182,7 +216,7 @@ public KieSession newKieSession(String kSessionName, Environment environment) {
182 216
             log.error("Unknown KieBase name: " + kSessionModel.getKieBaseModel().getName());
183 217
             return null;
184 218
         }
185  
-        KieSession kSession = kBase.newKieSession(getKnowledgeSessionConfiguration(kSessionModel), environment);
  219
+        KieSession kSession = kBase.newKieSession( conf != null ? conf : getKnowledgeSessionConfiguration(kSessionModel), environment );
186 220
         wireListnersAndWIHs(kSessionModel, kSession);
187 221
 
188 222
         KieSession oldSession = kSessions.remove(kSessionName);
@@ -195,6 +229,10 @@ public KieSession newKieSession(String kSessionName, Environment environment) {
195 229
     }
196 230
 
197 231
     public StatelessKieSession newStatelessKieSession(String kSessionName) {
  232
+        return newStatelessKieSession(kSessionName, null);
  233
+    }
  234
+
  235
+    public StatelessKieSession newStatelessKieSession(String kSessionName, KieSessionConfiguration conf) {
198 236
         KieSessionModelImpl kSessionModel = (KieSessionModelImpl) kProject.getKieSessionModel( kSessionName );
199 237
         if ( kSessionName == null ) {
200 238
             log.error("Unknown KieSession name: " + kSessionName);
@@ -208,7 +246,7 @@ public StatelessKieSession newStatelessKieSession(String kSessionName) {
208 246
             log.error("Unknown KieBase name: " + kSessionModel.getKieBaseModel().getName());
209 247
             return null;
210 248
         }
211  
-        StatelessKieSession statelessKieSession = kBase.newStatelessKieSession(getKnowledgeSessionConfiguration(kSessionModel));
  249
+        StatelessKieSession statelessKieSession = kBase.newStatelessKieSession( conf != null ? conf : getKnowledgeSessionConfiguration(kSessionModel) );
212 250
         statelessKSessions.put(kSessionName, statelessKieSession);
213 251
         return statelessKieSession;
214 252
     }
2  drools-compiler/src/test/java/org/drools/compiler/CommonTestMethodBase.java
@@ -16,7 +16,7 @@
16 16
 import org.drools.compiler.lang.descr.PackageDescr;
17 17
 import org.drools.core.runtime.rule.impl.AgendaImpl;
18 18
 import org.junit.Assert;
19  
-import org.kie.internal.KieBaseConfiguration;
  19
+import org.kie.api.KieBaseConfiguration;
20 20
 import org.kie.internal.KnowledgeBase;
21 21
 import org.kie.internal.KnowledgeBaseFactory;
22 22
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-compiler/src/test/java/org/drools/compiler/conf/KnowledgeBaseConfigurationTest.java
@@ -21,7 +21,7 @@
21 21
 import org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler;
22 22
 import org.junit.Before;
23 23
 import org.junit.Test;
24  
-import org.kie.internal.KieBaseConfiguration;
  24
+import org.kie.api.KieBaseConfiguration;
25 25
 import org.kie.internal.KnowledgeBaseFactory;
26 26
 import org.kie.internal.conf.AlphaThresholdOption;
27 27
 import org.kie.api.conf.EqualityBehaviorOption;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/AnnotationsTest.java
@@ -34,7 +34,7 @@
34 34
 import org.drools.core.io.impl.ByteArrayResource;
35 35
 import org.junit.Assert;
36 36
 import org.junit.Test;
37  
-import org.kie.internal.KieBaseConfiguration;
  37
+import org.kie.api.KieBaseConfiguration;
38 38
 import org.kie.internal.KnowledgeBase;
39 39
 import org.kie.internal.KnowledgeBaseFactory;
40 40
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/CepEspTest.java
@@ -28,7 +28,7 @@
28 28
 import org.junit.Assert;
29 29
 import org.junit.Ignore;
30 30
 import org.junit.Test;
31  
-import org.kie.internal.KieBaseConfiguration;
  31
+import org.kie.api.KieBaseConfiguration;
32 32
 import org.kie.internal.KnowledgeBase;
33 33
 import org.kie.internal.KnowledgeBaseFactory;
34 34
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/DeclarativeAgendaTest.java
@@ -6,7 +6,7 @@
6 6
 import org.drools.compiler.CommonTestMethodBase;
7 7
 import org.junit.Test;
8 8
 import org.kie.internal.KnowledgeBase;
9  
-import org.kie.internal.KieBaseConfiguration;
  9
+import org.kie.api.KieBaseConfiguration;
10 10
 import org.kie.internal.KnowledgeBaseFactory;
11 11
 import org.kie.internal.builder.conf.DeclarativeAgendaOption;
12 12
 import org.kie.api.event.rule.MatchCancelledEvent;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/DynamicRulesTest.java
@@ -62,7 +62,7 @@
62 62
 import org.drools.core.reteoo.ReteooRuleBase;
63 63
 import org.drools.core.rule.Package;
64 64
 import org.junit.Test;
65  
-import org.kie.internal.KieBaseConfiguration;
  65
+import org.kie.api.KieBaseConfiguration;
66 66
 import org.kie.internal.KnowledgeBase;
67 67
 import org.kie.internal.KnowledgeBaseFactory;
68 68
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/FailureOnRemovalTest.java
@@ -9,7 +9,7 @@
9 9
 import org.drools.compiler.CommonTestMethodBase;
10 10
 import org.drools.compiler.compiler.DroolsParserException;
11 11
 import org.junit.Test;
12  
-import org.kie.internal.KieBaseConfiguration;
  12
+import org.kie.api.KieBaseConfiguration;
13 13
 import org.kie.internal.KnowledgeBase;
14 14
 import org.kie.internal.KnowledgeBaseFactory;
15 15
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/LinkingTest.java
@@ -14,7 +14,7 @@
14 14
 import org.drools.core.reteoo.LeftInputAdapterNode.LiaNodeMemory;
15 15
 import org.junit.Test;
16 16
 import org.kie.internal.KnowledgeBase;
17  
-import org.kie.internal.KieBaseConfiguration;
  17
+import org.kie.api.KieBaseConfiguration;
18 18
 import org.kie.internal.KnowledgeBaseFactory;
19 19
 import org.kie.internal.builder.KnowledgeBuilder;
20 20
 import org.kie.internal.builder.KnowledgeBuilderFactory;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MBeansMonitoringTest.java
@@ -15,7 +15,7 @@
15 15
 import org.junit.Assert;
16 16
 import org.junit.Before;
17 17
 import org.junit.Test;
18  
-import org.kie.internal.KieBaseConfiguration;
  18
+import org.kie.api.KieBaseConfiguration;
19 19
 import org.kie.internal.KnowledgeBase;
20 20
 import org.kie.internal.KnowledgeBaseFactory;
21 21
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MVELTest.java
@@ -49,7 +49,7 @@
49 49
 import org.junit.Ignore;
50 50
 import org.junit.Test;
51 51
 import org.kie.internal.KnowledgeBase;
52  
-import org.kie.internal.KieBaseConfiguration;
  52
+import org.kie.api.KieBaseConfiguration;
53 53
 import org.kie.internal.KnowledgeBaseFactory;
54 54
 import org.kie.internal.builder.KnowledgeBuilder;
55 55
 import org.kie.internal.builder.KnowledgeBuilderConfiguration;
5  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MiscTest.java
@@ -68,7 +68,6 @@
68 68
 import org.drools.compiler.TestParam;
69 69
 import org.drools.compiler.Triangle;
70 70
 import org.drools.compiler.Win;
71  
-import org.drools.core.WorkingMemory;
72 71
 import org.drools.core.audit.WorkingMemoryConsoleLogger;
73 72
 import org.drools.core.base.RuleNameEndsWithAgendaFilter;
74 73
 import org.drools.core.base.RuleNameEqualsAgendaFilter;
@@ -84,7 +83,6 @@
84 83
 import org.drools.compiler.compiler.PackageBuilder.PackageMergeException;
85 84
 import org.drools.compiler.compiler.PackageBuilderConfiguration;
86 85
 import org.drools.compiler.compiler.ParserError;
87  
-import org.drools.core.common.InternalRuleBase;
88 86
 import org.drools.core.impl.EnvironmentFactory;
89 87
 import org.drools.compiler.lang.DrlDumper;
90 88
 import org.drools.compiler.lang.descr.AttributeDescr;
@@ -96,12 +94,11 @@
96 94
 import org.drools.core.rule.*;
97 95
 import org.drools.compiler.rule.builder.dialect.java.JavaDialectConfiguration;
98 96
 import org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration;
99  
-import org.drools.core.rule.Package;
100 97
 import org.drools.core.runtime.rule.impl.AgendaImpl;
101 98
 import org.junit.Assert;
102 99
 import org.junit.Ignore;
103 100
 import org.junit.Test;
104  
-import org.kie.internal.KieBaseConfiguration;
  101
+import org.kie.api.KieBaseConfiguration;
105 102
 import org.kie.internal.KnowledgeBase;
106 103
 import org.kie.internal.KnowledgeBaseFactory;
107 104
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MiscTest2.java
@@ -32,7 +32,7 @@
32 32
 import org.kie.api.builder.KieFileSystem;
33 33
 import org.kie.api.definition.type.Position;
34 34
 import org.kie.api.runtime.KieSession;
35  
-import org.kie.internal.KieBaseConfiguration;
  35
+import org.kie.api.KieBaseConfiguration;
36 36
 import org.kie.internal.KnowledgeBase;
37 37
 import org.kie.internal.KnowledgeBaseFactory;
38 38
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/MultithreadTest.java
@@ -30,7 +30,7 @@
30 30
 import org.junit.Ignore;
31 31
 import org.junit.Test;
32 32
 import org.kie.internal.KnowledgeBase;
33  
-import org.kie.internal.KieBaseConfiguration;
  33
+import org.kie.api.KieBaseConfiguration;
34 34
 import org.kie.internal.KnowledgeBaseFactory;
35 35
 import org.kie.api.conf.EventProcessingOption;
36 36
 import org.kie.internal.runtime.StatefulKnowledgeSession;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/PseudoClockEventsTest.java
@@ -32,7 +32,7 @@
32 32
 import org.drools.core.time.impl.PseudoClockScheduler;
33 33
 import org.junit.Test;
34 34
 import org.kie.internal.KnowledgeBase;
35  
-import org.kie.internal.KieBaseConfiguration;
  35
+import org.kie.api.KieBaseConfiguration;
36 36
 import org.kie.internal.KnowledgeBaseFactory;
37 37
 import org.kie.api.conf.EventProcessingOption;
38 38
 import org.kie.api.event.rule.AfterMatchFiredEvent;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/SegmentCreationTest.java
@@ -15,7 +15,7 @@
15 15
 import org.drools.core.reteoo.LeftInputAdapterNode.LiaNodeMemory;
16 16
 import org.junit.Test;
17 17
 import org.kie.internal.KnowledgeBase;
18  
-import org.kie.internal.KieBaseConfiguration;
  18
+import org.kie.api.KieBaseConfiguration;
19 19
 import org.kie.internal.KnowledgeBaseFactory;
20 20
 import org.kie.internal.builder.KnowledgeBuilder;
21 21
 import org.kie.internal.builder.KnowledgeBuilderFactory;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/StreamsTest.java
@@ -48,7 +48,7 @@
48 48
 import org.junit.Assert;
49 49
 import org.junit.Test;
50 50
 import org.kie.internal.KnowledgeBase;
51  
-import org.kie.internal.KieBaseConfiguration;
  51
+import org.kie.api.KieBaseConfiguration;
52 52
 import org.kie.internal.KnowledgeBaseFactory;
53 53
 import org.kie.internal.builder.KnowledgeBuilder;
54 54
 import org.kie.internal.builder.KnowledgeBuilderFactory;
3  drools-compiler/src/test/java/org/drools/compiler/integrationtests/TruthMaintenanceTest.java
@@ -36,10 +36,9 @@
36 36
 import org.drools.core.impl.StatefulKnowledgeSessionImpl;
37 37
 import org.drools.core.rule.EntryPoint;
38 38
 import org.drools.core.rule.Package;
39  
-import org.junit.Ignore;
40 39
 import org.junit.Test;
41 40
 import org.kie.internal.KnowledgeBase;
42  
-import org.kie.internal.KieBaseConfiguration;
  41
+import org.kie.api.KieBaseConfiguration;
43 42
 import org.kie.internal.KnowledgeBaseFactory;
44 43
 import org.kie.internal.builder.KnowledgeBuilder;
45 44
 import org.kie.internal.builder.KnowledgeBuilderFactory;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/UnmarshallingTest.java
@@ -10,7 +10,7 @@
10 10
 import junit.framework.Assert;
11 11
 
12 12
 import org.junit.Test;
13  
-import org.kie.internal.KieBaseConfiguration;
  13
+import org.kie.api.KieBaseConfiguration;
14 14
 import org.kie.internal.KnowledgeBase;
15 15
 import org.kie.internal.KnowledgeBaseFactory;
16 16
 import org.kie.internal.builder.KnowledgeBuilder;
2  ...s-compiler/src/test/java/org/drools/compiler/integrationtests/marshalling/FactHandleMarshallingTest.java
@@ -35,7 +35,7 @@
35 35
 import org.drools.core.rule.EntryPoint;
36 36
 import org.junit.Assert;
37 37
 import org.junit.Test;
38  
-import org.kie.internal.KieBaseConfiguration;
  38
+import org.kie.api.KieBaseConfiguration;
39 39
 import org.kie.internal.KnowledgeBase;
40 40
 import org.kie.internal.KnowledgeBaseFactory;
41 41
 import org.kie.api.conf.EventProcessingOption;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/marshalling/MarshallingTest.java
@@ -78,7 +78,7 @@
78 78
 import org.junit.Test;
79 79
 import org.kie.api.KieBase;
80 80
 import org.kie.internal.KnowledgeBase;
81  
-import org.kie.internal.KieBaseConfiguration;
  81
+import org.kie.api.KieBaseConfiguration;
82 82
 import org.kie.internal.KnowledgeBaseFactory;
83 83
 import org.kie.internal.builder.KnowledgeBuilder;
84 84
 import org.kie.internal.builder.KnowledgeBuilderFactory;
2  drools-compiler/src/test/java/org/drools/compiler/integrationtests/sequential/SequentialTest.java
@@ -12,7 +12,7 @@
12 12
 import org.drools.compiler.integrationtests.DynamicRulesTest;
13 13
 import org.drools.core.rule.Package;
14 14
 import org.junit.Test;
15  
-import org.kie.internal.KieBaseConfiguration;
  15
+import org.kie.api.KieBaseConfiguration;
16 16
 import org.kie.internal.KnowledgeBase;
17 17
 import org.kie.internal.KnowledgeBaseFactory;
18 18
 import org.kie.internal.builder.KnowledgeBuilder;
9  drools-compiler/src/test/java/org/drools/compiler/integrationtests/waltz/Waltz.java
@@ -37,19 +37,10 @@
37 37
 
38 38
 import org.junit.Test;
39 39
 import org.kie.api.KieBase;
40  
-import org.kie.internal.KieBaseConfiguration;
41 40
 import org.kie.internal.KnowledgeBase;
42  
-import org.kie.internal.KnowledgeBaseFactory;
43  
-import org.kie.internal.builder.KnowledgeBuilder;
44  
-import org.kie.internal.builder.KnowledgeBuilderFactory;
45  
-import org.kie.internal.builder.conf.PhreakOption;
46 41
 import org.kie.internal.builder.conf.LanguageLevelOption;
47  
-import org.kie.internal.io.ResourceFactory;
48  
-import org.kie.api.io.ResourceType;
49 42
 import org.kie.api.runtime.KieSession;
50 43
 
51  
-import static org.junit.Assert.*;
52  
-
53 44
 /**
54 45
  * This is a sample file to launch a rule package from a rule source file.
55 46
  */
2  drools-compiler/src/test/java/org/drools/compiler/phreak/PhreakLiaNodeTest.java
@@ -2,7 +2,7 @@
2 2
 
3 3
 import org.drools.core.common.InternalFactHandle;
4 4
 import org.junit.Test;
5  
-import org.kie.internal.KieBaseConfiguration;
  5
+import org.kie.api.KieBaseConfiguration;
6 6
 import org.kie.internal.KnowledgeBase;
7 7
 import org.kie.internal.KnowledgeBaseFactory;
8 8
 import org.kie.internal.builder.KnowledgeBuilder;
6  drools-core/src/main/java/org/drools/core/RuleBaseConfiguration.java
@@ -35,7 +35,7 @@
35 35
 import org.drools.core.reteoo.ReteooComponentFactory;
36 36
 import org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler;
37 37
 import org.drools.core.spi.ConflictResolver;
38  
-import org.kie.internal.KieBaseConfiguration;
  38
+import org.kie.api.KieBaseConfiguration;
39 39
 import org.kie.internal.builder.conf.ClassLoaderCacheOption;
40 40
 import org.kie.internal.builder.conf.DeclarativeAgendaOption;
41 41
 import org.kie.internal.builder.conf.PhreakOption;
@@ -50,7 +50,7 @@
50 50
 import org.kie.api.conf.KieBaseOption;
51 51
 import org.kie.api.conf.MBeansOption;
52 52
 import org.kie.internal.conf.MaxThreadsOption;
53  
-import org.kie.internal.conf.MultiValueKnowledgeBaseOption;
  53
+import org.kie.api.conf.MultiValueKieBaseOption;
54 54
 import org.kie.internal.conf.MultithreadEvaluationOption;
55 55
 import org.kie.internal.conf.PermGenThresholdOption;
56 56
 import org.kie.api.conf.RemoveIdentitiesOption;
@@ -1241,7 +1241,7 @@ public String toString() {
1241 1241
 
1242 1242
     }
1243 1243
 
1244  
-    public <T extends MultiValueKnowledgeBaseOption> T getOption(Class<T> option,
  1244
+    public <T extends MultiValueKieBaseOption> T getOption(Class<T> option,
1245 1245
                                                                  String key) {
1246 1246
         return null;
1247 1247
     }
2  drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseFactoryServiceImpl.java
@@ -19,7 +19,7 @@
19 19
 import org.drools.core.RuleBaseConfiguration;
20 20
 import org.drools.core.RuleBaseFactory;
21 21
 import org.drools.core.SessionConfiguration;
22  
-import org.kie.internal.KieBaseConfiguration;
  22
+import org.kie.api.KieBaseConfiguration;
23 23
 import org.kie.internal.KnowledgeBase;
24 24
 import org.kie.internal.KnowledgeBaseFactoryService;
25 25
 import org.kie.api.runtime.Environment;
2  drools-core/src/test/java/org/drools/core/reteoo/NodeSegmentUnlinkingTest.java
@@ -20,7 +20,7 @@
20 20
 import org.drools.core.rule.Rule;
21 21
 import org.drools.core.spi.PropagationContext;
22 22
 import org.junit.Test;
23  
-import org.kie.internal.KieBaseConfiguration;
  23
+import org.kie.api.KieBaseConfiguration;
24 24
 import org.kie.internal.KnowledgeBaseFactory;
25 25
 import org.kie.internal.builder.conf.PhreakOption;
26 26
 
2  drools-core/src/test/java/org/drools/core/reteoo/RuleUnlinkingTest.java
@@ -19,7 +19,7 @@
19 19
 import org.drools.core.rule.GroupElement.Type;
20 20
 import org.drools.core.spi.PropagationContext;
21 21
 import org.junit.Test;
22  
-import org.kie.internal.KieBaseConfiguration;
  22
+import org.kie.api.KieBaseConfiguration;
23 23
 import org.kie.internal.KnowledgeBaseFactory;
24 24
 import org.kie.internal.builder.conf.PhreakOption;
25 25
 
2  drools-core/src/test/java/org/drools/core/reteoo/RuleUnlinkingWithSegmentMemoryTest.java
@@ -18,7 +18,7 @@
18 18
 import org.drools.core.rule.GroupElement.Type;
19 19
 import org.drools.core.spi.PropagationContext;
20 20
 import org.junit.Test;
21  
-import org.kie.internal.KieBaseConfiguration;
  21
+import org.kie.api.KieBaseConfiguration;
22 22
 import org.kie.internal.KnowledgeBaseFactory;
23 23
 import org.kie.internal.builder.conf.PhreakOption;
24 24
 
2  drools-core/src/test/java/org/drools/core/util/ObjectHashMapTest.java
@@ -21,7 +21,7 @@
21 21
 
22 22
 import org.junit.Test;
23 23
 import org.kie.internal.KnowledgeBase;
24  
-import org.kie.internal.KieBaseConfiguration;
  24
+import org.kie.api.KieBaseConfiguration;
25 25
 import org.kie.internal.KnowledgeBaseFactory;
26 26
 import org.kie.api.conf.EqualityBehaviorOption;
27 27
 import org.kie.internal.runtime.StatefulKnowledgeSession;
2  drools-examples/src/main/java/org/drools/benchmark/waltzdb/WaltzDbBenchmark.java
@@ -16,7 +16,7 @@
16 16
 
17 17
 package org.drools.benchmark.waltzdb;
18 18
 
19  
-import org.kie.internal.KieBaseConfiguration;
  19
+import org.kie.api.KieBaseConfiguration;
20 20
 import org.kie.internal.KnowledgeBase;
21 21
 import org.kie.internal.KnowledgeBaseFactory;
22 22
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-examples/src/main/java/org/drools/examples/sudoku/rules/DroolsUtil.java
@@ -16,7 +16,7 @@
16 16
 package org.drools.examples.sudoku.rules;
17 17
 
18 18
 import org.kie.internal.KnowledgeBase;
19  
-import org.kie.internal.KieBaseConfiguration;
  19
+import org.kie.api.KieBaseConfiguration;
20 20
 import org.kie.internal.KnowledgeBaseFactory;
21 21
 import org.kie.internal.builder.KnowledgeBuilder;
22 22
 import org.kie.internal.builder.KnowledgeBuilderError;
2  drools-examples/src/main/java/org/drools/games/adventures/GameEngine.java
@@ -4,7 +4,7 @@
4 4
 import org.drools.core.common.InternalRuleBase;
5 5
 import org.drools.core.impl.KnowledgeBaseImpl;
6 6
 import org.kie.internal.KnowledgeBase;
7  
-import org.kie.internal.KieBaseConfiguration;
  7
+import org.kie.api.KieBaseConfiguration;
8 8
 import org.kie.internal.KnowledgeBaseFactory;
9 9
 import org.kie.internal.builder.KnowledgeBuilder;
10 10
 import org.kie.internal.builder.KnowledgeBuilderFactory;
2  drools-examples/src/main/java/org/drools/games/pong/PongMain.java
... ...
@@ -1,6 +1,6 @@
1 1
 package org.drools.games.pong;
2 2
 
3  
-import org.kie.internal.KieBaseConfiguration;
  3
+import org.kie.api.KieBaseConfiguration;
4 4
 import org.kie.internal.KnowledgeBase;
5 5
 import org.kie.internal.KnowledgeBaseFactory;
6 6
 import org.kie.internal.builder.KnowledgeBuilder;
2  drools-persistence-jpa/src/test/java/org/drools/persistence/marshalling/util/TestMarshallingUtilsTest.java
@@ -41,7 +41,7 @@
41 41
 import org.junit.Assert;
42 42
 import org.junit.Ignore;
43 43
 import org.junit.Test;
44  
-import org.kie.internal.KieBaseConfiguration;
  44
+import org.kie.api.KieBaseConfiguration;
45 45
 import org.kie.internal.KnowledgeBase;
46 46
 import org.kie.internal.KnowledgeBaseFactory;
47 47
 import org.kie.api.conf.EventProcessingOption;
2  ...ls-persistence-jpa/src/test/java/org/drools/persistence/timer/integrationtests/TimerAndCalendarTest.java
@@ -21,7 +21,7 @@
21 21
 import org.junit.Before;
22 22
 import org.junit.Test;
23 23
 import org.kie.internal.KnowledgeBase;
24  
-import org.kie.internal.KieBaseConfiguration;
  24
+import org.kie.api.KieBaseConfiguration;
25 25
 import org.kie.internal.KnowledgeBaseFactory;
26 26
 import org.kie.internal.builder.KnowledgeBuilder;
27 27
 import org.kie.internal.builder.KnowledgeBuilderError;

0 notes on commit 91f8aac

Please sign in to comment.
Something went wrong with that request. Please try again.