Refactoring drools console + add rest pojo model as it was in version 5 with Guvnor
This commit is contained in:
parent
c434544431
commit
68d39cf456
19 changed files with 627 additions and 451 deletions
|
|
@ -14,7 +14,6 @@
|
|||
<orderEntry type="library" name="Maven: org.jboss.errai:errai-common:4.3.3.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.jsinterop:jsinterop-annotations:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.errai.reflections:reflections:4.3.3.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.benediktmeurer.gwt-slf4j:gwt-slf4j:0.0.2" level="project" />
|
||||
|
|
@ -23,27 +22,31 @@
|
|||
<orderEntry type="library" name="Maven: com.google.jsinterop:base:1.0.0-beta-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.elemental2:elemental2-core:1.0.0-beta-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.elemental2:elemental2-promise:1.0.0-beta-1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.resteasy:resteasy-multipart-provider:3.0.24.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.resteasy:resteasy-client:3.0.24.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sun.mail:javax.mail:1.5.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.james:apache-mime4j:0.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.resteasy:resteasy-jaxrs:3.0.24.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec:1.0.1.Beta1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.resteasy:resteasy-jaxb-provider:3.6.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec:1.0.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.15" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.resteasy:resteasy-jaxrs:3.6.2.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.1_spec:1.0.2.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:1.0.0.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.activation:activation:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.httpcomponents:httpclient:4.3.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.httpcomponents:httpcore:4.3.3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-logging:commons-logging:1.1.3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-codec:commons-codec:1.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-io:commons-io:2.1" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: net.jcip:jcip-annotations:1.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.resteasy:resteasy-jaxb-provider:3.0.24.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sun.xml.bind:jaxb-impl:2.2.7" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sun.xml.bind:jaxb-core:2.2.7" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.xml.bind:jaxb-api:2.2.7" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sun.istack:istack-commons-runtime:2.16" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.12" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.xml.bind:jsr173_api:1.0" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.resteasy:resteasy-multipart-provider:3.6.2.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jboss.resteasy:resteasy-client:3.6.2.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sun.mail:javax.mail:1.5.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.james:apache-mime4j:0.6" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -23,12 +23,28 @@
|
|||
<dependency>
|
||||
<groupId>org.jboss.errai</groupId>
|
||||
<artifactId>errai-common</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>guava</artifactId>
|
||||
<groupId>com.google.guava</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-jaxb-provider</artifactId>
|
||||
<version>3.6.2.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-jaxrs</artifactId>
|
||||
<version>3.6.2.Final</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-multipart-provider</artifactId>
|
||||
<version>3.0.24.Final</version>
|
||||
<version>3.6.2.Final</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
|
@ -41,18 +57,6 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-jaxrs</artifactId>
|
||||
<version>3.0.24.Final</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-jaxb-provider</artifactId>
|
||||
<version>3.0.24.Final</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package org.drools.guvnor.server.jaxrs.jaxb;
|
||||
|
||||
|
||||
import org.jboss.resteasy.annotations.providers.multipart.PartType;
|
||||
|
||||
import javax.ws.rs.FormParam;
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ public class PackageResource {
|
|||
try {
|
||||
List<Asset> contentList = new LinkedList<>();
|
||||
WorkspaceProject project = getProject(organizationalUnitName, repositoryName, packageName);
|
||||
if (project != null && project.getName().equals(packageName)) {
|
||||
if (project != null) {
|
||||
org.uberfire.backend.vfs.Path rootPath = project.getRootPath();
|
||||
org.uberfire.java.nio.file.Path nioPath = Paths.get(rootPath.toURI());
|
||||
DirectoryStream<org.uberfire.java.nio.file.Path> directoryStream = ioService.newDirectoryStream(nioPath);
|
||||
|
|
@ -167,10 +167,10 @@ public class PackageResource {
|
|||
|
||||
private WorkspaceProject getProject(String organizationalUnitName, String repositoryName, String packageName) {
|
||||
OrganizationalUnit organizationalUnit = organizationalUnitService.getOrganizationalUnit(organizationalUnitName);
|
||||
Collection<Repository> repositories = organizationalUnit.getRepositories();
|
||||
for (Repository repository : repositories) {
|
||||
if (repository.getAlias().equals(repositoryName)) {
|
||||
Optional<Branch> branch = repository.getDefaultBranch();
|
||||
//Collection<Repository> repositories = organizationalUnit.getRepositories();
|
||||
// for (Repository repository : repositories) {
|
||||
// if (repository.getAlias().equals(repositoryName)) {
|
||||
// Optional<Branch> branch = repository.getDefaultBranch();
|
||||
Collection<WorkspaceProject> workspaceProjects = projectService.getAllWorkspaceProjects(organizationalUnit);
|
||||
|
||||
for (WorkspaceProject project : workspaceProjects) {
|
||||
|
|
@ -178,8 +178,8 @@ public class PackageResource {
|
|||
return project;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
//}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package org.chtijbug.kie.rest.backend;
|
||||
|
||||
import org.kie.api.io.Resource;
|
||||
import org.kie.api.io.ResourceType;
|
||||
import org.kie.internal.io.ResourceFactory;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -13,40 +11,42 @@ public class RestTypeDefinition {
|
|||
|
||||
public boolean accept(String fileName) {
|
||||
boolean result = false;
|
||||
Resource zz = ResourceFactory.newFileResource("rr");
|
||||
|
||||
if (fileName.endsWith("." + ResourceType.DRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.GDRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.RDRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.XDRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DSL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DSLR.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.RDSLR.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DRF.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.BPMN2.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.CMMN.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DTABLE.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.BRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.XSD.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.PMML.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DESCR.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.JAVA.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.PROPERTIES.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.SCARD.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.TDRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.BAYES.getDefaultExtension())
|
||||
// ||fileName.endsWith("." + ResourceType.JAVA.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.TEMPLATE.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DRT.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.GDST.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.SCGD.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.SOLVER.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DMN.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.FEEL.getDefaultExtension())
|
||||
if (fileName.startsWith(".") == false) {
|
||||
|
||||
if (fileName.endsWith("." + ResourceType.DRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.GDRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.RDRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.XDRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DSL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DSLR.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.RDSLR.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DRF.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.BPMN2.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.CMMN.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DTABLE.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.BRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.XSD.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.PMML.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DESCR.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.JAVA.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.PROPERTIES.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.SCARD.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.TDRL.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.BAYES.getDefaultExtension())
|
||||
// ||fileName.endsWith("." + ResourceType.JAVA.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.TEMPLATE.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DRT.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.GDST.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.SCGD.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.SOLVER.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.DMN.getDefaultExtension())
|
||||
|| fileName.endsWith("." + ResourceType.FEEL.getDefaultExtension())
|
||||
|
||||
|
||||
) {
|
||||
result = true;
|
||||
) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
<orderEntry type="library" name="Maven: org.jboss.errai:errai-common:4.3.3.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.jsinterop:jsinterop-annotations:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.errai.reflections:reflections:4.3.3.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
|
|
@ -37,6 +36,16 @@
|
|||
<orderEntry type="library" name="Maven: com.google.jsinterop:base:1.0.0-beta-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.elemental2:elemental2-core:1.0.0-beta-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.elemental2:elemental2-promise:1.0.0-beta-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.resteasy:resteasy-jaxb-provider:3.6.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec:1.0.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.15" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-api:7.15.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.15.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.15.0.Final" level="project" />
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue