Skip to content

Commit

Permalink
Merge pull request #4 from DirectProjectJavaRI/develop
Browse files Browse the repository at this point in the history
Releasing 8.0.0
  • Loading branch information
Greg Meyer authored Aug 3, 2021
2 parents b5285a1 + 8ec591d commit b3a658e
Show file tree
Hide file tree
Showing 13 changed files with 109 additions and 112 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
hs_err_pid*
/.classpath
/.project
/target/
107 changes: 55 additions & 52 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>direct-msg-monitor-model</artifactId>
<name>Direct Project Message Monitor Data Model Objects</name>
<version>6.0</version>
<version>8.0.0</version>
<description>Direct Project Message Monitor Data Model Objects</description>
<inceptionYear>2018</inceptionYear>
<url>https://github.com/DirectProjectJavaRI/direct-msg-monitor-model</url>
Expand All @@ -23,38 +23,48 @@
<url>http://nhindirect.org</url>
</organization>
<prerequisites>
<maven>3.0.0</maven>
<maven>3.5.0</maven>
</prerequisites>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.2.RELEASE</version>
</parent>
<scm>
<url>scm:git:https://github.com/DirectProjectJavaRI/direct-msg-monitor-model.git</url>
<connection>scm:git:https://github.com/DirectProjectJavaRI/direct-msg-monitor-model.git</connection>
</scm>
<licenses>
<license>
<version>2.5.2</version>
<relativePath />
</parent>
<scm>
<url>scm:git:https://github.com/DirectProjectJavaRI/direct-msg-monitor-model.git</url>
<connection>scm:git:https://github.com/DirectProjectJavaRI/direct-msg-monitor-model.git</connection>
</scm>
<licenses>
<license>
<name>New BSD License</name>
<url>http://nhindirect.org/BSDLicense</url>
</license>
</licenses>
</license>
</licenses>
<properties>
<javax-mail.version>1.6.2</javax-mail.version>
<dsn.version>1.6.7</dsn.version>
<commons-io.version>2.8.0</commons-io.version>
</properties>
<dependencies>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>direct-common</artifactId>
<version>6.0</version>
<version>8.0.0</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
</dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>${javax-mail.version}</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>dsn</artifactId>
<version>1.4.3</version>
<version>${dsn.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand All @@ -63,34 +73,31 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>3.1.0</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>3.1.0</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>3.1.0</version>
</extension>
</extensions>
<resources>
Expand Down Expand Up @@ -119,6 +126,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -151,32 +159,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<index>true</index>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<index>true</index>
</archive>
</configuration>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<additionalJOption>-Xdoclint:none</additionalJOption>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<docfilessubdirs>true</docfilessubdirs>
Expand Down Expand Up @@ -211,6 +214,7 @@
</goals>
</execution>
</executions>
<version>3.0.1</version>
</plugin>
-->
</plugins>
Expand All @@ -220,14 +224,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<additionalJOption>-Xdoclint:none</additionalJOption>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<docfilessubdirs>true</docfilessubdirs>
Expand All @@ -254,6 +256,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
13 changes: 5 additions & 8 deletions src/main/java/org/nhindirect/common/tx/TxUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
import javax.mail.internet.MimeMessage;
import javax.mail.internet.ParseException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nhindirect.common.mail.MDNStandard;
import org.nhindirect.common.mail.SMIMEStandard;
import org.nhindirect.common.mail.dsn.DSNStandard;
Expand All @@ -40,18 +38,17 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
import org.nhindirect.common.tx.model.TxDetailType;
import org.nhindirect.common.tx.model.TxMessageType;

import lombok.extern.slf4j.Slf4j;


/**
* Utility class for message monitoring
* @author Greg Meyer
* @since 1.1
*/
@Slf4j
public class TxUtil
{
@SuppressWarnings("deprecation")
private static final Log LOGGER = LogFactory.getFactory().getInstance(TxUtil.class);


/**
* Gets the message type based on the content type headers.
* @param msg The message to extract the type from.
Expand Down Expand Up @@ -87,11 +84,11 @@ else if (contentType.match(SMIMEStandard.EncryptedContentMediaType) ||
///CLOVER:OFF
catch (ParseException e)
{
LOGGER.warn("Failed to discern message type.", e);
log.warn("Failed to discern message type.", e);
}
catch (MessagingException e)
{
LOGGER.warn("Failed to discern message type.", e);
log.warn("Failed to discern message type.", e);
}
return TxMessageType.UNKNOWN;
///CLOVER:ON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
import javax.mail.internet.InternetHeaders;
import javax.mail.internet.MimeMessage;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nhindirect.common.mail.MDNStandard;
import org.nhindirect.common.mail.MailStandard;
import org.nhindirect.common.mail.MailUtil;
Expand All @@ -49,15 +47,14 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY

import com.sun.mail.dsn.DeliveryStatus;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class DefaultTxDetailParser implements TxDetailParser
{
@SuppressWarnings("deprecation")
private static final Log LOGGER = LogFactory.getFactory().getInstance(DefaultTxDetailParser.class);

{
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public Map<String, TxDetail> getMessageDetails(InternetHeaders headers)
{
Expand All @@ -78,7 +75,7 @@ public Map<String, TxDetail> getMessageDetails(InternetHeaders headers)
catch (MessagingException e)
{

LOGGER.warn("Failed to translate headers to MimeMessage.", e);
log.warn("Failed to translate headers to MimeMessage.", e);

}
///CLOVER:ON
Expand All @@ -104,7 +101,7 @@ public Map<String, TxDetail> getMessageDetails(InputStream stream)
catch (MessagingException e)
{

LOGGER.warn("Failed to translate input stream into MimeMessage.", e);
log.warn("Failed to translate input stream into MimeMessage.", e);

}
///CLOVER:ON
Expand Down Expand Up @@ -158,7 +155,7 @@ public Map<String, TxDetail> getMessageDetails(MimeMessage msg)
/// CLOVER:OFF
catch (MessagingException e)
{
LOGGER.warn("Failed to retrieve message sender list.", e);
log.warn("Failed to retrieve message sender list.", e);
}
/// CLOVER:ON

Expand All @@ -173,7 +170,7 @@ public Map<String, TxDetail> getMessageDetails(MimeMessage msg)
/// CLOVER:OFF
catch (MessagingException e)
{
LOGGER.warn("Failed to retrieve message sender", e);
log.warn("Failed to retrieve message sender", e);
}
/// CLOVER:ON

Expand Down Expand Up @@ -204,7 +201,7 @@ public Map<String, TxDetail> getMessageDetails(MimeMessage msg)
/// CLOVER:OFF
catch (MessagingException e)
{
LOGGER.warn("Failed to retrieve message recipient list.", e);
log.warn("Failed to retrieve message recipient list.", e);
}
/// CLOVER:ON

Expand Down Expand Up @@ -253,7 +250,7 @@ public Map<String, TxDetail> getMessageDetails(MimeMessage msg)
// CLOVER:OFF
catch (Exception e)
{
LOGGER.warn("Failed to retrieve MDN headers from message. Message may not be an MDN message.", e);
log.warn("Failed to retrieve MDN headers from message. Message may not be an MDN message.", e);
}
// CLOVER:ON
break;
Expand Down Expand Up @@ -300,7 +297,7 @@ public Map<String, TxDetail> getMessageDetails(MimeMessage msg)
///CLOVER:OFF
catch (Exception e)
{
LOGGER.warn("Could not get a requested field from the DSN message", e);
log.warn("Could not get a requested field from the DSN message", e);
}
///CLOVER:ON
break;
Expand All @@ -322,7 +319,6 @@ protected String getHeadersAsStringInternal(MimeMessage msg)
return getHeadersAsString(msg);
}

@SuppressWarnings("unchecked")
public static String getHeadersAsString(MimeMessage msg)
{
StringBuilder builder = new StringBuilder();
Expand All @@ -338,7 +334,7 @@ public static String getHeadersAsString(MimeMessage msg)
{
// According to most SE runtimes, getAllHeaderLines will never thrown a MessagingException

LOGGER.warn("Failed to builder message summary.", e);
log.warn("Failed to builder message summary.", e);

}
///CLOVER:ON
Expand Down
Loading

0 comments on commit b3a658e

Please sign in to comment.