Skip to content

Commit

Permalink
feat(all-in-one): add all in one messages
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 committed Jun 8, 2018
1 parent 816ce4e commit 275806a
Show file tree
Hide file tree
Showing 32 changed files with 273 additions and 410 deletions.
65 changes: 2 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,5 @@
[![Coverage Status](https://coveralls.io/repos/github/carlosthe19916/sunat-jms-thorntail/badge.svg?branch=master)](https://coveralls.io/github/carlosthe19916/sunat-jms-thorntail?branch=master)
[![Maintainability](https://sonarcloud.io/api/project_badges/measure?project=carlosthe19916&metric=alert_status)](https://sonarcloud.io/dashboard?id=carlosthe19916)


= REST API Level 0 - WildFly Swarm Booster

IMPORTANT: This booster requires Java 8 JDK or greater and Maven 3.3.x.

IMPORTANT: As part of the process of creating this booster, developers.redhat.com/launch or the Fabric8 Launcher tool set up a project with a CI/CD deployment of this booster. You can see the status of this deployment in your Single-node OpenShift Cluster or OpenShift Online Web Console.

== Runing the Booster Locally

To run this booster on your local host:

[source,bash,options="nowrap",subs="attributes+"]
----
$ git clone git@github.com:carlosthe19916/sunat-jms-thorntail

$ cd sunat-jms-thorntail

$ mvn wildfly-swarm:run
----

== Interacting with the Booster Locally

To interact with your booster while it's running locally, use the form at `http://localhost:8080` or the `curl` command:

[source,bash,options="nowrap",subs="attributes+"]
----
$ curl http://localhost:8080/api/greeting
{"content":"Hello, World!"}

$ curl http://localhost:8080/api/greeting?name=Sarah
{"content":"Hello, Sarah!"}
----


== Updating the Booster
To update your booster:

. Stop your booster.
+
NOTE: To stop your running booster in a Linux or macOS terminal, use `CTRL+C`. In a Windows command prompt, you can use `CTRL + Break(pause)`.

. Make your change (e.g. edit `src/main/webapp/index.html`).
. Restart your booster.
. Confirm your change appears.


== Running the Booster on a Single-node OpenShift Cluster
If you have a single-node OpenShift cluster, such as Minishift or Red Hat Container Development Kit, link:http://appdev.openshift.io/docs/minishift-installation.html[installed and running], you can also deploy your booster there. A single-node OpenShift cluster provides you with access to a cloud environment that is similar to a production environment.

To deploy your booster to a running single-node OpenShift cluster:
[source,bash,options="nowrap",subs="attributes+"]
----
$ oc login -u developer -p developer

$ oc new-project MY_PROJECT_NAME

$ mvn clean fabric8:deploy -Popenshift
----

== More Information
You can learn more about this booster and rest of the WildFly Swarm runtime in the link:http://appdev.openshift.io/docs/wf-swarm-runtime.html[WildFly Swarm Runtime Guide].

NOTE: Run the set of integration tests included with this booster using `mvn clean verify -Popenshift,openshift-it`.
# JMSUnat
Java Message Service for SUNAT.
6 changes: 3 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<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/maven-v4_0_0.xsd">
<parent>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms</artifactId>
<artifactId>jmsunat</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>sunat-jms-core</artifactId>
<name>SUNAT JMS Core</name>
<artifactId>jmsunat-core</artifactId>
<name>JMSunat Core</name>
<packaging>jar</packaging>

<dependencies>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

70 changes: 32 additions & 38 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?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>io.openshift</groupId>
<artifactId>booster-parent</artifactId>
<version>20</version>
</parent>

<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms</artifactId>
<artifactId>jmsunat</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>SUNAT JMS</name>
<name>JMSunat</name>
<description>JMS for SUNAT</description>

<properties>
<java.version>1.8</java.version>
Expand Down Expand Up @@ -52,9 +52,9 @@
</developers>

<scm>
<connection>scm:git:git://github.com/carlosthe19916/sunat-jms-thorntail.git</connection>
<developerConnection>scm:git:git@github.com:carlosthe19916/sunat-jms-thorntail.git</developerConnection>
<url>https://github.com/carlosthe19916/sunat-jms-thorntail/tree/master/</url>
<connection>scm:git:git://github.com/carlosthe19916/jmsunat.git</connection>
<developerConnection>scm:git:git@github.com:carlosthe19916/jmsunat.git</developerConnection>
<url>https://github.com/carlosthe19916/jmsunat/tree/master/</url>
</scm>

<distributionManagement>
Expand All @@ -70,12 +70,6 @@

<modules>
<module>core</module>
<module>sender-spi</module>
<module>consumer</module>
<module>rest</module>
<module>ui</module>
<module>wildfly-swarm</module>
<module>boot</module>
</modules>

<dependencyManagement>
Expand All @@ -90,34 +84,34 @@

<dependency>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms-sender</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms-consumer</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms-rest</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms-ui</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms-wildfly-swarm-config</artifactId>
<artifactId>jmsunat-core</artifactId>
<version>${project.version}</version>
</dependency>
<!--<dependency>-->
<!--<groupId>io.github.carlosthe19916</groupId>-->
<!--<artifactId>jmsunat-sender-spi</artifactId>-->
<!--<version>${project.version}</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>io.github.carlosthe19916</groupId>-->
<!--<artifactId>sunat-jms-consumer</artifactId>-->
<!--<version>${project.version}</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>io.github.carlosthe19916</groupId>-->
<!--<artifactId>sunat-jms-rest</artifactId>-->
<!--<version>${project.version}</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>io.github.carlosthe19916</groupId>-->
<!--<artifactId>sunat-jms-ui</artifactId>-->
<!--<version>${project.version}</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>io.github.carlosthe19916</groupId>-->
<!--<artifactId>sunat-jms-wildfly-swarm-config</artifactId>-->
<!--<version>${project.version}</version>-->
<!--</dependency>-->
</dependencies>
</dependencyManagement>

Expand Down
12 changes: 5 additions & 7 deletions wildfly-swarm-config/pom.xml → sender-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,31 @@
<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/maven-v4_0_0.xsd">
<parent>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms</artifactId>
<artifactId>jmsunat</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>sunat-jms-wildfly-swarm-config</artifactId>
<name>SUNAT JMS Widlfly-Swarm Config</name>
<artifactId>jmsunat-sender-spi</artifactId>
<name>JMSunat Sender Spi</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms-core</artifactId>
</dependency>
<dependency>
<groupId>io.github.carlosthe19916</groupId>
<artifactId>sunat-jms-sender</artifactId>
</dependency>

<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>cdi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.carlosthe19916.jms.sender.model;
package io.github.carlosthe19916.sender.model;

public class BillBean {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package io.github.carlosthe19916.sender.model;

public class BillConsultBean {

private final String rucComprobante;
private final String tipoComprobante;
private final String serieComprobante;
private final Integer numeroComprobante;

private BillConsultBean(Builder builder) {
this.rucComprobante = builder.rucComprobante;
this.tipoComprobante = builder.tipoComprobante;
this.serieComprobante = builder.serieComprobante;
this.numeroComprobante = builder.numeroComprobante;
}

public String getRucComprobante() {
return rucComprobante;
}

public String getTipoComprobante() {
return tipoComprobante;
}

public String getSerieComprobante() {
return serieComprobante;
}

public Integer getNumeroComprobante() {
return numeroComprobante;
}

public static class Builder {
private String rucComprobante;
private String tipoComprobante;
private String serieComprobante;
private Integer numeroComprobante;

public Builder rucComprobante(String rucComprobante) {
this.rucComprobante = rucComprobante;
return this;
}

public Builder tipoComprobante(String tipoComprobante) {
this.tipoComprobante = tipoComprobante;
return this;
}

public Builder serieComprobante(String serieComprobante) {
this.serieComprobante = serieComprobante;
return this;
}

public Builder numeroComprobante(Integer numeroComprobante) {
this.numeroComprobante = numeroComprobante;
return this;
}

public BillConsultBean build() {
return new BillConsultBean(this);
}
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.carlosthe19916.jms.sender.model;
package io.github.carlosthe19916.sender.model;

public class BillValidBean {

Expand Down

0 comments on commit 275806a

Please sign in to comment.