TRINIDAD-1065 - use the mfp:hidden in facets and properties to be able
to prevent these from being included in the tag documentation

Merge of 653574
diff --git a/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java b/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
index 5d7c6ae..5beb387 100644
--- a/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
+++ b/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
@@ -130,6 +130,9 @@
 
     // Maven Faces Plugin
     digester.setRuleNamespaceURI("http://myfaces.apache.org/maven-faces-plugin");
+    
+    // faces-config/component/facet/facet-extension
+    digester.addBeanPropertySetter("faces-config/component/facet/facet-extension/hidden");
 
     // faces-config/component/facet/example
     digester.addObjectCreate("faces-config/component/facet/example",
@@ -222,6 +225,7 @@
                                    "alternateClass");
     digester.addBeanPropertySetter("faces-config/component/property/property-extension/tag-attribute-excluded",
                                    "tagAttributeExcluded");
+    digester.addBeanPropertySetter("faces-config/component/property/property-extension/hidden");
     digester.addCallMethod("faces-config/component/property/property-extension/property-values",
                            "parsePropertyValues", 1);
     digester.addCallParam("faces-config/component/property/property-extension/property-values", 0);
diff --git a/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacetBean.java b/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacetBean.java
index efe1b1f..c9cbf05 100644
--- a/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacetBean.java
+++ b/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacetBean.java
@@ -87,7 +87,26 @@
     return _required;
   }
 
+  /**
+   * If the facet should be hidden from documentation
+   * @return If the facet should be hidden
+   */
+  public boolean isHidden()
+  {
+    return _hidden;
+  }  
+
+  /**
+   * Set if this facet should be hidden from documentation
+   * @param hidden If the facet should be hidden
+   */
+  public void setHidden(boolean hidden)
+  {
+    this._hidden = hidden;
+  }
+
   private String  _description;
   private String  _facetName;
   private boolean _required;
+  private boolean _hidden;
 }
diff --git a/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java b/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java
index 3e7cb93..60391c9 100644
--- a/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java
+++ b/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java
@@ -428,6 +428,24 @@
 
     return _fieldPropertyName;
   }
+  
+  /**
+   * If the property should be hidden from documentation
+   * @return If the facet should be hidden
+   */
+  public boolean isHidden()
+  {
+    return _hidden;
+  }  
+
+  /**
+   * Set if this facet should be hidden from documentation
+   * @param hidden If the facet should be hidden
+   */
+  public void setHidden(boolean hidden)
+  {
+    this._hidden = hidden;
+  }
 
   private String  _aliasOf;
   private String  _jspPropertyName;
@@ -440,6 +458,7 @@
   private boolean _tagAttributeExcluded;
   private boolean _enum;
   private boolean _useMaxTime;
+  private boolean _hidden;
   private String[] _propertyValues;
   private String[] _unsupportedAgents = _EMPTY_ARRAY;
   private String[] _unsupportedRenderKits = _EMPTY_ARRAY;
diff --git a/maven-faces-plugin/src/main/resources/META-INF/schemas/maven-faces-plugin.xsd b/maven-faces-plugin/src/main/resources/META-INF/schemas/maven-faces-plugin.xsd
index 60cebf4..0eebaef 100644
--- a/maven-faces-plugin/src/main/resources/META-INF/schemas/maven-faces-plugin.xsd
+++ b/maven-faces-plugin/src/main/resources/META-INF/schemas/maven-faces-plugin.xsd
@@ -59,6 +59,7 @@
             <xsd:element name="requires-literal" type="xsd:boolean"
                          minOccurs="0"/>
             <xsd:element name="virtual" type="xsd:boolean"/>
+            <xsd:element name="hidden" type="xsd:boolean"/>
             <xsd:element name="method-binding-signature"
                          type="mfp:method-binding-signatureType" minOccurs="0"/>
         </xsd:sequence>
diff --git a/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java b/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
index e8f5af2..8677b85 100644
--- a/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
+++ b/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
@@ -806,6 +806,11 @@
     while (attributes.hasNext())
     {
       PropertyBean attr = (PropertyBean) attributes.next();
+      
+      if (attr.isHidden())
+      {
+        continue;
+      }
 
       /*
       if ((group == null) || "Ungrouped".equals(group))
@@ -998,7 +1003,11 @@
     Iterator iter = bean.facets(true);
     while (iter.hasNext())
     {
-      facetNames.add(((FacetBean) iter.next()).getFacetName());
+      FacetBean facetBean = (FacetBean)iter.next();
+      if (!facetBean.isHidden())
+      {
+        facetNames.add(facetBean.getFacetName());
+      }
     }
 
     out.write("<table>\n");