myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r600379 - in /myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces: ./ generator/taglib/ parse/
Date Sun, 02 Dec 2007 21:31:31 GMT
Author: bommel
Date: Sun Dec  2 13:31:30 2007
New Revision: 600379

URL: http://svn.apache.org/viewvc?rev=600379&view=rev
Log:
minor cleanup

Modified:
    myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
    myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractTagGenerator.java
    myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesConverterTagGenerator.java
    myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesValidatorTagGenerator.java
    myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java
    myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java
    myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AbstractTagBean.java
    myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ConverterBean.java
    myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ValidatorBean.java

Modified: myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java?rev=600379&r1=600378&r2=600379&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
(original)
+++ myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
Sun Dec  2 13:31:30 2007
@@ -73,8 +73,6 @@
 import java.io.OutputStream;
 import java.io.StringWriter;
 import java.lang.reflect.Modifier;
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
@@ -1044,34 +1042,7 @@
    */
   private String type;
 
-  public static String resolveType(String className)
-  {
-    return (String)_RESOLVABLE_TYPES.get(className);
-  }
-
-  // TODO: for everything but Locale, String[], Date, and TimeZone,
-  // in JSF 1.2 we should already be going through coercion, and
-  // not need any of the "TagUtils" functions
-  static private Map _createResolvableTypes()
-  {
-    Map resolvableTypes = new HashMap();
-
-    resolvableTypes.put("boolean", "Boolean");
-    resolvableTypes.put("char", "Character");
-    resolvableTypes.put("java.util.Date", "Date");
-    resolvableTypes.put("int", "Integer");
-    resolvableTypes.put("float", "Float");
-    resolvableTypes.put("double", "Double");
-    resolvableTypes.put("java.util.Locale", "Locale");
-    resolvableTypes.put("long", "Long");
-    resolvableTypes.put("java.lang.String", "String");
-    resolvableTypes.put("java.lang.String[]", "StringArray");
-    resolvableTypes.put("java.util.TimeZone", "TimeZone");
-
-    return Collections.unmodifiableMap(resolvableTypes);
-  }
 
-  static final private Map _RESOLVABLE_TYPES = _createResolvableTypes();
 
   static final private String _JSP_TAG_LIBRARY_DOCTYPE_PUBLIC =
               "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN";

Modified: myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractTagGenerator.java?rev=600379&r1=600378&r2=600379&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractTagGenerator.java
(original)
+++ myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractTagGenerator.java
Sun Dec  2 13:31:30 2007
@@ -30,6 +30,9 @@
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.Set;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
 
 public abstract class AbstractTagGenerator {
   protected Log _log;
@@ -225,5 +228,33 @@
     }
   }
 
+  protected String resolveType(String className)
+  {
+    return (String)_RESOLVABLE_TYPES.get(className);
+  }
+
+  // TODO: for everything but Locale, String[], Date, and TimeZone,
+  // in JSF 1.2 we should already be going through coercion, and
+  // not need any of the "TagUtils" functions
+  private Map _createResolvableTypes()
+  {
+    Map resolvableTypes = new HashMap();
+
+    resolvableTypes.put("boolean", "Boolean");
+    resolvableTypes.put("char", "Character");
+    resolvableTypes.put("java.util.Date", "Date");
+    resolvableTypes.put("int", "Integer");
+    resolvableTypes.put("float", "Float");
+    resolvableTypes.put("double", "Double");
+    resolvableTypes.put("java.util.Locale", "Locale");
+    resolvableTypes.put("long", "Long");
+    resolvableTypes.put("java.lang.String", "String");
+    resolvableTypes.put("java.lang.String[]", "StringArray");
+    resolvableTypes.put("java.util.TimeZone", "TimeZone");
+
+    return Collections.unmodifiableMap(resolvableTypes);
+  }
+
+  final private Map _RESOLVABLE_TYPES = _createResolvableTypes();
 
 }

Modified: myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesConverterTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesConverterTagGenerator.java?rev=600379&r1=600378&r2=600379&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesConverterTagGenerator.java
(original)
+++ myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesConverterTagGenerator.java
Sun Dec  2 13:31:30 2007
@@ -19,7 +19,6 @@
 package org.apache.myfaces.trinidadbuild.plugin.faces.generator.taglib;
 
 import org.apache.maven.plugin.logging.Log;
