Skip to content

Commit

Permalink
Merge pull request #37 from Senzing/caceres.version-1.2.0
Browse files Browse the repository at this point in the history
Version 1.2.0
  • Loading branch information
barrycaceres authored Feb 4, 2022
2 parents 8005057 + a4a67f5 commit e14b421
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 18 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
[markdownlint](https://dlaa.me/markdownlint/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2022-02-04

### Changed in 1.2.0

- Updated to `senzing-api-server` version 2.8.3 for dependency on the release
version 2.x of `senzing-commons-java`
- Changed references to `com.senzing.util.JsonUtils` to
`com.senzing.util.JsonUtilities`

## [1.1.1] - 2022-01-19

### Changed in 1.1.1

- Updated to `senzing-api-server` version 2.8.1 to reduce repo size
- Updated POC REST API spec to fix bulk-data examples
- Updated spring framework dependencies in `pom.xml` tp address security
- Updated spring framework dependencies in `pom.xml` tp address security
vulnerabilities.

## [1.1.0] - 2021-12-01
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ENV REFRESHED_AT=2022-01-06

LABEL Name="senzing/senzing-poc-server" \
Maintainer="[email protected]" \
Version="1.1.1"
Version="1.2.0"

HEALTHCHECK CMD ["/app/healthcheck.sh"]

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<groupId>com.senzing</groupId>
<artifactId>senzing-poc-server</artifactId>
<packaging>jar</packaging>
<version>1.1.1</version>
<version>1.2.0</version>
<name>senzing-poc-server</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.senzing</groupId>
<artifactId>senzing-api-server</artifactId>
<version>[2.8.1, 3.0.0-SNAPSHOT)</version>
<version>[2.8.3, 3.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
Expand Down
2 changes: 1 addition & 1 deletion senzing-api-server
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.senzing.io.TemporaryDataCache;
import com.senzing.poc.server.SzPocProvider;
import com.senzing.util.AccessToken;
import com.senzing.util.JsonUtils;
import com.senzing.util.JsonUtilities;
import com.senzing.util.LoggingUtilities;
import com.senzing.util.Timers;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
Expand Down Expand Up @@ -186,20 +186,20 @@ default SzBulkLoadResponse streamLoadBulkRecords(

// check if we have a data source and entity type
String resolvedDS = (done) ? null
: JsonUtils.getString(record, "DATA_SOURCE");
: JsonUtilities.getString(record, "DATA_SOURCE");
String resolvedET = (done) ? null
: JsonUtils.getString(record, "ENTITY_TYPE");
: JsonUtilities.getString(record, "ENTITY_TYPE");
if ((!done)
&& (resolvedDS == null || resolvedDS.trim().length() == 0
|| resolvedET == null || resolvedET.trim().length() == 0)) {

debugLog("Incomplete record not set: "
+ JsonUtils.toJsonText(record));
+ JsonUtilities.toJsonText(record));

bulkLoadResult.trackIncompleteRecord(resolvedDS, resolvedET);

} else {
String recordText = (done) ? null : JsonUtils.toJsonText(record);
String recordText = (done) ? null : JsonUtilities.toJsonText(record);
byte[] recordBytes = (done) ? null : recordText.getBytes(UTF_8);
int byteCount = (done) ? 0 : recordBytes.length + 3;

Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/senzing/poc/services/EntityStreamServices.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.senzing.poc.model.SzQueueInfoResponse;
import com.senzing.poc.model.impl.SzQueueInfoResponseImpl;
import com.senzing.poc.server.SzPocProvider;
import com.senzing.util.JsonUtils;
import com.senzing.util.JsonUtilities;
import com.senzing.util.Timers;

import javax.json.Json;
Expand Down Expand Up @@ -159,8 +159,8 @@ public SzBasicResponse postRecordToLoadQueue(
Collections.singletonMap("ENTITY_TYPE", "GENERIC"));

// cleanup the record ID and load ID in the JSON text
JsonObject recordJson = JsonUtils.parseJsonObject(recordText);
String jsonRecordId = JsonUtils.getString(recordJson, "RECORD_ID");
JsonObject recordJson = JsonUtilities.parseJsonObject(recordText);
String jsonRecordId = JsonUtilities.getString(recordJson, "RECORD_ID");
if ((jsonRecordId != null && jsonRecordId.trim().length() == 0)
|| (loadId != null && loadId.trim().length() > 0))
{
Expand All @@ -179,7 +179,7 @@ public SzBasicResponse postRecordToLoadQueue(

// reconstitute the JSON text
recordJson = jsonBuilder.build();
recordText = JsonUtils.toJsonText(recordJson);
recordText = JsonUtilities.toJsonText(recordJson);
}

// check that the data source code is valid
Expand Down Expand Up @@ -262,15 +262,15 @@ public SzBasicResponse putRecordOnLoadQueue(

// check if the load ID needs to be added on
if (loadId != null && loadId.trim().length() > 0) {
JsonObject recordJson = JsonUtils.parseJsonObject(recordText);
JsonObject recordJson = JsonUtilities.parseJsonObject(recordText);
JsonObjectBuilder jsonBuilder = Json.createObjectBuilder(recordJson);

jsonBuilder.remove("SOURCE_ID");
jsonBuilder.add("SOURCE_ID", loadId);

// reconstitute the JSON text
recordJson = jsonBuilder.build();
recordText = JsonUtils.toJsonText(recordJson);
recordText = JsonUtilities.toJsonText(recordJson);
}

// check that the data source code is valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.senzing.api.services.SzMessage;
import com.senzing.util.ErrorLogSuppressor;
import com.senzing.util.JsonUtils;
import com.senzing.util.JsonUtilities;

import javax.json.JsonObject;
import java.util.Date;
Expand Down Expand Up @@ -43,7 +43,7 @@ public static void logFailedAsyncLoad(Exception e, SzMessage message) {
sb.append(": FAILED TO ENQUEUE RECORD FOR LOAD");

try {
JsonObject jsonRecord = JsonUtils.parseJsonObject(record);
JsonObject jsonRecord = JsonUtilities.parseJsonObject(record);
String prefix = ": ";
String dataSource = jsonRecord.getString("DATA_SOURCE");
String recordId = jsonRecord.getString("RECORD_ID");
Expand Down

0 comments on commit e14b421

Please sign in to comment.