ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1053760 - /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java
Date Wed, 29 Dec 2010 22:28:59 GMT
Author: veithen
Date: Wed Dec 29 22:28:59 2010
New Revision: 1053760

URL: http://svn.apache.org/viewvc?rev=1053760&view=rev
Log:
AXIOM-12: Improved the Javadoc of OMOutputFormat to explain in which way SwA and MTOM are
mutually exclusive.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java?rev=1053760&r1=1053759&r2=1053760&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java
Wed Dec 29 22:28:59 2010
@@ -172,6 +172,13 @@ public class OMOutputFormat {
         return map.containsKey(key);
     }
 
+    /**
+     * Indicates whether the document should be serialized using MTOM.
+     * 
+     * @return <code>true</code> if the document should be serialized using MTOM;
<code>false</code>
+     *         otherwise; the return value is always <code>false</code> if {@link
#isDoingSWA()}
+     *         returns <code>true</code>
+     */
     public boolean isOptimized() {
         return doOptimize && !doingSWA;  // optimize is disabled if SWA
     }
@@ -277,14 +284,36 @@ public class OMOutputFormat {
         this.ignoreXMLDeclaration = ignoreXMLDeclaration;
     }
 
-    public void setDoOptimize(boolean b) {
-        doOptimize = b;
+    /**
+     * Specifies that the document should be serialized using MTOM. Note that this setting
is
+     * ignored if SwA is enabled using {@link #setDoingSWA(boolean)}.
+     * 
+     * @param optimize
+     *            <code>true</code> if the document should be serialized using
MTOM;
+     *            <code>false</code> otherwise
+     */
+    public void setDoOptimize(boolean optimize) {
+        doOptimize = optimize;
     }
 
+    /**
+     * Indicates whether the document should be serialized using SwA.
+     * 
+     * @return <code>true</code> if the document should be serialized using SwA;
<code>false</code>
+     *         otherwise
+     */
     public boolean isDoingSWA() {
         return doingSWA;
     }
 
+    /**
+     * Specifies that the document should be serialized using SwA (SOAP with Attachments).
When SwA
+     * is enabled, then any configuration done using {@link #setDoOptimize(boolean)} is ignored.
+     * 
+     * @param doingSWA
+     *            <code>true</code> if the document should be serialized using
SwA;
+     *            <code>false</code> otherwise
+     */
     public void setDoingSWA(boolean doingSWA) {
         this.doingSWA = doingSWA;
     }



Mime
View raw message