Skip to content

Commit ce5a075

Browse files
author
Greg Meyer
authored
Merge pull request #10 from DirectProjectJavaRI/develop
Releasing 8.0.0
2 parents d08fe98 + d30d61b commit ce5a075

34 files changed

+1165
-875
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
hs_err_pid*
2424
/.classpath
2525
/.project
26+
/target/

pom.xml

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<modelVersion>4.0.0</modelVersion>
77
<artifactId>xd-common</artifactId>
88
<name>NHIN Direct XD* Common Library</name>
9-
<version>6.0</version>
9+
<version>8.0.0</version>
1010
<description>Library for common XD* operations and objects</description>
1111
<inceptionYear>2010</inceptionYear>
1212
<url>https://github.com/DirectProjectJavaRI/xd-common</url>
@@ -31,17 +31,22 @@
3131
</license>
3232
</licenses>
3333
<prerequisites>
34-
<maven>3.0.0</maven>
34+
<maven>3.5.0</maven>
3535
</prerequisites>
36-
<parent>
36+
<parent>
3737
<groupId>org.springframework.boot</groupId>
3838
<artifactId>spring-boot-dependencies</artifactId>
39-
<version>2.1.2.RELEASE</version>
40-
</parent>
39+
<version>2.5.2</version>
40+
<relativePath />
41+
</parent>
4142
<scm>
4243
<url>https://github.com/DirectProjectJavaRI/xd-common.git</url>
4344
<connection>scm:hg:https://github.com/DirectProjectJavaRI/xd-common.git</connection>
4445
</scm>
46+
<properties>
47+
<javax-mail.version>1.6.2</javax-mail.version>
48+
<commons-io.version>2.8.0</commons-io.version>
49+
</properties>
4550
<dependencies>
4651
<dependency>
4752
<groupId>org.springframework.boot</groupId>
@@ -50,7 +55,7 @@
5055
<dependency>
5156
<groupId>org.nhind</groupId>
5257
<artifactId>config-service-client</artifactId>
53-
<version>6.0</version>
58+
<version>8.0.0</version>
5459
<scope>compile</scope>
5560
</dependency>
5661
<dependency>
@@ -60,19 +65,13 @@
6065
<dependency>
6166
<groupId>commons-io</groupId>
6267
<artifactId>commons-io</artifactId>
63-
<version>2.6</version>
64-
</dependency>
65-
<dependency>
66-
<groupId>junit</groupId>
67-
<artifactId>junit</artifactId>
68-
<scope>test</scope>
68+
<version>${commons-io.version}</version>
69+
</dependency>
70+
<dependency>
71+
<groupId>com.sun.mail</groupId>
72+
<artifactId>javax.mail</artifactId>
73+
<version>${javax-mail.version}</version>
6974
</dependency>
70-
<dependency>
71-
<groupId>javax.mail</groupId>
72-
<artifactId>mail</artifactId>
73-
<version>1.4.3</version>
74-
<scope>compile</scope>
75-
</dependency>
7675
<dependency>
7776
<groupId>commons-codec</groupId>
7877
<artifactId>commons-codec</artifactId>
@@ -85,31 +84,29 @@
8584
<dependency>
8685
<groupId>org.nhind</groupId>
8786
<artifactId>config-service-jar</artifactId>
88-
<version>6.0</version>
87+
<version>8.0.0</version>
8988
<scope>test</scope>
9089
</dependency>
9190
<dependency>
9291
<groupId>org.springframework.boot</groupId>
9392
<artifactId>spring-boot-starter-test</artifactId>
9493
<scope>test</scope>
9594
</dependency>
95+
<dependency>
96+
<groupId>org.springframework.boot</groupId>
97+
<artifactId>spring-boot-starter-security</artifactId>
98+
<scope>test</scope>
99+
</dependency>
96100
<dependency>
97-
<groupId>commons-dbcp</groupId>
98-
<artifactId>commons-dbcp</artifactId>
99-
<version>1.4</version>
100-
<scope>test</scope>
101-
</dependency>
102-
<dependency>
103-
<groupId>org.hsqldb</groupId>
104-
<artifactId>hsqldb</artifactId>
105-
<scope>test</scope>
101+
<groupId>com.h2database</groupId>
102+
<artifactId>h2</artifactId>
103+
<scope>test</scope>
106104
</dependency>
107-
<dependency>
108-
<groupId>org.apache.camel</groupId>
109-
<artifactId>camel-spring-boot-starter</artifactId>
110-
<version>2.22.0</version>
111-
<scope>test</scope>
112-
</dependency>
105+
<dependency>
106+
<groupId>io.r2dbc</groupId>
107+
<artifactId>r2dbc-h2</artifactId>
108+
<scope>test</scope>
109+
</dependency>
113110
</dependencies>
114111