-import org.apache.myfaces.trinidadbuild.plugin.faces.GenerateJspTaglibsMojo;
 import org.apache.myfaces.trinidadbuild.plugin.faces.io.PrettyWriter;
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.ConverterBean;
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.PropertyBean;
@@ -92,7 +91,7 @@
                   propVar + ");");
       out.unindent();
       out.println("}");
-      String propType = GenerateJspTaglibsMojo.resolveType(propFullClass);
+      String propType = resolveType(propFullClass);
       if (propType != null)
       {
         out.println("else");
@@ -131,7 +130,7 @@
       out.println("converter.setValueBinding(\"" + propName + "\", vb);");
       out.unindent();
       out.println("}");
-      String propType = GenerateJspTaglibsMojo.resolveType(propFullClass);
+      String propType = resolveType(propFullClass);
       if (propType != null)
       {
         out.println("else");

Modified: myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesValidatorTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesValidatorTagGenerator.java?rev=600379&r1=600378&r2=600379&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesValidatorTagGenerator.java
(original)
+++ myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/MyFacesValidatorTagGenerator.java
Sun Dec  2 13:31:30 2007
@@ -23,7 +23,6 @@
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.PropertyBean;
 import org.apache.myfaces.trinidadbuild.plugin.faces.io.PrettyWriter;
 import org.apache.myfaces.trinidadbuild.plugin.faces.util.Util;
-import org.apache.myfaces.trinidadbuild.plugin.faces.GenerateJspTaglibsMojo;
 
 import java.util.Set;
 import java.util.TreeSet;
@@ -87,7 +86,7 @@
                   propVar + ");");
       out.unindent();
       out.println("}");
-      String propType = GenerateJspTaglibsMojo.resolveType(propFullClass);
+      String propType = resolveType(propFullClass);
       if (propType != null)
       {
         out.println("else");
@@ -126,7 +125,7 @@
       out.println("validator.setValueBinding(\"" + propName + "\", vb);");
       out.unindent();
       out.println("}");
-      String propType = GenerateJspTaglibsMojo.resolveType(propFullClass);
+      String propType = resolveType(propFullClass);
       if (propType != null)
       {
         out.println("else");

Modified: myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java?rev=600379&r1=600378&r2=600379&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java
(original)
+++ myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java
Sun Dec  2 13:31:30 2007
@@ -19,7 +19,6 @@
 package org.apache.myfaces.trinidadbuild.plugin.faces.generator.taglib;
 
 import org.apache.maven.plugin.logging.Log;
-import org.apache.myfaces.trinidadbuild.plugin.faces.GenerateJspTaglibsMojo;
 import org.apache.myfaces.trinidadbuild.plugin.faces.io.PrettyWriter;
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.ConverterBean;
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.PropertyBean;
@@ -92,7 +91,7 @@
                   propVar + ");");
       out.unindent();
       out.println("}");
-      String propType = GenerateJspTaglibsMojo.resolveType(propFullClass);
+      String propType = resolveType(propFullClass);
       if (propType != null)
       {
         out.println("else");
@@ -131,7 +130,7 @@
       out.println("converter.setValueBinding(\"" + propName + "\", vb);");
       out.unindent();
       out.println("}");
-      String propType = GenerateJspTaglibsMojo.resolveType(propFullClass);
+      String propType = resolveType(propFullClass);
       if (propType != null)
       {
         out.println("else");

Modified: myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java?rev=600379&r1=600378&r2=600379&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java
(original)
+++ myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java
Sun Dec  2 13:31:30 2007
@@ -19,7 +19,6 @@
 package org.apache.myfaces.trinidadbuild.plugin.faces.generator.taglib;
 
 import org.apache.maven.plugin.logging.Log;
-import org.apache.myfaces.trinidadbuild.plugin.faces.GenerateJspTaglibsMojo;
 import org.apache.myfaces.trinidadbuild.plugin.faces.io.PrettyWriter;
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.PropertyBean;
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.ValidatorBean;
@@ -87,7 +86,7 @@
                   propVar + ");");
       out.unindent();
       out.println("}");
-      String propType = GenerateJspTaglibsMojo.resolveType(propFullClass);
+      String propType = resolveType(propFullClass);
       if (propType != null)
       {
         out.println("else");
@@ -126,7 +125,7 @@
       out.println("validator.setValueBinding(\"" + propName + "\", vb);");
       out.unindent();
       out.println("}");
-      String propType = GenerateJspTaglibsMojo.resolveType(propFullClass);
+      String propType = resolveType(propFullClass);
       if (propType != null)
       {
         out.println("else");

Modified: myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AbstractTagBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AbstractTagBean.java?rev=600379&r1=600378&r2=600379&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AbstractTagBean.java
(original)
+++ myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AbstractTagBean.java
Sun Dec  2 13:31:30 2007
@@ -21,16 +21,21 @@
 import javax.xml.namespace.QName;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.LinkedHashMap;
 import java.lang.reflect.Modifier;
 
 public class AbstractTagBean extends ObjectBean {
   private String  _description;
   private String  _longDescription;
-  protected QName   _tagName;
+  private QName   _tagName;
   private String  _tagClass;
-  protected Map _properties;
+  private Map _properties;
   private int     _tagClassModifiers;
 
+  public AbstractTagBean() {
+    _properties = new LinkedHashMap();
+  }
+
   /**
    * Sets the description of this property.
    *
@@ -95,6 +100,18 @@
   }
 
   /**
+   * Sets the JSP tag name for this component.
+   *
+   * @param tagName  the JSP tag name
+   */
+  public void setTagName(
+      QName tagName)
+  {
+    _tagName = tagName;
+  }
+
+
+  /**
    * Returns the JSP tag name for this component.
    *
    * @return  the JSP tag name
@@ -199,5 +216,14 @@
     }
 
     return modifiers;
+  }
+
+ /**
+  * Number of properties for this component
+  * @return num of properties
+  */
+  public int propertiesSize()
+  {
+    return _properties.size();
   }
 }

Modified: myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ConverterBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ConverterBean.java?rev=600379&r1=600378&r2=600379&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ConverterBean.java
(original)
+++ myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ConverterBean.java
Sun Dec  2 13:31:30 2007
@@ -18,11 +18,7 @@
  */
 package org.apache.myfaces.trinidadbuild.plugin.faces.parse;
 
-import javax.xml.namespace.QName;
 import java.lang.reflect.Modifier;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
 import java.util.logging.Logger;
 
 /**
@@ -30,13 +26,6 @@
  * XML element.
  */
 public class ConverterBean extends AbstractTagBean {
-  /**
-   * Creates a new ConverterBean.
-   */
-  public ConverterBean()
-  {
-    _properties = new LinkedHashMap();
-  }
 
   /**
    * Sets the converter identifer for this component.

Modified: myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ValidatorBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ValidatorBean.java?rev=600379&r1=600378&r2=600379&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ValidatorBean.java
(original)
+++ myfaces/trinidad-maven/branches/bommel_matzew_mfp_overhaul/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ValidatorBean.java
Sun Dec  2 13:31:30 2007
@@ -19,25 +19,13 @@
 package org.apache.myfaces.trinidadbuild.plugin.faces.parse;
 
 import java.lang.reflect.Modifier;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
 import java.util.logging.Logger;
 
-import javax.xml.namespace.QName;
-
 /**
  * ValidatorBean is a Java representation of the faces-config validator
  * XML element.
  */
 public class ValidatorBean extends AbstractTagBean {
-  /**
-   * Creates a new ValidatorBean.
-   */
-  public ValidatorBean()
-  {
-    _properties = new LinkedHashMap();
-  }
 
   /**
    * Sets the validator identifer for this component.
@@ -90,17 +78,6 @@
   public String getValidatorClass()
   {
     return _validatorClass;
-  }
-
-  /**
-   * Sets the JSP tag name for this component.
-   *
-   * @param tagName  the JSP tag name
-   */
-  public void setTagName(
-    QName tagName)
-  {
-    _tagName = tagName;
   }
 
   /**



Mime
View raw message