You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by ma...@apache.org on 2006/07/25 02:17:33 UTC
svn commit: r425260 [1/7] - in
/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins:
maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/io/
maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin...
Author: matzew
Date: Mon Jul 24 19:17:31 2006
New Revision: 425260
URL: http://svn.apache.org/viewvc?rev=425260&view=rev
Log:
fixing (the last...) line issues and properties for PLUGIN folder.
Modified:
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/io/PrettyWriter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AttributeBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ConverterBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/EventBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/EventRefBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacetBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/MethodSignatureBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ObjectBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/RenderKitBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/RendererBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ValidatorBean.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/converters/QNameConverter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/rules/BeanPropertySetterRule.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/AttributeFilter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/ComponentFilter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/CompoundIterator.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/ConverterFilter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/FacetFilter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/Filter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/FilteredIterator.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/PropertyFilter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/RendererFilter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/SortedIterator.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/SourceTemplate.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/Util.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/ValidatorFilter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/XIncludeFilter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/util/XPointerFilter.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/test/java-templates/org/apache/myfaces/adf/component/UIXCommandTemplate.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/test/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractMojoTestCase.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/test/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateComponentsMojoTest.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/test/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateFacesConfigMojoTest.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/GenerateJavascriptLocalesMojo.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-i18n-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/i18n/GenerateLocaleElementsMojo.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/test/resources/validator/ParseException.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/test/resources/validator/SelectorParser.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/test/resources/validator/SelectorParserConstants.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/test/resources/validator/SelectorParserTokenManager.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/test/resources/validator/SimpleCharStream.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/test/resources/validator/Token.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javacc-plugin/src/test/resources/validator/TokenMgrError.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/xrts/GenerateSourcesMojo.java (contents, props changed)
incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-xrts-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/xrts/GenerateTestSourcesMojo.java (contents, props changed)
Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/io/PrettyWriter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/io/PrettyWriter.java?rev=425260&r1=425259&r2=425260&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/io/PrettyWriter.java (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/io/PrettyWriter.java Mon Jul 24 19:17:31 2006
@@ -13,182 +13,182 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.myfaces.trinidadbuild.plugin.faces.io;
-
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.Writer;
-
-public class PrettyWriter extends PrintWriter
-{
- public PrettyWriter(
- OutputStream out)
- {
- super(out);
- }
-
- public PrettyWriter(
- OutputStream out,
- boolean autoFlush)
- {
- super(out, autoFlush);
- }
-
- public PrettyWriter(
- Writer out)
- {
- super(out);
- }
-
- public PrettyWriter(
- Writer out,
- boolean autoFlush)
- {
- super(out, autoFlush);
- }
-
- public void indent()
- {
- _indentation ++;
- }
-
- public void unindent()
- {
- _indentation --;
- }
-
- public void write(
- String string,
- int offset,
- int length)
- {
- if (_unlatchPending())
- {
- for (int i=0; i < _indentation; i++)
- {
- super.write(_TAB_INDENT, 0, 2);
- }
- }
-
- super.write(string, offset, length);
- }
-
- public void write(
- char[] chars,
- int offset,
- int length)
- {
- if (_unlatchPending())
- {
- for (int i=0; i < _indentation; i++)
- {
- super.write(_TAB_INDENT_CHARS, 0, 2);
- }
- }
-
- super.write(chars, offset, length);
- }
-
- public void println()
- {
- super.println();
- _latchPending();
- }
-
- public void println(
- boolean x)
- {
- super.println(x);
- _latchPending();
- }
-
- public void println(
- char x)
- {
- super.println(x);
- _latchPending();
- }
-
- public void println(
- int x)
- {
- super.println(x);
- _latchPending();
- }
-
- public void println(
- long x)
- {
- super.println(x);
- _latchPending();
- }
-
- public void println(
- float x)
- {
- super.println(x);
- _latchPending();
- }
-
- public void println(
- double x)
- {
- super.println(x);
- _latchPending();
- }
-
- public void println(
- char[] x)
- {
- super.println(x);
- _latchPending();
- }
-
- public void println(
- String x)
- {
- int fromIndex = 0;
- for (int index = x.indexOf('\n');
- index != -1 && index + 1 < x.length();
- fromIndex = index + 1,
- index = x.indexOf('\n', fromIndex))
- {
- super.println(x.substring(fromIndex, index));
- _latchPending();
- }
-
- super.println(x.substring(fromIndex));
- _latchPending();
- }
-
- public void println(
- Object x)
- {
- super.println(x);
- _latchPending();
- }
-
- private boolean _unlatchPending()
- {
- boolean pending = _pending;
- if (pending)
- _pending = false;
-
- return pending;
- }
-
- private boolean _latchPending()
- {
- boolean pending = _pending;
- if (!pending)
- _pending = true;
-
- return !pending;
- }
-
- private int _indentation;
- private boolean _pending = true;
-
- private static final String _TAB_INDENT = " ";
- private static final char[] _TAB_INDENT_CHARS = _TAB_INDENT.toCharArray();
+package org.apache.myfaces.trinidadbuild.plugin.faces.io;
+
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Writer;
+
+public class PrettyWriter extends PrintWriter
+{
+ public PrettyWriter(
+ OutputStream out)
+ {
+ super(out);
+ }
+
+ public PrettyWriter(
+ OutputStream out,
+ boolean autoFlush)
+ {
+ super(out, autoFlush);
+ }
+
+ public PrettyWriter(
+ Writer out)
+ {
+ super(out);
+ }
+
+ public PrettyWriter(
+ Writer out,
+ boolean autoFlush)
+ {
+ super(out, autoFlush);
+ }
+
+ public void indent()
+ {
+ _indentation ++;
+ }
+
+ public void unindent()
+ {
+ _indentation --;
+ }
+
+ public void write(
+ String string,
+ int offset,
+ int length)
+ {
+ if (_unlatchPending())
+ {
+ for (int i=0; i < _indentation; i++)
+ {
+ super.write(_TAB_INDENT, 0, 2);
+ }
+ }
+
+ super.write(string, offset, length);
+ }
+
+ public void write(
+ char[] chars,
+ int offset,
+ int length)
+ {
+ if (_unlatchPending())
+ {
+ for (int i=0; i < _indentation; i++)
+ {
+ super.write(_TAB_INDENT_CHARS, 0, 2);
+ }
+ }
+
+ super.write(chars, offset, length);
+ }
+
+ public void println()
+ {
+ super.println();
+ _latchPending();
+ }
+
+ public void println(
+ boolean x)
+ {
+ super.println(x);
+ _latchPending();
+ }
+
+ public void println(
+ char x)
+ {
+ super.println(x);
+ _latchPending();
+ }
+
+ public void println(
+ int x)
+ {
+ super.println(x);
+ _latchPending();
+ }
+
+ public void println(
+ long x)
+ {
+ super.println(x);
+ _latchPending();
+ }
+
+ public void println(
+ float x)
+ {
+ super.println(x);
+ _latchPending();
+ }
+
+ public void println(
+ double x)
+ {
+ super.println(x);
+ _latchPending();
+ }
+
+ public void println(
+ char[] x)
+ {
+ super.println(x);
+ _latchPending();
+ }
+
+ public void println(
+ String x)
+ {
+ int fromIndex = 0;
+ for (int index = x.indexOf('\n');
+ index != -1 && index + 1 < x.length();
+ fromIndex = index + 1,
+ index = x.indexOf('\n', fromIndex))
+ {
+ super.println(x.substring(fromIndex, index));
+ _latchPending();
+ }
+
+ super.println(x.substring(fromIndex));
+ _latchPending();
+ }
+
+ public void println(
+ Object x)
+ {
+ super.println(x);
+ _latchPending();
+ }
+
+ private boolean _unlatchPending()
+ {
+ boolean pending = _pending;
+ if (pending)
+ _pending = false;
+
+ return pending;
+ }
+
+ private boolean _latchPending()
+ {
+ boolean pending = _pending;
+ if (!pending)
+ _pending = true;
+
+ return !pending;
+ }
+
+ private int _indentation;
+ private boolean _pending = true;
+
+ private static final String _TAB_INDENT = " ";
+ private static final char[] _TAB_INDENT_CHARS = _TAB_INDENT.toCharArray();
}
Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/io/PrettyWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AttributeBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AttributeBean.java?rev=425260&r1=425259&r2=425260&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AttributeBean.java (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AttributeBean.java Mon Jul 24 19:17:31 2006
@@ -13,209 +13,209 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.myfaces.trinidadbuild.plugin.faces.parse;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.lang.Comparable;
-
-/**
- * AttributeBean is a Java representation of the faces-config component or
- * renderer attribute XML element.
- */
-public class AttributeBean extends ObjectBean implements Comparable
-{
- /**
- * Sets the name of this attribute.
- *
- * @param attributeName the attribute name
- */
- public void setAttributeName(
- String attributeName)
- {
- _attributeName = attributeName;
- }
-
- /**
- * Returns the name of this attribute.
- *
- * @return the attribute name
- */
- public String getAttributeName()
- {
- return _attributeName;
- }
-
- /**
- * Sets the attribute class for this attribute.
- *
- * @param attributeClass the attribute class
- */
- public void setAttributeClass(
- String attributeClass)
- {
- Matcher matcher = _GENERIC_TYPE.matcher(attributeClass);
-
- if (matcher.matches())
- {
- _attributeClass = matcher.group(1);
- _attributeClassParameters = matcher.group(2).split(",");
- }
- else
- {
- _attributeClass = attributeClass;
- _attributeClassParameters = _EMPTY_ARRAY;
- }
- }
-
- /**
- * Returns the array of parameterized types for this attribute
- * if it uses generics.
- *
- * @return the array of parameterized types for this attribute
- */
- public String[] getAttributeClassParameters()
- {
- return _attributeClassParameters;
- }
-
- /**
- * Returns the attribute class for this attribute.
- *
- * @return the attribute class
- */
- public String getAttributeClass()
- {
- return _attributeClass;
- }
-
- /**
- * Sets the description of this attribute.
- *
- * @param description the attribute description
- */
- public void setDescription(
- String description)
- {
- _description = description;
- }
-
- /**
- * Returns the description of this attribute.
- *
- * @return the attribute description
- */
- public String getDescription()
- {
- return _description;
- }
-
- /**
- * Sets the default value of this attribute.
- *
- * @param defaultValue the attribute default value
- */
- public void setDefaultValue(
- String defaultValue)
- {
- _defaultValue = defaultValue;
- }
-
- /**
- * Returns the default value of this attribute.
- *
- * @return the attribute default value
- */
- public String getDefaultValue()
- {
- return _defaultValue;
- }
-
- /**
- * Sets the alternative class for this property.
- *
- * @param alternateClass the alternative class
- */
- public void setAlternateClass(
- String alternateClass)
- {
- _alternateClass = alternateClass;
- }
-
- /**
- * Returns the alternative class for this property.
- *
- * @return the alternative class
- */
- public String getAlternateClass()
- {
- return _alternateClass;
- }
-
- /**
- * Sets the method binding signature of this property.
- *
- * @param signature the method binding signature of this property
- */
- public void setMethodBindingSignature(
- MethodSignatureBean signature)
- {
- _signature = signature;
- }
-
- /**
- * Returns the method binding signature of this property.
- *
- * @return the method binding signature of this property
- */
- public MethodSignatureBean getMethodBindingSignature()
- {
- return _signature;
- }
-
- /**
- * Sets the virtual flag of this property.
- *
- * @param virtual the property required flag
- */
- public void setVirtual(
- boolean virtual)
- {
- _virtual = virtual;
- }
-
- /**
- * Returns virtual flag of this property.
- *
- * @return the property virtual flag
- */
- public boolean isVirtual()
- {
- return _virtual;
- }
-
- public int compareTo(Object o)
- {
- if(o instanceof AttributeBean)
- {
- AttributeBean attr = (AttributeBean)o;
- return _attributeName.compareTo(attr._attributeName);
- }
- else
- {
- return 1;
- }
- }
-
- private String _attributeName;
- private String _attributeClass;
- private String[] _attributeClassParameters;
- private String _description;
- private String _defaultValue;
- private String _alternateClass;
- private boolean _virtual;
- private MethodSignatureBean _signature;
-
- static private final Pattern _GENERIC_TYPE = Pattern.compile("([^<]+)<(.+)>");
- static private final String[] _EMPTY_ARRAY = new String[0];
-}
+package org.apache.myfaces.trinidadbuild.plugin.faces.parse;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.lang.Comparable;
+
+/**
+ * AttributeBean is a Java representation of the faces-config component or
+ * renderer attribute XML element.
+ */
+public class AttributeBean extends ObjectBean implements Comparable
+{
+ /**
+ * Sets the name of this attribute.
+ *
+ * @param attributeName the attribute name
+ */
+ public void setAttributeName(
+ String attributeName)
+ {
+ _attributeName = attributeName;
+ }
+
+ /**
+ * Returns the name of this attribute.
+ *
+ * @return the attribute name
+ */
+ public String getAttributeName()
+ {
+ return _attributeName;
+ }
+
+ /**
+ * Sets the attribute class for this attribute.
+ *
+ * @param attributeClass the attribute class
+ */
+ public void setAttributeClass(
+ String attributeClass)
+ {
+ Matcher matcher = _GENERIC_TYPE.matcher(attributeClass);
+
+ if (matcher.matches())
+ {
+ _attributeClass = matcher.group(1);
+ _attributeClassParameters = matcher.group(2).split(",");
+ }
+ else
+ {
+ _attributeClass = attributeClass;
+ _attributeClassParameters = _EMPTY_ARRAY;
+ }
+ }
+
+ /**
+ * Returns the array of parameterized types for this attribute
+ * if it uses generics.
+ *
+ * @return the array of parameterized types for this attribute
+ */
+ public String[] getAttributeClassParameters()
+ {
+ return _attributeClassParameters;
+ }
+
+ /**
+ * Returns the attribute class for this attribute.
+ *
+ * @return the attribute class
+ */
+ public String getAttributeClass()
+ {
+ return _attributeClass;
+ }
+
+ /**
+ * Sets the description of this attribute.
+ *
+ * @param description the attribute description
+ */
+ public void setDescription(
+ String description)
+ {
+ _description = description;
+ }
+
+ /**
+ * Returns the description of this attribute.
+ *
+ * @return the attribute description
+ */
+ public String getDescription()
+ {
+ return _description;
+ }
+
+ /**
+ * Sets the default value of this attribute.
+ *
+ * @param defaultValue the attribute default value
+ */
+ public void setDefaultValue(
+ String defaultValue)
+ {
+ _defaultValue = defaultValue;
+ }
+
+ /**
+ * Returns the default value of this attribute.
+ *
+ * @return the attribute default value
+ */
+ public String getDefaultValue()
+ {
+ return _defaultValue;
+ }
+
+ /**
+ * Sets the alternative class for this property.
+ *
+ * @param alternateClass the alternative class
+ */
+ public void setAlternateClass(
+ String alternateClass)
+ {
+ _alternateClass = alternateClass;
+ }
+
+ /**
+ * Returns the alternative class for this property.
+ *
+ * @return the alternative class
+ */
+ public String getAlternateClass()
+ {
+ return _alternateClass;
+ }
+
+ /**
+ * Sets the method binding signature of this property.
+ *
+ * @param signature the method binding signature of this property
+ */
+ public void setMethodBindingSignature(
+ MethodSignatureBean signature)
+ {
+ _signature = signature;
+ }
+
+ /**
+ * Returns the method binding signature of this property.
+ *
+ * @return the method binding signature of this property
+ */
+ public MethodSignatureBean getMethodBindingSignature()
+ {
+ return _signature;
+ }
+
+ /**
+ * Sets the virtual flag of this property.
+ *
+ * @param virtual the property required flag
+ */
+ public void setVirtual(
+ boolean virtual)
+ {
+ _virtual = virtual;
+ }
+
+ /**
+ * Returns virtual flag of this property.
+ *
+ * @return the property virtual flag
+ */
+ public boolean isVirtual()
+ {
+ return _virtual;
+ }
+
+ public int compareTo(Object o)
+ {
+ if(o instanceof AttributeBean)
+ {
+ AttributeBean attr = (AttributeBean)o;
+ return _attributeName.compareTo(attr._attributeName);
+ }
+ else
+ {
+ return 1;
+ }
+ }
+
+ private String _attributeName;
+ private String _attributeClass;
+ private String[] _attributeClassParameters;
+ private String _description;
+ private String _defaultValue;
+ private String _alternateClass;
+ private boolean _virtual;
+ private MethodSignatureBean _signature;
+
+ static private final Pattern _GENERIC_TYPE = Pattern.compile("([^<]+)<(.+)>");
+ static private final String[] _EMPTY_ARRAY = new String[0];
+}
Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/AttributeBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java?rev=425260&r1=425259&r2=425260&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java (original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java Mon Jul 24 19:17:31 2006
@@ -13,984 +13,984 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-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;
-
+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;
+
import org.apache.myfaces.trinidadbuild.plugin.faces.util.CompoundIterator;
-
-/**
- * ComponentBean is a Java representation of the faces-config component
- * XML element.
- */
-public class ComponentBean extends ObjectBean
-{
- /**
- * Creates a new ComponentBean.
- */
- public ComponentBean()
- {
- _properties = new LinkedHashMap();
- _facets = new LinkedHashMap();
- _events = new LinkedHashMap();
- }
-
- /**
- * Sets the UIX2 local name for this component.
- *
- * @param localName the local name
- *
- * @deprecated remove when "ui" package is gone
- */
- public void setLocalName(
- String localName)
- {
- _localName = localName;
- }
-
- /**
- * Returns the UIX2 local name for this component.
- *
- * @return the local name
- */
- public String getLocalName()
- {
- return _localName;
- }
-
- /**
- * Sets the UIX2 node class for this component.
- *
- * @param nodeClass the node class
- *
- * @deprecated remove when "ui" package is gone
- */
- public void setNodeClass(
- String nodeClass)
- {
- _nodeClass = nodeClass;
- }
-
- /**
- * Returns the UIX2 node class for this component.
- *
- * @return the node class
- */
- public String getNodeClass()
- {
- return _nodeClass;
- }
-
- /**
- * Sets the component type for this component.
- *
- * @param componentType the component type
- */
- public void setComponentType(
- String componentType)
- {
- _componentType = componentType;
- }
-
- /**
- * Returns the component type for this component.
- *
- * @return the component type
- */
- public String getComponentType()
- {
- return _componentType;
- }
-
- /**
- * Sets the component family for this component.
- *
- * @param componentFamily the component family
- */
- public void setComponentFamily(
- String componentFamily)
- {
- _componentFamily = componentFamily;
- }
-
- /**
- * Returns the component family for this component.
- *
- * @return the component family
- */
- public String getComponentFamily()
- {
- return _componentFamily;
- }
-
- /**
- * Returns true if the component family exists for this component.
- *
- * @return true if the component family exists,
- * false otherwise
- */
- public boolean hasComponentFamily()
- {
- return (_componentFamily != null);
- }
-
- /**
- * Sets the component class for this component.
- *
- * @param componentClass the component class
- */
- public void setComponentClass(
- String componentClass)
- {
- _componentClass = componentClass;
- }
-
- /**
- * Returns the component class for this component.
- *
- * @return the component class
- */
- public String getComponentClass()
- {
- return _componentClass;
- }
-
- /**
- * Sets the description of this property.
- *
- * @param description the property description
- */
- public void setDescription(
- String description)
- {
- _description = description;
- }
-
- /**
- * Returns the description of this property.
- *
- * @return the property description
- */
- public String getDescription()
- {
- return _description;
- }
-
- /**
- * Sets the long description of this property.
- *
- * @param longDescription the long property description
- */
- public void setLongDescription(
- String longDescription)
- {
- _longDescription = longDescription;
- }
-
- /**
- * Returns the long description of this property.
- *
- * @return the long property description
- */
- public String getLongDescription()
- {
- return _longDescription;
- }
-
- /**
- * Sets the JSP tag handler class for this component.
- *
- * @param tagClass the JSP tag handler class
- */
- public void setTagClass(
- String tagClass)
- {
- _tagClass = tagClass;
- }
-
- /**
- * Returns the JSP tag handler class for this component.
- *
- * @return the JSP tag handler class
- */
- public String getTagClass()
- {
- return _tagClass;
- }
-
- /**
- * Returns the JSP tag name for this component.
- *
- * @return the JSP tag name
- */
- public QName getTagName()
- {
- return _tagName;
- }
-
- /**
- * Sets the JSP tag name for this component.
- *
- * @param tagName the JSP tag name
- */
- public void setTagName(
- QName tagName)
- {
- _tagName = tagName;
- }
-
- /**
- * Sets the namingContainer flag of this property.
- *
- * @param namingContainer the component namingContainer flag
- */
- public void setNamingContainer(
- boolean namingContainer)
- {
- _namingContainer = namingContainer;
- }
-
- /**
- * Returns namingContainer flag of this component.
- *
- * @return the component namingContainer flag
- */
- public boolean isNamingContainer()
- {
- return _namingContainer;
- }
-
- /**
- * Sets the component supertype for this component.
- *
- * @param componentSupertype the component super type
- */
- public void setComponentSupertype(
- String componentSupertype)
- {
- _componentSupertype = componentSupertype;
- }
-
- /**
- * Returns the component supertype for this component.
- *
- * @return the component supertype
- */
- public String getComponentSupertype()
- {
- return _componentSupertype;
- }
-
- /**
- * Sets the component super class for this component.
- *
- * @param componentSuperclass the component super class
- */
- public void setComponentSuperclass(
- String componentSuperclass)
- {
- _componentSuperclass = componentSuperclass;
- }
-
- /**
- * Returns the component super class for this component.
- *
- * @return the component super class
- */
- public String getComponentSuperclass()
- {
- return _componentSuperclass;
- }
-
- /**
- * Sets the renderer type for this component.
- *
- * @param rendererType the renderer type
- */
- public void setRendererType(
- String rendererType)
- {
- _rendererType = rendererType;
- }
-
- /**
- * Returns the renderer type for this component.
- *
- * @return the renderer type
- */
- public String getRendererType()
- {
- return _rendererType;
- }
-
- /**
- * Sets the peer type for this component.
- *
- * @param peerType the peer type
- */
- public void setPeerType(
- String peerType)
- {
- _peerType = peerType;
- }
-
- /**
- * Returns the peer type for this component.
- *
- * @return the peer type
- */
- public String getPeerType()
- {
- return _peerType;
- }
-
- /**
- * Returns the default renderer type for this component.
- *
- * @return the default renderer type
- */
- public String getDefaultRendererType()
- {
- ComponentBean parent = resolveSupertype();
- return (parent != null) ? parent.findRendererType() : null;
- }
-
- /**
- * Returns the default peer type for this component.
- *
- * @return the default peer type
- */
- public String getDefaultPeerType()
- {
- ComponentBean parent = resolveSupertype();
- return (parent != null) ? parent.findPeerType() : null;
- }
-
- /**
- * Adds a property to this component.
- *
- * @param property the property to add
- */
- public void addProperty(
- PropertyBean property)
- {
- _properties.put(property.getPropertyName(), property);
- }
-
- /**
- * Returns the property for this property name.
- *
- * @param propertyName the property name to find
- */
- public PropertyBean findProperty(
- String propertyName)
- {
- return (PropertyBean)_properties.get(propertyName);
- }
-
- /**
- * Returns the property for this property name.
- *
- * @param propertyName the property name to find
- */
- public PropertyBean findProperty(
- String propertyName,
- boolean flatten)
- {
- PropertyBean prop = findProperty(propertyName);
- if (prop == null && flatten)
- {
- ComponentBean parent = resolveSupertype();
- if (parent != null)
- prop = parent.findProperty(propertyName, flatten);
- }
-
- return prop;
- }
-
-
- /**
- * Returns true if this component has any properties.
- *
- * @return true if this component has any properties,
- * false otherwise
- */
- public boolean hasProperties()
- {
- return hasProperties(false);
- }
-
- /**
- * Returns true if this component or any component supertype
- * has any properties.
- *
- * @return true if this component or any supertype has any properties,
- * false otherwise
- */
- public boolean hasProperties(
- boolean flatten)
- {
- boolean hasProperties = !_properties.isEmpty();
-
- if (!hasProperties && flatten)
- {
- ComponentBean parent = resolveSupertype();
- if (parent != null)
- hasProperties |= parent.hasProperties(flatten);
- }
-
- return hasProperties;
- }
-
- /**
- * Returns an iterator for all properties on this component only.
- *
- * @return the property iterator
- */
- public Iterator properties()
- {
- return _properties.values().iterator();
- }
-
- /**
- * Returns an iterator for properties on this component.
- *
- * @param flatten true if the iterator should be a combined list of
- * properties of this component and its supertype,
- * false otherwise
- *
- * @return the property iterator
- */
- public Iterator properties(
- boolean flatten)
- {
- Iterator properties = properties();
- if (flatten)
- {
- ComponentBean parent = resolveSupertype();
- if (parent != null)
- properties = new CompoundIterator(parent.properties(true), properties);
- }
- return properties;
- }
-
- /**
- * Adds a facet to this component.
- *
- * @param facet the facet to add
- */
- public void addFacet(
- FacetBean facet)
- {
- _facets.put(facet.getFacetName(), facet);
- }
-
- /**
- * Returns the facet for this facet name.
- *
- * @param facetName the facet name to find
- */
- public FacetBean findFacet(
- String facetName)
- {
- return (FacetBean)_facets.get(facetName);
- }
-
-
- public FacetBean findFacet(
- String facetName,
- boolean flatten)
- {
- FacetBean facet = findFacet(facetName);
- if (facet == null && flatten)
- {
- ComponentBean parent = resolveSupertype();
- if (parent != null)
- facet = parent.findFacet(facetName, flatten);
- }
-
- return facet;
- }
-
- /**
- * Returns true if this component has any facets.
- *
- * @return true if this component has any facets,
- * false otherwise
- */
- public boolean hasFacets()
- {
- return hasFacets(false);
- }
-
- /**
- * Returns true if this component or any component supertype
- * has any facets.
- *
- * @return true if this component or any supertype has any facets,
- * false otherwise
- */
- public boolean hasFacets(
- boolean flatten)
- {
- boolean hasFacets = !_facets.isEmpty();
-
- if (!hasFacets && flatten)
- {
- ComponentBean parent = resolveSupertype();
- if (parent != null)
- hasFacets |= parent.hasFacets(flatten);
- }
-
- return hasFacets;
- }
-
- /**
- * Returns an iterator for all facets on this component only.
- *
- * @return the facet iterator
- */
- public Iterator facets()
- {
- return _facets.values().iterator();
- }
-
- /**
- * Returns an iterator for facets on this component.
- *
- * @param flatten true if the iterator should be a combined list of
- * facets of this component and its supertype,
- * false otherwise
- *
- * @return the facet iterator
- */
- public Iterator facets(
- boolean flatten)
- {
- Iterator facets = facets();
- if (flatten)
- {
- ComponentBean parent = resolveSupertype();
- if (parent != null)
- facets = new CompoundIterator(facets, parent.facets(true));
- }
- return facets;
- }
-
- /**
- * Specifies if the component can have children.
- *
- * @param children true if the component can have children.
- * false otherwise
- */
- public void setChildren(
- boolean children)
- {
- _children = children;
- }
-
-
- /**
- * Returns true if the component can have children.
- *
- * @return true if the component can have children.
- * false otherwise
- */
- public boolean hasChildren()
- {
- return _children;
- }
-
- /**
- * Adds a Java Language class modifier to the component class.
- *
- * @param modifier the modifier to be added
- */
- public void addComponentClassModifier(
- int modifier)
- {
- _componentClassModifiers |= modifier;
- }
-
- /**
- * Returns the Java Language class modifiers for the component class.
- * By default, these modifiers include Modifier.PUBLIC.
- *
- * @return the Java Language class modifiers for the component class
- */
- public int getComponentClassModifiers()
- {
- int modifiers = _componentClassModifiers;
-
- if (!Modifier.isPrivate(modifiers) &&
- !Modifier.isProtected(modifiers) &&
- !Modifier.isPublic(modifiers))
- {
- modifiers |= Modifier.PUBLIC;
- }
-
- return modifiers;
- }
-
- public void parseComponentClassModifier(
- String modifier)
- {
- addComponentClassModifier(_parseModifier(modifier));
- }
-
- public void parseTagClassModifier(
- String modifier)
- {
- addTagClassModifier(_parseModifier(modifier));
- }
-
- private int _parseModifier(
- String text)
- {
- if ("public".equals(text))
- return Modifier.PUBLIC;
- else if ("protected".equals(text))
- return Modifier.PROTECTED;
- else if ("private".equals(text))
- return Modifier.PRIVATE;
- else if ("abstract".equals(text))
- return Modifier.ABSTRACT;
- else if ("final".equals(text))
- return Modifier.FINAL;
-
- throw new IllegalArgumentException("Unrecognized modifier: " + text);
- }
-
- /**
- * Adds a Java Language class modifier to the tag class.
- *
- * @param modifier the modifier to be added
- */
- public void addTagClassModifier(
- int modifier)
- {
- _tagClassModifiers |= modifier;
- }
-
- /**
- * Returns the Java Language class modifiers for the tag class.
- * By default, these modifiers include Modifier.PUBLIC.
- *
- * @return the Java Language class modifiers for the tag class
- */
- public int getTagClassModifiers()
- {
- int modifiers = _tagClassModifiers;
-
- if (!Modifier.isPrivate(modifiers) &&
- !Modifier.isProtected(modifiers) &&
- !Modifier.isPublic(modifiers))
- {
- modifiers |= Modifier.PUBLIC;
- }
-
- return modifiers;
- }
-
- /**
- * Adds an event to this component.
- *
- * @param eventRef the event to add
- */
- public void addEvent(
- EventRefBean eventRef)
- {
- if (eventRef.getEventType() == null)
- {
- _LOG.warning("Missing event type in component \"" +
- _componentType + "\"");
- }
- else
- {
- _events.put(eventRef.getEventType(), eventRef);
- }
- }
-
- /**
- * Returns true if this component has any events.
- *
- * @return true if this component has any events,
- * false otherwise
- */
- public boolean hasEvents()
- {
- return hasEvents(false);
- }
-
- /**
- * Returns true if this component or any component supertype
- * has any events.
- *
- * @return true if this component or any supertype has any events,
- * false otherwise
- */
- public boolean hasEvents(
- boolean flatten)
- {
- boolean hasEvents = !_events.isEmpty();
-
- if (!hasEvents && flatten)
- {
- ComponentBean parent = resolveSupertype();
- if (parent != null)
- hasEvents |= parent.hasEvents(flatten);
- }
-
- return hasEvents;
- }
-
- /**
- * Returns the event for this event name.
- *
- * @param eventName the event name to find
- */
- public EventBean findEvent(
- String eventName)
- {
- return (EventBean)_events.get(eventName);
- }
-
- public EventBean findEvent(
- String eventName,
- boolean flatten)
- {
- EventBean event = findEvent(eventName);
- if (event == null && flatten)
- {
- ComponentBean parent = resolveSupertype();
- if (parent != null)
- event = parent.findEvent(eventName, flatten);
- }
-
- return event;
- }
-
-
- /**
- * Returns an iterator for all events on this component only.
- *
- * @return the event iterator
- */
- public Iterator events()
- {
- return _events.values().iterator();
- }
-
- /**
- * Returns an iterator for events on this component.
- *
- * @param flatten true if the iterator should be a combined list of
- * events of this component and its supertype,
- * false otherwise
- *
- * @return the event iterator
- */
- public Iterator events(
- boolean flatten)
- {
- Iterator events = events();
- if (flatten)
- {
- ComponentBean parent = resolveSupertype();
- if (parent != null)
- events = new CompoundIterator(events, parent.events(true));
- }
- return events;
- }
-
- /**
- * Finds the component family in the component inheritance
- * hierarchy.
- *
- * @return the component family
- */
- public String findComponentFamily()
- {
- if (_componentFamily != null)
- return _componentFamily;
-
- ComponentBean parent = resolveSupertype();
- return (parent != null) ? parent.findComponentFamily() : null;
- }
-
- /**
- * Finds the behavioral component component inheritance
- * hierarchy.
- *
- * @return the behavioral component
- */
- public ComponentBean findBehavioralComponent()
- {
- if (_componentFamily != null)
- return this;
-
- ComponentBean component = resolveSupertype();
- return (component != null) ? component.findBehavioralComponent() : this;
- }
-
- /**
- * Finds the renderer type in the component inheritance
- * hierarchy.
- *
- * @return the renderer type
- */
- public String findRendererType()
- {
- if (_rendererType != null)
- return _rendererType;
-
- ComponentBean parent = resolveSupertype();
- return (parent != null) ? parent.findRendererType() : null;
- }
-
- /**
- * Finds the peer type in the component inheritance
- * hierarchy.
- *
- * @return the peer type
- */
- public String findPeerType()
- {
- if (_peerType != null)
- return _peerType;
-
- ComponentBean parent = resolveSupertype();
- return (parent != null) ? parent.findPeerType() : null;
- }
-
- /**
- * Finds the component superclass in the component inheritance
- * hierarchy.
- *
- * @return the component superclass
- */
- public String findComponentSuperclass()
- {
- if (_componentSuperclass != null)
- return _componentSuperclass;
-
- ComponentBean parent = resolveSupertype();
- return (parent != null) ? parent.findComponentClass()
- : _ADF_FACES_COMPONENT_BASE;
- }
-
- /**
- * Finds the tag superclass in the component inheritance
- * hierarchy.
- *
- * @return the tag superclass
- */
- public String findJspTagSuperclass()
- {
- if (_tagSuperclass != null)
- return _tagSuperclass;
-
- ComponentBean parent = resolveSupertype();
- return (parent != null) ? parent.findJspTagClass()
- : _ADF_FACES_COMPONENT_TAG;
- }
-
- /**
- * Returns the component supertype instance.
- *
- * @return the component supertype instance
- */
- public ComponentBean resolveSupertype()
- {
- if (_componentSupertype == null)
- return null;
-
- FacesConfigBean owner = getOwner();
- return (owner != null) ? owner.findComponent(_componentSupertype) : null;
- }
-
- /**
- * Finds the component class in the component inheritance
- * hierarchy.
- *
- * @return the component class
- */
- protected String findComponentClass()
- {
- if (_componentClass != null)
- return _componentClass;
-
- ComponentBean parent = resolveSupertype();
- return (parent != null) ? parent.findComponentClass() : null;
- }
-
- /**
- * Finds the tag class in the component inheritance
- * hierarchy.
- *
- * @return the tag class
- */
- protected String findJspTagClass()
- {
- if (_tagClass != null)
- return _tagClass;
-
- ComponentBean parent = resolveSupertype();
- return (parent != null) ? parent.findJspTagClass() : null;
- }
-
- /**
- * Attaches the component and all event references.
- *
- * @param owner the faces config owner
- */
- protected void attach(
- FacesConfigBean owner)
- {
- super.attach(owner);
- Iterator events = events(false);
- while (events.hasNext())
- {
- EventRefBean eventRef = (EventRefBean)events.next();
- eventRef.attach(owner);
- }
- }
-
- private String _description;
- private String _longDescription;
- private String _componentType;
- private String _componentFamily;
- private String _componentClass;
- private String _componentSupertype;
- private String _componentSuperclass;
- private String _rendererType;
- private String _peerType;
- private QName _tagName;
- private String _tagClass;
- private String _tagSuperclass;
- private String _localName;
- private String _nodeClass;
- private boolean _namingContainer;
- private boolean _children = true;
- private Map _properties;
- private Map _facets;
- private Map _events;
- private int _componentClassModifiers;
- private int _tagClassModifiers;
-
-
- static private final String _ADF_FACES_COMPONENT_BASE =
- "org.apache.myfaces.adf.component.UIXComponentBase";
-
- static private final String _ADF_FACES_COMPONENT_TAG =
- "org.apache.myfaces.adf.webapp.UIXComponentTag";
-
- static private final Logger _LOG = Logger.getLogger(ComponentBean.class.getName());
+
+/**
+ * ComponentBean is a Java representation of the faces-config component
+ * XML element.
+ */
+public class ComponentBean extends ObjectBean
+{
+ /**
+ * Creates a new ComponentBean.
+ */
+ public ComponentBean()
+ {
+ _properties = new LinkedHashMap();
+ _facets = new LinkedHashMap();
+ _events = new LinkedHashMap();
+ }
+
+ /**
+ * Sets the UIX2 local name for this component.
+ *
+ * @param localName the local name
+ *
+ * @deprecated remove when "ui" package is gone
+ */
+ public void setLocalName(
+ String localName)
+ {
+ _localName = localName;
+ }
+
+ /**
+ * Returns the UIX2 local name for this component.
+ *
+ * @return the local name
+ */
+ public String getLocalName()
+ {
+ return _localName;
+ }
+
+ /**
+ * Sets the UIX2 node class for this component.
+ *
+ * @param nodeClass the node class
+ *
+ * @deprecated remove when "ui" package is gone
+ */
+ public void setNodeClass(
+ String nodeClass)
+ {
+ _nodeClass = nodeClass;
+ }
+
+ /**
+ * Returns the UIX2 node class for this component.
+ *
+ * @return the node class
+ */
+ public String getNodeClass()
+ {
+ return _nodeClass;
+ }
+
+ /**
+ * Sets the component type for this component.
+ *
+ * @param componentType the component type
+ */
+ public void setComponentType(
+ String componentType)
+ {
+ _componentType = componentType;
+ }
+
+ /**
+ * Returns the component type for this component.
+ *
+ * @return the component type
+ */
+ public String getComponentType()
+ {
+ return _componentType;
+ }
+
+ /**
+ * Sets the component family for this component.
+ *
+ * @param componentFamily the component family
+ */
+ public void setComponentFamily(
+ String componentFamily)
+ {
+ _componentFamily = componentFamily;
+ }
+
+ /**
+ * Returns the component family for this component.
+ *
+ * @return the component family
+ */
+ public String getComponentFamily()
+ {
+ return _componentFamily;
+ }
+
+ /**
+ * Returns true if the component family exists for this component.
+ *
+ * @return true if the component family exists,
+ * false otherwise
+ */
+ public boolean hasComponentFamily()
+ {
+ return (_componentFamily != null);
+ }
+
+ /**
+ * Sets the component class for this component.
+ *
+ * @param componentClass the component class
+ */
+ public void setComponentClass(
+ String componentClass)
+ {
+ _componentClass = componentClass;
+ }
+
+ /**
+ * Returns the component class for this component.
+ *
+ * @return the component class
+ */
+ public String getComponentClass()
+ {
+ return _componentClass;
+ }
+
+ /**
+ * Sets the description of this property.
+ *
+ * @param description the property description
+ */
+ public void setDescription(
+ String description)
+ {
+ _description = description;
+ }
+
+ /**
+ * Returns the description of this property.
+ *
+ * @return the property description
+ */
+ public String getDescription()
+ {
+ return _description;
+ }
+
+ /**
+ * Sets the long description of this property.
+ *
+ * @param longDescription the long property description
+ */
+ public void setLongDescription(
+ String longDescription)
+ {
+ _longDescription = longDescription;
+ }
+
+ /**
+ * Returns the long description of this property.
+ *
+ * @return the long property description
+ */
+ public String getLongDescription()
+ {
+ return _longDescription;
+ }
+
+ /**
+ * Sets the JSP tag handler class for this component.
+ *
+ * @param tagClass the JSP tag handler class
+ */
+ public void setTagClass(
+ String tagClass)
+ {
+ _tagClass = tagClass;
+ }
+
+ /**
+ * Returns the JSP tag handler class for this component.
+ *
+ * @return the JSP tag handler class
+ */
+ public String getTagClass()
+ {
+ return _tagClass;
+ }
+
+ /**
+ * Returns the JSP tag name for this component.
+ *
+ * @return the JSP tag name
+ */
+ public QName getTagName()
+ {
+ return _tagName;
+ }
+
+ /**
+ * Sets the JSP tag name for this component.
+ *
+ * @param tagName the JSP tag name
+ */
+ public void setTagName(
+ QName tagName)
+ {
+ _tagName = tagName;
+ }
+
+ /**
+ * Sets the namingContainer flag of this property.
+ *
+ * @param namingContainer the component namingContainer flag
+ */
+ public void setNamingContainer(
+ boolean namingContainer)
+ {
+ _namingContainer = namingContainer;
+ }
+
+ /**
+ * Returns namingContainer flag of this component.
+ *
+ * @return the component namingContainer flag
+ */
+ public boolean isNamingContainer()
+ {
+ return _namingContainer;
+ }
+
+ /**
+ * Sets the component supertype for this component.
+ *
+ * @param componentSupertype the component super type
+ */
+ public void setComponentSupertype(
+ String componentSupertype)
+ {
+ _componentSupertype = componentSupertype;
+ }
+
+ /**
+ * Returns the component supertype for this component.
+ *
+ * @return the component supertype
+ */
+ public String getComponentSupertype()
+ {
+ return _componentSupertype;
+ }
+
+ /**
+ * Sets the component super class for this component.
+ *
+ * @param componentSuperclass the component super class
+ */
+ public void setComponentSuperclass(
+ String componentSuperclass)
+ {
+ _componentSuperclass = componentSuperclass;
+ }
+
+ /**
+ * Returns the component super class for this component.
+ *
+ * @return the component super class
+ */
+ public String getComponentSuperclass()
+ {
+ return _componentSuperclass;
+ }
+
+ /**
+ * Sets the renderer type for this component.
+ *
+ * @param rendererType the renderer type
+ */
+ public void setRendererType(
+ String rendererType)
+ {
+ _rendererType = rendererType;
+ }
+
+ /**
+ * Returns the renderer type for this component.
+ *
+ * @return the renderer type
+ */
+ public String getRendererType()
+ {
+ return _rendererType;
+ }
+
+ /**
+ * Sets the peer type for this component.
+ *
+ * @param peerType the peer type
+ */
+ public void setPeerType(
+ String peerType)
+ {
+ _peerType = peerType;
+ }
+
+ /**
+ * Returns the peer type for this component.
+ *
+ * @return the peer type
+ */
+ public String getPeerType()
+ {
+ return _peerType;
+ }
+
+ /**
+ * Returns the default renderer type for this component.
+ *
+ * @return the default renderer type
+ */
+ public String getDefaultRendererType()
+ {
+ ComponentBean parent = resolveSupertype();
+ return (parent != null) ? parent.findRendererType() : null;
+ }
+
+ /**
+ * Returns the default peer type for this component.
+ *
+ * @return the default peer type
+ */
+ public String getDefaultPeerType()
+ {
+ ComponentBean parent = resolveSupertype();
+ return (parent != null) ? parent.findPeerType() : null;
+ }
+
+ /**
+ * Adds a property to this component.
+ *
+ * @param property the property to add
+ */
+ public void addProperty(
+ PropertyBean property)
+ {
+ _properties.put(property.getPropertyName(), property);
+ }
+
+ /**
+ * Returns the property for this property name.
+ *
+ * @param propertyName the property name to find
+ */
+ public PropertyBean findProperty(
+ String propertyName)
+ {
+ return (PropertyBean)_properties.get(propertyName);
+ }
+
+ /**
+ * Returns the property for this property name.
+ *
+ * @param propertyName the property name to find
+ */
+ public PropertyBean findProperty(
+ String propertyName,
+ boolean flatten)
+ {
+ PropertyBean prop = findProperty(propertyName);
+ if (prop == null && flatten)
+ {
+ ComponentBean parent = resolveSupertype();
+ if (parent != null)
+ prop = parent.findProperty(propertyName, flatten);
+ }
+
+ return prop;
+ }
+
+
+ /**
+ * Returns true if this component has any properties.
+ *
+ * @return true if this component has any properties,
+ * false otherwise
+ */
+ public boolean hasProperties()
+ {
+ return hasProperties(false);
+ }
+
+ /**
+ * Returns true if this component or any component supertype
+ * has any properties.
+ *
+ * @return true if this component or any supertype has any properties,
+ * false otherwise
+ */
+ public boolean hasProperties(
+ boolean flatten)
+ {
+ boolean hasProperties = !_properties.isEmpty();
+
+ if (!hasProperties && flatten)
+ {
+ ComponentBean parent = resolveSupertype();
+ if (parent != null)
+ hasProperties |= parent.hasProperties(flatten);
+ }
+
+ return hasProperties;
+ }
+
+ /**
+ * Returns an iterator for all properties on this component only.
+ *
+ * @return the property iterator
+ */
+ public Iterator properties()
+ {
+ return _properties.values().iterator();
+ }
+
+ /**
+ * Returns an iterator for properties on this component.
+ *
+ * @param flatten true if the iterator should be a combined list of
+ * properties of this component and its supertype,
+ * false otherwise
+ *
+ * @return the property iterator
+ */
+ public Iterator properties(
+ boolean flatten)
+ {
+ Iterator properties = properties();
+ if (flatten)
+ {
+ ComponentBean parent = resolveSupertype();
+ if (parent != null)
+ properties = new CompoundIterator(parent.properties(true), properties);
+ }
+ return properties;
+ }
+
+ /**
+ * Adds a facet to this component.
+ *
+ * @param facet the facet to add
+ */
+ public void addFacet(
+ FacetBean facet)
+ {
+ _facets.put(facet.getFacetName(), facet);
+ }
+
+ /**
+ * Returns the facet for this facet name.
+ *
+ * @param facetName the facet name to find
+ */
+ public FacetBean findFacet(
+ String facetName)
+ {
+ return (FacetBean)_facets.get(facetName);
+ }
+
+
+ public FacetBean findFacet(
+ String facetName,
+ boolean flatten)
+ {
+ FacetBean facet = findFacet(facetName);
+ if (facet == null && flatten)
+ {
+ ComponentBean parent = resolveSupertype();
+ if (parent != null)
+ facet = parent.findFacet(facetName, flatten);
+ }
+
+ return facet;
+ }
+
+ /**
+ * Returns true if this component has any facets.
+ *
+ * @return true if this component has any facets,
+ * false otherwise
+ */
+ public boolean hasFacets()
+ {
+ return hasFacets(false);
+ }
+
+ /**
+ * Returns true if this component or any component supertype
+ * has any facets.
+ *
+ * @return true if this component or any supertype has any facets,
+ * false otherwise
+ */
+ public boolean hasFacets(
+ boolean flatten)
+ {
+ boolean hasFacets = !_facets.isEmpty();
+
+ if (!hasFacets && flatten)
+ {
+ ComponentBean parent = resolveSupertype();
+ if (parent != null)
+ hasFacets |= parent.hasFacets(flatten);
+ }
+
+ return hasFacets;
+ }
+
+ /**
+ * Returns an iterator for all facets on this component only.
+ *
+ * @return the facet iterator
+ */
+ public Iterator facets()
+ {
+ return _facets.values().iterator();
+ }
+
+ /**
+ * Returns an iterator for facets on this component.
+ *
+ * @param flatten true if the iterator should be a combined list of
+ * facets of this component and its supertype,
+ * false otherwise
+ *
+ * @return the facet iterator
+ */
+ public Iterator facets(
+ boolean flatten)
+ {
+ Iterator facets = facets();
+ if (flatten)
+ {
+ ComponentBean parent = resolveSupertype();
+ if (parent != null)
+ facets = new CompoundIterator(facets, parent.facets(true));
+ }
+ return facets;
+ }
+
+ /**
+ * Specifies if the component can have children.
+ *
+ * @param children true if the component can have children.
+ * false otherwise
+ */
+ public void setChildren(
+ boolean children)
+ {
+ _children = children;
+ }
+
+
+ /**
+ * Returns true if the component can have children.
+ *
+ * @return true if the component can have children.
+ * false otherwise
+ */
+ public boolean hasChildren()
+ {
+ return _children;
+ }
+
+ /**
+ * Adds a Java Language class modifier to the component class.
+ *
+ * @param modifier the modifier to be added
+ */
+ public void addComponentClassModifier(
+ int modifier)
+ {
+ _componentClassModifiers |= modifier;
+ }
+
+ /**
+ * Returns the Java Language class modifiers for the component class.
+ * By default, these modifiers include Modifier.PUBLIC.
+ *
+ * @return the Java Language class modifiers for the component class
+ */
+ public int getComponentClassModifiers()
+ {
+ int modifiers = _componentClassModifiers;
+
+ if (!Modifier.isPrivate(modifiers) &&
+ !Modifier.isProtected(modifiers) &&
+ !Modifier.isPublic(modifiers))
+ {
+ modifiers |= Modifier.PUBLIC;
+ }
+
+ return modifiers;
+ }
+
+ public void parseComponentClassModifier(
+ String modifier)
+ {
+ addComponentClassModifier(_parseModifier(modifier));
+ }
+
+ public void parseTagClassModifier(
+ String modifier)
+ {
+ addTagClassModifier(_parseModifier(modifier));
+ }
+
+ private int _parseModifier(
+ String text)
+ {
+ if ("public".equals(text))
+ return Modifier.PUBLIC;
+ else if ("protected".equals(text))
+ return Modifier.PROTECTED;
+ else if ("private".equals(text))
+ return Modifier.PRIVATE;
+ else if ("abstract".equals(text))
+ return Modifier.ABSTRACT;
+ else if ("final".equals(text))
+ return Modifier.FINAL;
+
+ throw new IllegalArgumentException("Unrecognized modifier: " + text);
+ }
+
+ /**
+ * Adds a Java Language class modifier to the tag class.
+ *
+ * @param modifier the modifier to be added
+ */
+ public void addTagClassModifier(
+ int modifier)
+ {
+ _tagClassModifiers |= modifier;
+ }
+
+ /**
+ * Returns the Java Language class modifiers for the tag class.
+ * By default, these modifiers include Modifier.PUBLIC.
+ *
+ * @return the Java Language class modifiers for the tag class
+ */
+ public int getTagClassModifiers()
+ {
+ int modifiers = _tagClassModifiers;
+
+ if (!Modifier.isPrivate(modifiers) &&
+ !Modifier.isProtected(modifiers) &&
+ !Modifier.isPublic(modifiers))
+ {
+ modifiers |= Modifier.PUBLIC;
+ }
+
+ return modifiers;
+ }
+
+ /**
+ * Adds an event to this component.
+ *
+ * @param eventRef the event to add
+ */
+ public void addEvent(
+ EventRefBean eventRef)
+ {
+ if (eventRef.getEventType() == null)
+ {
+ _LOG.warning("Missing event type in component \"" +
+ _componentType + "\"");
+ }
+ else
+ {
+ _events.put(eventRef.getEventType(), eventRef);
+ }
+ }
+
+ /**
+ * Returns true if this component has any events.
+ *
+ * @return true if this component has any events,
+ * false otherwise
+ */
+ public boolean hasEvents()
+ {
+ return hasEvents(false);
+ }
+
+ /**
+ * Returns true if this component or any component supertype
+ * has any events.
+ *
+ * @return true if this component or any supertype has any events,
+ * false otherwise
+ */
+ public boolean hasEvents(
+ boolean flatten)
+ {
+ boolean hasEvents = !_events.isEmpty();
+
+ if (!hasEvents && flatten)
+ {
+ ComponentBean parent = resolveSupertype();
+ if (parent != null)
+ hasEvents |= parent.hasEvents(flatten);
+ }
+
+ return hasEvents;
+ }
+
+ /**
+ * Returns the event for this event name.
+ *
+ * @param eventName the event name to find
+ */
+ public EventBean findEvent(
+ String eventName)
+ {
+ return (EventBean)_events.get(eventName);
+ }
+
+ public EventBean findEvent(
+ String eventName,
+ boolean flatten)
+ {
+ EventBean event = findEvent(eventName);
+ if (event == null && flatten)
+ {
+ ComponentBean parent = resolveSupertype();
+ if (parent != null)
+ event = parent.findEvent(eventName, flatten);
+ }
+
+ return event;
+ }
+
+
+ /**
+ * Returns an iterator for all events on this component only.
+ *
+ * @return the event iterator
+ */
+ public Iterator events()
+ {
+ return _events.values().iterator();
+ }
+
+ /**
+ * Returns an iterator for events on this component.
+ *
+ * @param flatten true if the iterator should be a combined list of
+ * events of this component and its supertype,
+ * false otherwise
+ *
+ * @return the event iterator
+ */
+ public Iterator events(
+ boolean flatten)
+ {
+ Iterator events = events();
+ if (flatten)
+ {
+ ComponentBean parent = resolveSupertype();
+ if (parent != null)
+ events = new CompoundIterator(events, parent.events(true));
+ }
+ return events;
+ }
+
+ /**
+ * Finds the component family in the component inheritance
+ * hierarchy.
+ *
+ * @return the component family
+ */
+ public String findComponentFamily()
+ {
+ if (_componentFamily != null)
+ return _componentFamily;
+
+ ComponentBean parent = resolveSupertype();
+ return (parent != null) ? parent.findComponentFamily() : null;
+ }
+
+ /**
+ * Finds the behavioral component component inheritance
+ * hierarchy.
+ *
+ * @return the behavioral component
+ */
+ public ComponentBean findBehavioralComponent()
+ {
+ if (_componentFamily != null)
+ return this;
+
+ ComponentBean component = resolveSupertype();
+ return (component != null) ? component.findBehavioralComponent() : this;
+ }
+
+ /**
+ * Finds the renderer type in the component inheritance
+ * hierarchy.
+ *
+ * @return the renderer type
+ */
+ public String findRendererType()
+ {
+ if (_rendererType != null)
+ return _rendererType;
+
+ ComponentBean parent = resolveSupertype();
+ return (parent != null) ? parent.findRendererType() : null;
+ }
+
+ /**
+ * Finds the peer type in the component inheritance
+ * hierarchy.
+ *
+ * @return the peer type
+ */
+ public String findPeerType()
+ {
+ if (_peerType != null)
+ return _peerType;
+
+ ComponentBean parent = resolveSupertype();
+ return (parent != null) ? parent.findPeerType() : null;
+ }
+
+ /**
+ * Finds the component superclass in the component inheritance
+ * hierarchy.
+ *
+ * @return the component superclass
+ */
+ public String findComponentSuperclass()
+ {
+ if (_componentSuperclass != null)
+ return _componentSuperclass;
+
+ ComponentBean parent = resolveSupertype();
+ return (parent != null) ? parent.findComponentClass()
+ : _ADF_FACES_COMPONENT_BASE;
+ }
+
+ /**
+ * Finds the tag superclass in the component inheritance
+ * hierarchy.
+ *
+ * @return the tag superclass
+ */
+ public String findJspTagSuperclass()
+ {
+ if (_tagSuperclass != null)
+ return _tagSuperclass;
+
+ ComponentBean parent = resolveSupertype();
+ return (parent != null) ? parent.findJspTagClass()
+ : _ADF_FACES_COMPONENT_TAG;
+ }
+
+ /**
+ * Returns the component supertype instance.
+ *
+ * @return the component supertype instance
+ */
+ public ComponentBean resolveSupertype()
+ {
+ if (_componentSupertype == null)
+ return null;
+
+ FacesConfigBean owner = getOwner();
+ return (owner != null) ? owner.findComponent(_componentSupertype) : null;
+ }
+
+ /**
+ * Finds the component class in the component inheritance
+ * hierarchy.
+ *
+ * @return the component class
+ */
+ protected String findComponentClass()
+ {
+ if (_componentClass != null)
+ return _componentClass;
+
+ ComponentBean parent = resolveSupertype();
+ return (parent != null) ? parent.findComponentClass() : null;
+ }
+
+ /**
+ * Finds the tag class in the component inheritance
+ * hierarchy.
+ *
+ * @return the tag class
+ */
+ protected String findJspTagClass()
+ {
+ if (_tagClass != null)
+ return _tagClass;
+
+ ComponentBean parent = resolveSupertype();
+ return (parent != null) ? parent.findJspTagClass() : null;
+ }
+
+ /**
+ * Attaches the component and all event references.
+ *
+ * @param owner the faces config owner
+ */
+ protected void attach(
+ FacesConfigBean owner)
+ {
+ super.attach(owner);
+ Iterator events = events(false);
+ while (events.hasNext())
+ {
+ EventRefBean eventRef = (EventRefBean)events.next();
+ eventRef.attach(owner);
+ }
+ }
+
+ private String _description;
+ private String _longDescription;
+ private String _componentType;
+ private String _componentFamily;
+ private String _componentClass;
+ private String _componentSupertype;
+ private String _componentSuperclass;
+ private String _rendererType;
+ private String _peerType;
+ private QName _tagName;
+ private String _tagClass;
+ private String _tagSuperclass;
+ private String _localName;
+ private String _nodeClass;
+ private boolean _namingContainer;
+ private boolean _children = true;
+ private Map _properties;
+ private Map _facets;
+ private Map _events;
+ private int _componentClassModifiers;
+ private int _tagClassModifiers;
+
+
+ static private final String _ADF_FACES_COMPONENT_BASE =
+ "org.apache.myfaces.adf.component.UIXComponentBase";
+
+ static private final String _ADF_FACES_COMPONENT_TAG =
+ "org.apache.myfaces.adf.webapp.UIXComponentTag";
+
+ static private final Logger _LOG = Logger.getLogger(ComponentBean.class.getName());
}
Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java
------------------------------------------------------------------------------
svn:eol-style = native