-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DROOLS-1663 Kie DMN doesn't support IMPORT decisions between DMN files #300
Merged
mariofusco
merged 6 commits into
kiegroup:master
from
tarilabs:tarilabs-20180309-dmnimport
Mar 27, 2018
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5d80327
WIP
tarilabs 98f8599
.
tarilabs 832ea78
Dependency sorter
tarilabs 53e7f27
Externalize ResourceWithConfiguration interface
tarilabs f447044
Use wide type Collection for collection of resources
tarilabs 2d5c5e9
Correct typo
tarilabs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
kie-api/src/main/java/org/kie/api/io/ResourceWithConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.kie.api.io; | ||
|
||
import java.util.function.Consumer; | ||
|
||
import org.kie.api.internal.assembler.KieAssemblerService; | ||
|
||
/** | ||
* Represent a tuple of a {@link Resource} with associated {@link ResourceConfiguration}, along with necessary kbuilder callbacks, to be used in in {@link KieAssemblerService}. | ||
*/ | ||
public interface ResourceWithConfiguration { | ||
|
||
Resource getResource(); | ||
|
||
ResourceConfiguration getResourceConfigutation(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please fix the typo in |
||
|
||
/** | ||
* callback executed on `kbuilder` as a paramenter in {@link KieAssemblerService}, which will be executed before performing {@link KieAssemblerService#addResource(Object, Resource, ResourceType, ResourceConfiguration)} for the given resource {@link #getResource()}. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please fix the typo in |
||
*/ | ||
Consumer<Object> getBeforeAdd(); | ||
|
||
/** | ||
* callback executed on `kbuilder` as a paramenter in {@link KieAssemblerService}, which will be executed after performing {@link KieAssemblerService#addResource(Object, Resource, ResourceType, ResourceConfiguration)} for the given resource {@link #getResource()}. | ||
*/ | ||
Consumer<Object> getAfterAdd(); | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
kie-internal/src/main/java/org/kie/internal/io/ResourceWithConfigurationImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package org.kie.internal.io; | ||
|
||
import java.util.function.Consumer; | ||
|
||
import org.kie.api.internal.assembler.KieAssemblerService; | ||
import org.kie.api.io.Resource; | ||
import org.kie.api.io.ResourceConfiguration; | ||
import org.kie.api.io.ResourceType; | ||
import org.kie.api.io.ResourceWithConfiguration; | ||
|
||
public class ResourceWithConfigurationImpl implements ResourceWithConfiguration { | ||
|
||
private final Resource resource; | ||
private final ResourceConfiguration resourceConfiguration; | ||
private final Consumer<Object> beforeAdd; | ||
private final Consumer<Object> afterAdd; | ||
|
||
/** | ||
* | ||
* @param resource | ||
* @param resourceConfiguration | ||
* @param beforeAdd callback executed on `kbuilder` as a paramenter, which will be executed before performing {@link KieAssemblerService#addResource(Object, Resource, ResourceType, ResourceConfiguration)} for the given resource {@link #resource} | ||
* @param afterAdd callback executed on `kbuilder` as a paramenter, which will be executed after performing {@link KieAssemblerService#addResource(Object, Resource, ResourceType, ResourceConfiguration)} for the given resource {@link #resource} | ||
*/ | ||
public ResourceWithConfigurationImpl(Resource resource, ResourceConfiguration resourceConfiguration, Consumer<Object> beforeAdd, Consumer<Object> afterAdd) { | ||
this.resource = resource; | ||
this.resourceConfiguration = resourceConfiguration; | ||
this.beforeAdd = beforeAdd; | ||
this.afterAdd = afterAdd; | ||
} | ||
|
||
@Override | ||
public Resource getResource() { | ||
return resource; | ||
} | ||
|
||
@Override | ||
public ResourceConfiguration getResourceConfigutation() { | ||
return resourceConfiguration; | ||
} | ||
|
||
@Override | ||
public Consumer<Object> getBeforeAdd() { | ||
return beforeAdd; | ||
} | ||
|
||
@Override | ||
public Consumer<Object> getAfterAdd() { | ||
return afterAdd; | ||
} | ||
|
||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume there is no suitable interface/class that could be used here instead of Object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@winklerm correct, and this is for consistency with the other method in class
KieAssemblerService