[Yanel-commits] rev 46798 - public/yanel/trunk/src/core/java/org/wyona/yanel/core/attributes/viewable

michi at wyona.com michi at wyona.com
Wed Dec 23 08:55:59 CET 2009


Author: michi
Date: 2009-12-23 08:55:53 +0100 (Wed, 23 Dec 2009)
New Revision: 46798

Modified:
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/attributes/viewable/View.java
Log:
javadoc improved

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/attributes/viewable/View.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/attributes/viewable/View.java	2009-12-23 07:50:07 UTC (rev 46797)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/attributes/viewable/View.java	2009-12-23 07:55:53 UTC (rev 46798)
@@ -20,7 +20,7 @@
 import java.util.HashMap;
 
 /**
- *
+ * A resource type can return various views of the same object
  */
 public class View {
 
@@ -63,32 +63,31 @@
     }
 
     /**
-     *
+     * Set content of response as InputStream
      */
     public void setInputStream(InputStream is) {
         this.is = is;
     }
 
     /**
-     *
+     * Get content of response as InputStream
      */
     public InputStream getInputStream() {
         return is;
     }
 
     /**
-     * Checks if this view will be used by Yanel to write the response.
-     * The default is true, and may be turned off for resources which want to 
-     * write the response themselves.
+     * Checks if this view contains the content of the response itself and if so, then Yanel can use getInputStream() to write the response.
+     * The default is true. If false, then it means the resource has written the response directly and getInputStream() should contain no data.
      */
     public boolean isResponse() {
         return isResponse;
     }
 
     /**
-     * Choose whether this view will be used by Yanel to write the response.
-     * The default is true, and may be turned off for resources which want to 
-     * write the response themselves.
+     * Set whether this view will be used or not by Yanel to write the response.
+     * Resources which want to write the response themselves should set this to false.
+     * If this method is not called, then isResponse() will return true as default, which assumes that this view contains the response.
      */
     public void setResponse(boolean isResponse) {
         this.isResponse = isResponse;



More information about the Yanel-commits mailing list