Author: chris.laprun(a)jboss.com
Date: 2012-03-15 09:12:34 -0400 (Thu, 15 Mar 2012)
New Revision: 8607
Modified:
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/AbstractApplicationMessage.java
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/UIPopupMessages.java
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java
Log:
- Added methods for backward compatibility.
Modified:
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/AbstractApplicationMessage.java
===================================================================
---
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/AbstractApplicationMessage.java 2012-03-15
12:55:09 UTC (rev 8606)
+++
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/application/AbstractApplicationMessage.java 2012-03-15
13:12:34 UTC (rev 8607)
@@ -99,4 +99,9 @@
}
return value;
}
+
+ public String getMessageKey()
+ {
+ throw new UnsupportedOperationException("Only non-compound ApplicationMessages
have a message key.");
+ }
}
Modified:
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java
===================================================================
---
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java 2012-03-15
12:55:09 UTC (rev 8606)
+++
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/UIApplication.java 2012-03-15
13:12:34 UTC (rev 8607)
@@ -19,12 +19,12 @@
package org.exoplatform.webui.core;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.web.application.AbstractApplicationMessage;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.exception.MessageException;
import java.io.Writer;
@@ -88,6 +88,11 @@
getUIPopupMessages().addMessage(message);
}
+ public void addMessage(ApplicationMessage message)
+ {
+ addMessage((AbstractApplicationMessage)message);
+ }
+
public void clearMessages()
{
getUIPopupMessages().clearMessages();
Modified:
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/UIPopupMessages.java
===================================================================
---
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/UIPopupMessages.java 2012-03-15
12:55:09 UTC (rev 8606)
+++
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/UIPopupMessages.java 2012-03-15
13:12:34 UTC (rev 8607)
@@ -19,11 +19,11 @@
package org.exoplatform.webui.core;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.web.application.AbstractApplicationMessage;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.RequestContext;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.event.Event;
@@ -120,6 +120,11 @@
infos_.add(msg);
}
}
+
+ public void addMessage(ApplicationMessage msg)
+ {
+ addMessage((AbstractApplicationMessage)msg);
+ }
private ResourceBundle getResourceBundle()
{
Modified:
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java
===================================================================
---
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java 2012-03-15
12:55:09 UTC (rev 8606)
+++
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/exception/MessageException.java 2012-03-15
13:12:34 UTC (rev 8607)
@@ -40,6 +40,11 @@
this.message = message;
}
+ public MessageException(ApplicationMessage message)
+ {
+ this((AbstractApplicationMessage)message);
+ }
+
public AbstractApplicationMessage getDetailMessage()
{
return message;
Show replies by date