115112
<build>
@@ -198,6 +195,7 @@
198195
<plugin>
199196
<groupId>org.apache.maven.plugins</groupId>
200197
<artifactId>maven-jxr-plugin</artifactId>
198+
<version>3.1.1</version>
201199
</plugin>
202200
<plugin>
203201
<groupId>org.apache.maven.plugins</groupId>
@@ -213,9 +211,8 @@
213211
<plugin>
214212
<groupId>org.apache.maven.plugins</groupId>
215213
<artifactId>maven-javadoc-plugin</artifactId>
216-
<version>2.6.1</version>
217214
<configuration>
218-
<additionalparam>-Xdoclint:none</additionalparam>
215+
<additionalJOption>-Xdoclint:none</additionalJOption>
219216
<charset>UTF-8</charset>
220217
<docencoding>UTF-8</docencoding>
221218
<docfilessubdirs>true</docfilessubdirs>
@@ -250,6 +247,7 @@
250247
</goals>
251248
</execution>
252249
</executions>
250+
<version>3.0.1</version>
253251
</plugin>
254252
-->
255253
</plugins>
@@ -260,14 +258,12 @@
260258
<plugin>
261259
<groupId>org.apache.maven.plugins</groupId>
262260
<artifactId>maven-project-info-reports-plugin</artifactId>
263-
<version>2.9</version>
264261
</plugin>
265262
<plugin>
266263
<groupId>org.apache.maven.plugins</groupId>
267264
<artifactId>maven-javadoc-plugin</artifactId>
268-
<version>2.6.1</version>
269265
<configuration>
270-
<additionalparam>-Xdoclint:none</additionalparam>
266+
<additionalJOption>-Xdoclint:none</additionalJOption>
271267
<charset>UTF-8</charset>
272268
<docencoding>UTF-8</docencoding>
273269
<docfilessubdirs>true</docfilessubdirs>
@@ -294,6 +290,7 @@
294290
<plugin>
295291
<groupId>org.apache.maven.plugins</groupId>
296292
<artifactId>maven-jxr-plugin</artifactId>
293+
<version>3.1.1</version>
297294
</plugin>
298295
<plugin>
299296
<groupId>org.codehaus.mojo</groupId>

src/main/java/org/nhindirect/xd/common/DirectDocument2.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
import org.nhindirect.xd.common.type.SubmitObjectsRequestEnum;
6666
import org.nhindirect.xd.transform.pojo.SimplePerson;
6767
import org.nhindirect.xd.transform.util.XmlUtils;
68-
import org.slf4j.Logger;
69-
import org.slf4j.LoggerFactory;
68+
69+
import lombok.extern.slf4j.Slf4j;
7070

