diff --git a/.classpath b/.classpath
old mode 100644
new mode 100755
index a093bb9..05e358d
--- a/.classpath
+++ b/.classpath
@@ -3,7 +3,6 @@
-
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
old mode 100644
new mode 100755
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
old mode 100644
new mode 100755
diff --git a/.github/PULL_REQUEST_TEMPLATE/bugfix.md b/.github/PULL_REQUEST_TEMPLATE/bugfix.md
old mode 100644
new mode 100755
diff --git a/.github/PULL_REQUEST_TEMPLATE/feature_integration.md b/.github/PULL_REQUEST_TEMPLATE/feature_integration.md
old mode 100644
new mode 100755
diff --git a/.github/PULL_REQUEST_TEMPLATE/javadoc_upgrade.md b/.github/PULL_REQUEST_TEMPLATE/javadoc_upgrade.md
old mode 100644
new mode 100755
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
old mode 100644
new mode 100755
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
old mode 100644
new mode 100755
diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
diff --git a/.project b/.project
old mode 100644
new mode 100755
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
old mode 100644
new mode 100755
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
old mode 100644
new mode 100755
diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs
old mode 100644
new mode 100755
diff --git a/.settings/org.eclipse.jpt.core.prefs b/.settings/org.eclipse.jpt.core.prefs
old mode 100644
new mode 100755
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
old mode 100644
new mode 100755
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
old mode 100644
new mode 100755
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
old mode 100644
new mode 100755
diff --git a/.settings/org.hibernate.eclipse.console.prefs b/.settings/org.hibernate.eclipse.console.prefs
old mode 100644
new mode 100755
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
old mode 100644
new mode 100755
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
old mode 100644
new mode 100755
diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
diff --git a/pom.xml b/pom.xml
old mode 100644
new mode 100755
index edb27fa..046ec55
--- a/pom.xml
+++ b/pom.xml
@@ -89,4 +89,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/java/envoy/server/Startup.java b/src/main/java/envoy/server/Startup.java
old mode 100644
new mode 100755
index 76e436a..d0c2730
--- a/src/main/java/envoy/server/Startup.java
+++ b/src/main/java/envoy/server/Startup.java
@@ -58,4 +58,4 @@ public class Startup {
PersistenceManager persMan = PersistenceManager.getInstance();
if (persMan.getConfigItemById("currentMessageId") == null) persMan.addConfigItem(new ConfigItem("currentMessageId", "0"));
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/envoy/server/data/ConfigItem.java b/src/main/java/envoy/server/data/ConfigItem.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/data/Message.java b/src/main/java/envoy/server/data/Message.java
old mode 100644
new mode 100755
index 7a33de0..e5f600c
--- a/src/main/java/envoy/server/data/Message.java
+++ b/src/main/java/envoy/server/data/Message.java
@@ -47,9 +47,10 @@ public class Message {
@Temporal(TemporalType.TIMESTAMP)
private Date readDate;
- private envoy.data.Message.MessageStatus status;
private String text;
+ private envoy.data.Message.MessageStatus status;
private byte[] attachment;
+ private boolean forwarded;
/**
* The constructor for a database object.
@@ -60,7 +61,7 @@ public class Message {
/**
* Constructs a database message from a common message.
- *
+ *
* @param message the {@link envoy.data.Message} to convert into a database
* {@link Message}
* @since Envoy Server Standalone v0.1-alpha
@@ -75,12 +76,13 @@ public class Message {
readDate = message.getReadDate();
sender = persMan.getUserById(message.getSenderId());
recipient = persMan.getUserById(message.getRecipientId());
+ forwarded = message.isForwarded();
// TODO: attachment = message.getAttachment().toByteArray();DOES NOT WORK YET
}
/**
* Converts this message into an instance of {@link envoy.data.Message}.
- *
+ *
* @return a {@link envoy.data.Message} containing the same values as this
* message
* @since Envoy Server Standalone v0.1-alpha
@@ -90,6 +92,7 @@ public class Message {
envoy.data.Message message = new MessageBuilder(sender.getId(), recipient.getId(), id).setText(text)
.setDate(creationDate)
.setStatus(status)
+ .setForwarded(forwarded)
.build();
message.setReceivedDate(receivedDate);
message.setReadDate(readDate);
@@ -210,4 +213,16 @@ public class Message {
* @since Envoy Server Standalone v0.1-alpha
*/
public void setAttachment(byte[] attachment) { this.attachment = attachment; }
+
+ /**
+ * @return whether this message is a forwarded message
+ * @since Envoy Server Standalone v0.1-alpha
+ */
+ public boolean isForwarded() { return forwarded; }
+
+ /**
+ * @param forwarded this message should be a forwarded message.
+ * @since Envoy Server Standalone v0.1-alpha
+ */
+ public void setForwarded(boolean forwarded) { this.forwarded = forwarded; }
}
diff --git a/src/main/java/envoy/server/data/PersistenceManager.java b/src/main/java/envoy/server/data/PersistenceManager.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/data/User.java b/src/main/java/envoy/server/data/User.java
old mode 100644
new mode 100755
index cb12b7e..6b26459
--- a/src/main/java/envoy/server/data/User.java
+++ b/src/main/java/envoy/server/data/User.java
@@ -46,15 +46,14 @@ public class User {
private List contacts;
/**
- * Creates an instance of @link{User}.
- * Solely used for JPA/ Hibernate
+ * Creates an instance of {@link User}.
*
* @since Envoy Server Standalone v0.1-alpha
*/
public User() {}
/**
- * Creates an instance of @link{User}.
+ * Creates an instance of {@link User}.
*
* @param user the {@link envoy.data.User} to convert
* @since Envoy Server Standalone v0.1-alpha
diff --git a/src/main/java/envoy/server/data/package-info.java b/src/main/java/envoy/server/data/package-info.java
old mode 100644
new mode 100755
index 81b16a3..acbd83e
--- a/src/main/java/envoy/server/data/package-info.java
+++ b/src/main/java/envoy/server/data/package-info.java
@@ -6,4 +6,4 @@
* @author Maximilian Käfer
* @since Envoy v0.1-alpha
*/
-package envoy.server.data;
\ No newline at end of file
+package envoy.server.data;
diff --git a/src/main/java/envoy/server/net/ConnectionManager.java b/src/main/java/envoy/server/net/ConnectionManager.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/net/ObjectMessageProcessor.java b/src/main/java/envoy/server/net/ObjectMessageProcessor.java
old mode 100644
new mode 100755
index 5f0d098..a35f955
--- a/src/main/java/envoy/server/net/ObjectMessageProcessor.java
+++ b/src/main/java/envoy/server/net/ObjectMessageProcessor.java
@@ -57,4 +57,4 @@ public class ObjectMessageProcessor implements IMessageProcessor {
e.printStackTrace();
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/envoy/server/net/ObjectMessageReader.java b/src/main/java/envoy/server/net/ObjectMessageReader.java
old mode 100644
new mode 100755
index db0fee7..34c034b
--- a/src/main/java/envoy/server/net/ObjectMessageReader.java
+++ b/src/main/java/envoy/server/net/ObjectMessageReader.java
@@ -5,10 +5,7 @@ import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
-import com.jenkov.nioserver.IMessageReader;
-import com.jenkov.nioserver.Message;
-import com.jenkov.nioserver.MessageBuffer;
-import com.jenkov.nioserver.Socket;
+import com.jenkov.nioserver.*;
import envoy.util.SerializationUtils;
@@ -71,4 +68,4 @@ public class ObjectMessageReader implements IMessageReader {
} while (nextMessage.length >= length);
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/envoy/server/net/ObjectWriteProxy.java b/src/main/java/envoy/server/net/ObjectWriteProxy.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/net/package-info.java b/src/main/java/envoy/server/net/package-info.java
old mode 100644
new mode 100755
index 0c1e178..b527a76
--- a/src/main/java/envoy/server/net/package-info.java
+++ b/src/main/java/envoy/server/net/package-info.java
@@ -6,4 +6,4 @@
* @author Maximilian Käfer
* @since Envoy v0.1-alpha
*/
-package envoy.server.net;
\ No newline at end of file
+package envoy.server.net;
diff --git a/src/main/java/envoy/server/package-info.java b/src/main/java/envoy/server/package-info.java
old mode 100644
new mode 100755
index 7297478..4994f65
--- a/src/main/java/envoy/server/package-info.java
+++ b/src/main/java/envoy/server/package-info.java
@@ -1,9 +1,9 @@
/**
* This package contains the class that manages application startup.
- *
+ *
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian Käfer
* @since Envoy Server Standalone v0.1-alpha
*/
-package envoy.server;
\ No newline at end of file
+package envoy.server;
diff --git a/src/main/java/envoy/server/processors/ContactOperationProcessor.java b/src/main/java/envoy/server/processors/ContactOperationProcessor.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/processors/ContactsRequestEventProcessor.java b/src/main/java/envoy/server/processors/ContactsRequestEventProcessor.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/processors/IdGeneratorRequestProcessor.java b/src/main/java/envoy/server/processors/IdGeneratorRequestProcessor.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/processors/LoginCredentialProcessor.java b/src/main/java/envoy/server/processors/LoginCredentialProcessor.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/processors/MessageProcessor.java b/src/main/java/envoy/server/processors/MessageProcessor.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/processors/MessageStatusChangeProcessor.java b/src/main/java/envoy/server/processors/MessageStatusChangeProcessor.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/processors/ObjectProcessor.java b/src/main/java/envoy/server/processors/ObjectProcessor.java
old mode 100644
new mode 100755
index 00eabe9..91204b2
--- a/src/main/java/envoy/server/processors/ObjectProcessor.java
+++ b/src/main/java/envoy/server/processors/ObjectProcessor.java
@@ -32,4 +32,4 @@ public interface ObjectProcessor {
* @since Envoy Server Standalone v0.1-alpha
*/
void process(T input, long socketId, ObjectWriteProxy writeProxy) throws IOException;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/envoy/server/processors/UserStatusChangeProcessor.java b/src/main/java/envoy/server/processors/UserStatusChangeProcessor.java
old mode 100644
new mode 100755
diff --git a/src/main/java/envoy/server/processors/package-info.java b/src/main/java/envoy/server/processors/package-info.java
old mode 100644
new mode 100755
index 02a68a0..d96d161
--- a/src/main/java/envoy/server/processors/package-info.java
+++ b/src/main/java/envoy/server/processors/package-info.java
@@ -7,4 +7,4 @@
* @author Maximilian Käfer
* @since Envoy v0.1-alpha
*/
-package envoy.server.processors;
\ No newline at end of file
+package envoy.server.processors;
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
old mode 100644
new mode 100755
diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml
old mode 100644
new mode 100755