ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adri...@apache.org
Subject svn commit: r1211809 - in /ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget: screen/ tree/
Date Thu, 08 Dec 2011 10:35:35 GMT
Author: adrianc
Date: Thu Dec  8 10:35:34 2011
New Revision: 1211809

URL: http://svn.apache.org/viewvc?rev=1211809&view=rev
Log:
Screen Widget Redesign - Added exception handling to the visitor interfaces.

Modified:
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetVisitor.java
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
    ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/TreeWidgetVisitor.java

Modified: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java?rev=1211809&r1=1211808&r2=1211809&view=diff
==============================================================================
--- ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
(original)
+++ ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
Thu Dec  8 10:35:34 2011
@@ -246,7 +246,7 @@ public class HtmlWidget extends ModelScr
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -277,7 +277,7 @@ public class HtmlWidget extends ModelScr
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -324,7 +324,7 @@ public class HtmlWidget extends ModelScr
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -341,7 +341,7 @@ public class HtmlWidget extends ModelScr
     }
 
     @Override
-    public void accept(ScreenWidgetVisitor visitor) {
+    public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
         visitor.visit(this);
     }
 }

Modified: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java?rev=1211809&r1=1211808&r2=1211809&view=diff
==============================================================================
--- ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
(original)
+++ ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
Thu Dec  8 10:35:34 2011
@@ -101,7 +101,7 @@ public class IterateSectionWidget extend
     }
 
     @Override
-    public void accept(ScreenWidgetVisitor visitor) {
+    public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
         visitor.visit(this);
     }
 

Modified: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?rev=1211809&r1=1211808&r2=1211809&view=diff
==============================================================================
--- ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
(original)
+++ ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
Thu Dec  8 10:35:34 2011
@@ -81,7 +81,7 @@ public abstract class ModelScreenWidget 
         if (Debug.verboseOn()) Debug.logVerbose("Reading Screen sub-widget with name: " +
widgetElement.getNodeName(), module);
     }
 
-    public abstract void accept(ScreenWidgetVisitor visitor);
+    public abstract void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException;
 
     public abstract void renderWidgetString(Appendable writer, Map<String, Object>
context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException;
 
@@ -171,7 +171,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -259,7 +259,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -367,7 +367,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -465,7 +465,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -502,7 +502,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -583,7 +583,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -640,7 +640,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -664,7 +664,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -716,7 +716,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -770,7 +770,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -863,7 +863,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -960,7 +960,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -1020,7 +1020,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -1245,7 +1245,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -1306,7 +1306,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -1409,7 +1409,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -1596,7 +1596,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -1698,7 +1698,7 @@ public abstract class ModelScreenWidget 
         }
 
         @Override
-        public void accept(ScreenWidgetVisitor visitor) {
+        public void accept(ScreenWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 

Modified: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetVisitor.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetVisitor.java?rev=1211809&r1=1211808&r2=1211809&view=diff
==============================================================================
--- ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetVisitor.java
(original)
+++ ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/screen/ScreenWidgetVisitor.java
Thu Dec  8 10:35:34 2011
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
+ * "License") throws IOException, GeneralException; you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
@@ -18,6 +18,9 @@
  *******************************************************************************/
 package org.ofbiz.widget.screen;
 
+import java.io.IOException;
+
+import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.widget.screen.HtmlWidget.HtmlTemplate;
 import org.ofbiz.widget.screen.HtmlWidget.HtmlTemplateDecorator;
 import org.ofbiz.widget.screen.HtmlWidget.HtmlTemplateDecoratorSection;
@@ -45,51 +48,52 @@ import org.ofbiz.widget.screen.ModelScre
  */
 public interface ScreenWidgetVisitor {
 
-    void visit(Container container);
+    void visit(Container container) throws IOException, GeneralException;
+
+    void visit(Content content) throws IOException, GeneralException;
 
-    void visit(Content content);
+    void visit(DecoratorScreen decoratorScreen) throws IOException, GeneralException;
 
-    void visit(DecoratorScreen decoratorScreen);
+    void visit(DecoratorSection decoratorSection) throws IOException, GeneralException;
 
-    void visit(DecoratorSection decoratorSection);
+    void visit(DecoratorSectionInclude decoratorSectionInclude) throws IOException, GeneralException;
 
-    void visit(DecoratorSectionInclude decoratorSectionInclude);
+    void visit(Form form) throws IOException, GeneralException;
 
-    void visit(Form form);
+    void visit(HorizontalSeparator horizontalSeparator) throws IOException, GeneralException;
 
-    void visit(HorizontalSeparator horizontalSeparator);
+    void visit(HtmlTemplate htmlTemplate) throws IOException, GeneralException;
 
-    void visit(HtmlTemplate htmlTemplate);
+    void visit(HtmlTemplateDecorator htmlTemplateDecorator) throws IOException, GeneralException;
 
-    void visit(HtmlTemplateDecorator htmlTemplateDecorator);
+    void visit(HtmlTemplateDecoratorSection htmlTemplateDecoratorSection) throws IOException,
GeneralException;
 
-    void visit(HtmlTemplateDecoratorSection htmlTemplateDecoratorSection);
+    void visit(HtmlWidget htmlWidget) throws IOException, GeneralException;
 
-    void visit(HtmlWidget htmlWidget);
+    void visit(Image image) throws IOException, GeneralException;
 
-    void visit(Image image);
+    void visit(IncludeScreen includeScreen) throws IOException, GeneralException;
 
-    void visit(IncludeScreen includeScreen);
+    void visit(IterateSectionWidget iterateSectionWidget) throws IOException, GeneralException;
 
-    void visit(IterateSectionWidget iterateSectionWidget);
+    void visit(Label label) throws IOException, GeneralException;
 
-    void visit(Label label);
+    void visit(Link link) throws IOException, GeneralException;
 
-    void visit(Link link);
+    void visit(Menu menu) throws IOException, GeneralException;
 
-    void visit(Menu menu);
+    void visit(ModelScreen modelScreen) throws IOException, GeneralException;
 
-    void visit(ModelScreen modelScreen);
+    void visit(PlatformSpecific platformSpecific) throws IOException, GeneralException;
 
-    void visit(PlatformSpecific platformSpecific);
+    void visit(PortalPage portalPage) throws IOException, GeneralException;
 
-    void visit(PortalPage portalPage);
+    void visit(Screenlet screenlet) throws IOException, GeneralException;
 
-    void visit(Screenlet screenlet);
+    void visit(Section section) throws IOException, GeneralException;
 
-    void visit(Section section);
+    void visit(SubContent subContent) throws IOException, GeneralException;
 
-    void visit(SubContent subContent);
+    void visit(Tree tree) throws IOException, GeneralException;
 
-    void visit(Tree tree);
 }

Modified: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java?rev=1211809&r1=1211808&r2=1211809&view=diff
==============================================================================
--- ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
(original)
+++ ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
Thu Dec  8 10:35:34 2011
@@ -130,7 +130,7 @@ public class ModelTree extends ModelWidg
 
     }
 
