Index: lams_common/src/java/org/lamsfoundation/lams/util/FlashMessage.java
===================================================================
diff -u -r6b534ddc37b0c034057470a1fb6bff50fd38b3c1 -radca2e233dae972dc555670af6f3f17357762022
--- lams_common/src/java/org/lamsfoundation/lams/util/FlashMessage.java (.../FlashMessage.java) (revision 6b534ddc37b0c034057470a1fb6bff50fd38b3c1)
+++ lams_common/src/java/org/lamsfoundation/lams/util/FlashMessage.java (.../FlashMessage.java) (revision adca2e233dae972dc555670af6f3f17357762022)
@@ -30,66 +30,89 @@
* Flash client.
*
*/
-public class FlashMessage implements Serializable {
-
- /** Message type indicating that operation was
- * unsuccessful due to some error on FLASH side.
- * For example the WDDX packet contains a null value
- */
- public static final int ERROR = 1;
+public class FlashMessage implements Serializable
+{
- /**
- * Message type indicating that operation failed
- * due to some system eror. For example, the client
- * was unable to serilaize the WDDX packet
- */
- public static final int CRITICAL_ERROR = 2;
-
- /**
- * Message type indicating that operation
- * was executed successfully
- */
- public static final int OBJECT_MESSAGE = 3;
+ /** Message type indicating that operation was
+ * unsuccessful due to some error on FLASH side.
+ * For example the WDDX packet contains a null value
+ */
+ public static final int ERROR = 1;
- /** Usually the name of the method that was called by the flash */
- private String messageKey;
-
- /**
- * The response to the flash's request. Normally a string either
- * stating the error message or the WDDX packet
- */
- private Object messageValue;
-
- /**
- * Represents the type of message being sent to Flash. Can be one of
- * the following values
- *
- * - ERROR
- * - CRITICAL_ERROR
- * - OBJECT_MESSAGE
- *
- */
- private int messageType;
-
- /** Minimal Constructor */
- public FlashMessage(String messageKey, Object messageValue) {
- this.messageKey = messageKey;
- this.messageValue = messageValue;
- this.messageType = OBJECT_MESSAGE;
- }
- /** Full Constructor*/
- public FlashMessage(String messageKey, Object messageValue, int messageType) {
- this.messageKey = messageKey;
- this.messageValue = messageValue;
- this.messageType = messageType;
- }
- public String getMessageKey() {
- return messageKey;
- }
- public int getMessageType() {
- return messageType;
- }
- public Object getMessageValue() {
- return messageValue;
- }
-}
+ /**
+ * Message type indicating that operation failed
+ * due to some system eror. For example, the client
+ * was unable to serilaize the WDDX packet
+ */
+ public static final int CRITICAL_ERROR = 2;
+
+ /**
+ * Message type indicating that operation
+ * was executed successfully
+ */
+ public static final int OBJECT_MESSAGE = 3;
+
+ /** Usually the name of the method that was called by the flash */
+ private String messageKey;
+
+ /**
+ * The response to the flash's request. Normally a string either
+ * stating the error message or the WDDX packet
+ */
+ private Object messageValue;
+
+ /**
+ * Represents the type of message being sent to Flash. Can be one of
+ * the following values
+ *
+ * - ERROR
+ * - CRITICAL_ERROR
+ * - OBJECT_MESSAGE
+ *
+ */
+ private int messageType;
+
+ /** Minimal Constructor */
+ public FlashMessage(String messageKey, Object messageValue)
+ {
+ this.messageKey = messageKey;
+ this.messageValue = messageValue;
+ this.messageType = OBJECT_MESSAGE;
+ }
+
+ /** Full Constructor*/
+ public FlashMessage(String messageKey, Object messageValue, int messageType)
+ {
+ this.messageKey = messageKey;
+ this.messageValue = messageValue;
+ this.messageType = messageType;
+ }
+
+ public String getMessageKey()
+ {
+ return messageKey;
+ }
+
+ public int getMessageType()
+ {
+ return messageType;
+ }
+
+ public Object getMessageValue()
+ {
+ return messageValue;
+ }
+
+ /**
+ * Return String representation of the message that will be sent to flash.
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer(getClass().getName() + ": ");
+ sb.append("messageKey='" + getMessageKey() + "'; ");
+ sb.append("messageType='" + getMessageType()+"';");
+ sb.append("messageValue='" + getMessageValue() + "'; ");
+ return sb.toString();
+ }
+}
\ No newline at end of file