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-4249: Implement client-side marshalling #1306
Merged
Merged
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9198e24
DROOLS-4249: Introducing kogito-marshaller module
yesamer fdf5512
DROOLS-4249: Introducing kogito-marshaller module
yesamer 02d3980
DROOLS-4249: Introducing kogito-marshaller module
yesamer b9e6f43
DROOLS-4249: Introducing kogito-marshaller module
yesamer cc8de57
DROOLS-4249: Introducing kogito-marshaller module
yesamer b0928a6
Merge remote-tracking branch 'origin/master' into DROOLS-4249
yesamer 49dd842
DROOLS-4249: Introducing kogito-marshaller module
yesamer c8943b1
DROOLS-4249: Required changes after Code Review
yesamer b08fad3
DROOLS-3879: Updated project version
yesamer 86bfbb2
DROOLS-4249: Required changes after Code Review
yesamer 42a68df
DROOLS-4249: Required changes after Code Review
yesamer 903b8b2
DROOLS-4249: Minor changes
yesamer 8ec1e84
Merge remote-tracking branch 'origin/master' into DROOLS-4249
yesamer 4fdc2e0
DROOLS-4249: Required changes after Code Review
yesamer cad4a3d
DROOLS-4249: Required changes after Code Review
yesamer 378f83f
DROOLS-4249: Required changes after Code Review
yesamer 49f5b4f
DROOLS-4249: Minor changes
yesamer File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...nario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-marshaller/.gitignore
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,18 @@ | ||
/target | ||
/local | ||
|
||
# Eclipse, Netbeans and IntelliJ files | ||
/.* | ||
/**/.* | ||
!.gitignore | ||
/nbproject | ||
*.ipr | ||
*.iws | ||
*.iml | ||
|
||
# Repository wide ignore mac DS_Store files | ||
.DS_Store | ||
*.log | ||
/src/main/java/org/ | ||
/src/main/resources/org/drools/workbench/scenariosimulation/kogito/marshaller/js/SCESIM.js | ||
/src/main/resources/org/drools/workbench/scenariosimulation/kogito/marshaller/js/Jsonix-all.js |
212 changes: 212 additions & 0 deletions
212
...scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-marshaller/pom.xml
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,212 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.drools</groupId> | ||
<artifactId>drools-wb-scenario-simulation-editor</artifactId> | ||
<version>7.34.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>drools-wb-scenario-simulation-editor-kogito-marshaller</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<name>Drools Workbench - Scenario Simulation Editor - Kogito - Marshaller</name> | ||
<description>Drools Workbench - Scenario Simulation Editor - Kogito - Marshaller</description> | ||
|
||
<properties> | ||
<jsinterop-annotations.version>1.0.2</jsinterop-annotations.version> | ||
<jsinterop-base-version>1.0.0-beta-1</jsinterop-base-version> | ||
<jsonix-scripts.version>3.0.0</jsonix-scripts.version> | ||
<js.destination>${project.basedir}/src/main/resources/org/drools/workbench/scenariosimulation/kogito/marshaller/js</js.destination> | ||
<gwt-jsonix-schema-compiler.version>1.1.0</gwt-jsonix-schema-compiler.version> | ||
<gwt-interop-utils.version>0.3.0</gwt-interop-utils.version> | ||
<maven-jaxb2-plugin.version>0.14.0</maven-jaxb2-plugin.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.gwt</groupId> | ||
<artifactId>gwt-user</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.jsinterop</groupId> | ||
<artifactId>base</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.jsinterop</groupId> | ||
<artifactId>jsinterop-annotations</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.kogito</groupId> | ||
<artifactId>gwt-jsonix-schema-compiler</artifactId> | ||
<version>${gwt-jsonix-schema-compiler.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.jsinterop</groupId> | ||
<artifactId>jsinterop-annotations</artifactId> | ||
<version>${jsinterop-annotations.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.jsinterop</groupId> | ||
<artifactId>base</artifactId> | ||
<version>${jsinterop-base-version}</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<configuration> | ||
<failOnError>false</failOnError> | ||
<filesets> | ||
<fileset> | ||
<directory>src/main/java/org/drools/workbench/scenariosimulation/kogito/marshaller/js/model</directory> | ||
<includes> | ||
<include>**</include> | ||
</includes> | ||
</fileset> | ||
<fileset> | ||
<directory>${js.destination}</directory> | ||
<includes> | ||
<include>SCESIM.js</include> | ||
<include>Jsonix-all.js</include> | ||
</includes> | ||
</fileset> | ||
<fileset> | ||
<directory>src/main/java/org/drools/workbench/scenariosimulation/kogito/marshaller/mapper</directory> | ||
<includes> | ||
<include>JsUtils.java</include> | ||
<include>JSIName.java</include> | ||
</includes> | ||
</fileset> | ||
</filesets> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.jvnet.jaxb2.maven2</groupId> | ||
<artifactId>maven-jaxb2-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>generate-javascript</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>generate</goal> | ||
</goals> | ||
<configuration> | ||
<extension>true</extension> | ||
<addCompileSourceRoot>false</addCompileSourceRoot> | ||
<debug>false</debug> | ||
<verbose>false</verbose> | ||
<args> | ||
<arg>-Xgwtjsonix</arg> | ||
<arg>-Xinheritance</arg> | ||
<arg>-jsid=${project.build.sourceDirectory}</arg> | ||
<arg>-jsmpkg=org.drools.workbench.scenariosimulation.kogito.marshaller.mapper</arg> | ||
<arg>-jsmn=SCESIMMainJs</arg> | ||
</args> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.kogito</groupId> | ||
<artifactId>gwt-jsonix-schema-compiler</artifactId> | ||
</plugin> | ||
</plugins> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-javascript</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.hisrc.jsonix</groupId> | ||
<artifactId>jsonix-scripts</artifactId> | ||
<version>${jsonix-scripts.version}</version> | ||
<type>js</type> | ||
<classifier>all</classifier> | ||
<outputDirectory>${js.destination}</outputDirectory> | ||
<destFileName>Jsonix-all.js</destFileName> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>move-generated-sources</id> | ||
<phase>process-sources</phase> | ||
<configuration> | ||
<target> | ||
<copy file="${project.build.directory}/generated-sources/xjc/SCESIM.js" tofile="${js.destination}/SCESIM.js"/> | ||
</target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- GWT Maven Plugin--> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>gwt-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>compile</goal> | ||
<goal>generateAsync</goal> | ||
<goal>test</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<module>org.drools.workbench.scenariosimulation.kogito.marshaller.ScesimMarshaller</module> | ||
<style>PRETTY</style> | ||
<compileReport>true</compileReport> | ||
<soycDetailed>true</soycDetailed> | ||
<logLevel>TRACE</logLevel> | ||
<noServer>false</noServer> | ||
</configuration> | ||
</plugin> | ||
<!-- DISABLE CHECKSTYLE --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
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. shouldn't be disabled just for special folders? 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. @jomarko good point, done! |
||
</configuration> | ||
</plugin> | ||
</plugins> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.jvnet.jaxb2.maven2</groupId> | ||
<artifactId>maven-jaxb2-plugin</artifactId> | ||
<version>${maven-jaxb2-plugin.version}</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
</project> |
4 changes: 4 additions & 0 deletions
4
...on-editor/drools-wb-scenario-simulation-editor-kogito-marshaller/src/main/java/.gitignore
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,4 @@ | ||
# Ignore everything in this directory, it will contain auto-generated files | ||
* | ||
# Except this file | ||
!.gitignore |
20 changes: 20 additions & 0 deletions
20
...or/drools-wb-scenario-simulation-editor-kogito-marshaller/src/main/resources/bindings.xjb
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,20 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<jaxb:bindings | ||
version="2.1" | ||
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" | ||
xmlns:jsonix="http://jsonix.highsource.org/customizations" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
|
||
jaxb:extensionBindingPrefixes="jsonix"> | ||
|
||
<jaxb:bindings schemaLocation="scesim.xsd" node="/xs:schema"> | ||
<jaxb:schemaBindings> | ||
<jaxb:package name="org.drools.workbench.scenariosimulation.kogito.marshaller.js.model"/> | ||
</jaxb:schemaBindings> | ||
|
||
<jsonix:packageMapping | ||
packageName="org.drools.workbench.scenariosimulation.kogito.marshaller.js.model" | ||
spaceName="SCESIM"/> | ||
</jaxb:bindings> | ||
|
||
</jaxb:bindings> |
22 changes: 22 additions & 0 deletions
22
...ources/org/drools/workbench/scenariosimulation/kogito/marshaller/ScesimMarshaller.gwt.xml
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,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
When updating your version of GWT, you should also update this DTD reference, | ||
so that your app can take advantage of the latest GWT module capabilities. | ||
--> | ||
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.2//EN" | ||
"http://gwtproject.org/doctype/2.8.2/gwt-module.dtd"> | ||
<module> | ||
|
||
<inherits name="jsinterop.base.Base" /> | ||
|
||
<!-- We don't need to support IE10 or older --> | ||
<!-- There is no "ie11" permutation. IE11 uses the Firefox one (gecko1_8) --> | ||
<set-property name="user.agent" value="gecko1_8,safari"/> | ||
|
||
<!-- Specify the paths for translatable code --> | ||
<source path="js"/> | ||
<source path="mapper"/> | ||
|
||
<super-source path="jre"/> | ||
|
||
</module> |
57 changes: 57 additions & 0 deletions
57
...org/drools/workbench/scenariosimulation/kogito/marshaller/jre/javax/xml/XMLConstants.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,57 @@ | ||
/* | ||
* Copyright 2019 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 javax.xml; | ||
|
||
import jsinterop.annotations.JsPackage; | ||
import jsinterop.annotations.JsType; | ||
|
||
/** | ||
* GWT Super-source version of javax.xml.XMLConstants. | ||
*/ | ||
@SuppressWarnings("unused") | ||
@JsType(namespace = JsPackage.GLOBAL) | ||
public final class XMLConstants { | ||
|
||
public static final String NULL_NS_URI = ""; | ||
|
||
public static final String DEFAULT_NS_PREFIX = ""; | ||
|
||
public static final String XML_NS_URI = "http://www.w3.org/XML/1998/namespace"; | ||
|
||
public static final String XML_NS_PREFIX = "xml"; | ||
|
||
public static final String XMLNS_ATTRIBUTE_NS_URI = "http://www.w3.org/2000/xmlns/"; | ||
|
||
public static final String XMLNS_ATTRIBUTE = "xmlns"; | ||
|
||
public static final String W3C_XML_SCHEMA_NS_URI = "http://www.w3.org/2001/XMLSchema"; | ||
|
||
public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI = "http://www.w3.org/2001/XMLSchema-instance"; | ||
|
||
public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes"; | ||
|
||
public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml"; | ||
|
||
public static final String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0"; | ||
|
||
public static final String FEATURE_SECURE_PROCESSING = "http://javax.xml.XMLConstants/feature/secure-processing"; | ||
|
||
public static final String ACCESS_EXTERNAL_DTD = "http://javax.xml.XMLConstants/property/accessExternalDTD"; | ||
|
||
public static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema"; | ||
|
||
public static final String ACCESS_EXTERNAL_STYLESHEET = "http://javax.xml.XMLConstants/property/accessExternalStylesheet"; | ||
} |
Oops, something went wrong.
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.
@manstis @yesamer is it expected that the list of dependencies differ slightly from DMN? I do not mean versions.
https://github.com/kiegroup/kie-wb-common/blob/master/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-marshaller/pom.xml
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.
@jomarko @manstis This is a good point, thank you to raise it. I'll analyze the differences. At first glance, a change in DMN side is required for
gwt-jsonix-schema-compiler
, in my understanding 1.1.0 is the last version generated by @gcardosiThere 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.
Ok, I reported https://issues.redhat.com/browse/DROOLS-5057 for DMN
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.
@jomarko
It seems that
jaxb2-namespace-prefix
version.jaxb2-basics
are sub plugin used inmaven-jaxb2-plugin
together withgwt-jsonix-schema-compiler
. IDK why these 2 plugins are required in DMN and NOT in SCESIM. @manstis do you have any idea?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.
IDK if they're required..
It could be they're dead baggage that can be tidied up (when @jomarko looks at the JIRA he reported).
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.
@manstis Thank you! @jomarko probably another "cleanup" change required in DMN is the one spotted by @danielezonca: remove
Errai.properties
andbeans.xml
files which should be useless in this module.