7171
/**
7272
* Abstract representation of a document with supporting metadata.
@@ -76,13 +76,12 @@
7676
*
7777
* @author beau
7878
*/
79+
@Slf4j
7980
public class DirectDocument2
8081
{
8182
private byte[] data;
8283
private Metadata metadata;
8384

84-
private static final Logger LOGGER = LoggerFactory.getLogger(DirectDocument2.class);
85-
8685
/**
8786
* Default document constructor.
8887
*/
@@ -427,7 +426,7 @@ public void setValues(ExtrinsicObjectType eot) throws MetadataException
427426
}
428427
catch (ParseException e)
429428
{
430-
LOGGER.error("Unable to parse creationTime", e);
429+
log.error("Unable to parse creationTime", e);
431430
throw new MetadataException("Unable to parse creationTime", e);
432431
}
433432
}
@@ -449,7 +448,7 @@ else if (SlotType1Enum.SERVICE_START_TIME.matches(slot.getName()))
449448
}
450449
catch (ParseException e)
451450
{
452-
LOGGER.error("Unable to parse serviceStartTime", e);
451+
log.error("Unable to parse serviceStartTime", e);
453452
throw new MetadataException("Unable to parse serviceStartTime", e);
454453
}
455454
}
@@ -466,7 +465,7 @@ else if (SlotType1Enum.SERVICE_STOP_TIME.matches(slot.getName()))
466465
}
467466
catch (ParseException e)
468467
{
469-
LOGGER.error("Unable to parse serviceStopTime", e);
468+
log.error("Unable to parse serviceStopTime", e);
470469
throw new MetadataException("Unable to parse serviceStopTime", e);
471470
}
472471
}
@@ -1310,7 +1309,7 @@ public String getHash()
13101309
public void setHash(String hash)
13111310
{
13121311
if (StringUtils.isNotEmpty(this.hash) && !StringUtils.equalsIgnoreCase(this.hash, hash))
1313-
LOGGER.warn("Replacing existing value with new value");
1312+
log.warn("Replacing existing value with new value");
13141313

13151314
this.hash = hash;
13161315
}
@@ -1330,7 +1329,7 @@ public Long getSize()
13301329
public void setSize(Long size)
13311330
{
13321331
if (this.size != null && !this.size.equals(size))
1333-
LOGGER.warn("Replacing existing size with new value");
1332+
log.warn("Replacing existing size with new value");
13341333

13351334
this.size = size;
13361335
}
@@ -1349,7 +1348,7 @@ public String getURI()
13491348
public void setURI(String uri)
13501349
{
13511350
if (StringUtils.isNotEmpty(this.uri) && !StringUtils.equalsIgnoreCase(this.uri, uri))
1352-
LOGGER.warn("Replacing existing value with new value");
1351+
log.warn("Replacing existing value with new value");
13531352

13541353
this.uri = uri;
13551354
}
@@ -1384,7 +1383,7 @@ public static String getSha1Hash(String string)
13841383
}
13851384
catch (NoSuchAlgorithmException e)
13861385
{
1387-
LOGGER.error("Unable to calculate hash, returning null.", e);
1386+
log.error("Unable to calculate hash, returning null.", e);
13881387
return null;
13891388
}
13901389

src/main/java/org/nhindirect/xd/common/DirectDocuments.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import static org.nhindirect.xd.common.DirectDocumentUtils.slotNotEmpty;
3434
import ihe.iti.xds_b._2007.ProvideAndRegisterDocumentSetRequestType;
3535
import ihe.iti.xds_b._2007.ProvideAndRegisterDocumentSetRequestType.Document;
36+
import lombok.extern.slf4j.Slf4j;
3637

3738
import java.io.IOException;
3839
import java.text.ParseException;
@@ -66,20 +67,18 @@
6667
import org.nhindirect.xd.common.type.SlotType1Enum;
6768
import org.nhindirect.xd.common.type.SubmitObjectsRequestEnum;
6869
import org.nhindirect.xd.transform.util.XmlUtils;
69-
import org.slf4j.Logger;
70-
import org.slf4j.LoggerFactory;
7170

7271
/**
7372
* Abstract representation of a collection of documents with supporting
7473
* metadata.
7574
*
7675
* @author beau
7776
*/
77+
@Slf4j
7878
public class DirectDocuments {
7979

8080
private List<DirectDocument2> documents;
81-
private SubmissionSet submissionSet;
82-
private static final Logger LOGGER = LoggerFactory.getLogger(DirectDocuments.class);
81+
private SubmissionSet submissionSet;
8382

8483
public DirectDocuments() {
8584
this.documents = new ArrayList<DirectDocument2>();
@@ -99,7 +98,7 @@ public SubmissionSet getSubmissionSet() {
9998
*/
10099
public void setSubmissionSet(SubmissionSet submissionSet) {
101100
if (this.submissionSet != null && !this.submissionSet.equals(submissionSet)) {
102-
LOGGER.warn("Overwriting existing SubmissionSet values");
101+
log.warn("Overwriting existing SubmissionSet values");
103102
}
104103

105104
this.submissionSet = submissionSet;
@@ -443,7 +442,7 @@ protected void setValues(RegistryPackageType rpt) throws MetadataException {
443442
submissionTime = DateUtils.parseDate(slot.getValueList().getValue().get(
444443
0), new String[]{"yyyyMMddHHmmss", "yyyyMMddHHmm", "yyyyMMdd"});
445444
} catch (ParseException e) {
446-
LOGGER.error("Unable to parse submissionTime", e);
445+
log.error("Unable to parse submissionTime", e);
447446
throw new MetadataException("Unable to parse submissionTime", e);
448447
}
449448
}

0 commit comments

Comments
 (0)