]> git.mxchange.org Git - jmailer-ee.git/commitdiff
moved to new location
authorRoland Häder <roland@mxchange.org>
Tue, 17 May 2016 08:25:39 +0000 (10:25 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 17 May 2016 08:25:39 +0000 (10:25 +0200)
src/org/mxchange/jmailee/model/delivery/EmailDeliveryWrapper.java [deleted file]
src/org/mxchange/jmailee/model/delivery/WrapableEmailDelivery.java [deleted file]
src/org/mxchange/jmailee/model/delivery/wrapper/EmailDeliveryWrapper.java [new file with mode: 0644]
src/org/mxchange/jmailee/model/delivery/wrapper/WrapableEmailDelivery.java [new file with mode: 0644]

diff --git a/src/org/mxchange/jmailee/model/delivery/EmailDeliveryWrapper.java b/src/org/mxchange/jmailee/model/delivery/EmailDeliveryWrapper.java
deleted file mode 100644 (file)
index 6ed6153..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jmailee.model.delivery;
-
-import java.util.Properties;
-
-/**
- * A wrapper class for email delivery.
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public class EmailDeliveryWrapper implements WrapableEmailDelivery {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 518_209_689_877_185_914L;
-
-       /**
-        * Body of email
-        */
-       private String body;
-
-       /**
-        * Recipient email address
-        */
-       private String emailAddress;
-
-       /**
-        * (Optional) properties
-        */
-       private Properties[] properties;
-
-       /**
-        * Subject line
-        */
-       private String subjectLine;
-
-       /**
-        * Constructor with email address (recipient), subject line, body and
-        * optional properties
-        *
-        * @param emailAddress Recipient's email address
-        * @param subjectLine Subject line
-        * @param body Body content
-        * @param properties Optional properties to e.g. override from address
-        */
-       public EmailDeliveryWrapper (final String emailAddress, final String subjectLine, final String body, final Properties[] properties) {
-               // Check all except properties as they are optional
-               if (null == emailAddress) {
-                       // Throw NPE
-                       throw new NullPointerException("emailAddress is null"); //NOI18N
-               } else if (emailAddress.trim().isEmpty()) {
-                       // Is empty
-                       throw new IllegalArgumentException("emailAddress is empty"); //NOI18N
-               } else if (null == subjectLine) {
-                       // Throw NPE
-                       throw new NullPointerException("subjectLine is null"); //NOI18N
-               } else if (subjectLine.trim().isEmpty()) {
-                       // Is empty
-                       throw new IllegalArgumentException("subjectLine is empty"); //NOI18N
-               } else if (null == body) {
-                       // Throw NPE
-                       throw new NullPointerException("body is null"); //NOI18N
-               } else if (body.trim().isEmpty()) {
-                       // Is empty
-                       throw new IllegalArgumentException("body is empty"); //NOI18N
-               }
-
-               // Then set all
-               this.emailAddress = emailAddress;
-               this.subjectLine = subjectLine;
-               this.body = body;
-               this.properties = properties;
-       }
-
-       @Override
-       public String getBody () {
-               return this.body;
-       }
-
-       @Override
-       public void setBody (final String body) {
-               this.body = body;
-       }
-
-       @Override
-       public String getEmailAddress () {
-               return this.emailAddress;
-       }
-
-       @Override
-       public void setEmailAddress (final String emailAddress) {
-               this.emailAddress = emailAddress;
-       }
-
-       @Override
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
-       public Properties[] getProperties () {
-               return this.properties;
-       }
-
-       @Override
-       @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
-       public void setProperties (final Properties[] properties) {
-               this.properties = properties;
-       }
-
-       @Override
-       public String getSubjectLine () {
-               return this.subjectLine;
-       }
-
-       @Override
-       public void setSubjectLine (final String subjectLine) {
-               this.subjectLine = subjectLine;
-       }
-
-}
diff --git a/src/org/mxchange/jmailee/model/delivery/WrapableEmailDelivery.java b/src/org/mxchange/jmailee/model/delivery/WrapableEmailDelivery.java
deleted file mode 100644 (file)
index 55ec556..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jmailee.model.delivery;
-
-import java.io.Serializable;
-import java.util.Properties;
-
-/**
- * A generic wrapper interface for mail delivery.
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface WrapableEmailDelivery extends Serializable {
-
-       /**
-        * Getter for body
-        * <p>
-        * @return Body
-        */
-       String getBody ();
-
-       /**
-        * Setter for body
-        * <p>
-        * @param body Body
-        */
-       void setBody (final String body);
-
-       /**
-        * Getter for recipient's email address
-        * <p>
-        * @return Recipient's email address
-        */
-       String getEmailAddress ();
-
-       /**
-        * Setter for recipient's email address
-        * <p>
-        * @param emailAddress Recipient's email address
-        */
-       void setEmailAddress (final String emailAddress);
-
-       /**
-        * Getter for optional properties
-        * <p>
-        * @return Optional properties
-        */
-       Properties[] getProperties ();
-
-       /**
-        * Setter for optional properties
-        * <p>
-        * @param properties Optional properties
-        */
-       void setProperties (final Properties[] properties);
-
-       /**
-        * Getter for subject line
-        * <p>
-        * @return Subject line
-        */
-       String getSubjectLine ();
-
-       /**
-        * Setter for subject line
-        * <p>
-        * @param subjectLine Subject line
-        */
-       void setSubjectLine (final String subjectLine);
-
-}
diff --git a/src/org/mxchange/jmailee/model/delivery/wrapper/EmailDeliveryWrapper.java b/src/org/mxchange/jmailee/model/delivery/wrapper/EmailDeliveryWrapper.java
new file mode 100644 (file)
index 0000000..89d4978
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jmailee.model.delivery.wrapper;
+
+import java.util.Properties;
+
+/**
+ * A wrapper class for email delivery.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public class EmailDeliveryWrapper implements WrapableEmailDelivery {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 518_209_689_877_185_914L;
+
+       /**
+        * Body of email
+        */
+       private String body;
+
+       /**
+        * Recipient email address
+        */
+       private String emailAddress;
+
+       /**
+        * (Optional) properties
+        */
+       private Properties[] properties;
+
+       /**
+        * Subject line
+        */
+       private String subjectLine;
+
+       /**
+        * Constructor with email address (recipient), subject line, body and
+        * optional properties
+        *
+        * @param emailAddress Recipient's email address
+        * @param subjectLine Subject line
+        * @param body Body content
+        * @param properties Optional properties to e.g. override from address
+        */
+       public EmailDeliveryWrapper (final String emailAddress, final String subjectLine, final String body, final Properties[] properties) {
+               // Check all except properties as they are optional
+               if (null == emailAddress) {
+                       // Throw NPE
+                       throw new NullPointerException("emailAddress is null"); //NOI18N
+               } else if (emailAddress.trim().isEmpty()) {
+                       // Is empty
+                       throw new IllegalArgumentException("emailAddress is empty"); //NOI18N
+               } else if (null == subjectLine) {
+                       // Throw NPE
+                       throw new NullPointerException("subjectLine is null"); //NOI18N
+               } else if (subjectLine.trim().isEmpty()) {
+                       // Is empty
+                       throw new IllegalArgumentException("subjectLine is empty"); //NOI18N
+               } else if (null == body) {
+                       // Throw NPE
+                       throw new NullPointerException("body is null"); //NOI18N
+               } else if (body.trim().isEmpty()) {
+                       // Is empty
+                       throw new IllegalArgumentException("body is empty"); //NOI18N
+               }
+
+               // Then set all
+               this.emailAddress = emailAddress;
+               this.subjectLine = subjectLine;
+               this.body = body;
+               this.properties = properties;
+       }
+
+       @Override
+       public String getBody () {
+               return this.body;
+       }
+
+       @Override
+       public void setBody (final String body) {
+               this.body = body;
+       }
+
+       @Override
+       public String getEmailAddress () {
+               return this.emailAddress;
+       }
+
+       @Override
+       public void setEmailAddress (final String emailAddress) {
+               this.emailAddress = emailAddress;
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public Properties[] getProperties () {
+               return this.properties;
+       }
+
+       @Override
+       @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
+       public void setProperties (final Properties[] properties) {
+               this.properties = properties;
+       }
+
+       @Override
+       public String getSubjectLine () {
+               return this.subjectLine;
+       }
+
+       @Override
+       public void setSubjectLine (final String subjectLine) {
+               this.subjectLine = subjectLine;
+       }
+
+}
diff --git a/src/org/mxchange/jmailee/model/delivery/wrapper/WrapableEmailDelivery.java b/src/org/mxchange/jmailee/model/delivery/wrapper/WrapableEmailDelivery.java
new file mode 100644 (file)
index 0000000..36a460e
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jmailee.model.delivery.wrapper;
+
+import java.io.Serializable;
+import java.util.Properties;
+
+/**
+ * A generic wrapper interface for mail delivery.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface WrapableEmailDelivery extends Serializable {
+
+       /**
+        * Getter for body
+        * <p>
+        * @return Body
+        */
+       String getBody ();
+
+       /**
+        * Setter for body
+        * <p>
+        * @param body Body
+        */
+       void setBody (final String body);
+
+       /**
+        * Getter for recipient's email address
+        * <p>
+        * @return Recipient's email address
+        */
+       String getEmailAddress ();
+
+       /**
+        * Setter for recipient's email address
+        * <p>
+        * @param emailAddress Recipient's email address
+        */
+       void setEmailAddress (final String emailAddress);
+
+       /**
+        * Getter for optional properties
+        * <p>
+        * @return Optional properties
+        */
+       Properties[] getProperties ();
+
+       /**
+        * Setter for optional properties
+        * <p>
+        * @param properties Optional properties
+        */
+       void setProperties (final Properties[] properties);
+
+       /**
+        * Getter for subject line
+        * <p>
+        * @return Subject line
+        */
+       String getSubjectLine ();
+
+       /**
+        * Setter for subject line
+        * <p>
+        * @param subjectLine Subject line
+        */
+       void setSubjectLine (final String subjectLine);
+
+}