myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r940247 - in /myfaces/extensions/cdi/trunk/jse-modules/message-module: api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/ impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/ impl/src/test/java/org/apache/myfaces...
Date Sun, 02 May 2010 15:40:58 GMT
Author: gpetracek
Date: Sun May  2 15:40:53 2010
New Revision: 940247

URL: http://svn.apache.org/viewvc?rev=940247&view=rev
Log:
[EXTCDI-21] cleanup

Modified:
    myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageBuilder.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageContext.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageBuilder.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContext.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/UnmodifiableMessageContext.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/PayloadTest.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageBuilder.java?rev=940247&r1=940246&r2=940247&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageBuilder.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageBuilder.java
Sun May  2 15:40:53 2010
@@ -68,11 +68,4 @@ public interface MessageBuilder extends 
      * @return the text of the message which was built via the fluent api
      */
     String toText();
-
-    /**
-     * converts a given message to the text via the current context
-     * @param message the message which should be converted
-     * @return the converted text of the given message
-     */
-    String toText(Message message);
 }

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageContext.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageContext.java?rev=940247&r1=940246&r2=940247&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageContext.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/MessageContext.java
Sun May  2 15:40:53 2010
@@ -51,12 +51,6 @@ public interface MessageContext extends 
     MessageContext cloneContext();
 
     /**
-     * @param message the message which should be converted to the final text
-     * @return the final text generated via the current message context
-     */
-    String getMessageText(Message message);
-
-    /**
      * @param message a message which should be added to the current context (message handlers)
      */
     void addMessage(Message message);

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageBuilder.java?rev=940247&r1=940246&r2=940247&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageBuilder.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageBuilder.java
Sun May  2 15:40:53 2010
@@ -215,13 +215,6 @@ class DefaultMessageBuilder implements M
         return getMessageText(baseMessage);
     }
 
-    public String toText(Message message)
-    {
-        //it isn't required to try to restore the message-context of the message
-        //to use the original context (config) just call message.toString(); instead of this
method
-        return getMessageText(message);
-    }
-
     private String getMessageText(Message baseMessage)
     {
         String message = baseMessage.getDescriptor();

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContext.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContext.java?rev=940247&r1=940246&r2=940247&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContext.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContext.java
Sun May  2 15:40:53 2010
@@ -83,11 +83,6 @@ public class DefaultMessageContext imple
         return config().use().create();
     }
 
-    public String getMessageText(Message message)
-    {
-        return message().toText(message);
-    }
-
     public void addMessage(Message message)
     {
         addMessage(this, message);

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/UnmodifiableMessageContext.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/UnmodifiableMessageContext.java?rev=940247&r1=940246&r2=940247&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/UnmodifiableMessageContext.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/UnmodifiableMessageContext.java
Sun May  2 15:40:53 2010
@@ -85,11 +85,6 @@ class UnmodifiableMessageContext impleme
         return messageContext.cloneContext();
     }
 
-    public String getMessageText(Message message)
-    {
-        return messageContext.getMessageText(message);
-    }
-
     public void addMessage(Message message)
     {
         messageContext.addMessage(messageContext, message);

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/PayloadTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/PayloadTest.java?rev=940247&r1=940246&r2=940247&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/PayloadTest.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/PayloadTest.java
Sun May  2 15:40:53 2010
@@ -82,7 +82,7 @@ public class PayloadTest extends Abstrac
         assertFalse(testResolver.isPayloadAvailable());
 
         Message message = this.messageContext.message().text("test msg").payload(MessageSeverity.Warn.class).create();
-        this.messageContext.getMessageText(message);
+        message.toString(this.messageContext);
 
         assertTrue(testResolver.isPayloadAvailable());
     }

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java?rev=940247&r1=940246&r2=940247&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java
Sun May  2 15:40:53 2010
@@ -71,7 +71,7 @@ public class SimpleMessageTest extends A
         Message message = this.messageContext.message().text("{hello}").create();
 
         @SuppressWarnings({"deprecation"})
-        String messageText = this.messageContext.message().toText(message); //TODO use a
different config
+        String messageText = message.toString(this.messageContext);
 
         checkDefaultHelloMessage(messageText);
     }
@@ -150,7 +150,7 @@ public class SimpleMessageTest extends A
     public void directTextResolvingTest()
     {
         Message message = this.messageContext.message().text("{hello}").create();
-        String messageText = this.messageContext.getMessageText(message);
+        String messageText = message.toString(this.messageContext);
 
         checkDefaultHelloMessage(messageText);
     }



Mime
View raw message