diff --git a/apache-avro/README.md b/apache-avro/README.md deleted file mode 100644 index b338e8e565..0000000000 --- a/apache-avro/README.md +++ /dev/null @@ -1,6 +0,0 @@ -## Apache Avro - -This module contains articles about Apache Avro - -### Relevant Articles: -- [Guide to Apache Avro](https://www.baeldung.com/java-apache-avro) diff --git a/apache-avro/pom.xml b/apache-avro/pom.xml deleted file mode 100644 index ad32ebb702..0000000000 --- a/apache-avro/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - 4.0.0 - apache-avro - 0.0.1-SNAPSHOT - apache-avro - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - org.slf4j - slf4j-simple - ${slf4j.version} - compile - - - org.apache.avro - avro - ${avro.version} - - - org.apache.avro - avro-compiler - ${avro.version} - - - - org.apache.avro - avro-maven-plugin - ${avro.version} - - - - - - - org.apache.avro - avro-maven-plugin - ${avro.version} - - - schemas - generate-sources - - schema - protocol - idl-protocol - - - ${project.basedir}/src/main/resources/ - ${project.basedir}/src/main/java/ - - - - - - - - - 1.8.2 - 1.7.25 - - - diff --git a/apache-beam/README.md b/apache-beam/README.md deleted file mode 100644 index a71e5256a8..0000000000 --- a/apache-beam/README.md +++ /dev/null @@ -1,3 +0,0 @@ -### Relevant Articles: - -- [Introduction to Apache Beam](https://www.baeldung.com/apache-beam) diff --git a/apache-beam/pom.xml b/apache-beam/pom.xml deleted file mode 100644 index 7a714ac480..0000000000 --- a/apache-beam/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - com.baeldung.apache - apache-beam - 0.0.1-SNAPSHOT - - - - org.apache.beam - beam-sdks-java-core - ${beam.version} - - - - org.apache.beam - beam-runners-direct-java - ${beam.version} - runtime - - - - org.assertj - assertj-core - ${assertj.version} - test - - - - - 2.19.0 - 3.6.1 - - - diff --git a/apache-bval/README.md b/apache-bval/README.md deleted file mode 100644 index e856810378..0000000000 --- a/apache-bval/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Apache BVal - -This module contains articles about Apache BVal - -### Relevant Articles: - -- [Intro to Apache BVal](https://www.baeldung.com/apache-bval) diff --git a/apache-bval/pom.xml b/apache-bval/pom.xml deleted file mode 100644 index 49484f4959..0000000000 --- a/apache-bval/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - 4.0.0 - apache-bval - 0.0.1-SNAPSHOT - apache-bval - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - org.apache.bval - bval-jsr - ${bval.version} - - - javax.validation - validation-api - ${javax.validation.validation-api.version} - - - org.apache.bval - bval-extras - ${bval.version} - - - - - 1.1.2 - 1.1.0.Final - - - \ No newline at end of file diff --git a/apache-bval/src/main/resources/logback.xml b/apache-bval/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/apache-bval/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/apache-curator/README.md b/apache-curator/README.md deleted file mode 100644 index 4fef6a138e..0000000000 --- a/apache-curator/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Apache Curator - -This module contains articles about Apache Curator - -### Relevant Articles: - -- [Introduction to Apache Curator](https://www.baeldung.com/apache-curator) diff --git a/apache-curator/pom.xml b/apache-curator/pom.xml deleted file mode 100644 index 5b249127d9..0000000000 --- a/apache-curator/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - 4.0.0 - apache-curator - 0.0.1-SNAPSHOT - apache-curator - jar - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - - org.apache.curator - curator-x-async - ${curator.version} - - - org.apache.zookeeper - zookeeper - - - - - org.apache.curator - curator-recipes - ${curator.version} - - - org.apache.zookeeper - zookeeper - ${zookeeper.version} - - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - - - - org.assertj - assertj-core - ${assertj.version} - test - - - com.jayway.awaitility - awaitility - ${avaitility.version} - test - - - - - 4.0.1 - 3.4.11 - - 3.6.1 - 1.7.0 - - - \ No newline at end of file diff --git a/apache-curator/src/main/resources/logback.xml b/apache-curator/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/apache-curator/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/apache-geode/README.md b/apache-geode/README.md deleted file mode 100644 index 86629f7a82..0000000000 --- a/apache-geode/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Apache Geode - -This module contains articles about Apache Geode - -### Relevant Articles: - -- [A Quick Guide to Apache Geode](https://www.baeldung.com/apache-geode) diff --git a/apache-geode/pom.xml b/apache-geode/pom.xml deleted file mode 100644 index fc5b253c01..0000000000 --- a/apache-geode/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - 4.0.0 - apache-geode - 1.0-SNAPSHOT - apache-geode - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - org.apache.geode - geode-core - ${geode.core} - - - - - 1.6.0 - - - \ No newline at end of file diff --git a/apache-libraries/README.md b/apache-libraries/README.md new file mode 100644 index 0000000000..1fc0dd0842 --- /dev/null +++ b/apache-libraries/README.md @@ -0,0 +1,15 @@ +## Apache Libraries + +This module contains articles about various Apache libraries and utilities + +### Relevant Articles: +- [Guide to Apache Avro](https://www.baeldung.com/java-apache-avro) +- [Introduction to Apache Beam](https://www.baeldung.com/apache-beam) +- [Intro to Apache BVal](https://www.baeldung.com/apache-bval) +- [Building a Microservice with Apache Meecrowave](https://www.baeldung.com/apache-meecrowave) +- [Intro to Apache OpenNLP](https://www.baeldung.com/apache-open-nlp) +- [Introduction to Apache Pulsar](https://www.baeldung.com/apache-pulsar) +- [Getting Started with Java and Zookeeper](https://www.baeldung.com/java-zookeeper) +- [Introduction to Apache Curator](https://www.baeldung.com/apache-curator) +- [A Quick Guide to Apache Geode](https://www.baeldung.com/apache-geode) +- [Guide to Solr in Java with Apache Solrj](https://www.baeldung.com/apache-solrj) diff --git a/apache-libraries/pom.xml b/apache-libraries/pom.xml new file mode 100644 index 0000000000..fc655967ed --- /dev/null +++ b/apache-libraries/pom.xml @@ -0,0 +1,223 @@ + + + 4.0.0 + apache-miscellaneous-1 + 0.0.1-SNAPSHOT + apache-libraries + + + com.baeldung + parent-modules + 1.0.0-SNAPSHOT + + + + + + org.apache.avro + avro + ${avro.version} + + + org.apache.avro + avro-compiler + ${avro.version} + + + org.apache.avro + avro-maven-plugin + ${avro.version} + + + + + org.apache.beam + beam-sdks-java-core + ${beam.version} + + + + org.apache.beam + beam-runners-direct-java + ${beam.version} + runtime + + + + + org.apache.bval + bval-jsr + ${bval.version} + + + javax.validation + validation-api + ${javax.validation.validation-api.version} + + + org.apache.bval + bval-extras + ${bval.version} + + + + + org.apache.meecrowave + meecrowave-core + ${meecrowave-core.version} + + + + org.apache.meecrowave + meecrowave-jpa + ${meecrowave-jpa.version} + + + com.squareup.okhttp3 + okhttp + ${okhttp.version} + + + org.apache.meecrowave + meecrowave-junit + ${meecrowave-junit.version} + test + + + + + org.apache.opennlp + opennlp-tools + ${opennlp.opennlp-tools.version} + + + + + org.apache.pulsar + pulsar-client + ${pulsar-client.version} + compile + + + + + org.apache.zookeeper + zookeeper + ${zookeeper.version} + + + + + org.apache.curator + curator-x-async + ${curator.version} + + + org.apache.zookeeper + zookeeper + + + + + org.apache.curator + curator-recipes + ${curator.version} + + + org.apache.zookeeper + zookeeper + ${zookeeper.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.jayway.awaitility + awaitility + ${avaitility.version} + test + + + + + org.apache.geode + geode-core + ${geode.core} + + + + + org.apache.solr + solr-solrj + ${solr.solr-solrj.version} + + + + + org.assertj + assertj-core + ${assertj.version} + test + + + + + + + + org.apache.avro + avro-maven-plugin + ${avro.version} + + + schemas + generate-sources + + schema + protocol + idl-protocol + + + ${project.basedir}/src/main/resources/ + ${project.basedir}/src/main/java/ + + + + + + + + org.apache.meecrowave + meecrowave-maven-plugin + ${meecrowave-maven-plugin.version} + + + + + + 1.8 + 1.8 + 1.8.2 + 1.7.25 + 2.19.0 + 3.9.0 + 1.1.2 + 1.1.0.Final + 1.2.0 + 3.10.0 + 1.2.1 + 1.2.1 + 1.2.1 + 1.8.4 + 2.1.1-incubating + 3.4.11 + 4.0.1 + 1.7.0 + 1.6.0 + 6.4.0 + + + diff --git a/apache-beam/src/main/java/com/baeldung/apache/beam/intro/WordCount.java b/apache-libraries/src/main/java/com/baeldung/apache/beam/intro/WordCount.java similarity index 100% rename from apache-beam/src/main/java/com/baeldung/apache/beam/intro/WordCount.java rename to apache-libraries/src/main/java/com/baeldung/apache/beam/intro/WordCount.java diff --git a/apache-curator/src/main/java/com/baeldung/apache/curator/modeled/HostConfig.java b/apache-libraries/src/main/java/com/baeldung/apache/curator/modeled/HostConfig.java similarity index 100% rename from apache-curator/src/main/java/com/baeldung/apache/curator/modeled/HostConfig.java rename to apache-libraries/src/main/java/com/baeldung/apache/curator/modeled/HostConfig.java diff --git a/apache-libraries/src/main/java/com/baeldung/avro/model/Active.java b/apache-libraries/src/main/java/com/baeldung/avro/model/Active.java new file mode 100644 index 0000000000..06624df246 --- /dev/null +++ b/apache-libraries/src/main/java/com/baeldung/avro/model/Active.java @@ -0,0 +1,13 @@ +/** + * Autogenerated by Avro + * + * DO NOT EDIT DIRECTLY + */ +package com.baeldung.avro.model; +@SuppressWarnings("all") +@org.apache.avro.specific.AvroGenerated +public enum Active { + YES, NO ; + public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"enum\",\"name\":\"Active\",\"namespace\":\"com.baeldung.avro.model\",\"symbols\":[\"YES\",\"NO\"]}"); + public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } +} diff --git a/apache-libraries/src/main/java/com/baeldung/avro/model/AvroHttpRequest.java b/apache-libraries/src/main/java/com/baeldung/avro/model/AvroHttpRequest.java new file mode 100644 index 0000000000..584ccfc21c --- /dev/null +++ b/apache-libraries/src/main/java/com/baeldung/avro/model/AvroHttpRequest.java @@ -0,0 +1,491 @@ +/** + * Autogenerated by Avro + * + * DO NOT EDIT DIRECTLY + */ +package com.baeldung.avro.model; + +import org.apache.avro.specific.SpecificData; +import org.apache.avro.message.BinaryMessageEncoder; +import org.apache.avro.message.BinaryMessageDecoder; +import org.apache.avro.message.SchemaStore; + +@SuppressWarnings("all") +@org.apache.avro.specific.AvroGenerated +public class AvroHttpRequest extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord { + private static final long serialVersionUID = -8649010116827875312L; + public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"AvroHttpRequest\",\"namespace\":\"com.baeldung.avro.model\",\"fields\":[{\"name\":\"requestTime\",\"type\":\"long\"},{\"name\":\"clientIdentifier\",\"type\":{\"type\":\"record\",\"name\":\"ClientIdentifier\",\"fields\":[{\"name\":\"hostName\",\"type\":\"string\"},{\"name\":\"ipAddress\",\"type\":\"string\"}]}},{\"name\":\"employeeNames\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":null},{\"name\":\"active\",\"type\":{\"type\":\"enum\",\"name\":\"Active\",\"symbols\":[\"YES\",\"NO\"]}}]}"); + public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } + + private static SpecificData MODEL$ = new SpecificData(); + + private static final BinaryMessageEncoder ENCODER = + new BinaryMessageEncoder(MODEL$, SCHEMA$); + + private static final BinaryMessageDecoder DECODER = + new BinaryMessageDecoder(MODEL$, SCHEMA$); + + /** + * Return the BinaryMessageDecoder instance used by this class. + */ + public static BinaryMessageDecoder getDecoder() { + return DECODER; + } + + /** + * Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}. + * @param resolver a {@link SchemaStore} used to find schemas by fingerprint + */ + public static BinaryMessageDecoder createDecoder(SchemaStore resolver) { + return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver); + } + + /** Serializes this AvroHttpRequest to a ByteBuffer. */ + public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException { + return ENCODER.encode(this); + } + + /** Deserializes a AvroHttpRequest from a ByteBuffer. */ + public static AvroHttpRequest fromByteBuffer( + java.nio.ByteBuffer b) throws java.io.IOException { + return DECODER.decode(b); + } + + @Deprecated public long requestTime; + @Deprecated public com.baeldung.avro.model.ClientIdentifier clientIdentifier; + @Deprecated public java.util.List employeeNames; + @Deprecated public com.baeldung.avro.model.Active active; + + /** + * Default constructor. Note that this does not initialize fields + * to their default values from the schema. If that is desired then + * one should use newBuilder(). + */ + public AvroHttpRequest() {} + + /** + * All-args constructor. + * @param requestTime The new value for requestTime + * @param clientIdentifier The new value for clientIdentifier + * @param employeeNames The new value for employeeNames + * @param active The new value for active + */ + public AvroHttpRequest(java.lang.Long requestTime, com.baeldung.avro.model.ClientIdentifier clientIdentifier, java.util.List employeeNames, com.baeldung.avro.model.Active active) { + this.requestTime = requestTime; + this.clientIdentifier = clientIdentifier; + this.employeeNames = employeeNames; + this.active = active; + } + + public org.apache.avro.Schema getSchema() { return SCHEMA$; } + // Used by DatumWriter. Applications should not call. + public java.lang.Object get(int field$) { + switch (field$) { + case 0: return requestTime; + case 1: return clientIdentifier; + case 2: return employeeNames; + case 3: return active; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + } + } + + // Used by DatumReader. Applications should not call. + @SuppressWarnings(value="unchecked") + public void put(int field$, java.lang.Object value$) { + switch (field$) { + case 0: requestTime = (java.lang.Long)value$; break; + case 1: clientIdentifier = (com.baeldung.avro.model.ClientIdentifier)value$; break; + case 2: employeeNames = (java.util.List)value$; break; + case 3: active = (com.baeldung.avro.model.Active)value$; break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + } + } + + /** + * Gets the value of the 'requestTime' field. + * @return The value of the 'requestTime' field. + */ + public java.lang.Long getRequestTime() { + return requestTime; + } + + /** + * Sets the value of the 'requestTime' field. + * @param value the value to set. + */ + public void setRequestTime(java.lang.Long value) { + this.requestTime = value; + } + + /** + * Gets the value of the 'clientIdentifier' field. + * @return The value of the 'clientIdentifier' field. + */ + public com.baeldung.avro.model.ClientIdentifier getClientIdentifier() { + return clientIdentifier; + } + + /** + * Sets the value of the 'clientIdentifier' field. + * @param value the value to set. + */ + public void setClientIdentifier(com.baeldung.avro.model.ClientIdentifier value) { + this.clientIdentifier = value; + } + + /** + * Gets the value of the 'employeeNames' field. + * @return The value of the 'employeeNames' field. + */ + public java.util.List getEmployeeNames() { + return employeeNames; + } + + /** + * Sets the value of the 'employeeNames' field. + * @param value the value to set. + */ + public void setEmployeeNames(java.util.List value) { + this.employeeNames = value; + } + + /** + * Gets the value of the 'active' field. + * @return The value of the 'active' field. + */ + public com.baeldung.avro.model.Active getActive() { + return active; + } + + /** + * Sets the value of the 'active' field. + * @param value the value to set. + */ + public void setActive(com.baeldung.avro.model.Active value) { + this.active = value; + } + + /** + * Creates a new AvroHttpRequest RecordBuilder. + * @return A new AvroHttpRequest RecordBuilder + */ + public static com.baeldung.avro.model.AvroHttpRequest.Builder newBuilder() { + return new com.baeldung.avro.model.AvroHttpRequest.Builder(); + } + + /** + * Creates a new AvroHttpRequest RecordBuilder by copying an existing Builder. + * @param other The existing builder to copy. + * @return A new AvroHttpRequest RecordBuilder + */ + public static com.baeldung.avro.model.AvroHttpRequest.Builder newBuilder(com.baeldung.avro.model.AvroHttpRequest.Builder other) { + return new com.baeldung.avro.model.AvroHttpRequest.Builder(other); + } + + /** + * Creates a new AvroHttpRequest RecordBuilder by copying an existing AvroHttpRequest instance. + * @param other The existing instance to copy. + * @return A new AvroHttpRequest RecordBuilder + */ + public static com.baeldung.avro.model.AvroHttpRequest.Builder newBuilder(com.baeldung.avro.model.AvroHttpRequest other) { + return new com.baeldung.avro.model.AvroHttpRequest.Builder(other); + } + + /** + * RecordBuilder for AvroHttpRequest instances. + */ + public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase + implements org.apache.avro.data.RecordBuilder { + + private long requestTime; + private com.baeldung.avro.model.ClientIdentifier clientIdentifier; + private com.baeldung.avro.model.ClientIdentifier.Builder clientIdentifierBuilder; + private java.util.List employeeNames; + private com.baeldung.avro.model.Active active; + + /** Creates a new Builder */ + private Builder() { + super(SCHEMA$); + } + + /** + * Creates a Builder by copying an existing Builder. + * @param other The existing Builder to copy. + */ + private Builder(com.baeldung.avro.model.AvroHttpRequest.Builder other) { + super(other); + if (isValidValue(fields()[0], other.requestTime)) { + this.requestTime = data().deepCopy(fields()[0].schema(), other.requestTime); + fieldSetFlags()[0] = true; + } + if (isValidValue(fields()[1], other.clientIdentifier)) { + this.clientIdentifier = data().deepCopy(fields()[1].schema(), other.clientIdentifier); + fieldSetFlags()[1] = true; + } + if (other.hasClientIdentifierBuilder()) { + this.clientIdentifierBuilder = com.baeldung.avro.model.ClientIdentifier.newBuilder(other.getClientIdentifierBuilder()); + } + if (isValidValue(fields()[2], other.employeeNames)) { + this.employeeNames = data().deepCopy(fields()[2].schema(), other.employeeNames); + fieldSetFlags()[2] = true; + } + if (isValidValue(fields()[3], other.active)) { + this.active = data().deepCopy(fields()[3].schema(), other.active); + fieldSetFlags()[3] = true; + } + } + + /** + * Creates a Builder by copying an existing AvroHttpRequest instance + * @param other The existing instance to copy. + */ + private Builder(com.baeldung.avro.model.AvroHttpRequest other) { + super(SCHEMA$); + if (isValidValue(fields()[0], other.requestTime)) { + this.requestTime = data().deepCopy(fields()[0].schema(), other.requestTime); + fieldSetFlags()[0] = true; + } + if (isValidValue(fields()[1], other.clientIdentifier)) { + this.clientIdentifier = data().deepCopy(fields()[1].schema(), other.clientIdentifier); + fieldSetFlags()[1] = true; + } + this.clientIdentifierBuilder = null; + if (isValidValue(fields()[2], other.employeeNames)) { + this.employeeNames = data().deepCopy(fields()[2].schema(), other.employeeNames); + fieldSetFlags()[2] = true; + } + if (isValidValue(fields()[3], other.active)) { + this.active = data().deepCopy(fields()[3].schema(), other.active); + fieldSetFlags()[3] = true; + } + } + + /** + * Gets the value of the 'requestTime' field. + * @return The value. + */ + public java.lang.Long getRequestTime() { + return requestTime; + } + + /** + * Sets the value of the 'requestTime' field. + * @param value The value of 'requestTime'. + * @return This builder. + */ + public com.baeldung.avro.model.AvroHttpRequest.Builder setRequestTime(long value) { + validate(fields()[0], value); + this.requestTime = value; + fieldSetFlags()[0] = true; + return this; + } + + /** + * Checks whether the 'requestTime' field has been set. + * @return True if the 'requestTime' field has been set, false otherwise. + */ + public boolean hasRequestTime() { + return fieldSetFlags()[0]; + } + + + /** + * Clears the value of the 'requestTime' field. + * @return This builder. + */ + public com.baeldung.avro.model.AvroHttpRequest.Builder clearRequestTime() { + fieldSetFlags()[0] = false; + return this; + } + + /** + * Gets the value of the 'clientIdentifier' field. + * @return The value. + */ + public com.baeldung.avro.model.ClientIdentifier getClientIdentifier() { + return clientIdentifier; + } + + /** + * Sets the value of the 'clientIdentifier' field. + * @param value The value of 'clientIdentifier'. + * @return This builder. + */ + public com.baeldung.avro.model.AvroHttpRequest.Builder setClientIdentifier(com.baeldung.avro.model.ClientIdentifier value) { + validate(fields()[1], value); + this.clientIdentifierBuilder = null; + this.clientIdentifier = value; + fieldSetFlags()[1] = true; + return this; + } + + /** + * Checks whether the 'clientIdentifier' field has been set. + * @return True if the 'clientIdentifier' field has been set, false otherwise. + */ + public boolean hasClientIdentifier() { + return fieldSetFlags()[1]; + } + + /** + * Gets the Builder instance for the 'clientIdentifier' field and creates one if it doesn't exist yet. + * @return This builder. + */ + public com.baeldung.avro.model.ClientIdentifier.Builder getClientIdentifierBuilder() { + if (clientIdentifierBuilder == null) { + if (hasClientIdentifier()) { + setClientIdentifierBuilder(com.baeldung.avro.model.ClientIdentifier.newBuilder(clientIdentifier)); + } else { + setClientIdentifierBuilder(com.baeldung.avro.model.ClientIdentifier.newBuilder()); + } + } + return clientIdentifierBuilder; + } + + /** + * Sets the Builder instance for the 'clientIdentifier' field + * @param value The builder instance that must be set. + * @return This builder. + */ + public com.baeldung.avro.model.AvroHttpRequest.Builder setClientIdentifierBuilder(com.baeldung.avro.model.ClientIdentifier.Builder value) { + clearClientIdentifier(); + clientIdentifierBuilder = value; + return this; + } + + /** + * Checks whether the 'clientIdentifier' field has an active Builder instance + * @return True if the 'clientIdentifier' field has an active Builder instance + */ + public boolean hasClientIdentifierBuilder() { + return clientIdentifierBuilder != null; + } + + /** + * Clears the value of the 'clientIdentifier' field. + * @return This builder. + */ + public com.baeldung.avro.model.AvroHttpRequest.Builder clearClientIdentifier() { + clientIdentifier = null; + clientIdentifierBuilder = null; + fieldSetFlags()[1] = false; + return this; + } + + /** + * Gets the value of the 'employeeNames' field. + * @return The value. + */ + public java.util.List getEmployeeNames() { + return employeeNames; + } + + /** + * Sets the value of the 'employeeNames' field. + * @param value The value of 'employeeNames'. + * @return This builder. + */ + public com.baeldung.avro.model.AvroHttpRequest.Builder setEmployeeNames(java.util.List value) { + validate(fields()[2], value); + this.employeeNames = value; + fieldSetFlags()[2] = true; + return this; + } + + /** + * Checks whether the 'employeeNames' field has been set. + * @return True if the 'employeeNames' field has been set, false otherwise. + */ + public boolean hasEmployeeNames() { + return fieldSetFlags()[2]; + } + + + /** + * Clears the value of the 'employeeNames' field. + * @return This builder. + */ + public com.baeldung.avro.model.AvroHttpRequest.Builder clearEmployeeNames() { + employeeNames = null; + fieldSetFlags()[2] = false; + return this; + } + + /** + * Gets the value of the 'active' field. + * @return The value. + */ + public com.baeldung.avro.model.Active getActive() { + return active; + } + + /** + * Sets the value of the 'active' field. + * @param value The value of 'active'. + * @return This builder. + */ + public com.baeldung.avro.model.AvroHttpRequest.Builder setActive(com.baeldung.avro.model.Active value) { + validate(fields()[3], value); + this.active = value; + fieldSetFlags()[3] = true; + return this; + } + + /** + * Checks whether the 'active' field has been set. + * @return True if the 'active' field has been set, false otherwise. + */ + public boolean hasActive() { + return fieldSetFlags()[3]; + } + + + /** + * Clears the value of the 'active' field. + * @return This builder. + */ + public com.baeldung.avro.model.AvroHttpRequest.Builder clearActive() { + active = null; + fieldSetFlags()[3] = false; + return this; + } + + @Override + @SuppressWarnings("unchecked") + public AvroHttpRequest build() { + try { + AvroHttpRequest record = new AvroHttpRequest(); + record.requestTime = fieldSetFlags()[0] ? this.requestTime : (java.lang.Long) defaultValue(fields()[0]); + if (clientIdentifierBuilder != null) { + record.clientIdentifier = this.clientIdentifierBuilder.build(); + } else { + record.clientIdentifier = fieldSetFlags()[1] ? this.clientIdentifier : (com.baeldung.avro.model.ClientIdentifier) defaultValue(fields()[1]); + } + record.employeeNames = fieldSetFlags()[2] ? this.employeeNames : (java.util.List) defaultValue(fields()[2]); + record.active = fieldSetFlags()[3] ? this.active : (com.baeldung.avro.model.Active) defaultValue(fields()[3]); + return record; + } catch (java.lang.Exception e) { + throw new org.apache.avro.AvroRuntimeException(e); + } + } + } + + @SuppressWarnings("unchecked") + private static final org.apache.avro.io.DatumWriter + WRITER$ = (org.apache.avro.io.DatumWriter)MODEL$.createDatumWriter(SCHEMA$); + + @Override public void writeExternal(java.io.ObjectOutput out) + throws java.io.IOException { + WRITER$.write(this, SpecificData.getEncoder(out)); + } + + @SuppressWarnings("unchecked") + private static final org.apache.avro.io.DatumReader + READER$ = (org.apache.avro.io.DatumReader)MODEL$.createDatumReader(SCHEMA$); + + @Override public void readExternal(java.io.ObjectInput in) + throws java.io.IOException { + READER$.read(this, SpecificData.getDecoder(in)); + } + +} diff --git a/apache-libraries/src/main/java/com/baeldung/avro/model/ClientIdentifier.java b/apache-libraries/src/main/java/com/baeldung/avro/model/ClientIdentifier.java new file mode 100644 index 0000000000..6d1f9a7e75 --- /dev/null +++ b/apache-libraries/src/main/java/com/baeldung/avro/model/ClientIdentifier.java @@ -0,0 +1,308 @@ +/** + * Autogenerated by Avro + * + * DO NOT EDIT DIRECTLY + */ +package com.baeldung.avro.model; + +import org.apache.avro.specific.SpecificData; +import org.apache.avro.message.BinaryMessageEncoder; +import org.apache.avro.message.BinaryMessageDecoder; +import org.apache.avro.message.SchemaStore; + +@SuppressWarnings("all") +@org.apache.avro.specific.AvroGenerated +public class ClientIdentifier extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord { + private static final long serialVersionUID = 8754570983127295424L; + public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ClientIdentifier\",\"namespace\":\"com.baeldung.avro.model\",\"fields\":[{\"name\":\"hostName\",\"type\":\"string\"},{\"name\":\"ipAddress\",\"type\":\"string\"}]}"); + public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } + + private static SpecificData MODEL$ = new SpecificData(); + + private static final BinaryMessageEncoder ENCODER = + new BinaryMessageEncoder(MODEL$, SCHEMA$); + + private static final BinaryMessageDecoder DECODER = + new BinaryMessageDecoder(MODEL$, SCHEMA$); + + /** + * Return the BinaryMessageDecoder instance used by this class. + */ + public static BinaryMessageDecoder getDecoder() { + return DECODER; + } + + /** + * Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}. + * @param resolver a {@link SchemaStore} used to find schemas by fingerprint + */ + public static BinaryMessageDecoder createDecoder(SchemaStore resolver) { + return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver); + } + + /** Serializes this ClientIdentifier to a ByteBuffer. */ + public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException { + return ENCODER.encode(this); + } + + /** Deserializes a ClientIdentifier from a ByteBuffer. */ + public static ClientIdentifier fromByteBuffer( + java.nio.ByteBuffer b) throws java.io.IOException { + return DECODER.decode(b); + } + + @Deprecated public java.lang.CharSequence hostName; + @Deprecated public java.lang.CharSequence ipAddress; + + /** + * Default constructor. Note that this does not initialize fields + * to their default values from the schema. If that is desired then + * one should use newBuilder(). + */ + public ClientIdentifier() {} + + /** + * All-args constructor. + * @param hostName The new value for hostName + * @param ipAddress The new value for ipAddress + */ + public ClientIdentifier(java.lang.CharSequence hostName, java.lang.CharSequence ipAddress) { + this.hostName = hostName; + this.ipAddress = ipAddress; + } + + public org.apache.avro.Schema getSchema() { return SCHEMA$; } + // Used by DatumWriter. Applications should not call. + public java.lang.Object get(int field$) { + switch (field$) { + case 0: return hostName; + case 1: return ipAddress; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + } + } + + // Used by DatumReader. Applications should not call. + @SuppressWarnings(value="unchecked") + public void put(int field$, java.lang.Object value$) { + switch (field$) { + case 0: hostName = (java.lang.CharSequence)value$; break; + case 1: ipAddress = (java.lang.CharSequence)value$; break; + default: throw new org.apache.avro.AvroRuntimeException("Bad index"); + } + } + + /** + * Gets the value of the 'hostName' field. + * @return The value of the 'hostName' field. + */ + public java.lang.CharSequence getHostName() { + return hostName; + } + + /** + * Sets the value of the 'hostName' field. + * @param value the value to set. + */ + public void setHostName(java.lang.CharSequence value) { + this.hostName = value; + } + + /** + * Gets the value of the 'ipAddress' field. + * @return The value of the 'ipAddress' field. + */ + public java.lang.CharSequence getIpAddress() { + return ipAddress; + } + + /** + * Sets the value of the 'ipAddress' field. + * @param value the value to set. + */ + public void setIpAddress(java.lang.CharSequence value) { + this.ipAddress = value; + } + + /** + * Creates a new ClientIdentifier RecordBuilder. + * @return A new ClientIdentifier RecordBuilder + */ + public static com.baeldung.avro.model.ClientIdentifier.Builder newBuilder() { + return new com.baeldung.avro.model.ClientIdentifier.Builder(); + } + + /** + * Creates a new ClientIdentifier RecordBuilder by copying an existing Builder. + * @param other The existing builder to copy. + * @return A new ClientIdentifier RecordBuilder + */ + public static com.baeldung.avro.model.ClientIdentifier.Builder newBuilder(com.baeldung.avro.model.ClientIdentifier.Builder other) { + return new com.baeldung.avro.model.ClientIdentifier.Builder(other); + } + + /** + * Creates a new ClientIdentifier RecordBuilder by copying an existing ClientIdentifier instance. + * @param other The existing instance to copy. + * @return A new ClientIdentifier RecordBuilder + */ + public static com.baeldung.avro.model.ClientIdentifier.Builder newBuilder(com.baeldung.avro.model.ClientIdentifier other) { + return new com.baeldung.avro.model.ClientIdentifier.Builder(other); + } + + /** + * RecordBuilder for ClientIdentifier instances. + */ + public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase + implements org.apache.avro.data.RecordBuilder { + + private java.lang.CharSequence hostName; + private java.lang.CharSequence ipAddress; + + /** Creates a new Builder */ + private Builder() { + super(SCHEMA$); + } + + /** + * Creates a Builder by copying an existing Builder. + * @param other The existing Builder to copy. + */ + private Builder(com.baeldung.avro.model.ClientIdentifier.Builder other) { + super(other); + if (isValidValue(fields()[0], other.hostName)) { + this.hostName = data().deepCopy(fields()[0].schema(), other.hostName); + fieldSetFlags()[0] = true; + } + if (isValidValue(fields()[1], other.ipAddress)) { + this.ipAddress = data().deepCopy(fields()[1].schema(), other.ipAddress); + fieldSetFlags()[1] = true; + } + } + + /** + * Creates a Builder by copying an existing ClientIdentifier instance + * @param other The existing instance to copy. + */ + private Builder(com.baeldung.avro.model.ClientIdentifier other) { + super(SCHEMA$); + if (isValidValue(fields()[0], other.hostName)) { + this.hostName = data().deepCopy(fields()[0].schema(), other.hostName); + fieldSetFlags()[0] = true; + } + if (isValidValue(fields()[1], other.ipAddress)) { + this.ipAddress = data().deepCopy(fields()[1].schema(), other.ipAddress); + fieldSetFlags()[1] = true; + } + } + + /** + * Gets the value of the 'hostName' field. + * @return The value. + */ + public java.lang.CharSequence getHostName() { + return hostName; + } + + /** + * Sets the value of the 'hostName' field. + * @param value The value of 'hostName'. + * @return This builder. + */ + public com.baeldung.avro.model.ClientIdentifier.Builder setHostName(java.lang.CharSequence value) { + validate(fields()[0], value); + this.hostName = value; + fieldSetFlags()[0] = true; + return this; + } + + /** + * Checks whether the 'hostName' field has been set. + * @return True if the 'hostName' field has been set, false otherwise. + */ + public boolean hasHostName() { + return fieldSetFlags()[0]; + } + + + /** + * Clears the value of the 'hostName' field. + * @return This builder. + */ + public com.baeldung.avro.model.ClientIdentifier.Builder clearHostName() { + hostName = null; + fieldSetFlags()[0] = false; + return this; + } + + /** + * Gets the value of the 'ipAddress' field. + * @return The value. + */ + public java.lang.CharSequence getIpAddress() { + return ipAddress; + } + + /** + * Sets the value of the 'ipAddress' field. + * @param value The value of 'ipAddress'. + * @return This builder. + */ + public com.baeldung.avro.model.ClientIdentifier.Builder setIpAddress(java.lang.CharSequence value) { + validate(fields()[1], value); + this.ipAddress = value; + fieldSetFlags()[1] = true; + return this; + } + + /** + * Checks whether the 'ipAddress' field has been set. + * @return True if the 'ipAddress' field has been set, false otherwise. + */ + public boolean hasIpAddress() { + return fieldSetFlags()[1]; + } + + + /** + * Clears the value of the 'ipAddress' field. + * @return This builder. + */ + public com.baeldung.avro.model.ClientIdentifier.Builder clearIpAddress() { + ipAddress = null; + fieldSetFlags()[1] = false; + return this; + } + + @Override + @SuppressWarnings("unchecked") + public ClientIdentifier build() { + try { + ClientIdentifier record = new ClientIdentifier(); + record.hostName = fieldSetFlags()[0] ? this.hostName : (java.lang.CharSequence) defaultValue(fields()[0]); + record.ipAddress = fieldSetFlags()[1] ? this.ipAddress : (java.lang.CharSequence) defaultValue(fields()[1]); + return record; + } catch (java.lang.Exception e) { + throw new org.apache.avro.AvroRuntimeException(e); + } + } + } + + @SuppressWarnings("unchecked") + private static final org.apache.avro.io.DatumWriter + WRITER$ = (org.apache.avro.io.DatumWriter)MODEL$.createDatumWriter(SCHEMA$); + + @Override public void writeExternal(java.io.ObjectOutput out) + throws java.io.IOException { + WRITER$.write(this, SpecificData.getEncoder(out)); + } + + @SuppressWarnings("unchecked") + private static final org.apache.avro.io.DatumReader + READER$ = (org.apache.avro.io.DatumReader)MODEL$.createDatumReader(SCHEMA$); + + @Override public void readExternal(java.io.ObjectInput in) + throws java.io.IOException { + READER$.read(this, SpecificData.getDecoder(in)); + } + +} diff --git a/apache-avro/src/main/java/com/baeldung/avro/util/AvroClassGenerator.java b/apache-libraries/src/main/java/com/baeldung/avro/util/AvroClassGenerator.java similarity index 100% rename from apache-avro/src/main/java/com/baeldung/avro/util/AvroClassGenerator.java rename to apache-libraries/src/main/java/com/baeldung/avro/util/AvroClassGenerator.java diff --git a/apache-avro/src/main/java/com/baeldung/avro/util/AvroSchemaBuilder.java b/apache-libraries/src/main/java/com/baeldung/avro/util/AvroSchemaBuilder.java similarity index 100% rename from apache-avro/src/main/java/com/baeldung/avro/util/AvroSchemaBuilder.java rename to apache-libraries/src/main/java/com/baeldung/avro/util/AvroSchemaBuilder.java diff --git a/apache-avro/src/main/java/com/baeldung/avro/util/model/Active.java b/apache-libraries/src/main/java/com/baeldung/avro/util/model/Active.java similarity index 100% rename from apache-avro/src/main/java/com/baeldung/avro/util/model/Active.java rename to apache-libraries/src/main/java/com/baeldung/avro/util/model/Active.java diff --git a/apache-avro/src/main/java/com/baeldung/avro/util/model/AvroHttpRequest.java b/apache-libraries/src/main/java/com/baeldung/avro/util/model/AvroHttpRequest.java similarity index 100% rename from apache-avro/src/main/java/com/baeldung/avro/util/model/AvroHttpRequest.java rename to apache-libraries/src/main/java/com/baeldung/avro/util/model/AvroHttpRequest.java diff --git a/apache-avro/src/main/java/com/baeldung/avro/util/model/ClientIdentifier.java b/apache-libraries/src/main/java/com/baeldung/avro/util/model/ClientIdentifier.java similarity index 100% rename from apache-avro/src/main/java/com/baeldung/avro/util/model/ClientIdentifier.java rename to apache-libraries/src/main/java/com/baeldung/avro/util/model/ClientIdentifier.java diff --git a/apache-avro/src/main/java/com/baeldung/avro/util/serealization/AvroDeSerealizer.java b/apache-libraries/src/main/java/com/baeldung/avro/util/serealization/AvroDeSerealizer.java similarity index 100% rename from apache-avro/src/main/java/com/baeldung/avro/util/serealization/AvroDeSerealizer.java rename to apache-libraries/src/main/java/com/baeldung/avro/util/serealization/AvroDeSerealizer.java diff --git a/apache-avro/src/main/java/com/baeldung/avro/util/serealization/AvroSerealizer.java b/apache-libraries/src/main/java/com/baeldung/avro/util/serealization/AvroSerealizer.java similarity index 100% rename from apache-avro/src/main/java/com/baeldung/avro/util/serealization/AvroSerealizer.java rename to apache-libraries/src/main/java/com/baeldung/avro/util/serealization/AvroSerealizer.java diff --git a/apache-bval/src/main/java/com/baeldung/model/User.java b/apache-libraries/src/main/java/com/baeldung/bval/model/User.java similarity index 96% rename from apache-bval/src/main/java/com/baeldung/model/User.java rename to apache-libraries/src/main/java/com/baeldung/bval/model/User.java index 477136ddb4..95f09a4e0a 100644 --- a/apache-bval/src/main/java/com/baeldung/model/User.java +++ b/apache-libraries/src/main/java/com/baeldung/bval/model/User.java @@ -1,4 +1,4 @@ -package com.baeldung.model; +package com.baeldung.bval.model; import java.io.File; @@ -13,7 +13,7 @@ import org.apache.bval.extras.constraints.creditcard.Visa; import org.apache.bval.extras.constraints.file.Directory; import org.apache.bval.extras.constraints.net.InetAddress; -import com.baeldung.validation.Password; +import com.baeldung.bval.validation.Password; public class User { @NotNull diff --git a/apache-bval/src/main/java/com/baeldung/validation/Password.java b/apache-libraries/src/main/java/com/baeldung/bval/validation/Password.java similarity index 94% rename from apache-bval/src/main/java/com/baeldung/validation/Password.java rename to apache-libraries/src/main/java/com/baeldung/bval/validation/Password.java index 4ae06b2fb0..b278612261 100644 --- a/apache-bval/src/main/java/com/baeldung/validation/Password.java +++ b/apache-libraries/src/main/java/com/baeldung/bval/validation/Password.java @@ -1,4 +1,4 @@ -package com.baeldung.validation; +package com.baeldung.bval.validation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/apache-bval/src/main/java/com/baeldung/validation/PasswordValidator.java b/apache-libraries/src/main/java/com/baeldung/bval/validation/PasswordValidator.java similarity index 95% rename from apache-bval/src/main/java/com/baeldung/validation/PasswordValidator.java rename to apache-libraries/src/main/java/com/baeldung/bval/validation/PasswordValidator.java index 19038d04d5..46d7ff8d9e 100644 --- a/apache-bval/src/main/java/com/baeldung/validation/PasswordValidator.java +++ b/apache-libraries/src/main/java/com/baeldung/bval/validation/PasswordValidator.java @@ -1,4 +1,4 @@ -package com.baeldung.validation; +package com.baeldung.bval.validation; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; diff --git a/apache-geode/src/main/java/com/baeldung/geode/Customer.java b/apache-libraries/src/main/java/com/baeldung/geode/Customer.java similarity index 100% rename from apache-geode/src/main/java/com/baeldung/geode/Customer.java rename to apache-libraries/src/main/java/com/baeldung/geode/Customer.java diff --git a/apache-geode/src/main/java/com/baeldung/geode/CustomerKey.java b/apache-libraries/src/main/java/com/baeldung/geode/CustomerKey.java similarity index 100% rename from apache-geode/src/main/java/com/baeldung/geode/CustomerKey.java rename to apache-libraries/src/main/java/com/baeldung/geode/CustomerKey.java diff --git a/apache-geode/src/main/java/com/baeldung/geode/functions/UpperCaseNames.java b/apache-libraries/src/main/java/com/baeldung/geode/functions/UpperCaseNames.java similarity index 100% rename from apache-geode/src/main/java/com/baeldung/geode/functions/UpperCaseNames.java rename to apache-libraries/src/main/java/com/baeldung/geode/functions/UpperCaseNames.java diff --git a/apache-meecrowave/src/main/java/com/baeldung/meecrowave/Article.java b/apache-libraries/src/main/java/com/baeldung/meecrowave/Article.java similarity index 100% rename from apache-meecrowave/src/main/java/com/baeldung/meecrowave/Article.java rename to apache-libraries/src/main/java/com/baeldung/meecrowave/Article.java diff --git a/apache-meecrowave/src/main/java/com/baeldung/meecrowave/ArticleEndpoints.java b/apache-libraries/src/main/java/com/baeldung/meecrowave/ArticleEndpoints.java similarity index 100% rename from apache-meecrowave/src/main/java/com/baeldung/meecrowave/ArticleEndpoints.java rename to apache-libraries/src/main/java/com/baeldung/meecrowave/ArticleEndpoints.java diff --git a/apache-meecrowave/src/main/java/com/baeldung/meecrowave/ArticleService.java b/apache-libraries/src/main/java/com/baeldung/meecrowave/ArticleService.java similarity index 100% rename from apache-meecrowave/src/main/java/com/baeldung/meecrowave/ArticleService.java rename to apache-libraries/src/main/java/com/baeldung/meecrowave/ArticleService.java diff --git a/apache-meecrowave/src/main/java/com/baeldung/meecrowave/Server.java b/apache-libraries/src/main/java/com/baeldung/meecrowave/Server.java similarity index 100% rename from apache-meecrowave/src/main/java/com/baeldung/meecrowave/Server.java rename to apache-libraries/src/main/java/com/baeldung/meecrowave/Server.java diff --git a/apache-pulsar/src/main/java/com/baeldung/ConsumerUnitTest.java b/apache-libraries/src/main/java/com/baeldung/pulsar/ConsumerUnitTest.java similarity index 98% rename from apache-pulsar/src/main/java/com/baeldung/ConsumerUnitTest.java rename to apache-libraries/src/main/java/com/baeldung/pulsar/ConsumerUnitTest.java index 82a0028837..be94f1a975 100644 --- a/apache-pulsar/src/main/java/com/baeldung/ConsumerUnitTest.java +++ b/apache-libraries/src/main/java/com/baeldung/pulsar/ConsumerUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung; +package com.baeldung.pulsar; import java.io.IOException; diff --git a/apache-pulsar/src/main/java/com/baeldung/ProducerUnitTest.java b/apache-libraries/src/main/java/com/baeldung/pulsar/ProducerUnitTest.java similarity index 98% rename from apache-pulsar/src/main/java/com/baeldung/ProducerUnitTest.java rename to apache-libraries/src/main/java/com/baeldung/pulsar/ProducerUnitTest.java index 10a4b46c4d..45c4def559 100644 --- a/apache-pulsar/src/main/java/com/baeldung/ProducerUnitTest.java +++ b/apache-libraries/src/main/java/com/baeldung/pulsar/ProducerUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung; +package com.baeldung.pulsar; import org.apache.pulsar.client.api.CompressionType; import org.apache.pulsar.client.api.Message; diff --git a/apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionUnitTest.java b/apache-libraries/src/main/java/com/baeldung/pulsar/subscriptions/ExclusiveSubscriptionUnitTest.java similarity index 98% rename from apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionUnitTest.java rename to apache-libraries/src/main/java/com/baeldung/pulsar/subscriptions/ExclusiveSubscriptionUnitTest.java index 79121347e7..57d4ed5d00 100644 --- a/apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionUnitTest.java +++ b/apache-libraries/src/main/java/com/baeldung/pulsar/subscriptions/ExclusiveSubscriptionUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.subscriptions; +package com.baeldung.pulsar.subscriptions; import org.apache.pulsar.client.api.ConsumerBuilder; import org.apache.pulsar.client.api.Message; diff --git a/apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionUnitTest.java b/apache-libraries/src/main/java/com/baeldung/pulsar/subscriptions/FailoverSubscriptionUnitTest.java similarity index 98% rename from apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionUnitTest.java rename to apache-libraries/src/main/java/com/baeldung/pulsar/subscriptions/FailoverSubscriptionUnitTest.java index 1d13b4b83a..c5395da606 100644 --- a/apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionUnitTest.java +++ b/apache-libraries/src/main/java/com/baeldung/pulsar/subscriptions/FailoverSubscriptionUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.subscriptions; +package com.baeldung.pulsar.subscriptions; import org.apache.pulsar.client.api.Consumer; import org.apache.pulsar.client.api.ConsumerBuilder; diff --git a/apache-solrj/src/main/java/com/baeldung/solrjava/ProductBean.java b/apache-libraries/src/main/java/com/baeldung/solrjava/ProductBean.java similarity index 100% rename from apache-solrj/src/main/java/com/baeldung/solrjava/ProductBean.java rename to apache-libraries/src/main/java/com/baeldung/solrjava/ProductBean.java diff --git a/apache-solrj/src/main/java/com/baeldung/solrjava/SolrJavaIntegration.java b/apache-libraries/src/main/java/com/baeldung/solrjava/SolrJavaIntegration.java similarity index 100% rename from apache-solrj/src/main/java/com/baeldung/solrjava/SolrJavaIntegration.java rename to apache-libraries/src/main/java/com/baeldung/solrjava/SolrJavaIntegration.java diff --git a/apache-zookeeper/src/main/java/com/baeldung/zookeeper/connection/ZKConnection.java b/apache-libraries/src/main/java/com/baeldung/zookeeper/connection/ZKConnection.java similarity index 100% rename from apache-zookeeper/src/main/java/com/baeldung/zookeeper/connection/ZKConnection.java rename to apache-libraries/src/main/java/com/baeldung/zookeeper/connection/ZKConnection.java diff --git a/apache-zookeeper/src/main/java/com/baeldung/zookeeper/manager/ZKManager.java b/apache-libraries/src/main/java/com/baeldung/zookeeper/manager/ZKManager.java similarity index 100% rename from apache-zookeeper/src/main/java/com/baeldung/zookeeper/manager/ZKManager.java rename to apache-libraries/src/main/java/com/baeldung/zookeeper/manager/ZKManager.java diff --git a/apache-zookeeper/src/main/java/com/baeldung/zookeeper/manager/ZKManagerImpl.java b/apache-libraries/src/main/java/com/baeldung/zookeeper/manager/ZKManagerImpl.java similarity index 100% rename from apache-zookeeper/src/main/java/com/baeldung/zookeeper/manager/ZKManagerImpl.java rename to apache-libraries/src/main/java/com/baeldung/zookeeper/manager/ZKManagerImpl.java diff --git a/apache-avro/src/main/resources/avroHttpRequest-schema.avsc b/apache-libraries/src/main/resources/avroHttpRequest-schema.avsc similarity index 100% rename from apache-avro/src/main/resources/avroHttpRequest-schema.avsc rename to apache-libraries/src/main/resources/avroHttpRequest-schema.avsc diff --git a/apache-avro/src/main/resources/logback.xml b/apache-libraries/src/main/resources/logback.xml similarity index 100% rename from apache-avro/src/main/resources/logback.xml rename to apache-libraries/src/main/resources/logback.xml diff --git a/apache-opennlp/src/main/resources/models/DoccatSample.txt b/apache-libraries/src/main/resources/models/DoccatSample.txt similarity index 100% rename from apache-opennlp/src/main/resources/models/DoccatSample.txt rename to apache-libraries/src/main/resources/models/DoccatSample.txt diff --git a/apache-opennlp/src/main/resources/models/en-sent.bin b/apache-libraries/src/main/resources/models/en-sent.bin similarity index 100% rename from apache-opennlp/src/main/resources/models/en-sent.bin rename to apache-libraries/src/main/resources/models/en-sent.bin diff --git a/apache-opennlp/src/main/resources/models/en-token.bin b/apache-libraries/src/main/resources/models/en-token.bin similarity index 100% rename from apache-opennlp/src/main/resources/models/en-token.bin rename to apache-libraries/src/main/resources/models/en-token.bin diff --git a/apache-beam/src/test/java/com/baeldung/apache/beam/intro/WordCountUnitTest.java b/apache-libraries/src/test/java/com/baeldung/apache/beam/intro/WordCountUnitTest.java similarity index 100% rename from apache-beam/src/test/java/com/baeldung/apache/beam/intro/WordCountUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/beam/intro/WordCountUnitTest.java diff --git a/apache-curator/src/test/java/com/baeldung/apache/curator/BaseManualTest.java b/apache-libraries/src/test/java/com/baeldung/apache/curator/BaseManualTest.java similarity index 100% rename from apache-curator/src/test/java/com/baeldung/apache/curator/BaseManualTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/curator/BaseManualTest.java diff --git a/apache-curator/src/test/java/com/baeldung/apache/curator/configuration/ConfigurationManagementManualTest.java b/apache-libraries/src/test/java/com/baeldung/apache/curator/configuration/ConfigurationManagementManualTest.java similarity index 100% rename from apache-curator/src/test/java/com/baeldung/apache/curator/configuration/ConfigurationManagementManualTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/curator/configuration/ConfigurationManagementManualTest.java diff --git a/apache-curator/src/test/java/com/baeldung/apache/curator/connection/ConnectionManagementManualTest.java b/apache-libraries/src/test/java/com/baeldung/apache/curator/connection/ConnectionManagementManualTest.java similarity index 100% rename from apache-curator/src/test/java/com/baeldung/apache/curator/connection/ConnectionManagementManualTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/curator/connection/ConnectionManagementManualTest.java diff --git a/apache-curator/src/test/java/com/baeldung/apache/curator/modeled/ModelTypedExamplesManualTest.java b/apache-libraries/src/test/java/com/baeldung/apache/curator/modeled/ModelTypedExamplesManualTest.java similarity index 100% rename from apache-curator/src/test/java/com/baeldung/apache/curator/modeled/ModelTypedExamplesManualTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/curator/modeled/ModelTypedExamplesManualTest.java diff --git a/apache-curator/src/test/java/com/baeldung/apache/curator/recipes/RecipesManualTest.java b/apache-libraries/src/test/java/com/baeldung/apache/curator/recipes/RecipesManualTest.java similarity index 100% rename from apache-curator/src/test/java/com/baeldung/apache/curator/recipes/RecipesManualTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/curator/recipes/RecipesManualTest.java diff --git a/apache-opennlp/src/test/java/com/baeldung/apache/opennlp/ChunkerUnitTest.java b/apache-libraries/src/test/java/com/baeldung/apache/opennlp/ChunkerUnitTest.java similarity index 100% rename from apache-opennlp/src/test/java/com/baeldung/apache/opennlp/ChunkerUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/opennlp/ChunkerUnitTest.java diff --git a/apache-opennlp/src/test/java/com/baeldung/apache/opennlp/LanguageDetectorAndTrainingDataUnitTest.java b/apache-libraries/src/test/java/com/baeldung/apache/opennlp/LanguageDetectorAndTrainingDataUnitTest.java similarity index 100% rename from apache-opennlp/src/test/java/com/baeldung/apache/opennlp/LanguageDetectorAndTrainingDataUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/opennlp/LanguageDetectorAndTrainingDataUnitTest.java diff --git a/apache-opennlp/src/test/java/com/baeldung/apache/opennlp/LemmetizerUnitTest.java b/apache-libraries/src/test/java/com/baeldung/apache/opennlp/LemmetizerUnitTest.java similarity index 100% rename from apache-opennlp/src/test/java/com/baeldung/apache/opennlp/LemmetizerUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/opennlp/LemmetizerUnitTest.java diff --git a/apache-opennlp/src/test/java/com/baeldung/apache/opennlp/NamedEntityRecognitionUnitTest.java b/apache-libraries/src/test/java/com/baeldung/apache/opennlp/NamedEntityRecognitionUnitTest.java similarity index 100% rename from apache-opennlp/src/test/java/com/baeldung/apache/opennlp/NamedEntityRecognitionUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/opennlp/NamedEntityRecognitionUnitTest.java diff --git a/apache-opennlp/src/test/java/com/baeldung/apache/opennlp/POSTaggerUnitTest.java b/apache-libraries/src/test/java/com/baeldung/apache/opennlp/POSTaggerUnitTest.java similarity index 100% rename from apache-opennlp/src/test/java/com/baeldung/apache/opennlp/POSTaggerUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/opennlp/POSTaggerUnitTest.java diff --git a/apache-opennlp/src/test/java/com/baeldung/apache/opennlp/SentenceDetectionUnitTest.java b/apache-libraries/src/test/java/com/baeldung/apache/opennlp/SentenceDetectionUnitTest.java similarity index 100% rename from apache-opennlp/src/test/java/com/baeldung/apache/opennlp/SentenceDetectionUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/opennlp/SentenceDetectionUnitTest.java diff --git a/apache-opennlp/src/test/java/com/baeldung/apache/opennlp/TokenizerUnitTest.java b/apache-libraries/src/test/java/com/baeldung/apache/opennlp/TokenizerUnitTest.java similarity index 100% rename from apache-opennlp/src/test/java/com/baeldung/apache/opennlp/TokenizerUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/apache/opennlp/TokenizerUnitTest.java diff --git a/apache-avro/src/test/java/com/baeldung/avro/util/serealization/AvroSerealizerDeSerealizerUnitTest.java b/apache-libraries/src/test/java/com/baeldung/avro/util/serealization/AvroSerealizerDeSerealizerUnitTest.java similarity index 100% rename from apache-avro/src/test/java/com/baeldung/avro/util/serealization/AvroSerealizerDeSerealizerUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/avro/util/serealization/AvroSerealizerDeSerealizerUnitTest.java diff --git a/apache-bval/src/test/java/com/baeldung/validation/ValidationIntegrationTest.java b/apache-libraries/src/test/java/com/baeldung/bval/validation/ValidationIntegrationTest.java similarity index 97% rename from apache-bval/src/test/java/com/baeldung/validation/ValidationIntegrationTest.java rename to apache-libraries/src/test/java/com/baeldung/bval/validation/ValidationIntegrationTest.java index ecbcd100da..344aec06d0 100644 --- a/apache-bval/src/test/java/com/baeldung/validation/ValidationIntegrationTest.java +++ b/apache-libraries/src/test/java/com/baeldung/bval/validation/ValidationIntegrationTest.java @@ -1,4 +1,4 @@ -package com.baeldung.validation; +package com.baeldung.bval.validation; import java.io.File; import java.util.Set; @@ -13,9 +13,9 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; +import com.baeldung.bval.model.User; -import com.baeldung.model.User; +import static org.junit.Assert.*; public class ValidationIntegrationTest { private static ValidatorFactory validatorFactory; diff --git a/apache-geode/src/test/java/com/baeldung/geode/GeodeSamplesLiveTest.java b/apache-libraries/src/test/java/com/baeldung/geode/GeodeSamplesLiveTest.java similarity index 100% rename from apache-geode/src/test/java/com/baeldung/geode/GeodeSamplesLiveTest.java rename to apache-libraries/src/test/java/com/baeldung/geode/GeodeSamplesLiveTest.java diff --git a/apache-meecrowave/src/test/java/com/baeldung/meecrowave/ArticleEndpointsUnitTest.java b/apache-libraries/src/test/java/com/baeldung/meecrowave/ArticleEndpointsUnitTest.java similarity index 100% rename from apache-meecrowave/src/test/java/com/baeldung/meecrowave/ArticleEndpointsUnitTest.java rename to apache-libraries/src/test/java/com/baeldung/meecrowave/ArticleEndpointsUnitTest.java diff --git a/apache-solrj/src/test/java/com/baeldung/solrjava/SolrJavaLiveTest.java b/apache-libraries/src/test/java/com/baeldung/solrjava/SolrJavaLiveTest.java similarity index 100% rename from apache-solrj/src/test/java/com/baeldung/solrjava/SolrJavaLiveTest.java rename to apache-libraries/src/test/java/com/baeldung/solrjava/SolrJavaLiveTest.java diff --git a/apache-beam/src/test/resources/wordcount.txt b/apache-libraries/src/test/resources/wordcount.txt similarity index 100% rename from apache-beam/src/test/resources/wordcount.txt rename to apache-libraries/src/test/resources/wordcount.txt diff --git a/apache-meecrowave/README.md b/apache-meecrowave/README.md deleted file mode 100644 index d360af13af..0000000000 --- a/apache-meecrowave/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Apache Meecrowave - -This module contains articles about Apache Meecrowave - -### Relevant Articles: - -- [Building a Microservice with Apache Meecrowave](https://www.baeldung.com/apache-meecrowave) \ No newline at end of file diff --git a/apache-meecrowave/pom.xml b/apache-meecrowave/pom.xml deleted file mode 100644 index e046599be3..0000000000 --- a/apache-meecrowave/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - 4.0.0 - apache-meecrowave - 0.0.1 - apache-meecrowave - A sample REST API application with Meecrowave - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - - org.apache.meecrowave - meecrowave-core - ${meecrowave-core.version} - - - - org.apache.meecrowave - meecrowave-jpa - ${meecrowave-jpa.version} - - - - com.squareup.okhttp3 - okhttp - ${okhttp.version} - - - org.apache.meecrowave - meecrowave-junit - ${meecrowave-junit.version} - test - - - - - - - org.apache.meecrowave - meecrowave-maven-plugin - ${meecrowave-maven-plugin.version} - - - - - - 1.8 - 1.8 - 1.2.0 - 3.10.0 - 1.2.1 - 1.2.1 - 1.2.1 - - - \ No newline at end of file diff --git a/apache-meecrowave/src/main/resources/logback.xml b/apache-meecrowave/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/apache-meecrowave/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/apache-opennlp/README.md b/apache-opennlp/README.md deleted file mode 100644 index 4b1fa36540..0000000000 --- a/apache-opennlp/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Apache OpenNLP - -This module contains articles about Apache OpenNLP - -### Relevant Articles - -- [Intro to Apache OpenNLP](https://www.baeldung.com/apache-open-nlp) diff --git a/apache-opennlp/pom.xml b/apache-opennlp/pom.xml deleted file mode 100644 index 07ce14b4fd..0000000000 --- a/apache-opennlp/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - 4.0.0 - apache-opennlp - 1.0-SNAPSHOT - apache-opennlp - jar - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - org.apache.opennlp - opennlp-tools - ${org.apache.opennlp.opennlp-tools.version} - - - org.assertj - assertj-core - ${org.assertj.version} - test - - - - - 3.9.0 - 1.8.4 - - - \ No newline at end of file diff --git a/apache-opennlp/src/main/resources/logback.xml b/apache-opennlp/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/apache-opennlp/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/apache-pulsar/.gitignore b/apache-pulsar/.gitignore deleted file mode 100755 index 1c53e03007..0000000000 --- a/apache-pulsar/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.classpath -.project -.settings -target -.idea -*.iml -.gradle/ -build/ diff --git a/apache-pulsar/README.md b/apache-pulsar/README.md deleted file mode 100644 index c44849a490..0000000000 --- a/apache-pulsar/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Apache Pulsar - -This module contains articles about Apache Pulsar - -### Relevant Articles: - -- [Introduction to Apache Pulsar](https://www.baeldung.com/apache-pulsar) diff --git a/apache-pulsar/pom.xml b/apache-pulsar/pom.xml deleted file mode 100644 index 568389f9f5..0000000000 --- a/apache-pulsar/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - 4.0.0 - com.baeldung.pulsar - apache-pulsar - 0.0.1 - apache-pulsar - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - .. - - - - - org.apache.pulsar - pulsar-client - ${pulsar-client.version} - compile - - - - - 2.1.1-incubating - - - diff --git a/apache-solrj/README.md b/apache-solrj/README.md deleted file mode 100644 index 803db393e9..0000000000 --- a/apache-solrj/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Apache Solrj - -This module contains articles about Apache Solrj - -### Relevant Articles: - -- [Guide to Solr in Java with Apache Solrj](https://www.baeldung.com/apache-solrj) \ No newline at end of file diff --git a/apache-solrj/pom.xml b/apache-solrj/pom.xml deleted file mode 100644 index 165cd9571b..0000000000 --- a/apache-solrj/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - apache-solrj - 0.0.1-SNAPSHOT - apache-solrj - jar - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - org.apache.solr - solr-solrj - ${org.apache.solr.solr-solrj.version} - - - - - 6.4.0 - - - \ No newline at end of file diff --git a/apache-solrj/src/main/resources/logback.xml b/apache-solrj/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/apache-solrj/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/apache-zookeeper/README.md b/apache-zookeeper/README.md deleted file mode 100644 index cda1cd6d73..0000000000 --- a/apache-zookeeper/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Apache Zookeeper - -This module contains articles about Apache Zookeeper - -### Relevant articles: - -- [Getting Started with Java and Zookeeper](https://www.baeldung.com/java-zookeeper) diff --git a/apache-zookeeper/pom.xml b/apache-zookeeper/pom.xml deleted file mode 100644 index f441848f70..0000000000 --- a/apache-zookeeper/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - 4.0.0 - apache-zookeeper - 0.0.1-SNAPSHOT - apache-zookeeper - jar - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - org.apache.zookeeper - zookeeper - ${org.apache.zookeeper.version} - - - - - 3.4.11 - - - - diff --git a/apache-zookeeper/src/main/resources/logback.xml b/apache-zookeeper/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/apache-zookeeper/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 41c26b21a0..2882155117 100644 --- a/pom.xml +++ b/pom.xml @@ -343,26 +343,18 @@ animal-sniffer-mvn-plugin annotations antlr - - apache-avro - apache-bval - apache-curator - apache-cxf - apache-geode - apache-meecrowave - apache-olingo/olingo2 - apache-opennlp - apache-poi - apache-pulsar + + apache-cxf + apache-libraries + apache-olingo/olingo2 + apache-poi apache-rocketmq - apache-shiro - apache-solrj + apache-shiro apache-spark apache-tapestry apache-thrift apache-tika - apache-velocity - apache-zookeeper + apache-velocity asciidoctor asm @@ -865,27 +857,18 @@ animal-sniffer-mvn-plugin annotations antlr - - apache-avro - apache-beam - apache-bval - apache-curator - apache-cxf - apache-geode - apache-meecrowave - apache-olingo/olingo2 - apache-opennlp - apache-poi - apache-pulsar + + apache-cxf + apache-libraries + apache-olingo/olingo2 + apache-poi apache-rocketmq - apache-shiro - apache-solrj + apache-shiro apache-spark apache-tapestry apache-thrift apache-tika - apache-velocity - apache-zookeeper + apache-velocity asciidoctor asm