You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by st...@apache.org on 2011/10/20 22:23:30 UTC

svn commit: r1187033 - in /myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter: ExporterActionListener.java ExporterActionListenerTag.java util/ComponentUtils.java util/ExporterConstants.java

Author: struberg
Date: Thu Oct 20 20:23:29 2011
New Revision: 1187033

URL: http://svn.apache.org/viewvc?rev=1187033&view=rev
Log:
MFCOMMONS-40 fix checkstyle issues in mf-commons-components

Modified:
    myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java
    myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java
    myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java
    myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ExporterConstants.java

Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java?rev=1187033&r1=1187032&r2=1187033&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java Thu Oct 20 20:23:29 2011
@@ -58,12 +58,11 @@ public class ExporterActionListener impl
     {
     }
 
-    public ExporterActionListener(String _for, String _fileType,
-            String _fileName)
+    public ExporterActionListener(String listenerFor, String fileType, String fileName)
     {
-        this._fileType = _fileType;
-        this._fileName = _fileName;
-        this._for = _for;
+        this._fileType = fileType;
+        this._fileName = fileName;
+        this._for = listenerFor;
     }
 
     public void processAction(ActionEvent event)
@@ -143,9 +142,9 @@ public class ExporterActionListener impl
         return _fileName;
     }
 
-    public void setFilename(String _filename)
+    public void setFilename(String filename)
     {
-        this._fileName = _filename;
+        this._fileName = filename;
     }
 
     public String getFileType()
@@ -163,9 +162,9 @@ public class ExporterActionListener impl
         return _for;
     }
 
-    public void setFor(String _for)
+    public void setFor(String listenerFor)
     {
-        this._for = _for;
+        this._for = listenerFor;
     }
 
     public void restoreState(FacesContext context, Object state)

Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java?rev=1187033&r1=1187032&r2=1187033&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java Thu Oct 20 20:23:29 2011
@@ -36,14 +36,16 @@ import org.apache.myfaces.buildtools.mav
    name="mc:exporterActionListener",
    bodyContent="JSP",
    tagHandler="org.apache.myfaces.commons.exporter.FaceletsExporterActionListenerTag")