-    public void accept(TreeWidgetVisitor visitor) {
+    public void accept(TreeWidgetVisitor visitor) throws IOException, GeneralException {
         visitor.visit(this);
     }
 
@@ -367,7 +367,7 @@ public class ModelTree extends ModelWidg
 
         }
 
-        public void accept(TreeWidgetVisitor visitor) {
+        public void accept(TreeWidgetVisitor visitor) throws IOException, GeneralException
{
             visitor.visit(this);
         }
 
@@ -732,7 +732,7 @@ public class ModelTree extends ModelWidg
 
             }
 
-            public void accept(TreeWidgetVisitor visitor) {
+            public void accept(TreeWidgetVisitor visitor) throws IOException, GeneralException
{
                 visitor.visit(this);
             }
 
@@ -774,7 +774,7 @@ public class ModelTree extends ModelWidg
                 this.styleExdr = FlexibleStringExpander.getInstance(labelElement.getAttribute("style"));
             }
 
-            public void accept(TreeWidgetVisitor visitor) {
+            public void accept(TreeWidgetVisitor visitor) throws IOException, GeneralException
{
                 visitor.visit(this);
             }
 
@@ -864,7 +864,7 @@ public class ModelTree extends ModelWidg
                 }
             }
 
-            public void accept(TreeWidgetVisitor visitor) {
+            public void accept(TreeWidgetVisitor visitor) throws IOException, GeneralException
{
                 visitor.visit(this);
             }
 
@@ -1056,7 +1056,7 @@ public class ModelTree extends ModelWidg
 
             }
 
-            public void accept(TreeWidgetVisitor visitor) {
+            public void accept(TreeWidgetVisitor visitor) throws IOException, GeneralException
{
                 visitor.visit(this);
             }
 

Modified: ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/TreeWidgetVisitor.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/TreeWidgetVisitor.java?rev=1211809&r1=1211808&r2=1211809&view=diff
==============================================================================
--- ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/TreeWidgetVisitor.java
(original)
+++ ofbiz/branches/20111115ScreenWidgetRedesign/framework/widget/src/org/ofbiz/widget/tree/TreeWidgetVisitor.java
Thu Dec  8 10:35:34 2011
@@ -18,6 +18,9 @@
  *******************************************************************************/
 package org.ofbiz.widget.tree;
 
+import java.io.IOException;
+
+import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.widget.tree.ModelTree.ModelNode;
 import org.ofbiz.widget.tree.ModelTree.ModelNode.ModelSubNode;
 
@@ -26,15 +29,16 @@ import org.ofbiz.widget.tree.ModelTree.M
  */
 public interface TreeWidgetVisitor {
 
-    void visit(ModelNode modelNode);
+    void visit(ModelNode modelNode) throws IOException, GeneralException;
+
+    void visit(ModelNode.Image image) throws IOException, GeneralException;
 
-    void visit(ModelNode.Image image);
+    void visit(ModelSubNode modelSubNode) throws IOException, GeneralException;
 
-    void visit(ModelSubNode modelSubNode);
+    void visit(ModelTree modelTree) throws IOException, GeneralException;
 
-    void visit(ModelTree modelTree);
+    void visit(ModelTree.ModelNode.Label label) throws IOException, GeneralException;
 
-    void visit(ModelTree.ModelNode.Label label);
+    void visit(ModelTree.ModelNode.Link link) throws IOException, GeneralException;
 
-    void visit(ModelTree.ModelNode.Link link);
 }



Mime
View raw message