diff --git a/src/main/java/envoy/server/data/Message.java b/src/main/java/envoy/server/data/Message.java
index e5f600c..f2584d3 100755
--- a/src/main/java/envoy/server/data/Message.java
+++ b/src/main/java/envoy/server/data/Message.java
@@ -68,14 +68,14 @@ public class Message {
*/
public Message(envoy.data.Message message) {
PersistenceManager persMan = PersistenceManager.getInstance();
- id = message.getId();
+ id = message.getID();
status = message.getStatus();
text = message.getText();
creationDate = message.getCreationDate();
receivedDate = message.getReceivedDate();
readDate = message.getReadDate();
- sender = persMan.getUserById(message.getSenderId());
- recipient = persMan.getUserById(message.getRecipientId());
+ sender = persMan.getUserById(message.getSenderID());
+ recipient = persMan.getUserById(message.getRecipientID());
forwarded = message.isForwarded();
// TODO: attachment = message.getAttachment().toByteArray();DOES NOT WORK YET
}
diff --git a/src/main/java/envoy/server/data/User.java b/src/main/java/envoy/server/data/User.java
index b356147..327a030 100755
--- a/src/main/java/envoy/server/data/User.java
+++ b/src/main/java/envoy/server/data/User.java
@@ -5,7 +5,6 @@ import java.util.List;
import javax.persistence.*;
-
/**
* This class serves as a way to let Hibernate communicate with the server
* without bringing the dependency of JPA/Hibernate into the client.
@@ -60,7 +59,7 @@ public class User {
* @since Envoy Server Standalone v0.1-alpha
*/
public User(envoy.data.User user) {
- id = user.getId();
+ id = user.getID();
name = user.getName();
status = user.getStatus();
}
diff --git a/src/main/java/envoy/server/processors/ContactOperationProcessor.java b/src/main/java/envoy/server/processors/ContactOperationProcessor.java
index 3c6c6d8..e0f0645 100755
--- a/src/main/java/envoy/server/processors/ContactOperationProcessor.java
+++ b/src/main/java/envoy/server/processors/ContactOperationProcessor.java
@@ -26,7 +26,7 @@ public class ContactOperationProcessor implements ObjectProcessor {
+public class IDGeneratorRequestProcessor implements ObjectProcessor {
private static final long ID_RANGE = 200;
@Override
- public Class getInputClass() { return IdGeneratorRequest.class; }
+ public Class getInputClass() { return IDGeneratorRequest.class; }
@Override
- public void process(IdGeneratorRequest input, long socketId, ObjectWriteProxy writeProxy) throws IOException {
+ public void process(IDGeneratorRequest input, long socketId, ObjectWriteProxy writeProxy) throws IOException {
System.out.println("Received id generation request.");
ConfigItem currentId = PersistenceManager.getInstance().getConfigItemById("currentMessageId");
- IdGenerator generator = new IdGenerator(Integer.parseInt(currentId.getValue()), ID_RANGE);
+ IDGenerator generator = new IDGenerator(Integer.parseInt(currentId.getValue()), ID_RANGE);
currentId.setValue(String.valueOf(Integer.parseInt(currentId.getValue()) + ID_RANGE));
PersistenceManager.getInstance().updateConfigItem(currentId);
diff --git a/src/main/java/envoy/server/processors/MessageProcessor.java b/src/main/java/envoy/server/processors/MessageProcessor.java
index 1a62829..13dc49a 100755
--- a/src/main/java/envoy/server/processors/MessageProcessor.java
+++ b/src/main/java/envoy/server/processors/MessageProcessor.java
@@ -26,21 +26,21 @@ public class MessageProcessor implements ObjectProcessor {
ConnectionManager connectionManager = ConnectionManager.getInstance();
message.nextStatus();
- if (connectionManager.isOnline(message.getRecipientId())) try {
+ if (connectionManager.isOnline(message.getRecipientID())) try {
// If recipient is online, send the message directly
- writeProxy.write(connectionManager.getSocketId(message.getRecipientId()), message);
+ writeProxy.write(connectionManager.getSocketId(message.getRecipientID()), message);
// Update the message status to RECEIVED
message.setReceivedDate(new Date());
message.nextStatus();
writeProxy.write(socketId, new MessageStatusChangeEvent(message));
} catch (IOException e) {
- System.err.println("Recipient online. Failed to send message" + message.getId());
+ System.err.println("Recipient online. Failed to send message" + message.getID());
e.printStackTrace();
}
PersistenceManager.getInstance().addMessage(new envoy.server.data.Message(message));
}
-
+
@Override
public Class getInputClass() { return Message.class; }
}
diff --git a/src/main/java/envoy/server/processors/MessageStatusChangeProcessor.java b/src/main/java/envoy/server/processors/MessageStatusChangeProcessor.java
index b01772e..80c9ceb 100755
--- a/src/main/java/envoy/server/processors/MessageStatusChangeProcessor.java
+++ b/src/main/java/envoy/server/processors/MessageStatusChangeProcessor.java
@@ -27,7 +27,7 @@ public class MessageStatusChangeProcessor implements ObjectProcessor