-public class ExporterActionListenerTag extends TagSupport {
+public class ExporterActionListenerTag extends TagSupport
+{
 
     private static final long serialVersionUID = -1455677614701939262L;
     private String _fileType;
     private String _fileName;
     private String _for;
     
-    public int doStartTag() throws JspException {
+    public int doStartTag() throws JspException
+    {
 
         // check whether the attributes are not null
         if (_for == null) 
@@ -97,14 +99,16 @@ public class ExporterActionListenerTag e
         return Tag.SKIP_BODY;
     }
 
-    public void release() {
+    public void release()
+    {
         super.release();
         _fileType = null;
         _fileName = null;
         _for = null;
     }
     
-    public String getFilename() {
+    public String getFilename()
+    {
         return _fileName;
     }
 
@@ -113,11 +117,13 @@ public class ExporterActionListenerTag e
      * 
      * @JSFJspAttribute
      */
-    public void setFilename(String _filename) {
-        this._fileName = _filename;
+    public void setFilename(String filename)
+    {
+        this._fileName = filename;
     }
 
-    public String getFileType() {
+    public String getFileType()
+    {
         return _fileType;
     }
 
@@ -126,11 +132,13 @@ public class ExporterActionListenerTag e
      * 
      * @JSFJspAttribute
      */
-    public void setFileType(String type) {
+    public void setFileType(String type)
+    {
         _fileType = type;
     }
 
-    public String getFor() {
+    public String getFor()
+    {
         return _for;
     }
 
@@ -139,8 +147,9 @@ public class ExporterActionListenerTag e
      * 
      * @JSFJspAttribute
      */
-    public void setFor(String _for) {
-        this._for = _for;
+    public void setFor(String listenerFor)
+    {
+        this._for = listenerFor;
     }
     
     

Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java?rev=1187033&r1=1187032&r2=1187033&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java Thu Oct 20 20:23:29 2011
@@ -41,9 +41,8 @@ public final class ComponentUtils
 
     private static final Log log = LogFactory.getLog(ComponentUtils.class);
 
-    public static UIComponent findComponentById(FacesContext context,
-            UIComponent root, String id) {
-
+    public static UIComponent findComponentById(FacesContext context, UIComponent root, String id)
+    {
         UIComponent component = null;
 
         for (int i = 0; i < root.getChildCount() && component == null; i++)
@@ -62,7 +61,8 @@ public final class ComponentUtils
         return component;
     }
 
-    public static String getPathToComponent(UIComponent component) {
+    public static String getPathToComponent(UIComponent component)
+    {
         StringBuffer buf = new StringBuffer();
 
         if (component == null)
@@ -80,11 +80,13 @@ public final class ComponentUtils
         return buf.toString();
     }
 
-    private static void getPathToComponent(UIComponent component,
-            StringBuffer buf) {
+    private static void getPathToComponent(UIComponent component, StringBuffer buf)
+    {
 
         if (component == null)
+        {
             return;
+        }
 
         StringBuffer intBuf = new StringBuffer();
 
@@ -107,7 +109,8 @@ public final class ComponentUtils
         getPathToComponent(component.getParent(), buf);
     }
 
-    private static Object getValue(UIComponent component) {
+    private static Object getValue(UIComponent component)
+    {
         Object value;
         try
         {
@@ -122,8 +125,8 @@ public final class ComponentUtils
         return value;
     }
 
-    public static String getStringValue(FacesContext facesContext,
-            UIComponent component) {
+    public static String getStringValue(FacesContext facesContext, UIComponent component)
+    {
         try
         {
             if (!(component instanceof ValueHolder))
@@ -142,7 +145,9 @@ public final class ComponentUtils
                     if (submittedValue instanceof String)
                     {
                         if (log.isDebugEnabled())
+                        {
                             log.debug("returning 1 '" + submittedValue + "'");
+                        }
                         return (String) submittedValue;
                     }
 
@@ -182,7 +187,9 @@ public final class ComponentUtils
                     converter = facesContext.getApplication().createConverter(
                             value.getClass());
                     if (log.isDebugEnabled())
+                    {
                         log.debug("the created converter is " + converter);
+                    }
                 }
                 catch (FacesException e)
                 {
@@ -199,18 +206,24 @@ public final class ComponentUtils
                 if (value == null)
                 {
                     if (log.isDebugEnabled())
+                    {
                         log.debug("returning an empty string");
+                    }
                     return "";
                 }
 
                 if (log.isDebugEnabled())
+                {
                     log.debug("returning an .toString");
+                }
                 return value.toString();
 
             }
 
             if (log.isDebugEnabled())
+            {
                 log.debug("returning converter get as string " + converter);
+            }
             return converter.getAsString(facesContext, component, value);
 
         }
@@ -223,7 +236,8 @@ public final class ComponentUtils
         }
     }
 
-    public static List getHTMLDataTableColumns(HtmlDataTable table) {
+    public static List getHTMLDataTableColumns(HtmlDataTable table)
+    {
         List columns = new ArrayList();
 
         for (int i = 0; i < table.getChildCount(); i++)

Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ExporterConstants.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ExporterConstants.java?rev=1187033&r1=1187032&r2=1187033&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ExporterConstants.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ExporterConstants.java Thu Oct 20 20:23:29 2011
@@ -18,7 +18,8 @@
  */
 package org.apache.myfaces.commons.exporter.util;
 
-public interface ExporterConstants {
+public interface ExporterConstants
+{
     public static String EXPORTER_TABLE_ID = "exporterTableId";
     public static String EXPORTER_FILE_NAME = "exporterFileName";
     public static String EXPORTER_FILE_TYPE = "exporterFileType";