You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wink.apache.org by el...@apache.org on 2009/09/10 14:45:58 UTC

svn commit: r813407 - /incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/XmlFormattingOptions.java

Author: elman
Date: Thu Sep 10 12:45:57 2009
New Revision: 813407

URL: http://svn.apache.org/viewvc?rev=813407&view=rev
Log:
add javadoc

Modified:
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/XmlFormattingOptions.java

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/XmlFormattingOptions.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/XmlFormattingOptions.java?rev=813407&r1=813406&r2=813407&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/XmlFormattingOptions.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/XmlFormattingOptions.java Thu Sep 10 12:45:57 2009
@@ -19,6 +19,10 @@
  *******************************************************************************/
 package org.apache.wink.common.model;
 
+import javax.ws.rs.core.Application;
+import javax.ws.rs.ext.ContextResolver;
+
+
 /**
  * Holds the following XML Formatting Options:
  * <ul>
@@ -29,6 +33,27 @@
  * </ul>
  * Can be used by XML representations to give a control over the formation of
  * XML output.
+ * <p>
+ * In order to use it, implement a ContextResolver returning an
+ * XmlFormattingOptions. And register it in {@link Application}.
+ * <p>
+ * Example:
+ * 
+ * <pre>
+ * &#064;Provider
+ * public class FormattingOptionsContextResolver implements ContextResolver&lt;XmlFormattingOptions&gt; {
+ * 
+ *     public XmlFormattingOptions getContext(Class&lt;?&gt; type) {
+ * 
+ *         if (type == MyClass.class) {
+ *             return new XmlFormattingOptions(false, false);
+ *         }
+ *         return null;
+ *     }
+ * }
+ * </pre>
+ * @see Application
+ * @see ContextResolver
  */
 public class XmlFormattingOptions implements Cloneable {