svn commit: r832882 - /cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java

View: New views
1 Messages — Rating Filter:   Alert me  

svn commit: r832882 - /cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java

by dkulp :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Author: dkulp
Date: Wed Nov  4 22:02:05 2009
New Revision: 832882

URL: http://svn.apache.org/viewvc?rev=832882&view=rev
Log:
add required method

Modified:
    cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java

Modified: cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java?rev=832882&r1=832881&r2=832882&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java (original)
+++ cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java Wed Nov  4 22:02:05 2009
@@ -117,6 +117,15 @@
         return false;
     }
     
+    
+    public static boolean getContextualBoolean(Message m, String key, boolean defaultValue) {
+        Object o = m.getContextualProperty(key);
+        if (o != null) {
+            return isTrue(o);
+        }
+        return defaultValue;
+    }
+    
     /**
      * Returns true if the underlying content format is a W3C DOM or a SAAJ message.
      */