Skip to content

Commit

Permalink
DROOLS-1434: moving public interfaces to kie-dmn-api module (apache#41)
Browse files Browse the repository at this point in the history
* DROOLS-1434: moving public interfaces to kie-dmn-api module

* DROOLS-1434: add .newContext() to DMNRuntime to allow creation from API
  • Loading branch information
tarilabs authored and mswiderski committed Feb 17, 2017
1 parent e8dcf64 commit b7e0347
Show file tree
Hide file tree
Showing 155 changed files with 699 additions and 438 deletions.
8 changes: 8 additions & 0 deletions kie-dmn/kie-dmn-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
<name>KIE :: Decision Model Notation :: API</name>

<dependencies>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-internal</artifactId>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-dmn-model</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.kie.dmn.core.api;
package org.kie.dmn.api.core;

import org.kie.api.io.Resource;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.kie.dmn.core.api;
package org.kie.dmn.api.core;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.kie.dmn.core.api;
package org.kie.dmn.api.core;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.kie.dmn.core.api;
package org.kie.dmn.api.core;

import org.kie.dmn.feel.runtime.events.FEELEvent;
import org.kie.dmn.api.feel.runtime.events.FEELEvent;

public interface DMNMessage {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@
* limitations under the License.
*/

package org.kie.dmn.core.api;
package org.kie.dmn.api.core;

import org.kie.dmn.core.ast.BusinessKnowledgeModelNode;
import org.kie.dmn.core.ast.DecisionNode;
import org.kie.dmn.core.ast.InputDataNode;
import org.kie.dmn.core.ast.ItemDefNode;
import org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode;
import org.kie.dmn.api.core.ast.DecisionNode;
import org.kie.dmn.api.core.ast.InputDataNode;
import org.kie.dmn.api.core.ast.ItemDefNode;
import org.kie.dmn.feel.model.v1_1.Definitions;

import javax.xml.namespace.QName;
import java.util.Collection;
import java.util.List;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.kie.dmn.core.api;
package org.kie.dmn.api.core;

import org.kie.internal.io.ResourceTypePackage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
* limitations under the License.
*/

package org.kie.dmn.core.api;
package org.kie.dmn.api.core;

import java.util.List;
import java.util.Map;

/**
* An instance that encapsulates all the information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.kie.dmn.core.api;
package org.kie.dmn.api.core;

import org.kie.dmn.core.api.event.DMNRuntimeEventManager;
import org.kie.dmn.api.core.event.DMNRuntimeEventManager;

import java.util.List;

Expand Down Expand Up @@ -78,4 +78,11 @@ public interface DMNRuntime extends DMNRuntimeEventManager {
*/
DMNResult evaluateDecisionById(DMNModel model, String decisionId, DMNContext context );

/**
* Creates a new empty DMNContext
*
* @return a new empty DMNContext
*/
DMNContext newContext();

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.kie.dmn.core.api;
package org.kie.dmn.api.core;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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.kie.dmn.api.core.ast;

import org.kie.dmn.api.core.DMNType;
import org.kie.dmn.feel.model.v1_1.BusinessKnowledgeModel;

public interface BusinessKnowledgeModelNode extends DMNNode {

DMNType getResultType();

BusinessKnowledgeModel getBusinessKnowledModel();

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.kie.dmn.core.ast;
package org.kie.dmn.api.core.ast;

public interface DMNNode {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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.kie.dmn.api.core.ast;

import org.kie.dmn.api.core.DMNType;
import org.kie.dmn.feel.model.v1_1.Decision;

public interface DecisionNode extends DMNNode {

DMNType getResultType();

Decision getDecision();

}
Original file line number Diff line number Diff line change
@@ -0,0 +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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.kie.dmn.api.core.ast;

public interface InputDataNode extends DMNNode {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* 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.kie.dmn.api.core.ast;

import org.kie.dmn.api.core.DMNType;

public interface ItemDefNode extends DMNNode {

DMNType getType();

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.kie.dmn.core.api.event;
package org.kie.dmn.api.core.event;

import org.kie.dmn.core.ast.BusinessKnowledgeModelNode;
import org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode;

public interface AfterEvaluateBKMEvent
extends DMNEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.kie.dmn.core.api.event;
package org.kie.dmn.api.core.event;

import org.kie.dmn.core.ast.DecisionNode;
import org.kie.dmn.api.core.ast.DecisionNode;

public interface AfterEvaluateDecisionEvent extends DMNEvent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

package org.kie.dmn.core.api.event;

import org.kie.dmn.core.api.DMNResult;
package org.kie.dmn.api.core.event;

import java.util.List;

import org.kie.dmn.api.core.DMNResult;

public interface AfterEvaluateDecisionTableEvent {

String getNodeName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.kie.dmn.core.api.event;
package org.kie.dmn.api.core.event;

import org.kie.dmn.core.ast.BusinessKnowledgeModelNode;
import org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode;

public interface BeforeEvaluateBKMEvent
extends DMNEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.kie.dmn.core.api.event;
package org.kie.dmn.api.core.event;

import org.kie.dmn.core.ast.DecisionNode;
import org.kie.dmn.api.core.ast.DecisionNode;

public interface BeforeEvaluateDecisionEvent extends DMNEvent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.kie.dmn.core.api.event;
package org.kie.dmn.api.core.event;

import org.kie.dmn.core.api.DMNResult;
import org.kie.dmn.api.core.DMNResult;

public interface BeforeEvaluateDecisionTableEvent {
String getNodeName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package org.kie.dmn.core.api.event;
package org.kie.dmn.api.core.event;

import org.kie.dmn.core.api.DMNResult;
import org.kie.dmn.api.core.DMNResult;

public interface DMNEvent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
* limitations under the License.
*/

package org.kie.dmn.core.api.event;
package org.kie.dmn.api.core.event;

import org.kie.dmn.api.core.event.AfterEvaluateBKMEvent;
import org.kie.dmn.api.core.event.AfterEvaluateDecisionEvent;
import org.kie.dmn.api.core.event.AfterEvaluateDecisionTableEvent;
import org.kie.dmn.api.core.event.BeforeEvaluateBKMEvent;
import org.kie.dmn.api.core.event.BeforeEvaluateDecisionEvent;
import org.kie.dmn.api.core.event.BeforeEvaluateDecisionTableEvent;

public interface DMNRuntimeEventListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.kie.dmn.core.api.event;
package org.kie.dmn.api.core.event;

import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.kie.dmn.feel.runtime.events;
package org.kie.dmn.api.feel.runtime.events;

public interface FEELEvent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.kie.dmn.feel.runtime.events;
package org.kie.dmn.api.feel.runtime.events;

/**
* A general interface for a FEEL event listener
Expand Down

0 comments on commit b7e0347

Please sign in to comment.