[seam-commits] Seam SVN: r11013 - in modules/trunk: international/src/main/java/org/jboss/seam/international and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed May 27 00:54:23 EDT 2009
Author: dan.j.allen
Date: 2009-05-27 00:54:23 -0400 (Wed, 27 May 2009)
New Revision: 11013
Added:
modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessagesDelegate.java
Removed:
modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessagesWrapper.java
Modified:
modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesMessages.java
Log:
rename wrapper to delegate
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesMessages.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesMessages.java 2009-05-27 04:22:02 UTC (rev 11012)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/FacesMessages.java 2009-05-27 04:54:23 UTC (rev 11013)
@@ -11,7 +11,7 @@
import org.jboss.seam.international.StatusMessage;
import org.jboss.seam.international.StatusMessages;
-import org.jboss.seam.international.StatusMessagesWrapper;
+import org.jboss.seam.international.StatusMessagesDelegate;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
@@ -57,7 +57,7 @@
*/
public
@Faces
-class FacesMessages extends StatusMessagesWrapper
+class FacesMessages extends StatusMessagesDelegate
{
private static final LogProvider log = Logging.getLogProvider(FacesMessages.class);
@@ -111,7 +111,7 @@
@Override
public void onBeforeRender()
{
- getStatusMessages().onBeforeRender();
+ super.onBeforeRender();
FacesContext facesContext = FacesContext.getCurrentInstance();
for (StatusMessage statusMessage : getGlobalMessages())
{
Copied: modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessagesDelegate.java (from rev 11012, modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessagesWrapper.java)
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessagesDelegate.java (rev 0)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessagesDelegate.java 2009-05-27 04:54:23 UTC (rev 11013)
@@ -0,0 +1,184 @@
+package org.jboss.seam.international;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.validation.ConstraintViolation;
+
+import org.jboss.seam.international.StatusMessage.Severity;
+
+/**
+ * A abstract wrapper class that delegates all operations to the StatusMessages
+ * instance. It's up to the implementation to provide access to the
+ * StatusMessages instance, preferably obtained through constructor injection.
+ * The intent is for this class to be extended to wrap view layer specific
+ * functionality around the StatusMessages component.
+ *
+ * @author Dan Allen
+ */
+public abstract class StatusMessagesDelegate extends StatusMessages
+{
+ public abstract StatusMessages getStatusMessages();
+
+ @Override
+ public void onBeforeRender()
+ {
+ getStatusMessages().onBeforeRender();
+ }
+
+ @Override
+ public void add(ConstraintViolation<?> cv)
+ {
+ getStatusMessages().add(cv);
+ }
+
+ @Override
+ public void add(ConstraintViolation<?>[] cvs)
+ {
+ getStatusMessages().add(cvs);
+ }
+
+ @Override
+ public void add(Severity severity, String messageTemplate, Object... params)
+ {
+ getStatusMessages().add(severity, messageTemplate, params);
+ }
+
+ @Override
+ public void add(Severity severity, String key, String detailKey, String messageTemplate, String messageDetailTemplate, Object... params)
+ {
+ getStatusMessages().add(severity, key, detailKey, messageTemplate, messageDetailTemplate, params);
+ }
+
+ @Override
+ public void add(String messageTemplate, Object... params)
+ {
+ getStatusMessages().add(messageTemplate, params);
+ }
+
+ @Override
+ public void addFromResourceBundle(Severity severity, String key, Object... params)
+ {
+ getStatusMessages().addFromResourceBundle(severity, key, params);
+ }
+
+ @Override
+ public void addFromResourceBundle(String key, Object... params)
+ {
+ getStatusMessages().addFromResourceBundle(key, params);
+ }
+
+ @Override
+ public void addFromResourceBundleOrDefault(Severity severity, String key, String defaultMessageTemplate, Object... params)
+ {
+ getStatusMessages().addFromResourceBundleOrDefault(severity, key, defaultMessageTemplate, params);
+ }
+
+ @Override
+ public void addFromResourceBundleOrDefault(String key, String defaultMessageTemplate, Object... params)
+ {
+ getStatusMessages().addFromResourceBundleOrDefault(key, defaultMessageTemplate, params);
+ }
+
+ @Override
+ public void addToControl(ConstraintViolation<?> cv)
+ {
+ getStatusMessages().addToControl(cv);
+ }
+
+ @Override
+ public void addToControl(String id, ConstraintViolation<?> cv)
+ {
+ getStatusMessages().addToControl(id, cv);
+ }
+
+ @Override
+ public void addToControl(String id, Severity severity, String messageTemplate, Object... params)
+ {
+ getStatusMessages().addToControl(id, severity, messageTemplate, params);
+ }
+
+ @Override
+ public void addToControl(String id, Severity severity, String key, String messageTemplate, Object... params)
+ {
+ getStatusMessages().addToControl(id, severity, key, messageTemplate, params);
+ }
+
+ @Override
+ public void addToControl(String id, String messageTemplate, Object... params)
+ {
+ getStatusMessages().addToControl(id, messageTemplate, params);
+ }
+
+ @Override
+ public void addToControlFromResourceBundle(String id, Severity severity, String key, Object... params)
+ {
+ getStatusMessages().addToControlFromResourceBundle(id, severity, key, params);
+ }
+
+ @Override
+ public void addToControlFromResourceBundle(String id, String key, Object... params)
+ {
+ getStatusMessages().addToControlFromResourceBundle(id, key, params);
+ }
+
+ @Override
+ public void addToControlFromResourceBundleOrDefault(String id, Severity severity, String key, String defaultMessageTemplate, Object... params)
+ {
+ getStatusMessages().addToControlFromResourceBundleOrDefault(id, severity, key, defaultMessageTemplate, params);
+ }
+
+ @Override
+ public void addToControlFromResourceBundleOrDefault(String id, String key, String defaultMessageTemplate, Object... params)
+ {
+ getStatusMessages().addToControlFromResourceBundleOrDefault(id, key, defaultMessageTemplate, params);
+ }
+
+ @Override
+ public void addToControls(ConstraintViolation<?>[] cvs)
+ {
+ getStatusMessages().addToControls(cvs);
+ }
+
+ @Override
+ public void clear()
+ {
+ getStatusMessages().clear();
+ }
+
+ @Override
+ public void clearGlobalMessages()
+ {
+ getStatusMessages().clearGlobalMessages();
+ }
+
+ @Override
+ public void clearKeyedMessages()
+ {
+ getStatusMessages().clearKeyedMessages();
+ }
+
+ @Override
+ public void clearKeyedMessages(String id)
+ {
+ getStatusMessages().clearKeyedMessages(id);
+ }
+
+ @Override
+ public List<StatusMessage> getGlobalMessages()
+ {
+ return getStatusMessages().getGlobalMessages();
+ }
+
+ @Override
+ public Map<String, List<StatusMessage>> getKeyedMessages()
+ {
+ return getStatusMessages().getKeyedMessages();
+ }
+
+ @Override
+ public List<StatusMessage> getKeyedMessages(String id)
+ {
+ return getStatusMessages().getKeyedMessages(id);
+ }
+}
Deleted: modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessagesWrapper.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessagesWrapper.java 2009-05-27 04:22:02 UTC (rev 11012)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessagesWrapper.java 2009-05-27 04:54:23 UTC (rev 11013)
@@ -1,181 +0,0 @@
-package org.jboss.seam.international;
-
-import java.util.List;
-import java.util.Map;
-
-import javax.validation.ConstraintViolation;
-
-import org.jboss.seam.international.StatusMessage.Severity;
-
-/**
- * A abstract wrapper class that delegates all operations to the StatusMessages
- * instance. It's up to the implementation to provide access to the
- * StatusMessages instance, preferably obtained through constructor injection.
- * The intent is for this class to be extended to wrap view layer specific
- * functionality around the StatusMessages component.
- *
- * @author Dan Allen
- */
-public abstract class StatusMessagesWrapper extends StatusMessages
-{
- public abstract StatusMessages getStatusMessages();
-
- @Override
- public abstract void onBeforeRender();
-
- @Override
- public void add(ConstraintViolation<?> cv)
- {
- getStatusMessages().add(cv);
- }
-
- @Override
- public void add(ConstraintViolation<?>[] cvs)
- {
- getStatusMessages().add(cvs);
- }
-
- @Override
- public void add(Severity severity, String messageTemplate, Object... params)
- {
- getStatusMessages().add(severity, messageTemplate, params);
- }
-
- @Override
- public void add(Severity severity, String key, String detailKey, String messageTemplate, String messageDetailTemplate, Object... params)
- {
- getStatusMessages().add(severity, key, detailKey, messageTemplate, messageDetailTemplate, params);
- }
-
- @Override
- public void add(String messageTemplate, Object... params)
- {
- getStatusMessages().add(messageTemplate, params);
- }
-
- @Override
- public void addFromResourceBundle(Severity severity, String key, Object... params)
- {
- getStatusMessages().addFromResourceBundle(severity, key, params);
- }
-
- @Override
- public void addFromResourceBundle(String key, Object... params)
- {
- getStatusMessages().addFromResourceBundle(key, params);
- }
-
- @Override
- public void addFromResourceBundleOrDefault(Severity severity, String key, String defaultMessageTemplate, Object... params)
- {
- getStatusMessages().addFromResourceBundleOrDefault(severity, key, defaultMessageTemplate, params);
- }
-
- @Override
- public void addFromResourceBundleOrDefault(String key, String defaultMessageTemplate, Object... params)
- {
- getStatusMessages().addFromResourceBundleOrDefault(key, defaultMessageTemplate, params);
- }
-
- @Override
- public void addToControl(ConstraintViolation<?> cv)
- {
- getStatusMessages().addToControl(cv);
- }
-
- @Override
- public void addToControl(String id, ConstraintViolation<?> cv)
- {
- getStatusMessages().addToControl(id, cv);
- }
-
- @Override
- public void addToControl(String id, Severity severity, String messageTemplate, Object... params)
- {
- getStatusMessages().addToControl(id, severity, messageTemplate, params);
- }
-
- @Override
- public void addToControl(String id, Severity severity, String key, String messageTemplate, Object... params)
- {
- getStatusMessages().addToControl(id, severity, key, messageTemplate, params);
- }
-
- @Override
- public void addToControl(String id, String messageTemplate, Object... params)
- {
- getStatusMessages().addToControl(id, messageTemplate, params);
- }
-
- @Override
- public void addToControlFromResourceBundle(String id, Severity severity, String key, Object... params)
- {
- getStatusMessages().addToControlFromResourceBundle(id, severity, key, params);
- }
-
- @Override
- public void addToControlFromResourceBundle(String id, String key, Object... params)
- {
- getStatusMessages().addToControlFromResourceBundle(id, key, params);
- }
-
- @Override
- public void addToControlFromResourceBundleOrDefault(String id, Severity severity, String key, String defaultMessageTemplate, Object... params)
- {
- getStatusMessages().addToControlFromResourceBundleOrDefault(id, severity, key, defaultMessageTemplate, params);
- }
-
- @Override
- public void addToControlFromResourceBundleOrDefault(String id, String key, String defaultMessageTemplate, Object... params)
- {
- getStatusMessages().addToControlFromResourceBundleOrDefault(id, key, defaultMessageTemplate, params);
- }
-
- @Override
- public void addToControls(ConstraintViolation<?>[] cvs)
- {
- getStatusMessages().addToControls(cvs);
- }
-
- @Override
- public void clear()
- {
- getStatusMessages().clear();
- }
-
- @Override
- public void clearGlobalMessages()
- {
- getStatusMessages().clearGlobalMessages();
- }
-
- @Override
- public void clearKeyedMessages()
- {
- getStatusMessages().clearKeyedMessages();
- }
-
- @Override
- public void clearKeyedMessages(String id)
- {
- getStatusMessages().clearKeyedMessages(id);
- }
-
- @Override
- public List<StatusMessage> getGlobalMessages()
- {
- return getStatusMessages().getGlobalMessages();
- }
-
- @Override
- public Map<String, List<StatusMessage>> getKeyedMessages()
- {
- return getStatusMessages().getKeyedMessages();
- }
-
- @Override
- public List<StatusMessage> getKeyedMessages(String id)
- {
- return getStatusMessages().getKeyedMessages(id);
- }
-}
More information about the seam-commits
mailing list