JBoss Rich Faces SVN: r15245 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-08-21 07:22:33 -0400 (Fri, 21 Aug 2009)
New Revision: 15245
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_subTable.xml
Log:
https://jira.jboss.org/jira/browse/RF-7681 - the component description and identification parameters are reviewed;
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_subTable.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_subTable.xml 2009-08-21 09:27:25 UTC (rev 15244)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/rich_subTable.xml 2009-08-21 11:22:33 UTC (rev 15245)
@@ -56,39 +56,14 @@
</emphasis> tags. Ajax support is possible, because the component was created basing on the
<emphasis role="bold">
<property><a4j:repeat></property>
- </emphasis> component and as a result it could be partially updated with Ajax. <emphasis>
+ </emphasis> component and as a result it could be partially updated with Ajax. The <emphasis>
<property>"ajaxKeys"</property>
- </emphasis> attribute allows to define row keys that is updated after an Ajax request.</para>
+ </emphasis> attribute allows to define row keys which are updated after an Ajax request. You can find an example which demonstrate the usage of the
+ <emphasis>
+ <property>"ajaxKeys"</property>
+ </emphasis> attributes for data iteration components in the
+ <ulink url="http://www.jboss.org/community/wiki/UsingtheajaxKeysattributeforrichdataList">RichFaces Cookbook article</ulink>.</para>
- <para>Here is an example:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-
- <programlisting role="XML">...
-<rich:dataTable value="#{capitalsBean.capitals}" var="capitals">
- <rich:column>
- ...
- </rich:column>
- <rich:subTable value="#{capitals.details}" var="detail" ajaxKeys="#{bean.ajaxSet}" binding="#{bean.subtable}" id="subtable">
- <rich:column>
- ...
- </rich:column>
- </rich:subTable>
-</rich:dataTable>
-...
-<a4j:commandButton action="#{tableBean.action}" reRender="subtable"/>
-...
-</programlisting>
- <para> In the example <emphasis>
- <property>"reRender"</property>
- </emphasis> attribute contains value of <emphasis>
- <property>"id"</property>
- </emphasis> attribute for <emphasis role="bold">
- <property><rich:subTable></property>
- </emphasis> component. As a result the component is updated after an Ajax request.</para>
-
<para>The component allows to use <emphasis>
<property>"header"</property>
</emphasis> and <emphasis>
15 years, 4 months
JBoss Rich Faces SVN: r15244 - root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-21 05:27:25 -0400 (Fri, 21 Aug 2009)
New Revision: 15244
Modified:
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java
Log:
fix encoding issue under linux
Modified: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java 2009-08-21 01:29:55 UTC (rev 15243)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java 2009-08-21 09:27:25 UTC (rev 15244)
@@ -52,12 +52,12 @@
this.limitRender = this.getAttribute("limitRender");
}
- public void apply(FaceletContext f�ontext, UIComponent parent) throws IOException {
+ public void apply(FaceletContext fContext, UIComponent parent) throws IOException {
String eventName = getEventName();
if(!isWrapping()) {
- applyAttachedObject(f�ontext, parent, eventName);
+ applyAttachedObject(fContext, parent, eventName);
} else {
- this.nextHandler.apply(f�ontext, parent);
+ this.nextHandler.apply(fContext, parent);
}
}
15 years, 4 months
JBoss Rich Faces SVN: r15243 - in root/cdk/trunk/plugins: annotations/src/main/java/org/richfaces/cdk/annotations and 25 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-08-20 21:29:55 -0400 (Thu, 20 Aug 2009)
New Revision: 15243
Added:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/DisplayName.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Generate.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Icon.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Test.java
root/cdk/trunk/plugins/annotations/src/main/resources/
root/cdk/trunk/plugins/annotations/src/main/resources/META-INF/
root/cdk/trunk/plugins/annotations/src/main/resources/META-INF/cdk/
root/cdk/trunk/plugins/annotations/src/main/resources/META-INF/cdk/attributes/
root/cdk/trunk/plugins/annotations/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkError.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ModelValidator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ValidatorImpl.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Key.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelCollection.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RenderKit.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Searchable.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/SearchableCollection.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitable.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/CdkEntityResolver.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FragmentParser.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/Properties.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyAdapter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/package-info.java
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_5.xsd
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_1_2.xsd
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_client_1_2.xsd
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_1_2.xsd
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_2_0.xsd
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesuicomponent_2_0.xsd
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-partialresponse_2_0.xsd
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/xml.xsd
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestBase.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ComponentLibraryTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ModelBean.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/CdkResolverTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FragmentParserTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbMarshallTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbTestBase.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/fragment.xml
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/include.xml
Removed:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Verifier.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/VerifierImpl.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererKit.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbMarshallTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbTestBase.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/model/
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/resources/
Modified:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attributes.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/RendererClassGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/RendererTemplateParser.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCdkContext.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkContext.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Event.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/LibraryVisitor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Tag.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/CdkProcessorTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/freemarker/FreeMarkerRendererTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/Child.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/Id.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/Root.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/package-info.java
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
Log:
Start XML parser implementation.
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,56 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">Attribute alias. CDK will generate getters/setters for that alias wich delegate calls to original attribute methods.
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target({ElementType.METHOD,ElementType.FIELD})
+@Inherited
+public @interface Alias {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Alias";
+
+ /**
+ * <p class="changed_added_4_0">
+ * Attribute alias. That is mandatory parameter</p>
+ *
+ * @return attribute alias.
+ */
+ public String value();
+
+
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -42,8 +42,9 @@
boolean hidden() default false;
boolean readOnly() default false;
+
+ boolean passThough() default false;
- String name() default "";
-
- Class<?> type() default Object.class;
+ String[] behavior() default {};
+
}
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attributes.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attributes.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Attributes.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -50,8 +50,8 @@
* components.
* </p>
*
- * @return references to XML files that contain attributes definitions.
+ * @return URL's of the XML files that contain attribute definitions.
*/
- public Attribute[] value();
+ public String[] value();
}
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Component.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -45,31 +45,14 @@
/**
* <p class="changed_added_4_0">
- * Type of the component. If this value an empty, component type will be inferred from class name.
+ * Type of the component. Currently that is mandatory</p>
+ * <p class="todo">TODO if this value is an empty, component type will be inferred from class name.
* </p>
*
* @return component type.
*/
- public String type() default "";
+ public String value();
- /**
- * <p class="changed_added_4_0">
- * Name of the final component class. May be empty, in that case name will be
- * inferred from naming conventions.
- * </p>
- *
- * @return
- */
- public String className() default "";
-
- /**
- * <p class="changed_added_4_0">
- * Family of the component. If this value an empty, it will be inferred.
- * </p>
- *
- * @return component family.
- */
- public String family() default "";
}
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/DisplayName.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/DisplayName.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/DisplayName.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">Defines name that would be used in IDE to display.
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target({ElementType.TYPE,ElementType.METHOD})
+@Inherited
+public @interface DisplayName {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.DisplayName";
+
+ /**
+ * <p class="changed_added_4_0">
+ * IDE display name.
+ * </p>
+ *
+ * @return Icon url.
+ */
+ public String value();
+
+
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/DisplayName.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -39,7 +39,7 @@
@Inherited
public @interface Facet {
- public static final String NAME = "org.richfaces.cdk.annotations.Facets";
+ public static final String NAME = "org.richfaces.cdk.annotations.Facet";
/**
* <p class="changed_added_4_0">The name of that facet.</p>
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Generate.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Generate.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Generate.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,58 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface Generate {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Generate";
+
+ /**
+ * <p class="changed_added_4_0">
+ * Name of the generated component class. Currently that is mandatory</p>
+ * <p class="todo">TODO: if this value is an empty, component class will be inferred from class name.
+ * </p>
+ *
+ * @return component type.
+ */
+ public String value();
+
+
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Generate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Icon.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Icon.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Icon.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">Icon used that would be used in IDE to display.
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target({ElementType.TYPE,ElementType.METHOD})
+@Inherited
+public @interface Icon {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Icon";
+
+ /**
+ * <p class="changed_added_4_0">
+ * URL that defines IDE icon.
+ * </p>
+ *
+ * @return Icon url.
+ */
+ public String value();
+
+
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Icon.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/RendererTemplate.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -45,12 +45,12 @@
/**
* <p class="changed_added_4_0">
- * Type of the renderer. If this value an empty, component type will be inferred from class name.
+ * Reference to renderer template used with that component.
* </p>
*
- * @return component type.
+ * @return template url.
*/
- public String value() default "";
+ public String value();
}
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Test.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Test.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Test.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,59 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">Mark component class or method for automated testing.</p>
+ * <p class="todo">TODO: introduce additional parameters to refine generated test.
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target({ElementType.TYPE,ElementType.METHOD})
+@Inherited
+public @interface Test {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Test";
+
+ /**
+ * <p class="changed_added_4_0">
+ * Name of the generated unit test class. Currently that is mandatory</p>
+ * <p class="todo">TODO: if this value is an empty, class will be inferred from the base class name.
+ * </p>
+ *
+ * @return component type.
+ */
+ public String className();
+
+
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/annotations/src/main/resources (from rev 15233, root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/resources)
Added: root/cdk/trunk/plugins/annotations/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<cdk:properties xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:cdk="http://richfaces.org/cdk/extensions">
+
+ <property>
+ <description><![CDATA[
+ The component identifier for this component. This value must be
+ unique within the closest parent component that is a naming
+ container.
+ ]]></description>
+ <display-name>Component Identifier</display-name>
+ <icon></icon>
+ <property-name>id</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:el-expression>false</cdk:el-expression>
+ </property-extension>
+ </property>
+ <property>
+ <description><![CDATA[
+ Flag indicating whether or not this component should be rendered
+ (during Render Response Phase), or processed on any subsequent
+ form submit. The default value for this property is true.
+ ]]></description>
+ <display-name>Rendered Flag</display-name>
+ <icon></icon>
+ <property-name>rendered</property-name>
+ <property-class>boolean</property-class>
+ <property-extension>
+ <cdk:el-expression>true</cdk:el-expression>
+ </property-extension>
+ </property>
+</cdk:properties>
Property changes on: root/cdk/trunk/plugins/annotations/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/RendererClassGenerator.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/RendererClassGenerator.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/RendererClassGenerator.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -34,7 +34,7 @@
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.Renderer;
-import org.richfaces.cdk.model.RendererKit;
+import org.richfaces.cdk.model.RenderKit;
/**
* <p class="changed_added_4_0"></p>
@@ -60,7 +60,7 @@
*/
@Override
public void render(ComponentLibrary library) throws CdkException {
- for (RendererKit renderKit : library.getRenderKits()) {
+ for (RenderKit renderKit : library.getRenderKits()) {
for (Renderer renderer : renderKit.getRenderers()) {
JavaClass javaClass = renderer.getTemplate();
String fullName = javaClass.getFullName();
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/RendererTemplateParser.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/RendererTemplateParser.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/templates/RendererTemplateParser.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -36,6 +36,7 @@
import org.richfaces.cdk.StandardSources;
import org.richfaces.cdk.model.Component;
import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.RenderKit;
import org.richfaces.cdk.model.Renderer;
/**
@@ -56,13 +57,18 @@
for(File file : getContext().getSources(StandardSources.RENDERER_TEMPLATES)){
try {
RootElementConsumer template = TemplateReader.parseTemplate(new FileInputStream(file));
- Renderer renderer = library.createRenderer(template.getRenderKitId(), template.getRendererType(), template.getFamily());
+ RenderKit renderKit = library.findOrCreateRenderKit(template.getRenderKitId());
+ Renderer renderer = renderKit.findOrCreateRenderer(template.getRendererType());
renderer.setTemplate(template.getJavaClass());
String componentType = template.getComponentType();
if(null != componentType){
- Component component = library.createComponent(componentType);
+ Component component = library.findOrCreateComponent(componentType);
component.getRenderers().add(renderer);
}
+ String family = template.getFamily();
+ if(null != family){
+ renderer.setFamily(family);
+ }
} catch (FileNotFoundException e) {
// TODO - log errors, marks mojo failed after whole build cycle.
throw new CdkException(e);
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCdkContext.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCdkContext.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCdkContext.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -24,11 +24,13 @@
package org.richfaces.cdk;
import java.io.File;
+import java.util.List;
import java.util.Map;
import org.richfaces.cdk.CdkWriter.OutputType;
import org.richfaces.cdk.model.ComponentLibrary;
+import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
/**
@@ -52,7 +54,11 @@
private Map<SourceType, Iterable<File>> sources = Maps.newHashMap();
private Map<OutputType,File> outputs = Maps.newHashMap();
+
+ private Map<SourceType,File> inputFolders = Maps.newHashMap();
+ private List<CdkError> errors = Lists.newArrayList();
+
/**
* <p class="changed_added_4_0"></p>
* @return the javaSource
@@ -147,6 +153,16 @@
File outputFolder = outputs.get(type);
return outputFolder;
}
+
+ @Override
+ public void sendError(CdkError error) {
+ errors.add(error);
+ }
+
+ @Override
+ public File getSourceFolder(SourceType type) {
+ return inputFolders.get(type);
+ }
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkContext.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkContext.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkContext.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -17,11 +17,11 @@
public interface CdkContext {
/**
- * <p class="changed_added_4_0">Type of source files e.g. Java classes, faces-configs, renderer templates</p>
+ * <p class="changed_added_4_0">Id of source files e.g. Java classes, faces-configs, renderer templates</p>
* @author asmirnov(a)exadel.com
*
*/
- interface SourceType {
+ public interface SourceType {
String getName();
}
@@ -80,5 +80,9 @@
* @return output folder for requested type.
*/
public File getOutputFolder(OutputType type);
+
+ public void sendError(CdkError error);
+ public File getSourceFolder(SourceType type);
+
}
\ No newline at end of file
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkError.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkError.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkError.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+/**
+ * <p class="changed_added_4_0">That class incapsulates information about recoverable CDK errors.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class CdkError {
+
+ private String message;
+
+ private String description;
+
+ private Throwable cause;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ */
+ public CdkError(String message) {
+ this.message = message;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ * @param cause
+ */
+ public CdkError(String message, Throwable cause) {
+ this.message = message;
+ this.cause = cause;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkError.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -194,8 +194,8 @@
return builder;
}
- protected Verifier getVerifier() {
+ protected ModelValidator getVerifier() {
// TODO - put verifier implementation into context ?
- return new VerifierImpl(getContext());
+ return new ValidatorImpl(getContext());
}
}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ModelValidator.java (from rev 15224, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Verifier.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ModelValidator.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ModelValidator.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import org.richfaces.cdk.model.ComponentLibrary;
+
+/**
+ * <p class="changed_added_4_0">Interface for CDK library model verifier.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface ModelValidator {
+
+ /**
+ * <p class="changed_added_4_0">Perform verify procedure on the library model.</p>
+ * @param library
+ * @throws CdkException
+ */
+ public void verify(ComponentLibrary library) throws CdkException;
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ModelValidator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ValidatorImpl.java (from rev 15224, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/VerifierImpl.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ValidatorImpl.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ValidatorImpl.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,102 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.util.Collection;
+
+
+import org.richfaces.cdk.model.Component;
+import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.ModelCollection;
+import org.richfaces.cdk.model.RenderKit;
+import org.richfaces.cdk.model.Renderer;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class ValidatorImpl implements ModelValidator {
+
+ private final CdkContext context;
+
+ public ValidatorImpl(CdkContext context) {
+ this.context = context;
+ }
+
+ /* (non-Javadoc)
+ * @see org.richfaces.cdk.ModelValidator#verify(org.richfaces.cdk.model.ComponentLibrary)
+ */
+ @Override
+ public void verify(ComponentLibrary library) throws CdkException {
+ verifyRenderers(library);
+ verifyComponents(library);
+ // After all, merge all similar elements.
+ compact(library.getComponents());
+ compact(library.getRenderKits());
+ compact(library.getRenderKits());
+ }
+
+ protected void verifyRenderers(ComponentLibrary library) {
+ for (RenderKit renderKit : library.getRenderKits()) {
+ // Check render kit name and class.
+ for (Renderer renderer : renderKit.getRenderers()) {
+ // Check type.
+ // Check family.
+ // Check generated class.
+ // Check superclass.
+ // Check component type.
+ }
+ compact(renderKit.getRenderers());
+ }
+
+ }
+
+ protected void verifyComponents(ComponentLibrary library) {
+ NamingConventions namingConventions = getNamingConventions();
+ for (Component component : library.getComponents()) {
+ // Check classes.
+ // Check Component type.
+ if(null == component.getType()){
+// component.setType(new Component.Type(namingConventions.inferComponentType(explicitType, className)));
+ }
+ // Check family.
+ // Check attributes.
+ // Check renderers.
+ compact(component.getAttributes());
+ }
+
+ }
+
+ private NamingConventions getNamingConventions() {
+ return context.getNamingConventions();
+ }
+
+ protected void compact(Collection<?> collection) {
+// if (collection instanceof ModelCollection) {
+// ModelCollection model = (ModelCollection) collection;
+// model.mergeKeys();
+// }
+ }
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/ValidatorImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Verifier.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Verifier.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Verifier.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -1,42 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import org.richfaces.cdk.model.ComponentLibrary;
-
-/**
- * <p class="changed_added_4_0">Interface for CDK library model verifier.</p>
- * @author asmirnov(a)exadel.com
- *
- */
-public interface Verifier {
-
- /**
- * <p class="changed_added_4_0">Perform verify procedure on the library model.</p>
- * @param library
- * @throws CdkException
- */
- public void verify(ComponentLibrary library) throws CdkException;
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/VerifierImpl.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/VerifierImpl.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/VerifierImpl.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -1,50 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import org.richfaces.cdk.model.ComponentLibrary;
-
-/**
- * <p class="changed_added_4_0"></p>
- * @author asmirnov(a)exadel.com
- *
- */
-public class VerifierImpl implements Verifier {
-
- private final CdkContext context;
-
- public VerifierImpl(CdkContext context) {
- this.context = context;
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.cdk.Verifier#verify(org.richfaces.cdk.model.ComponentLibrary)
- */
- @Override
- public void verify(ComponentLibrary library) throws CdkException {
- // TODO Auto-generated method stub
-
- }
-
-}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -23,24 +23,29 @@
package org.richfaces.cdk.apt;
+import java.util.List;
import java.util.Set;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.MirroredTypeException;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.ElementFilter;
import org.richfaces.cdk.CdkContext;
+import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.Attributes;
import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.annotations.DisplayName;
import org.richfaces.cdk.annotations.Family;
+import org.richfaces.cdk.annotations.Generate;
+import org.richfaces.cdk.annotations.Icon;
import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.Property;
-import org.richfaces.cdk.model.Component.Type;
-import org.richfaces.cdk.util.Strings;
+import org.richfaces.cdk.xmlconfig.FragmentParser;
/**
* <p class="changed_added_4_0">
@@ -83,44 +88,14 @@
try {
// Process class-level annotations.
// Calculate type for base UI component class.
- // TODO - encapsulate that into simple utility classes call.
Component componentAnnotation = componentElement
.getAnnotation(Component.class);
- org.richfaces.cdk.model.Component component = new org.richfaces.cdk.model.Component();
+ // Because component type is a primary key for components collection, we have to infer explicit value here.
+ String type = getContext().getNamingConventions().inferComponentType(componentAnnotation.value(),componentElement.getQualifiedName().toString());
+ org.richfaces.cdk.model.Component component = library.findOrCreateComponent(type);
// Should that component be generated ?
- component.setExists(!componentElement
- .getModifiers().contains(
- Modifier.ABSTRACT));
- component.setBaseClass(new ClassDescription(componentElement.getQualifiedName()
- .toString()));
- if(!Strings.isEmpty(componentAnnotation.type())){
- component.setType(new Type(componentAnnotation.type()));
- }
- // Generated class name.
- if(!Strings.isEmpty(componentAnnotation
- .className())){
- component.setComponentClass(new ClassDescription(componentAnnotation.className()));
- component.setExists(false);
- }
- // Component family
- if(!Strings.isEmpty(componentAnnotation
- .family())){
- // @Component annotation fiels
- component.setFamily(componentAnnotation.family());
- } else if(null != componentElement.getAnnotation(Family.class)){
- // @Family annotation.
- component
- .setFamily(componentElement.getAnnotation(Family.class).value());
- } else {
- // TODO - find static final COMPONENT_FAMILY string ?
- }
- // JavaDoc comments
- component.setDescription(this.processingEnv
- .getElementUtils().getDocComment(componentElement));
- // TODO - process Events attribute.
- // TODO - renderers, ....
- // Process attributes.
- processAttributes(componentElement, component);
+ setClassNames(componentElement, component);
+ setComponentProperties(componentElement, component);
library.getComponents().add(component);
} catch (Exception e) {
// rise error and continue.
@@ -130,54 +105,112 @@
continue;
}
}
+ // TODO - process classes annotated as "FacesComponent".
return true;
}
return false;
}
+ private void setComponentProperties(TypeElement componentElement,
+ org.richfaces.cdk.model.Component component) throws CdkException {
+ // Component family
+ setComponeneFamily(componentElement, component);
+ setComponentDescription(componentElement, component);
+ // TODO - process Events attribute.
+ // TODO - renderers, ....
+ // Process attributes.
+ processAttributes(componentElement, component);
+ }
+
+ private void setComponentDescription(TypeElement componentElement,
+ org.richfaces.cdk.model.Component component) {
+ // JavaDoc comments
+ component.setDescription(this.processingEnv.getElementUtils()
+ .getDocComment(componentElement));
+ Icon icon = componentElement.getAnnotation(Icon.class);
+ if (null != icon) {
+ component.setIcon(icon.value());
+ }
+ DisplayName displayName = componentElement
+ .getAnnotation(DisplayName.class);
+ if (null != displayName) {
+ component.setDisplayname(displayName.value());
+ }
+ }
+
+ private void setComponeneFamily(TypeElement componentElement,
+ org.richfaces.cdk.model.Component component) {
+ Family family = componentElement.getAnnotation(Family.class);
+ if (null != family) {
+ // @Family annotation
+ component.setFamily(family.value());
+ } else {
+ // static final COMPONENT_FAMILY string constant.
+ List<VariableElement> fieldsIn = ElementFilter.fieldsIn(this.processingEnv.getElementUtils().getAllMembers(componentElement));
+ for (VariableElement field : fieldsIn) {
+ Set<Modifier> modifiers = field.getModifiers();
+ if(modifiers.contains(Modifier.FINAL)&&modifiers.contains(Modifier.STATIC)&&field.getSimpleName().equals("COMPONENT_FAMILY")){
+ Object value = field.getConstantValue();
+ if(null != value){
+ component.setFamily(value.toString());
+ }
+ }
+ }
+ }
+ }
+
+ private void setClassNames(TypeElement componentElement,
+ org.richfaces.cdk.model.Component component) {
+ Generate generate = componentElement.getAnnotation(Generate.class);
+ // Set generated and base class names.
+ ClassDescription baseClass = new ClassDescription(componentElement
+ .getQualifiedName().toString());
+ if (null != generate) {
+ component.setComponentClass(new ClassDescription(generate.value()));
+ component.setBaseClass(baseClass);
+ component.setExists(false);
+ } else if (componentElement.getModifiers().contains(Modifier.ABSTRACT)) {
+ // Final component class will be set by validator.
+ component.setBaseClass(baseClass);
+ component.setExists(false);
+ } else {
+ component.setComponentClass(baseClass);
+ component.setExists(true);
+ }
+ }
+
protected void processAttributes(TypeElement componentElement,
- org.richfaces.cdk.model.Component component) {
+ org.richfaces.cdk.model.Component component) throws CdkException {
Set<BeanProperty> properties = getBeanPropertiesAnnotatedWith(
Attribute.class, componentElement);
// TODO - encapsulate attribute builder into utility class.
for (BeanProperty beanProperty : properties) {
- Property atribute = component
- .addAttribute(beanProperty.getName());
+ Property atribute = component.findOrCreateAttribute(beanProperty
+ .getName());
// Documentation
atribute.setDescription(beanProperty.getDocComment());
- // Type.
- atribute.setType(new ClassDescription(beanProperty
- .getType().toString()));
+ // Id.
+ atribute.setType(new ClassDescription(beanProperty.getType()
+ .toString()));
// Flags.
atribute.setExists(beanProperty.isExists());
}
Attributes attributes = componentElement
.getAnnotation(Attributes.class);
if (null != attributes) {
- Attribute[] attributes2 = attributes.value();
- for (Attribute attributeAnnotation : attributes2) {
- Property attribute = component
- .addAttribute(attributeAnnotation.name());
- attribute.setExists(false);
- try {
- Class<?> type = attributeAnnotation.type();
- attribute
- .setType(new ClassDescription(type
- .getName()));
- } catch (MirroredTypeException ex) {
- attribute.setType(new ClassDescription(ex
- .getTypeMirror().toString()));
- }
- // TODO - process additional properties.
+ String[] includes = attributes.value();
+ for (String attributesConfig : includes) {
+ // process additional properties.
+ FragmentParser parser = new FragmentParser(getContext());
+ component.getAttributes().addAll(parser.parseProperties(attributesConfig));
}
}
// TODO - Process standard information for parent classes
- // and intrfaces.
+ // and interfaces.
}
public ComponentLibrary getLibrary() {
return library;
}
-
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/freemarker/FreeMarkerRenderer.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -31,8 +31,9 @@
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.model.ComponentLibrary;
-import org.richfaces.cdk.model.JsfComponent;
import org.richfaces.cdk.model.LibraryVisitor;
+import org.richfaces.cdk.model.Searchable;
+import org.richfaces.cdk.model.Visitable;
import freemarker.template.Configuration;
import freemarker.template.Template;
@@ -43,7 +44,7 @@
* @author asmirnov(a)exadel.com
*
*/
-public abstract class FreeMarkerRenderer<C extends JsfComponent<C>,P> implements CdkWriter,LibraryVisitor<Boolean, P> {
+public abstract class FreeMarkerRenderer<C extends Visitable,P> implements CdkWriter,LibraryVisitor<Boolean, P> {
private CdkContext context;
private Configuration configuration;
@@ -70,7 +71,7 @@
}
@Override
- public Boolean visit(JsfComponent<?> c, P param) {
+ public Boolean visit(Visitable c, P param) {
if(isMyComponent(c)){
return processComponent((C)c, param);
}
@@ -99,7 +100,7 @@
protected abstract String getOutputFile(C c) throws IOException;
- protected abstract boolean isMyComponent(JsfComponent c);
+ protected abstract boolean isMyComponent(Visitable c);
protected abstract String getTemplateName();
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -32,7 +32,8 @@
import org.richfaces.cdk.freemarker.FreeMarkerRenderer;
import org.richfaces.cdk.model.Component;
import org.richfaces.cdk.model.ComponentLibrary;
-import org.richfaces.cdk.model.JsfComponent;
+import org.richfaces.cdk.model.Searchable;
+import org.richfaces.cdk.model.Visitable;
/**
* <p class="changed_added_4_0"></p>
@@ -52,7 +53,7 @@
@Override
- protected boolean isMyComponent(JsfComponent c) {
+ protected boolean isMyComponent(Visitable c) {
if (c instanceof Component) {
Component component = (Component) c;
return !component.isExists();
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -28,13 +28,14 @@
* @author asmirnov(a)exadel.com
*
*/
+@SuppressWarnings("serial")
public class Attribute extends Property {
/**
* <p class="changed_added_4_0"></p>
* @param name
*/
- public Attribute(String name) {
+ public Attribute(Property.Name name) {
super(name);
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -29,29 +29,27 @@
*
*/
@SuppressWarnings("serial")
-public class Behavior implements JsfComponent<Behavior> {
+public class Behavior implements ModelElement<Behavior,Behavior.Type> {
- private JsfType type;
+ public static final class Type extends Key {
+
+ public Type(String name) {
+ super(name);
+ }
+ }
+ private final Type type;
- @Override
- public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
- return visitor.visit(this, param);
+ public Behavior(Type type) {
+ this.type = type;
}
-
/* (non-Javadoc)
- * @see org.richfaces.cdk.model.JsfComponent#getType()
+ * @see org.richfaces.cdk.model.ModelElement#getType()
*/
- public JsfType getType() {
+ @Override
+ public Type getKey() {
return type;
}
- /**
- * <p class="changed_added_4_0"></p>
- * @param type the type to set
- */
- public void setType(JsfType type) {
- this.type = type;
- }
@Override
public void merge(Behavior other) {
@@ -59,4 +57,9 @@
}
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -64,7 +64,7 @@
private final String boxingClassName;
/**
- * <p class="changed_added_4_0">Type parameters for that class</p>
+ * <p class="changed_added_4_0">Id parameters for that class</p>
* TODO append type parameters to key.
*/
private String typeParameters;
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -12,6 +12,8 @@
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlType;
+import org.richfaces.cdk.model.Event.ClassName;
+import org.richfaces.cdk.model.Facet.Name;
import org.richfaces.cdk.util.Strings;
import com.google.common.collect.Maps;
@@ -26,19 +28,15 @@
@SuppressWarnings("serial")
@XmlType(name="faces-config-componentType")
@XmlAccessorType( XmlAccessType.NONE )
-public final class Component implements JsfComponent<Component>, DescriptionGroup,Extensible<ConfigExtension> {
+public final class Component implements ModelElement<Component,Component.Type>, DescriptionGroup,Extensible<ConfigExtension> {
- /**
- * <p class="changed_added_4_0">Reference to component library for which that component is belong to.</p>
- */
- private ComponentLibrary library;
/**
* <p class="changed_added_4_0">
* Component type
* </p>
*/
- private Type type;
+ private final Type type;
/**
* <p class="changed_added_4_0">
@@ -68,6 +66,8 @@
*/
private String displayname;
+
+ private String family;
/**
* <p class="changed_added_4_0">
* Icon name for IDE tools
@@ -85,22 +85,40 @@
* Component attributes
* </p>
*/
- private final Map<String, Property> attributes = Maps.newHashMap();
+ private final SearchableCollection<Property, Property.Name> attributes = new ModelCollection<Property, Property.Name>() {
+ @Override
+ public Property create(Property.Name key) {
+ return new Property(key);
+ }
+ };
+
/**
* <p class="changed_added_4_0">
* Facets recognised by the component
* </p>
*/
- private final Map<String,Facet> facets = Maps.newHashMap();
+ private final SearchableCollection<Facet,Facet.Name> facets = new ModelCollection<Facet, Facet.Name>() {
+ @Override
+ public Facet create(Name key) {
+ return new Facet(key.getType());
+ }
+ };
+
/**
* <p class="changed_added_4_0">
* Application level events fired by the component
* </p>
*/
- private final Set<Event> events = Sets.newHashSet();
+ private final SearchableCollection<Event,Event.ClassName> events = new ModelCollection<Event, Event.ClassName>() {
+ @Override
+ public Event create(ClassName key) {
+ return new Event(key);
+ }
+ };
+
/**
* <p class="changed_added_4_0">
* Renderer for the final component. This is bidirectional many to many
@@ -109,8 +127,13 @@
*/
private final Set<Renderer> renderers = Sets.newHashSet();
- private ComponentExtension extension;
+ private ConfigExtension extension;
+ public Component(Type key) {
+ this.type = key;
+ }
+
+
@Override
public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
return visitor.visit(this, param);
@@ -120,34 +143,27 @@
public void merge(Component otherComponent) {
ComponentLibrary.merge(renderers, otherComponent.getRenderers());
// TODO - merge facets, renderers, events ...
- for (Property property : otherComponent.getAttributes()) {
- if(attributes.containsKey(property.getName())){
- attributes.get(property.getName()).merge(property);
- } else {
- attributes.put(property.getName(), property);
- }
- }
+ ComponentLibrary.merge(attributes, otherComponent.getAttributes());
+ ComponentLibrary.merge(facets, otherComponent.getFacets());
+// ComponentLibrary.merge(events, otherComponent.getEvents());
ComponentLibrary.merge(this,otherComponent);
}
/*
* (non-Javadoc)
*
- * @see org.richfaces.cdk.model.JsfComponent#getType()
+ * @see org.richfaces.cdk.model.ModelElement#getType()
*/
@Override
- @XmlElement(name="component-type",required=true)
- public Type getType() {
+ public Type getKey() {
return type;
}
- /**
- * <p class="changed_added_4_0"></p>
- * @param type the type to set
- */
- public void setType(Type type) {
- this.type = type;
+
+ @XmlElement(name="component-type",required=true)
+ public Type getType() {
+ return type;
}
/**
@@ -155,14 +171,11 @@
* @return the extension
*/
@XmlElement(name="component-extensions")
- public ComponentExtension getExtension() {
- if (extension == null) {
- extension = new ComponentExtension();
- }
+ public ConfigExtension getExtension() {
return extension;
}
- public void setExtension(ComponentExtension extension) {
+ public void setExtension(ConfigExtension extension) {
this.extension = extension;
}
@@ -176,7 +189,7 @@
*/
@Merge
public String getFamily() {
- return getExtension().getFamily();
+ return family;
}
/**
@@ -187,7 +200,7 @@
* the family to set
*/
public void setFamily(String family) {
- getExtension().setFamily(family);
+ this.family = family;
}
/**
@@ -306,17 +319,12 @@
*/
@XmlElements({@XmlElement(name="property",type=Property.class),@XmlElement(name="attribute",type=Attribute.class)})
public Collection<Property> getAttributes() {
- return Collections.unmodifiableCollection(attributes.values());
+ return attributes;
}
- public Property addAttribute(String attributeName) {
+ public Property findOrCreateAttribute(String attributeName) {
Property attribute;
- if (attributes.containsKey(attributeName)) {
- attribute = attributes.get(attributeName);
- } else {
- attribute = new Property(attributeName);
- attributes.put(attributeName, attribute);
- }
+ attribute = attributes.findOrCreate(new Property.Name(attributeName));
return attribute;
}
@@ -325,65 +333,41 @@
* @return the facets
*/
public Collection<Facet> getFacets() {
- return facets.values();
+ return facets;
}
- public Facet addFacet(String name){
- Facet facet = facets.get(name);
- if(null == facets){
- facet = new Facet(name);
- facets.put(name, facet);
- }
- return facet;
+ public Facet findOrCreateFacet(String name){
+ return facets.findOrCreate(new Facet.Name(name));
}
/**
* <p class="changed_added_4_0"></p>
* @return the events
*/
- public Set<Event> getEvents() {
+ public Collection<Event> getEvents() {
return events;
}
public Event addEvent(String className){
- Event event = new Event();
- events.add(event);
- return event;
+ // TODO - use a single events collection from library.
+ return events.findOrCreate(new Event.ClassName(className));
}
/**
* <p class="changed_added_4_0"></p>
+ * TODO - synchronize renderers collection with library ?
* @return the renderers
*/
public Set<Renderer> getRenderers() {
return renderers;
}
- public static class Type extends JsfType {
+ public static class Type extends Key {
public Type(String type) {
super(type);
}
}
-
- /**
- * <p class="changed_added_4_0">Inner class that wraps <component-extension> element content</p>
- * @author asmirnov(a)exadel.com
- *
- */
- public static class ComponentExtension extends ConfigExtension {
-
- private String family;
-
- @XmlElement(namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
- public String getFamily(){
- return family;
- }
-
- public void setFamily(String family) {
- this.family = family;
- }
- }
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -29,28 +29,15 @@
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
import java.util.NoSuchElementException;
-import java.util.Set;
import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
-import org.richfaces.cdk.model.Component.Type;
-import org.richfaces.cdk.util.Strings;
-
import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
/**
* <p class="changed_added_4_0">
@@ -64,37 +51,79 @@
* @author asmirnov(a)exadel.com
*
*/
-@XmlRootElement(name="faces-config",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
-(a)XmlType(namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE,name="faces-configType")
+@XmlRootElement(name = "faces-config", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE)
+@XmlType(namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE, name = "faces-configType")
public class ComponentLibrary implements Serializable {
-
+
public static final String FACES_CONFIG_NAMESPACE = "http://java.sun.com/xml/ns/javaee";
- public static final String CDK_EXTENSIONS_NAMESPACE="http://richfaces.org/cdk";
+ public static final String FACES_CONFIG_SCHEMA_LOCATION = "http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd";
+ public static final String CDK_EXTENSIONS_NAMESPACE = "http://richfaces.org/cdk/extensions";
+
/**
* <p class="changed_added_4_0">
* </p>
*/
private static final long serialVersionUID = -6055670836731899832L;
- private final List<Component> components = Lists.newArrayList();
+ private final SearchableCollection<Component, Component.Type> components = new ModelCollection<Component, Component.Type>() {
+ @Override
+ public Component create(Component.Type key) {
+ return new Component(key);
+ }
+ };
+
/**
* <p class="changed_added_4_0">
* JSF renderer associated with that library
* </p>
*/
- private final List<RendererKit> renderKits = Lists.newArrayList();
+ private final SearchableCollection<RenderKit, RenderKit.Id> renderKits = new ModelCollection<RenderKit, RenderKit.Id>() {
- private final List<Converter> converters = Lists.newArrayList();
+ @Override
+ public RenderKit create(RenderKit.Id key) {
+ RenderKit rendererKit = new RenderKit();
+ rendererKit.setType(key);
+ return rendererKit;
+ }
+ };
- private final List<Validator> validators = Lists.newArrayList();
+ private final SearchableCollection<Converter, Key> converters = new ModelCollection<Converter, Key>() {
- private final List<Behavior> behaviors = Lists.newArrayList();
+ @Override
+ public Converter create(Key key) {
+ Converter converter = new Converter(key);
+ return converter;
+ }
+ };
- private final List<Listener> listeners = Lists.newArrayList();
+ private final SearchableCollection<Validator, Key> validators = new ModelCollection<Validator, Key>() {
+ @Override
+ public Validator create(Key key) {
+ Validator validator = new Validator(key);
+ return validator;
+ }
+ };
+
+ private final SearchableCollection<Behavior, Behavior.Type> behaviors = new ModelCollection<Behavior, Behavior.Type>() {
+
+ @Override
+ public Behavior create(Behavior.Type key) {
+ Behavior behavior = new Behavior(key);
+ return behavior;
+ }
+ };
+ private final SearchableCollection<Listener, Key> listeners = new ModelCollection<Listener, Key>() {
+
+ @Override
+ public Listener create(Key key) {
+ Listener listener = new Listener(key);
+ return listener;
+ }
+ };
/**
* <p class="changed_added_4_0">
* Tag library with references of all used tags
@@ -120,61 +149,24 @@
* @param otherLibrary
*/
public void merge(ComponentLibrary otherLibrary) {
- merge(components,otherLibrary.getComponents());
- merge(renderKits,otherLibrary.getRenderKits());
- merge(converters,otherLibrary.getConverters());
- merge(validators,otherLibrary.getValidators());
- merge(listeners,otherLibrary.getListeners());
+ components.merge(otherLibrary.components);
+ renderKits.merge(otherLibrary.renderKits);
+ converters.merge(otherLibrary.converters);
+ validators.merge(otherLibrary.validators);
+ listeners.merge(otherLibrary.listeners);
}
- public <R,P> R accept(LibraryVisitor<R, P> visitor,P param){
- R result = accept(components,visitor, param, null);
- result = accept(renderKits,visitor, param, result);
- result = accept(converters,visitor, param, result);
- result = accept(validators,visitor, param, result);
- result = accept(listeners,visitor, param, result);
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ R result = accept(components, visitor, param, null);
+ result = accept(renderKits, visitor, param, result);
+ result = accept(converters, visitor, param, result);
+ result = accept(validators, visitor, param, result);
+ result = accept(listeners, visitor, param, result);
return result;
}
/**
* <p class="changed_added_4_0">
- * </p>
- *
- * @return the components
- */
- @XmlElement
- public Collection<Component> getComponents() {
- return components;
- }
-
- /**
- * <p class="changed_added_4_0">
- * Lookup for component with given type. If such component did not exist and
- * parameter {@code create} was set to {@code true} a new instance will be
- * created
- * </p>
- *
- * @param componentType2
- * @param create
- * @return
- */
- Component getComponent(String type, boolean create) {
- Component.Type componentType = new Component.Type(type);
- Component component = null;
- try {
- component = find(components, componentType);
- } catch (NoSuchElementException e) {
- if (create) {
- component = new Component();
- component.setType(componentType);
- components.add(component);
- }
- }
- return component;
- }
-
- /**
- * <p class="changed_added_4_0">
* Create a new component description.
* </p>
*
@@ -187,44 +179,43 @@
* already existed components.
* @return
*/
- public Component createComponent(String type) {
- Component component = getComponent(type, true);
+ public Component findOrCreateComponent(String type) {
+ Component component = components.findOrCreate(new Component.Type(type));
return component;
}
/**
- * <p class="changed_added_4_0"></p>
+ * <p class="changed_added_4_0">
+ * </p>
+ *
* @param renderKitId
* @param rendererType
- * @param family
* @return
*/
- public Renderer createRenderer(String renderKitId, String rendererType,
- String family) {
- RendererKit.Type renderKitType = new RendererKit.Type(renderKitId);
- RendererKit rendererKit = find(renderKits,renderKitType);
- if(null == rendererKit){
- rendererKit = new RendererKit();
- rendererKit.setType(renderKitType);
- renderKits.add(rendererKit);
- }
- Renderer.Type type = new Renderer.Type(rendererType,family);
- Renderer renderer = find(rendererKit.getRenderers(), type);
- if(null == renderer){
- renderer = new Renderer();
- renderer.setType(type);
- rendererKit.getRenderers().add(renderer);
- }
- return renderer;
+ public RenderKit findOrCreateRenderKit(String renderKitId) {
+ RenderKit.Id renderKitType = new RenderKit.Id(renderKitId);
+ RenderKit renderKit = renderKits.findOrCreate(renderKitType);
+ return renderKit;
}
/**
* <p class="changed_added_4_0">
* </p>
*
+ * @return the components
+ */
+ @XmlElement
+ public Collection<Component> getComponents() {
+ return components;
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
* @return the renderKits
*/
- public List<RendererKit> getRenderKits() {
+ public Collection<RenderKit> getRenderKits() {
return renderKits;
}
@@ -234,7 +225,7 @@
*
* @return the converters
*/
- public List<Converter> getConverters() {
+ public Collection<Converter> getConverters() {
return converters;
}
@@ -244,7 +235,7 @@
*
* @return the validators
*/
- public List<Validator> getValidators() {
+ public Collection<Validator> getValidators() {
return validators;
}
@@ -254,7 +245,7 @@
*
* @return the behaviors
*/
- public List<Behavior> getBehaviors() {
+ public Collection<Behavior> getBehaviors() {
return behaviors;
}
@@ -264,7 +255,7 @@
*
* @return the listeners
*/
- public List<Listener> getListeners() {
+ public Collection<Listener> getListeners() {
return listeners;
}
@@ -280,28 +271,32 @@
// Utility methods.
- static <T extends JsfComponent<T>> void merge(Collection<T> target, Collection<T> source){
+ static <K extends Key,T extends ModelElement<T,K>> void merge(Collection<T> target,
+ Collection<T> source) {
for (T element : source) {
- T targetElement = find(target,element.getType());
- if(null == targetElement){
+ T targetElement = find(target, element.getKey());
+ if (null == targetElement) {
target.add(element);
} else {
targetElement.merge(element);
}
}
}
-
+
static <T extends Mergeable<T>> void merge(T target, T source) {
try {
- PropertyDescriptor[] properties = Introspector.getBeanInfo(target.getClass()).getPropertyDescriptors();
+ PropertyDescriptor[] properties = Introspector.getBeanInfo(
+ target.getClass()).getPropertyDescriptors();
for (PropertyDescriptor propertyDescriptor : properties) {
Method readMethod = propertyDescriptor.getReadMethod();
Method writeMethod = propertyDescriptor.getWriteMethod();
- if(null != readMethod && null != writeMethod && readMethod.isAnnotationPresent(Merge.class)){
- boolean overwrite = readMethod.getAnnotation(Merge.class).value();
+ if (null != readMethod && null != writeMethod
+ && readMethod.isAnnotationPresent(Merge.class)) {
+ boolean overwrite = readMethod.getAnnotation(Merge.class)
+ .value();
Object oldValue = readMethod.invoke(target);
Object newValue = readMethod.invoke(source);
- if(null != newValue && (overwrite || null == oldValue)){
+ if (null != newValue && (overwrite || null == oldValue)) {
writeMethod.invoke(target, newValue);
}
}
@@ -317,12 +312,17 @@
}
}
- static <R,P,T extends JsfComponent<?>> R accept(Iterable<T> components, LibraryVisitor<R, P> visitor,P param, R result){
- for (T t : components) {
- R accept = t.accept(visitor, param);
- if(null != accept){
- result = accept;
+ static <R, P, T extends ModelElement<T,?>> R accept(Iterable<T> components,
+ LibraryVisitor<R, P> visitor, P param, R result) {
+ if (null == result) {
+ for (T t : components) {
+ R accept = t.accept(visitor, param);
+ if (null != accept) {
+ result = accept;
+ break;
+ }
}
+
}
return result;
}
@@ -342,14 +342,14 @@
* @throws NoSuchElementException
* if there was no such element in collection.
*/
- static <T extends JsfComponent> T find(Iterable<T> collection,
- final JsfType key) throws NoSuchElementException {
+ static <K extends Key,T extends Searchable<K>> T find(Iterable<T> collection, final K key)
+ throws NoSuchElementException {
return Iterables.find(collection, new Predicate<T>() {
@Override
public boolean apply(T input) {
- return key.equals(input.getType());
+ return key.equals(input.getKey());
}
});
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -29,9 +29,9 @@
*
*/
@SuppressWarnings("serial")
-public class Converter implements JsfComponent <Converter>{
+public class Converter implements ModelElement <Converter,Key>{
- private JsfType type;
+ private final Key type;
@Override
public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
@@ -39,9 +39,9 @@
}
/* (non-Javadoc)
- * @see org.richfaces.cdk.model.JsfComponent#getType()
+ * @see org.richfaces.cdk.model.ModelElement#getType()
*/
- public JsfType getType() {
+ public Key getKey() {
return type;
}
@@ -49,7 +49,7 @@
* <p class="changed_added_4_0"></p>
* @param type the type to set
*/
- public void setType(JsfType type) {
+ public Converter(Key type) {
this.type = type;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Event.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Event.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Event.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -30,10 +30,33 @@
* @author asmirnov(a)exadel.com
*
*/
-public class Event {
+@SuppressWarnings("serial")
+public class Event implements ModelElement<Event,Event.ClassName>{
- private String name;
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+ public static final class ClassName extends Key {
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type
+ */
+ public ClassName(String type) {
+ super(type);
+ // TODO Auto-generated constructor stub
+ }
+
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * TODO - create individual key.
+ */
+ private final ClassName name;
+
private String description;
private String className;
@@ -42,4 +65,35 @@
private String sourceInterface;
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ public Key getName() {
+ return name;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param name the name to set
+ */
+ public Event(ClassName name) {
+ this.name = name;
+ }
+
+ @Override
+ public void merge(Event other) {
+ ComponentLibrary.merge(this, other);
+ }
+
+ @Override
+ public ClassName getKey() {
+ return name;
+ }
+
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -28,20 +28,32 @@
* @author asmirnov(a)exadel.com
*
*/
-public class Facet implements Mergeable<Facet>{
+@SuppressWarnings("serial")
+public class Facet implements ModelElement<Facet,Facet.Name>{
+
+ public static final class Name extends Key {
+
+ public Name(String name) {
+ super(name);
+ }
+ }
- private final String name;
+ private final Name name;
+ private String description;
+
/**
* <p class="changed_added_4_0"></p>
* @param name
*/
public Facet(String name) {
- this.name = name;
+ this.name = new Name(name);
}
- private String description;
-
+ @Override
+ public Name getKey() {
+ return name;
+ }
/**
* <p class="changed_added_4_0"></p>
* @return the description
@@ -63,7 +75,7 @@
* <p class="changed_added_4_0"></p>
* @return the name
*/
- public String getName() {
+ public Name getName() {
return name;
}
@@ -72,4 +84,9 @@
ComponentLibrary.merge(this, other);
}
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
+ }
+
}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -1,27 +0,0 @@
-package org.richfaces.cdk.model;
-
-import java.io.Serializable;
-
-public interface JsfComponent<T> extends Serializable, Mergeable<T> {
-
- /**
- * <p class="changed_added_4_0">Marker interface for all JSF objects:
- * {@code Validator}, {@code Converter}, {@code Behavior}, {@code
- * FacesListener}</p>
- *
- * @return the type of JSF object.
- */
- public JsfType getType();
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param <R>
- * @param <P>
- * @param visitor
- * @param param
- * @return
- */
- public <R,P> R accept(LibraryVisitor<R,P> visitor,
- P param);
-
-}
\ No newline at end of file
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -1,90 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk.model;
-
-import java.io.Serializable;
-
-/**
- * <p class="changed_added_4_0">This is a Key class that should be used to find JSF elements in {@link ComponentLibrary}</p>
- * @author asmirnov(a)exadel.com
- *
- */
-@SuppressWarnings("serial")
-public class JsfType implements Serializable {
-
- private final String type;
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param type
- */
- public JsfType(String type) {
- this.type = type;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @return the type
- */
- public String getType() {
- return type;
- }
-
- @Override
- public String toString() {
- return type;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((type == null) ? 0 : type.hashCode());
- return result;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- JsfType other = (JsfType) obj;
- if (type == null) {
- if (other.type != null)
- return false;
- } else if (!type.equals(other.type))
- return false;
- return true;
- }
-
-
-}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Key.java (from rev 15224, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Key.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Key.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,90 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+import java.io.Serializable;
+
+/**
+ * <p class="changed_added_4_0">This is a Key class that should be used to find JSF elements in {@link ComponentLibrary}</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@SuppressWarnings("serial")
+public class Key implements Serializable {
+
+ private final String type;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type
+ */
+ public Key(String type) {
+ this.type = type;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ @Override
+ public String toString() {
+ return type;
+ }
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Key other = (Key) obj;
+ if (type == null) {
+ if (other.type != null)
+ return false;
+ } else if (!type.equals(other.type))
+ return false;
+ return true;
+ }
+
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Key.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/LibraryVisitor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/LibraryVisitor.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/LibraryVisitor.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -38,6 +38,6 @@
* @param param
* @return
*/
- public R visit(JsfComponent<?> c, P param);
+ public R visit(Visitable c, P param);
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -29,29 +29,28 @@
*
*/
@SuppressWarnings("serial")
-public class Listener implements JsfComponent<Listener> {
+public class Listener implements ModelElement<Listener,Key> {
- private JsfType type;
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
+ private final Key type;
@Override
public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
return visitor.visit(this, param);
}
+ public Listener(Key type) {
+ this.type = type;
+ }
/* (non-Javadoc)
- * @see org.richfaces.cdk.model.JsfComponent#getType()
+ * @see org.richfaces.cdk.model.ModelElement#getType()
*/
- public JsfType getType() {
+ public Key getKey() {
return type;
}
- /**
- * <p class="changed_added_4_0"></p>
- * @param type the type to set
- */
- public void setType(JsfType type) {
- this.type = type;
- }
@Override
public void merge(Listener other) {
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelCollection.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelCollection.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelCollection.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,203 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
+/**
+ * <p class="changed_added_4_0">
+ * Base class for all model collections.
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public abstract class ModelCollection<E extends ModelElement<E,K>, K extends Key>
+ implements SearchableCollection<E, K>, Visitable,
+ Mergeable<SearchableCollection<E, K>> {
+
+ private final class SearchPredicate implements Predicate<E> {
+
+ private final K key;
+
+ private SearchPredicate(K key) {
+ this.key = key;
+ }
+
+ @Override
+ public boolean apply(E input) {
+ return key.equals(input.getKey());
+ }
+ }
+
+ private final BiMap<K, E> elementsMap = HashBiMap.create();
+
+ private final BiMap<E, K> reverseMap = elementsMap.inverse();
+
+ // TODO -provide factory methods.
+ // private final Method factoryMethod;
+
+ @Override
+ public E find(final K key) {
+ if (null != key) {
+ return elementsMap.get(key);
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public E findOrCreate(K key) {
+ E element = find(key);
+ if (null == element) {
+ element = create(key);
+ elementsMap.put(key,element);
+ }
+ return element;
+ }
+
+ @Override
+ public Iterable<K> keys() {
+ return elementsMap.keySet();
+ }
+
+ @Override
+ public boolean add(E e) {
+ E old = elementsMap.put(e.getKey(),e);
+ if(null != old){
+ // TODO - merge values ?
+ }
+ return null != old;
+ }
+
+ @Override
+ public boolean addAll(Collection<? extends E> c) {
+ boolean changed = false;
+ for (E e : c) {
+ changed |= add(e);
+ }
+ return changed;
+ }
+
+ @Override
+ public void clear() {
+ elementsMap.clear();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public boolean contains(Object o) {
+ if (o instanceof ModelElement<?,?>) {
+ K key = ((ModelElement<E,K>) o).getKey();
+ return elementsMap.containsKey(key);
+ }
+ return false;
+ }
+
+ @Override
+ public boolean containsAll(Collection<?> c) {
+ return elementsMap.values().containsAll(c);
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return elementsMap.isEmpty();
+ }
+
+ @Override
+ public Iterator<E> iterator() {
+ return elementsMap.values().iterator();
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ return null != reverseMap.remove(o);
+ }
+
+ @Override
+ public boolean removeAll(Collection<?> c) {
+ boolean changed = false;
+ for (Object e : c) {
+ changed |= remove(e);
+ }
+ return changed;
+ }
+
+ @Override
+ public boolean retainAll(Collection<?> c) {
+// return elements.retainAll(c);
+ return false;
+ }
+
+ @Override
+ public int size() {
+ return elementsMap.size();
+ }
+
+ @Override
+ public Object[] toArray() {
+ return elementsMap.values().toArray();
+ }
+
+ @Override
+ public <T> T[] toArray(T[] a) {
+ return elementsMap.values().toArray(a);
+ }
+
+ public <R, P> R accept(
+ org.richfaces.cdk.model.LibraryVisitor<R, P> visitor, P param) {
+ R result = null;
+ Iterator<E> iterator = iterator();
+ while (null == result && iterator.hasNext()) {
+ result = iterator.next().accept(visitor, param);
+ }
+ return result;
+ };
+
+ @Override
+ public void merge(SearchableCollection<E, K> other) {
+ for (E element : other) {
+ K key = element.getKey();
+ E old = find(key);
+ if (null == old) {
+ elementsMap.put(key,element);
+ } else {
+ old.merge(element);
+ }
+ }
+ }
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelCollection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelElement.java (from rev 15224, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelElement.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelElement.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,7 @@
+package org.richfaces.cdk.model;
+
+import java.io.Serializable;
+
+public interface ModelElement<T extends ModelElement<T, K>,K extends Key> extends Serializable, Mergeable<T>, Searchable<K>, Visitable {
+
+}
\ No newline at end of file
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelElement.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -21,25 +21,26 @@
package org.richfaces.cdk.model;
-import java.io.Serializable;
import java.util.Set;
-import javax.xml.bind.annotation.XmlElement;
-
-import org.richfaces.cdk.util.Strings;
-
/**
* That class represents JSF component property.
* @author asmirnov(a)exadel.com
*
*/
@SuppressWarnings("serial")
-public class Property implements Serializable, DescriptionGroup, Mergeable<Property> {
+public class Property implements DescriptionGroup, ModelElement<Property,Property.Name> {
+ public static final class Name extends Key {
+
+ public Name(String name) {
+ super(name);
+ }
+ }
/**
* <p class="changed_added_4_0">Bean property name of component attribute</p>
*/
- private String name;
+ private final Name name;
private ClassDescription type;
@@ -81,38 +82,36 @@
private Set<String> behaviorNames;
-
/**
* <p class="changed_added_4_0"></p>
* @param name
*/
- public Property(String name) {
+ public Property(Name name) {
+ if(null==name){
+ throw new NullPointerException();
+ }
this.name = name;
}
- public Property() {
- }
+ @Override
+ public Name getKey() {
+ return name;
+ }
+
/**
* <p class="changed_added_4_0"></p>
* @return the name
*/
- @XmlElement(name="property-name")
- public String getName() {
+ public Name getName() {
return name;
}
/**
* <p class="changed_added_4_0"></p>
- * @param name
- */
- public void setName(String name) {
- this.name = name;
- }
- /**
- * <p class="changed_added_4_0"></p>
* @return the description
*/
+ @Merge
public String getDescription() {
return description;
}
@@ -129,6 +128,7 @@
* <p class="changed_added_4_0"></p>
* @return the displayname
*/
+ @Merge
public String getDisplayname() {
return displayname;
}
@@ -145,6 +145,7 @@
* <p class="changed_added_4_0"></p>
* @return the icon
*/
+ @Merge
public String getIcon() {
return icon;
}
@@ -161,6 +162,7 @@
* <p class="changed_added_4_0"></p>
* @return the type
*/
+ @Merge
public ClassDescription getType() {
return type;
}
@@ -178,7 +180,7 @@
* <p class="changed_added_4_0"></p>
* @return the dafaultValue
*/
- @XmlElement(name="default-value")
+ @Merge
public String getDafaultValue() {
return dafaultValue;
}
@@ -195,7 +197,7 @@
* <p class="changed_added_4_0"></p>
* @return the suggestedValue
*/
- @XmlElement(name="suggested-value")
+ @Merge
public String getSuggestedValue() {
return suggestedValue;
}
@@ -212,6 +214,7 @@
* <p class="changed_added_4_0"></p>
* @return the exists
*/
+ @Merge
public boolean isExists() {
return exists;
}
@@ -224,40 +227,15 @@
this.exists = exists;
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- return result;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Property other = (Property) obj;
- if (name == null) {
- if (other.name != null)
- return false;
- } else if (!name.equals(other.name))
- return false;
- return true;
+ public void merge(Property other) {
+ ComponentLibrary.merge(this, other);
}
@Override
- public void merge(Property other) {
- ComponentLibrary.merge(this, other);
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
}
}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RenderKit.java (from rev 15224, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererKit.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RenderKit.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RenderKit.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,139 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+import java.util.Collection;
+
+import javax.faces.render.RenderKitFactory;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@SuppressWarnings("serial")
+public class RenderKit implements ModelElement<RenderKit,RenderKit.Id> {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+ @SuppressWarnings("serial")
+ public static final class Id extends Key {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type
+ */
+ public Id(String type) {
+ // Null value means default render kit.
+ super(null==type?RenderKitFactory.HTML_BASIC_RENDER_KIT:type);
+ }
+
+ public String getId(){
+ return super.getType();
+ }
+ }
+
+ private Id type;
+
+ private ClassDescription renderKitClass;
+
+ private final SearchableCollection<Renderer,Renderer.Type> renderers = new ModelCollection<Renderer, Renderer.Type>() {
+
+ @Override
+ public Renderer create(Renderer.Type key) {
+ Renderer renderer = new Renderer();
+ renderer.setType(key);
+ return renderer;
+ }
+ };
+
+ /* (non-Javadoc)
+ * @see org.richfaces.cdk.model.ModelElement#getType()
+ */
+ @Override
+ public Id getKey() {
+ return type;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type the type to set
+ */
+ public void setType(Id type) {
+ this.type = type;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the renderKitClass
+ */
+ @Merge
+ public ClassDescription getRenderKitClass() {
+ return renderKitClass;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param renderKitClass the renderKitClass to set
+ */
+ public void setRenderKitClass(ClassDescription renderKitClass) {
+ this.renderKitClass = renderKitClass;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the renderers
+ */
+ public Collection<Renderer> getRenderers() {
+ return renderers;
+ }
+
+ /* (non-Javadoc)
+ * @see org.richfaces.cdk.model.ModelElement#accept(org.richfaces.cdk.model.LibraryVisitor, java.lang.Object)
+ */
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void merge(RenderKit other) {
+ renderers.merge(other.renderers);
+ ComponentLibrary.merge(this, other);
+ }
+
+ public Renderer getOrCreateRenderer(String rendererType) {
+ Renderer.Type type = new Renderer.Type(rendererType);
+ return renderers.findOrCreate(type);
+ }
+
+ public Renderer findOrCreateRenderer(String rendererType) {
+ Renderer.Type type = new Renderer.Type(rendererType);
+ return renderers.findOrCreate(type);
+ }
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RenderKit.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -31,20 +31,22 @@
*
*/
@SuppressWarnings("serial")
-public class Renderer implements JsfComponent<Renderer> {
+public class Renderer implements ModelElement<Renderer,Renderer.Type> {
private Type type;
private JavaClass template;
+
+ private String family;
@Override
public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
return visitor.visit(this, param);
}
/* (non-Javadoc)
- * @see org.richfaces.cdk.model.JsfComponent#getType()
+ * @see org.richfaces.cdk.model.ModelElement#getType()
*/
- public Type getType() {
+ public Type getKey() {
return type;
}
@@ -60,6 +62,7 @@
* <p class="changed_added_4_0"></p>
* @return the template
*/
+ @Merge
public JavaClass getTemplate() {
return template;
}
@@ -72,71 +75,45 @@
}
/**
+ * <p class="changed_added_4_0"></p>
+ * @return the family
+ */
+ @Merge
+ public String getFamily() {
+ return family;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param family the family to set
+ */
+ public void setFamily(String family) {
+ this.family = family;
+ }
+
+ /**
* <p class="changed_added_4_0">Key for lookup renderer in the model.</p>
* @author asmirnov(a)exadel.com
*
*/
@SuppressWarnings("serial")
- public static class Type extends JsfType {
+ public static class Type extends Key {
- private final String family;
- public Type(String type, String family) {
- super(type);
- this.family = family;
- }
-
/**
* <p class="changed_added_4_0"></p>
- * @return the family
+ * TODO - use family as part of key ?
+ * @param type
*/
- public String getFamily() {
- return family;
+ public Type(String type) {
+ super(type);
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result
- + ((family == null) ? 0 : family.hashCode());
- return result;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!super.equals(obj)) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- Type other = (Type) obj;
- if (family == null) {
- if (other.family != null) {
- return false;
- }
- } else if (!family.equals(other.family)) {
- return false;
- }
- return true;
- }
-
}
@Override
public void merge(Renderer other) {
- // TODO Auto-generated method stub
-
+ ComponentLibrary.merge(this, other);
}
}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererKit.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererKit.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererKit.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -1,125 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk.model;
-
-import java.util.List;
-
-import javax.faces.render.RenderKitFactory;
-
-import com.google.common.collect.Lists;
-
-/**
- * <p class="changed_added_4_0"></p>
- * @author asmirnov(a)exadel.com
- *
- */
-@SuppressWarnings("serial")
-public class RendererKit implements JsfComponent<RendererKit> {
-
- /**
- * <p class="changed_added_4_0"></p>
- * @author asmirnov(a)exadel.com
- *
- */
- @SuppressWarnings("serial")
- public static final class Type extends JsfType {
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param type
- */
- public Type(String type) {
- // Null value means default render kit.
- super(null==type?RenderKitFactory.HTML_BASIC_RENDER_KIT:type);
- }
-
- public String getId(){
- return super.getType();
- }
- }
-
- private Type type;
-
- private ClassDescription renderKitClass;
-
- private final List<Renderer> renderers = Lists.newArrayList();
-
- /* (non-Javadoc)
- * @see org.richfaces.cdk.model.JsfComponent#accept(org.richfaces.cdk.model.LibraryVisitor, java.lang.Object)
- */
- @Override
- public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.cdk.model.JsfComponent#getType()
- */
- @Override
- public Type getType() {
- return type;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param type the type to set
- */
- public void setType(Type type) {
- this.type = type;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @return the renderKitClass
- */
- public ClassDescription getRenderKitClass() {
- return renderKitClass;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param renderKitClass the renderKitClass to set
- */
- public void setRenderKitClass(ClassDescription renderKitClass) {
- this.renderKitClass = renderKitClass;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @return the renderers
- */
- public List<Renderer> getRenderers() {
- return renderers;
- }
-
- @Override
- public void merge(RendererKit other) {
- ComponentLibrary.merge(renderers, other.renderers);
- if(null != other.getRenderKitClass()){
- setRenderKitClass(other.getRenderKitClass());
- }
- }
-
-}
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Searchable.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Searchable.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Searchable.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,14 @@
+package org.richfaces.cdk.model;
+
+public interface Searchable<K extends Key> {
+
+ /**
+ * <p class="changed_added_4_0">Marker interface for all JSF objects:
+ * {@code Validator}, {@code Converter}, {@code Behavior}, {@code
+ * FacesListener}</p>
+ *
+ * @return the type of JSF object.
+ */
+ public K getKey();
+
+}
\ No newline at end of file
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Searchable.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/SearchableCollection.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/SearchableCollection.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/SearchableCollection.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,63 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+import java.util.Collection;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface SearchableCollection<E extends Searchable,K extends Key> extends Collection<E>, Visitable,
+Mergeable<SearchableCollection<E, K>> {
+
+ /**
+ * <p class="changed_added_4_0">Find element in collection by Key</p>
+ * @param key
+ * @return element from collection for that key, null if no such element.
+ */
+ public E find(K key);
+
+ /**
+ * <p class="changed_added_4_0">Look for ilement in collection by key. If such element exists in collection, return that, otherwise create a new one.</p>
+ * @param key
+ * @return
+ */
+ public E findOrCreate(K key);
+
+ /**
+ * <p class="changed_added_4_0">Factory method used to create a component instance.</p>
+ * @param key
+ * @return
+ */
+ E create(K key);
+
+ /**
+ * <p class="changed_added_4_0">Return collection of all components keys.</p>
+ * @return
+ */
+ public Iterable<K> keys();
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/SearchableCollection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Tag.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Tag.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Tag.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -60,6 +60,6 @@
* <p class="changed_added_4_0">Component that the tag creates. This in bidirectional one to one relation.</p>
* TODO - tag should also works with {@code Validator}, {@code Converter}, {@code Behavior}, {@code FacesListener}
*/
- private JsfComponent component;
+ private Searchable component;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -29,9 +29,9 @@
*
*/
@SuppressWarnings("serial")
-public class Validator implements JsfComponent<Validator> {
+public class Validator implements ModelElement<Validator,Key> {
- private JsfType type;
+ private final Key type;
@Override
public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
@@ -39,9 +39,9 @@
}
/* (non-Javadoc)
- * @see org.richfaces.cdk.model.JsfComponent#getType()
+ * @see org.richfaces.cdk.model.ModelElement#getType()
*/
- public JsfType getType() {
+ public Key getKey() {
return type;
}
@@ -49,7 +49,7 @@
* <p class="changed_added_4_0"></p>
* @param type the type to set
*/
- public void setType(JsfType type) {
+ public Validator(Key type) {
this.type = type;
}
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitable.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitable.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitable.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,15 @@
+package org.richfaces.cdk.model;
+
+public interface Visitable {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param <R>
+ * @param <P>
+ * @param visitor
+ * @param param
+ * @return
+ */
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param);
+
+}
\ No newline at end of file
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitable.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/CdkEntityResolver.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/CdkEntityResolver.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/CdkEntityResolver.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,215 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.richfaces.cdk.CdkContext;
+import org.richfaces.cdk.StandardSources;
+import org.richfaces.cdk.CdkContext.SourceType;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.EntityResolver2;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * <p class="changed_added_4_0">
+ * That class resolves entities used by CDK ( standard JSF schemas, extensions,
+ * configuration fragments.)
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class CdkEntityResolver implements EntityResolver2 {
+
+ // configure a validating SAX2.0 parser (Xerces2)
+ public static final String JAXP_SCHEMA_LANGUAGE =
+ "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
+ public static final String JAXP_SCHEMA_LOCATION =
+ "http://java.sun.com/xml/jaxp/properties/schemaSource";
+ public static final String W3C_XML_SCHEMA =
+ "http://www.w3.org/2001/XMLSchema";
+
+ private static final String URN_SYSTEM = "urn:system:";
+
+ private static final ImmutableMap<String, String> systemEntities = ImmutableMap
+ .<String, String> builder()
+ .put("http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd",
+ URN_SYSTEM + "web-facesconfig_2_0.xsd")
+ .put("http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd",
+ URN_SYSTEM + "web-facesconfig_1_2.xsd")
+ .put("http://java.sun.com/xml/ns/javaee/javaee_5.xsd",
+ URN_SYSTEM + "javaee_5.xsd")
+ .put(
+ "http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd",
+ URN_SYSTEM + "javaee_web_services_1_2.xsd")
+ .put(
+ "http://java.sun.com/xml/ns/javaee/javaee_web_services_client_1_2.xsd",
+ URN_SYSTEM + "javaee_web_services_client_1_2.xsd")
+ .put("http://www.w3.org/2001/03/xml.xsd", URN_SYSTEM + "xml.xsd")
+ .build();
+
+ private static final String SYSTEM_PREFIX = "/META-INF/schema/";
+
+ private static final String URN_RESOURCE = "urn:resource:";
+
+ private static final String RESOURCE_PREFIX = "";
+
+ private static final String URN_CONFIG = "urn:config:";
+
+ private static final String URN_TEMPLATES = "urn:templates:";
+
+ private static final String URN_ATTRIBUTES = "urn:attributes:";
+
+ private static final String ATTRIBUTES_PREFIX = "META-INF/cdk/attributes/";
+
+ private final CdkContext context;
+
+ public CdkEntityResolver(CdkContext context) {
+ this.context = context;
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.xml.sax.ext.EntityResolver2#getExternalSubset(java.lang.String,
+ * java.lang.String)
+ */
+ @Override
+ public InputSource getExternalSubset(String name, String baseURI)
+ throws SAXException, IOException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.xml.sax.ext.EntityResolver2#resolveEntity(java.lang.String,
+ * java.lang.String, java.lang.String, java.lang.String)
+ */
+ @Override
+ public InputSource resolveEntity(String name, String publicId,
+ String baseURI, String systemId) throws SAXException, IOException {
+ // TODO perform conversions with baseURI
+ return resolveSystemId(systemId);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String,
+ * java.lang.String)
+ */
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId)
+ throws SAXException, IOException {
+ InputSource entity = null;
+ if (null != systemId) {
+ entity = resolveSystemId(systemId);
+ } else {
+ //TODO - check publicId
+ }
+ return entity;
+ }
+
+ protected InputSource resolveSystemId(String systemId)
+ throws FileNotFoundException {
+ InputSource entity = null;
+ // first step - convert known system url's:
+ if (systemEntities.containsKey(systemId)) {
+ systemId = systemEntities.get(systemId);
+ }
+ // Check registered urn's:
+ if (systemId.startsWith(URN_SYSTEM)) {
+ // Cdk resources
+ String path = systemId.substring(URN_SYSTEM.length());
+ InputStream inputStream = CdkEntityResolver.class
+ .getResourceAsStream(SYSTEM_PREFIX + path);
+ if (null != inputStream) {
+ entity = new InputSource(inputStream);
+
+ }
+ } else if (systemId.startsWith(URN_RESOURCE)) {
+ // Project resources
+ String path = systemId.substring(URN_RESOURCE.length());
+ InputStream inputStream = getContext().getLoader()
+ .getResourceAsStream(RESOURCE_PREFIX + path);
+ if (null != inputStream) {
+ entity = new InputSource(inputStream);
+
+ }
+ } else if (systemId.startsWith(URN_ATTRIBUTES)) {
+ // Standard attributes. Look for them in the satndard place via project classloader.
+ String path = systemId.substring(URN_ATTRIBUTES.length());
+ InputStream inputStream = getContext().getLoader()
+ .getResourceAsStream(ATTRIBUTES_PREFIX + path);
+ if (null != inputStream) {
+ entity = new InputSource(inputStream);
+
+ }
+ } else if (systemId.startsWith(URN_CONFIG)) {
+ // Config folder.
+ String path = systemId.substring(URN_CONFIG.length());
+ entity = getProjectInputSource(StandardSources.FACES_CONFIGS, path);
+ } else if (systemId.startsWith(URN_TEMPLATES)) {
+ // Templates folder.
+ String path = systemId.substring(URN_TEMPLATES.length());
+ entity = getProjectInputSource(StandardSources.RENDERER_TEMPLATES, path);
+ }
+ return entity;
+ }
+
+ protected InputSource getProjectInputSource(SourceType type, String path)
+ throws FileNotFoundException {
+ File folder = getContext().getSourceFolder(type);
+ InputSource entity = null;
+ if(null != folder && folder.exists() && folder.isDirectory()){
+ File configFile = new File(folder,path);
+ if(configFile.exists()){
+ InputStream inputStream = new FileInputStream(configFile);
+ entity = new InputSource(inputStream);
+ }
+ }
+ return entity;
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @return the context
+ */
+ public CdkContext getContext() {
+ return context;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/CdkEntityResolver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FragmentParser.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FragmentParser.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FragmentParser.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,134 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig;
+
+import java.io.FileNotFoundException;
+import java.util.Collection;
+import java.util.Collections;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.util.ValidationEventCollector;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.sax.SAXSource;
+
+import org.richfaces.cdk.CdkContext;
+import org.richfaces.cdk.CdkException;
+import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.Property;
+import org.richfaces.cdk.xmlconfig.model.Properties;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+import org.xml.sax.XMLReader;
+
+/**
+ * <p class="changed_added_4_0">
+ * That class parses xml document with fragment of faces-config ( eg, standard
+ * component attributes )
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class FragmentParser {
+
+ private CdkContext context;
+
+ private CdkEntityResolver resolver;
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @param context
+ */
+ public FragmentParser(CdkContext context) {
+ this.context = context;
+ this.resolver = new CdkEntityResolver(context);
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * Parses faces-config.xml fragment with component/renderer properties.
+ * </p>
+ *
+ * @param url
+ * @return
+ */
+ public Collection<Property> parseProperties(String url) throws CdkException {
+ SAXParserFactory spf = SAXParserFactory.newInstance("org.apache.xerces.jaxp.SAXParserFactoryImpl",FragmentParser.class.getClassLoader());
+ spf.setNamespaceAware(true);
+ spf.setValidating(true);
+ try {
+ spf.setFeature("http://apache.org/xml/features/validation/schema", true);
+ spf.setFeature("http://apache.org/xml/features/xinclude", true);
+ spf.setFeature("http://apache.org/xml/features/xinclude/fixup-base-uris", false);
+ SAXParser saxParser = spf.newSAXParser();
+ try {
+ saxParser.setProperty(CdkEntityResolver.JAXP_SCHEMA_LANGUAGE,
+ CdkEntityResolver.W3C_XML_SCHEMA);
+ saxParser.setProperty(CdkEntityResolver.JAXP_SCHEMA_LOCATION,
+ ComponentLibrary.FACES_CONFIG_SCHEMA_LOCATION);
+
+ } catch (SAXNotRecognizedException x) {
+ // exception handling omitted
+ } catch (SAXNotSupportedException e) {
+ throw new CdkException(e);
+ }
+
+ XMLReader xmlReader = saxParser.getXMLReader();
+ xmlReader.setEntityResolver(resolver);
+ SAXSource source = new SAXSource(xmlReader, resolver.resolveSystemId(url));
+
+ // Setup JAXB to unmarshal
+ JAXBContext jc = JAXBContext.newInstance(Properties.class);
+ Unmarshaller u = jc.createUnmarshaller();
+ ValidationEventCollector vec = new ValidationEventCollector();
+ u.setEventHandler(vec);
+
+ // turn off the JAXB provider's default validation mechanism to
+ // avoid duplicate validation
+// u.setValidating(false);
+ Properties unmarshal = (Properties) u.unmarshal(source);
+ return unmarshal.getProperty();
+ } catch(SAXException e){
+
+ } catch (ParserConfigurationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (JAXBException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return Collections.emptySet();
+ }
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/FragmentParser.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/Properties.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/Properties.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/Properties.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,65 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig.model;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.richfaces.cdk.model.Attribute;
+import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.Property;
+
+import com.google.common.collect.Lists;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@XmlRootElement(name="properties",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+public class Properties {
+ private List<Property> property = Lists.newArrayList();
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the property
+ */
+ @XmlElements({@XmlElement(name="property",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE,type=PropertyBean.class)/*,@XmlElement(name="attribute",type=Attribute.class)*/})
+// @XmlElement(name="property",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public List<Property> getProperty() {
+ return property;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param property the property to set
+ */
+ public void setProperty(List<Property> property) {
+ this.property = property;
+ }
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/Properties.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyAdapter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyAdapter.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyAdapter.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,53 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig.model;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.richfaces.cdk.model.ClassDescription;
+import org.richfaces.cdk.model.Property;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class PropertyAdapter extends XmlAdapter<PropertyBean, Property> {
+
+ @Override
+ public PropertyBean marshal(Property v) throws Exception {
+ PropertyBean bean = new PropertyBean();
+ bean.setName(v.getName().toString());
+ bean.setType(v.getType().toString());
+ return bean;
+ }
+
+ @Override
+ public Property unmarshal(PropertyBean v) throws Exception {
+ Property property = new Property(new Property.Name(v.getName()));
+ property.setType(new ClassDescription(v.getType()));
+ return property;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyAdapter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,75 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig.model;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.richfaces.cdk.model.ComponentLibrary;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class PropertyBean {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ @XmlElement(name="property-name",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the type
+ */
+ @XmlElement(name="property-class",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type the type to set
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ private String name;
+
+ private String type;
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/package-info.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/package-info.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/package-info.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,21 @@
+/**
+ * <h2>JAXB classes that wraps real model classes.</h2>
+ * <p>Some model requirements do not match JAXB plain bean model. The most important case is requirements for unique Id's like component and renderer type.
+ * the other important difference is model properties which do not map to faces-config schema but moved into <<....-extension> elements.</p>
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.NONE)
+(a)javax.xml.bind.annotation.XmlSchema(namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE,
+ location=ComponentLibrary.FACES_CONFIG_SCHEMA_LOCATION,
+ xmlns = { @javax.xml.bind.annotation.XmlNs( prefix = "cdk",
+ namespaceURI = ComponentLibrary.CDK_EXTENSIONS_NAMESPACE ) })
+(a)XmlJavaTypeAdapter(type=Property.class,value=PropertyAdapter.class)
+
+package org.richfaces.cdk.xmlconfig.model;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.Property;
+
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_5.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_5.xsd (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_5.xsd 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,2133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+
+<xsd:schema
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="5">
+ <xsd:annotation>
+ <xsd:documentation>
+ @(#)javaee_5.xsds 1.65 06/02/17
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2003-2005 Sun Microsystems, Inc.
+ 4150 Network Circle
+ Santa Clara, California 95054
+ U.S.A
+ All rights reserved.
+
+ Sun Microsystems, Inc. has intellectual property rights
+ relating to technology described in this document. In
+ particular, and without limitation, these intellectual
+ property rights may include one or more of the U.S. patents
+ listed at http://www.sun.com/patents and one or more
+ additional patents or pending patent applications in the
+ U.S. and other countries.
+
+ This document and the technology which it describes are
+ distributed under licenses restricting their use, copying,
+ distribution, and decompilation. No part of this document
+ may be reproduced in any form by any means without prior
+ written authorization of Sun and its licensors, if any.
+
+ Third-party software, including font technology, is
+ copyrighted and licensed from Sun suppliers.
+
+ Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
+ JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+ Cup logo are trademarks or registered trademarks of Sun
+ Microsystems, Inc. in the U.S. and other countries.
+
+ Federal Acquisitions: Commercial Software - Government Users
+ Subject to Standard License Terms and Conditions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+<xsd:annotation>
+<xsd:documentation>
+
+The following definitions that appear in the common
+shareable schema(s) of J2EE deployment descriptors should be
+interpreted with respect to the context they are included:
+
+Deployment Component may indicate one of the following:
+ j2ee application;
+ application client;
+ web application;
+ enterprise bean;
+ resource adapter;
+
+Deployment File may indicate one of the following:
+ ear file;
+ war file;
+ jar file;
+ rar file;
+
+</xsd:documentation>
+</xsd:annotation>
+
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <xsd:include schemaLocation="javaee_web_services_client_1_2.xsd"/>
+
+
+<!-- **************************************************** -->
+
+ <xsd:group name="descriptionGroup">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This group keeps the usage of the contained description related
+ elements consistent across Java EE deployment descriptors.
+
+ All elements may occur multiple times with different languages,
+ to support localization of the content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="display-name"
+ type="javaee:display-nameType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="icon"
+ type="javaee:iconType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="descriptionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The description type is used by a description element to
+ provide text describing the parent element. The elements
+ that use this type should include any information that the
+ Deployment Component's Deployment File file producer wants
+ to provide to the consumer of the Deployment Component's
+ Deployment File (i.e., to the Deployer). Typically, the
+ tools used by such a Deployment File consumer will display
+ the description when processing the parent element that
+ contains the description.
+
+ The lang attribute defines the language that the
+ description is provided in. The default value is "en" (English).
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:xsdStringType">
+ <xsd:attribute ref="xml:lang"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:simpleType name="dewey-versionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type defines a dewey decimal that is used
+ to describe versions of documents.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="\.?[0-9]+(\.[0-9]+)*"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="display-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The display-name type contains a short name that is intended
+ to be displayed by tools. It is used by display-name
+ elements. The display name need not be unique.
+
+ Example:
+
+ ...
+ <display-name xml:lang="en">
+ Employee Self Service
+ </display-name>
+
+ The value of the xml:lang attribute is "en" (English) by default.
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:string">
+ <xsd:attribute ref="xml:lang"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="ejb-linkType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The ejb-linkType is used by ejb-link
+ elements in the ejb-ref or ejb-local-ref elements to specify
+ that an EJB reference is linked to enterprise bean.
+
+ The value of the ejb-link element must be the ejb-name of an
+ enterprise bean in the same ejb-jar file or in another ejb-jar
+ file in the same Java EE application unit.
+
+ Alternatively, the name in the ejb-link element may be
+ composed of a path name specifying the ejb-jar containing the
+ referenced enterprise bean with the ejb-name of the target
+ bean appended and separated from the path name by "#". The
+ path name is relative to the Deployment File containing
+ Deployment Component that is referencing the enterprise
+ bean. This allows multiple enterprise beans with the same
+ ejb-name to be uniquely identified.
+
+ Examples:
+
+ <ejb-link>EmployeeRecord</ejb-link>
+
+ <ejb-link>../products/product.jar#ProductEJB</ejb-link>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="ejb-local-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The ejb-local-refType is used by ejb-local-ref elements for
+ the declaration of a reference to an enterprise bean's local
+ home or to the local business interface of a 3.0 bean.
+ The declaration consists of:
+
+ - an optional description
+ - the EJB reference name used in the code of the Deployment
+ Component that's referencing the enterprise bean.
+ - the optional expected type of the referenced enterprise bean
+ - the optional expected local interface of the referenced
+ enterprise bean or the local business interface of the
+ referenced enterprise bean.
+ - the optional expected local home interface of the referenced
+ enterprise bean. Not applicable if this ejb-local-ref refers
+ to the local business interface of a 3.0 bean.
+ - optional ejb-link information, used to specify the
+ referenced enterprise bean
+ - optional elements to define injection of the named enterprise
+ bean into a component field or property.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="ejb-ref-name"
+ type="javaee:ejb-ref-nameType"/>
+ <xsd:element name="ejb-ref-type"
+ type="javaee:ejb-ref-typeType"
+ minOccurs="0"/>
+ <xsd:element name="local-home"
+ type="javaee:local-homeType"
+ minOccurs="0"/>
+ <xsd:element name="local"
+ type="javaee:localType"
+ minOccurs="0"/>
+ <xsd:element name="ejb-link"
+ type="javaee:ejb-linkType"
+ minOccurs="0"/>
+ <xsd:group ref="javaee:resourceGroup"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="ejb-ref-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The ejb-ref-name element contains the name of an EJB
+ reference. The EJB reference is an entry in the
+ Deployment Component's environment and is relative to the
+ java:comp/env context. The name must be unique within the
+ Deployment Component.
+
+ It is recommended that name is prefixed with "ejb/".
+
+ Example:
+
+ <ejb-ref-name>ejb/Payroll</ejb-ref-name>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:jndi-nameType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="ejb-ref-typeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The ejb-ref-typeType contains the expected type of the
+ referenced enterprise bean.
+
+ The ejb-ref-type designates a value
+ that must be one of the following:
+
+ Entity
+ Session
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:enumeration value="Entity"/>
+ <xsd:enumeration value="Session"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="ejb-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The ejb-refType is used by ejb-ref elements for the
+ declaration of a reference to an enterprise bean's home or
+ to the remote business interface of a 3.0 bean.
+ The declaration consists of:
+
+ - an optional description
+ - the EJB reference name used in the code of
+ the Deployment Component that's referencing the enterprise
+ bean.
+ - the optional expected type of the referenced enterprise bean
+ - the optional remote interface of the referenced enterprise bean
+ or the remote business interface of the referenced enterprise
+ bean
+ - the optional expected home interface of the referenced
+ enterprise bean. Not applicable if this ejb-ref
+ refers to the remote business interface of a 3.0 bean.
+ - optional ejb-link information, used to specify the
+ referenced enterprise bean
+ - optional elements to define injection of the named enterprise
+ bean into a component field or property
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="ejb-ref-name"
+ type="javaee:ejb-ref-nameType"/>
+ <xsd:element name="ejb-ref-type"
+ type="javaee:ejb-ref-typeType"
+ minOccurs="0"/>
+ <xsd:element name="home"
+ type="javaee:homeType"
+ minOccurs="0"/>
+ <xsd:element name="remote"
+ type="javaee:remoteType"
+ minOccurs="0"/>
+ <xsd:element name="ejb-link"
+ type="javaee:ejb-linkType"
+ minOccurs="0"/>
+ <xsd:group ref="javaee:resourceGroup"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="emptyType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type is used to designate an empty
+ element when used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="env-entry-type-valuesType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ This type contains the fully-qualified Java type of the
+ environment entry value that is expected by the
+ application's code.
+
+ The following are the legal values of env-entry-type-valuesType:
+
+ java.lang.Boolean
+ java.lang.Byte
+ java.lang.Character
+ java.lang.String
+ java.lang.Short
+ java.lang.Integer
+ java.lang.Long
+ java.lang.Float
+ java.lang.Double
+
+ Example:
+
+ <env-entry-type>java.lang.Boolean</env-entry-type>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:enumeration value="java.lang.Boolean"/>
+ <xsd:enumeration value="java.lang.Byte"/>
+ <xsd:enumeration value="java.lang.Character"/>
+ <xsd:enumeration value="java.lang.String"/>
+ <xsd:enumeration value="java.lang.Short"/>
+ <xsd:enumeration value="java.lang.Integer"/>
+ <xsd:enumeration value="java.lang.Long"/>
+ <xsd:enumeration value="java.lang.Float"/>
+ <xsd:enumeration value="java.lang.Double"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="env-entryType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The env-entryType is used to declare an application's
+ environment entry. The declaration consists of an optional
+ description, the name of the environment entry, a type
+ (optional if the value is injected, otherwise required), and
+ an optional value.
+
+ It also includes optional elements to define injection of
+ the named resource into fields or JavaBeans properties.
+
+ If a value is not specified and injection is requested,
+ no injection will occur and no entry of the specified name
+ will be created. This allows an initial value to be
+ specified in the source code without being incorrectly
+ changed when no override has been specified.
+
+ If a value is not specified and no injection is requested,
+ a value must be supplied during deployment.
+
+ This type is used by env-entry elements.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="env-entry-name"
+ type="javaee:jndi-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The env-entry-name element contains the name of a
+ Deployment Component's environment entry. The name
+ is a JNDI name relative to the java:comp/env
+ context. The name must be unique within a
+ Deployment Component. The uniqueness
+ constraints must be defined within the declared
+ context.
+
+ Example:
+
+ <env-entry-name>minAmount</env-entry-name>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="env-entry-type"
+ type="javaee:env-entry-type-valuesType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The env-entry-type element contains the Java language
+ type of the environment entry. If an injection target
+ is specified for the environment entry, the type may
+ be omitted, or must match the type of the injection
+ target. If no injection target is specified, the type
+ is required.
+
+ Example:
+
+ <env-entry-type>java.lang.Integer</env-entry-type>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="env-entry-value"
+ type="javaee:xsdStringType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The env-entry-value designates the value of a
+ Deployment Component's environment entry. The value
+ must be a String that is valid for the
+ constructor of the specified type that takes a
+ single String parameter, or for java.lang.Character,
+ a single character.
+
+ Example:
+
+ <env-entry-value>100.00</env-entry-value>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:group ref="javaee:resourceGroup"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The elements that use this type designate the name of a
+ Java class or interface. The name is in the form of a
+ "binary name", as defined in the JLS. This is the form
+ of name used in Class.forName(). Tools that need the
+ canonical name (the name used in source code) will need
+ to convert this binary name to the canonical name.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="generic-booleanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type defines four different values which can designate
+ boolean values. This includes values yes and no which are
+ not designated by xsd:boolean
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:enumeration value="true"/>
+ <xsd:enumeration value="false"/>
+ <xsd:enumeration value="yes"/>
+ <xsd:enumeration value="no"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="homeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The homeType defines the fully-qualified name of
+ an enterprise bean's home interface.
+
+ Example:
+
+ <home>com.aardvark.payroll.PayrollHome</home>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:fully-qualified-classType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="iconType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The icon type contains small-icon and large-icon elements
+ that specify the file names for small and large GIF, JPEG,
+ or PNG icon images used to represent the parent element in a
+ GUI tool.
+
+ The xml:lang attribute defines the language that the
+ icon file names are provided in. Its value is "en" (English)
+ by default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="small-icon" type="javaee:pathType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The small-icon element contains the name of a file
+ containing a small (16 x 16) icon image. The file
+ name is a relative path within the Deployment
+ Component's Deployment File.
+
+ The image may be in the GIF, JPEG, or PNG format.
+ The icon can be used by tools.
+
+ Example:
+
+ <small-icon>employee-service-icon16x16.jpg</small-icon>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="large-icon" type="javaee:pathType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The large-icon element contains the name of a file
+ containing a large
+ (32 x 32) icon image. The file name is a relative
+ path within the Deployment Component's Deployment
+ File.
+
+ The image may be in the GIF, JPEG, or PNG format.
+ The icon can be used by tools.
+
+ Example:
+
+ <large-icon>employee-service-icon32x32.jpg</large-icon>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ </xsd:sequence>
+
+ <xsd:attribute ref="xml:lang"/>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="injection-targetType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ An injection target specifies a class and a name within
+ that class into which a resource should be injected.
+
+ The injection target class specifies the fully qualified
+ class name that is the target of the injection. The
+ Java EE specifications describe which classes can be an
+ injection target.
+
+ The injection target name specifies the target within
+ the specified class. The target is first looked for as a
+ JavaBeans property name. If not found, the target is
+ looked for as a field name.
+
+ The specified resource will be injected into the target
+ during initialization of the class by either calling the
+ set method for the target property or by setting a value
+ into the named field.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="injection-target-class"
+ type="javaee:fully-qualified-classType"/>
+ <xsd:element name="injection-target-name"
+ type="javaee:java-identifierType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The java-identifierType defines a Java identifier.
+ The users of this type should further verify that
+ the content does not contain Java reserved keywords.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:pattern value="($|_|\p{L})(\p{L}|\p{Nd}|_|$)*"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="java-typeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This is a generic type that designates a Java primitive
+ type or a fully qualified name of a Java interface/type,
+ or an array of such types.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:pattern value="[^\p{Z}]*"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="jndi-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The jndi-nameType type designates a JNDI name in the
+ Deployment Component's environment and is relative to the
+ java:comp/env context. A JNDI name must be unique within the
+ Deployment Component.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:group name="jndiEnvironmentRefsGroup">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This group keeps the usage of the contained JNDI environment
+ reference elements consistent across Java EE deployment descriptors.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="env-entry"
+ type="javaee:env-entryType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ejb-ref"
+ type="javaee:ejb-refType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ejb-local-ref"
+ type="javaee:ejb-local-refType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="javaee:service-refGroup"/>
+ <xsd:element name="resource-ref"
+ type="javaee:resource-refType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="resource-env-ref"
+ type="javaee:resource-env-refType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="message-destination-ref"
+ type="javaee:message-destination-refType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="persistence-context-ref"
+ type="javaee:persistence-context-refType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="persistence-unit-ref"
+ type="javaee:persistence-unit-refType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="post-construct"
+ type="javaee:lifecycle-callbackType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="pre-destroy"
+ type="javaee:lifecycle-callbackType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="lifecycle-callbackType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The lifecycle-callback type specifies a method on a
+ class to be called when a lifecycle event occurs.
+ Note that each class may have only one lifecycle callback
+ method for any given event and that the method may not
+ be overloaded.
+
+ If the lifefycle-callback-class element is missing then
+ the class defining the callback is assumed to be the
+ component class in scope at the place in the descriptor
+ in which the callback definition appears.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="lifecycle-callback-class"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0"/>
+ <xsd:element name="lifecycle-callback-method"
+ type="javaee:java-identifierType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="listenerType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The listenerType indicates the deployment properties for a web
+ application listener bean.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="listener-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The listener-class element declares a class in the
+ application must be registered as a web
+ application listener bean. The value is the fully
+ qualified classname of the listener class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="local-homeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The local-homeType defines the fully-qualified
+ name of an enterprise bean's local home interface.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:fully-qualified-classType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="localType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The localType defines the fully-qualified name of an
+ enterprise bean's local interface.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:fully-qualified-classType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="message-destination-linkType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The message-destination-linkType is used to link a message
+ destination reference or message-driven bean to a message
+ destination.
+
+ The Assembler sets the value to reflect the flow of messages
+ between producers and consumers in the application.
+
+ The value must be the message-destination-name of a message
+ destination in the same Deployment File or in another
+ Deployment File in the same Java EE application unit.
+
+ Alternatively, the value may be composed of a path name
+ specifying a Deployment File containing the referenced
+ message destination with the message-destination-name of the
+ destination appended and separated from the path name by
+ "#". The path name is relative to the Deployment File
+ containing Deployment Component that is referencing the
+ message destination. This allows multiple message
+ destinations with the same name to be uniquely identified.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="message-destination-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The message-destination-ref element contains a declaration
+ of Deployment Component's reference to a message destination
+ associated with a resource in Deployment Component's
+ environment. It consists of:
+
+ - an optional description
+ - the message destination reference name
+ - an optional message destination type
+ - an optional specification as to whether
+ the destination is used for
+ consuming or producing messages, or both.
+ if not specified, "both" is assumed.
+ - an optional link to the message destination
+ - optional injection targets
+
+ The message destination type must be supplied unless an
+ injection target is specified, in which case the type
+ of the target is used. If both are specified, the type
+ must be assignment compatible with the type of the injection
+ target.
+
+ Examples:
+
+ <message-destination-ref>
+ <message-destination-ref-name>jms/StockQueue
+ </message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue
+ </message-destination-type>
+ <message-destination-usage>Consumes
+ </message-destination-usage>
+ <message-destination-link>CorporateStocks
+ </message-destination-link>
+ </message-destination-ref>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="message-destination-ref-name"
+ type="javaee:jndi-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The message-destination-ref-name element specifies
+ the name of a message destination reference; its
+ value is the environment entry name used in
+ Deployment Component code. The name is a JNDI name
+ relative to the java:comp/env context and must be
+ unique within an ejb-jar (for enterprise beans) or a
+ Deployment File (for others).
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="message-destination-type"
+ type="javaee:message-destination-typeType"
+ minOccurs="0"/>
+ <xsd:element name="message-destination-usage"
+ type="javaee:message-destination-usageType"
+ minOccurs="0"/>
+ <xsd:element name="message-destination-link"
+ type="javaee:message-destination-linkType"
+ minOccurs="0"/>
+
+ <xsd:group ref="javaee:resourceGroup"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="message-destination-typeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The message-destination-typeType specifies the type of
+ the destination. The type is specified by the Java interface
+ expected to be implemented by the destination.
+
+ Example:
+
+ <message-destination-type>javax.jms.Queue
+ </message-destination-type>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:fully-qualified-classType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="message-destination-usageType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The message-destination-usageType specifies the use of the
+ message destination indicated by the reference. The value
+ indicates whether messages are consumed from the message
+ destination, produced for the destination, or both. The
+ Assembler makes use of this information in linking producers
+ of a destination with its consumers.
+
+ The value of the message-destination-usage element must be
+ one of the following:
+ Consumes
+ Produces
+ ConsumesProduces
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:enumeration value="Consumes"/>
+ <xsd:enumeration value="Produces"/>
+ <xsd:enumeration value="ConsumesProduces"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="message-destinationType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The message-destinationType specifies a message
+ destination. The logical destination described by this
+ element is mapped to a physical destination by the Deployer.
+
+ The message destination element contains:
+
+ - an optional description
+ - an optional display-name
+ - an optional icon
+ - a message destination name which must be unique
+ among message destination names within the same
+ Deployment File.
+ - an optional mapped name
+
+ Example:
+
+ <message-destination>
+ <message-destination-name>CorporateStocks
+ </message-destination-name>
+ </message-destination>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="message-destination-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The message-destination-name element specifies a
+ name for a message destination. This name must be
+ unique among the names of message destinations
+ within the Deployment File.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="mapped-name"
+ type="javaee:xsdStringType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ A product specific name that this message destination
+ should be mapped to. Each message-destination-ref
+ element that references this message destination will
+ define a name in the namespace of the referencing
+ component. (It's a name in the JNDI java:comp/env
+ namespace.) Many application servers provide a way to
+ map these local names to names of resources known to the
+ application server. This mapped name is often a global
+ JNDI name, but may be a name of any form. Each of the
+ local names should be mapped to this same global name.
+
+ Application servers are not required to support any
+ particular form or type of mapped name, nor the ability
+ to use mapped names. The mapped name is
+ product-dependent and often installation-dependent. No
+ use of a mapped name is portable.
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="param-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type is a general type that can be used to declare
+ parameter/value lists.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="param-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The param-name element contains the name of a
+ parameter.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="param-value"
+ type="javaee:xsdStringType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The param-value element contains the value of a
+ parameter.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="pathType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The elements that use this type designate either a relative
+ path or an absolute path starting with a "/".
+
+ In elements that specify a pathname to a file within the
+ same Deployment File, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the Deployment File's namespace. Absolute filenames (i.e.,
+ those starting with "/") also specify names in the root of
+ the Deployment File's namespace. In general, relative names
+ are preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="persistence-context-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The persistence-context-ref element contains a declaration
+ of Deployment Component's reference to a persistence context
+ associated within a Deployment Component's
+ environment. It consists of:
+
+ - an optional description
+ - the persistence context reference name
+ - an optional persistence unit name. If not specified,
+ the default persistence unit is assumed.
+ - an optional specification as to whether
+ the persistence context type is Transaction or
+ Extended. If not specified, Transaction is assumed.
+ - an optional list of persistence properties
+ - optional injection targets
+
+ Examples:
+
+ <persistence-context-ref>
+ <persistence-context-ref-name>myPersistenceContext
+ </persistence-context-ref-name>
+ </persistence-context-ref>
+
+ <persistence-context-ref>
+ <persistence-context-ref-name>myPersistenceContext
+ </persistence-context-ref-name>
+ <persistence-unit-name>PersistenceUnit1
+ </persistence-unit-name>
+ <persistence-context-type>Extended</persistence-context-type>
+ </persistence-context-ref>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="persistence-context-ref-name"
+ type="javaee:jndi-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The persistence-context-ref-name element specifies
+ the name of a persistence context reference; its
+ value is the environment entry name used in
+ Deployment Component code. The name is a JNDI name
+ relative to the java:comp/env context.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="persistence-unit-name"
+ type="javaee:string"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The Application Assembler(or BeanProvider) may use the
+ following syntax to avoid the need to rename persistence
+ units to have unique names within a Java EE application.
+
+ The Application Assembler specifies the pathname of the
+ root of the persistence.xml file for the referenced
+ persistence unit and appends the name of the persistence
+ unit separated from the pathname by #. The pathname is
+ relative to the referencing application component jar file.
+ In this manner, multiple persistence units with the same
+ persistence unit name may be uniquely identified when the
+ Application Assembler cannot change persistence unit names.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="persistence-context-type"
+ type="javaee:persistence-context-typeType"
+ minOccurs="0"/>
+
+ <xsd:element name="persistence-property"
+ type="javaee:propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Used to specify properties for the container or persistence
+ provider. Vendor-specific properties may be included in
+ the set of properties. Properties that are not recognized
+ by a vendor must be ignored. Entries that make use of the
+ namespace javax.persistence and its subnamespaces must not
+ be used for vendor-specific properties. The namespace
+ javax.persistence is reserved for use by the specification.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:group ref="javaee:resourceGroup"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="persistence-context-typeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The persistence-context-typeType specifies the transactional
+ nature of a persistence context reference.
+
+ The value of the persistence-context-type element must be
+ one of the following:
+ Transaction
+ Extended
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:enumeration value="Transaction"/>
+ <xsd:enumeration value="Extended"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="persistence-unit-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The persistence-unit-ref element contains a declaration
+ of Deployment Component's reference to a persistence unit
+ associated within a Deployment Component's
+ environment. It consists of:
+
+ - an optional description
+ - the persistence unit reference name
+ - an optional persistence unit name. If not specified,
+ the default persistence unit is assumed.
+ - optional injection targets
+
+ Examples:
+
+ <persistence-unit-ref>
+ <persistence-unit-ref-name>myPersistenceUnit
+ </persistence-unit-ref-name>
+ </persistence-unit-ref>
+
+ <persistence-unit-ref>
+ <persistence-unit-ref-name>myPersistenceUnit
+ </persistence-unit-ref-name>
+ <persistence-unit-name>PersistenceUnit1
+ </persistence-unit-name>
+ </persistence-unit-ref>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="persistence-unit-ref-name"
+ type="javaee:jndi-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The persistence-unit-ref-name element specifies
+ the name of a persistence unit reference; its
+ value is the environment entry name used in
+ Deployment Component code. The name is a JNDI name
+ relative to the java:comp/env context.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="persistence-unit-name"
+ type="javaee:string"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The Application Assembler(or BeanProvider) may use the
+ following syntax to avoid the need to rename persistence
+ units to have unique names within a Java EE application.
+
+ The Application Assembler specifies the pathname of the
+ root of the persistence.xml file for the referenced
+ persistence unit and appends the name of the persistence
+ unit separated from the pathname by #. The pathname is
+ relative to the referencing application component jar file.
+ In this manner, multiple persistence units with the same
+ persistence unit name may be uniquely identified when the
+ Application Assembler cannot change persistence unit names.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:group ref="javaee:resourceGroup"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="propertyType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Specifies a name/value pair.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="name"
+ type="javaee:xsdStringType">
+ </xsd:element>
+ <xsd:element name="value"
+ type="javaee:xsdStringType">
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="remoteType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The remote element contains the fully-qualified name
+ of the enterprise bean's remote interface.
+
+ Example:
+
+ <remote>com.wombat.empl.EmployeeService</remote>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:fully-qualified-classType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="res-authType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The res-authType specifies whether the Deployment Component
+ code signs on programmatically to the resource manager, or
+ whether the Container will sign on to the resource manager
+ on behalf of the Deployment Component. In the latter case,
+ the Container uses information that is supplied by the
+ Deployer.
+
+ The value must be one of the two following:
+
+ Application
+ Container
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:enumeration value="Application"/>
+ <xsd:enumeration value="Container"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="res-sharing-scopeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The res-sharing-scope type specifies whether connections
+ obtained through the given resource manager connection
+ factory reference can be shared. The value, if specified,
+ must be one of the two following:
+
+ Shareable
+ Unshareable
+
+ The default value is Shareable.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:enumeration value="Shareable"/>
+ <xsd:enumeration value="Unshareable"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="resource-env-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The resource-env-refType is used to define
+ resource-env-type elements. It contains a declaration of a
+ Deployment Component's reference to an administered object
+ associated with a resource in the Deployment Component's
+ environment. It consists of an optional description, the
+ resource environment reference name, and an optional
+ indication of the resource environment reference type
+ expected by the Deployment Component code.
+
+ It also includes optional elements to define injection of
+ the named resource into fields or JavaBeans properties.
+
+ The resource environment type must be supplied unless an
+ injection target is specified, in which case the type
+ of the target is used. If both are specified, the type
+ must be assignment compatible with the type of the injection
+ target.
+
+ Example:
+
+ <resource-env-ref>
+ <resource-env-ref-name>jms/StockQueue
+ </resource-env-ref-name>
+ <resource-env-ref-type>javax.jms.Queue
+ </resource-env-ref-type>
+ </resource-env-ref>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="resource-env-ref-name"
+ type="javaee:jndi-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The resource-env-ref-name element specifies the name
+ of a resource environment reference; its value is
+ the environment entry name used in
+ the Deployment Component code. The name is a JNDI
+ name relative to the java:comp/env context and must
+ be unique within a Deployment Component.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="resource-env-ref-type"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The resource-env-ref-type element specifies the type
+ of a resource environment reference. It is the
+ fully qualified name of a Java language class or
+ interface.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:group ref="javaee:resourceGroup"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="resource-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The resource-refType contains a declaration of a
+ Deployment Component's reference to an external resource. It
+ consists of an optional description, the resource manager
+ connection factory reference name, an optional indication of
+ the resource manager connection factory type expected by the
+ Deployment Component code, an optional type of authentication
+ (Application or Container), and an optional specification of
+ the shareability of connections obtained from the resource
+ (Shareable or Unshareable).
+
+ It also includes optional elements to define injection of
+ the named resource into fields or JavaBeans properties.
+
+ The connection factory type must be supplied unless an
+ injection target is specified, in which case the type
+ of the target is used. If both are specified, the type
+ must be assignment compatible with the type of the injection
+ target.
+
+ Example:
+
+ <resource-ref>
+ <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="res-ref-name"
+ type="javaee:jndi-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The res-ref-name element specifies the name of a
+ resource manager connection factory reference.
+ The name is a JNDI name relative to the
+ java:comp/env context.
+ The name must be unique within a Deployment File.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="res-type"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The res-type element specifies the type of the data
+ source. The type is specified by the fully qualified
+ Java language class or interface
+ expected to be implemented by the data source.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="res-auth"
+ type="javaee:res-authType"
+ minOccurs="0"/>
+
+ <xsd:element name="res-sharing-scope"
+ type="javaee:res-sharing-scopeType"
+ minOccurs="0"/>
+
+ <xsd:group ref="javaee:resourceGroup"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:group name="resourceGroup">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This group collects elements that are common to all the
+ JNDI resource elements.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="mapped-name"
+ type="javaee:xsdStringType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ A product specific name that this resource should be
+ mapped to. The name of this resource, as defined by the
+ resource's name element or defaulted, is a name that is
+ local to the application component using the resource.
+ (It's a name in the JNDI java:comp/env namespace.) Many
+ application servers provide a way to map these local
+ names to names of resources known to the application
+ server. This mapped name is often a global JNDI name,
+ but may be a name of any form.
+
+ Application servers are not required to support any
+ particular form or type of mapped name, nor the ability
+ to use mapped names. The mapped name is
+ product-dependent and often installation-dependent. No
+ use of a mapped name is portable.
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="injection-target"
+ type="javaee:injection-targetType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="role-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The role-nameType designates the name of a security role.
+
+ The name must conform to the lexical rules for a token.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="run-asType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The run-asType specifies the run-as identity to be
+ used for the execution of a component. It contains an
+ optional description, and the name of a security role.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="role-name"
+ type="javaee:role-nameType"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="security-role-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The security-role-refType contains the declaration of a
+ security role reference in a component's or a
+ Deployment Component's code. The declaration consists of an
+ optional description, the security role name used in the
+ code, and an optional link to a security role. If the
+ security role is not specified, the Deployer must choose an
+ appropriate security role.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="role-name"
+ type="javaee:role-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The value of the role-name element must be the String used
+ as the parameter to the
+ EJBContext.isCallerInRole(String roleName) method or the
+ HttpServletRequest.isUserInRole(String role) method.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="role-link"
+ type="javaee:role-nameType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The role-link element is a reference to a defined
+ security role. The role-link element must contain
+ the name of one of the security roles defined in the
+ security-role elements.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="security-roleType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The security-roleType contains the definition of a security
+ role. The definition consists of an optional description of
+ the security role, and the security role name.
+
+ Example:
+
+ <security-role>
+ <description>
+ This role includes all employees who are authorized
+ to access the employee service application.
+ </description>
+ <role-name>employee</role-name>
+ </security-role>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="role-name"
+ type="javaee:role-nameType"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This is a special string datatype that is defined by Java EE as
+ a base type for defining collapsed strings. When schemas
+ require trailing/leading space elimination as well as
+ collapsing the existing whitespace, this base type may be
+ used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="true-falseType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This simple type designates a boolean with only two
+ permissible values
+
+ - true
+ - false
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:xsdBooleanType">
+ <xsd:pattern value="(true|false)"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="url-patternType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The url-patternType contains the url pattern of the mapping.
+ It must follow the rules specified in Section 11.2 of the
+ Servlet API Specification. This pattern is assumed to be in
+ URL-decoded form and must not contain CR(#xD) or LF(#xA).
+ If it contains those characters, the container must inform
+ the developer with a descriptive error message.
+ The container must preserve all characters including whitespaces.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="xsdAnyURIType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type adds an "id" attribute to xsd:anyURI.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="xsdBooleanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type adds an "id" attribute to xsd:boolean.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:boolean">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="xsdIntegerType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type adds an "id" attribute to xsd:integer.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:integer">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="xsdNMTOKENType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type adds an "id" attribute to xsd:NMTOKEN.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:NMTOKEN">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="xsdNonNegativeIntegerType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type adds an "id" attribute to xsd:nonNegativeInteger.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:nonNegativeInteger">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="xsdPositiveIntegerType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type adds an "id" attribute to xsd:positiveInteger.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:positiveInteger">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="xsdQNameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type adds an "id" attribute to xsd:QName.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:QName">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="xsdStringType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type adds an "id" attribute to xsd:string.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+</xsd:schema>
+
Property changes on: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_5.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_1_2.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_1_2.xsd (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_1_2.xsd 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,784 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.2">
+ <xsd:annotation>
+ <xsd:documentation>
+ @(#)javaee_web_services_1_2.xsds 1.18 02/13/06
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2003-2005 Sun Microsystems, Inc.
+ 4150 Network Circle
+ Santa Clara, California 95054
+ U.S.A
+ All rights reserved.
+
+ Sun Microsystems, Inc. has intellectual property rights
+ relating to technology described in this document. In
+ particular, and without limitation, these intellectual
+ property rights may include one or more of the U.S. patents
+ listed at http://www.sun.com/patents and one or more
+ additional patents or pending patent applications in the
+ U.S. and other countries.
+
+ This document and the technology which it describes are
+ distributed under licenses restricting their use, copying,
+ distribution, and decompilation. No part of this document
+ may be reproduced in any form by any means without prior
+ written authorization of Sun and its licensors, if any.
+
+ Third-party software, including font technology, is
+ copyrighted and licensed from Sun suppliers.
+
+ Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
+ JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+ Cup logo are trademarks or registered trademarks of Sun
+ Microsystems, Inc. in the U.S. and other countries.
+
+ Federal Acquisitions: Commercial Software - Government Users
+ Subject to Standard License Terms and Conditions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ (C) Copyright International Business Machines Corporation 2002
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The webservices element is the root element for the web services
+ deployment descriptor. It specifies the set of web service
+ descriptions that are to be deployed into the Java EE Application
+ Server and the dependencies they have on container resources and
+ services. The deployment descriptor must be named
+ "META-INF/webservices.xml" in the web services' jar file.
+
+ Used in: webservices.xml
+
+ All webservices deployment descriptors must indicate the
+ webservices schema by using the Java EE namespace:
+
+ http://java.sun.com/xml/ns/javaee
+
+ and by indicating the version of the schema by using the version
+ element as shown below:
+
+ <webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd"
+ version="1.2">
+ ...
+ </webservices>
+
+ The instance documents may indicate the published version of the
+ schema using the xsi:schemaLocation attribute for the Java EE
+ namespace with the following location:
+
+ http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The following conventions apply to all Java EE
+ deployment descriptor elements unless indicated otherwise.
+
+ - In elements that specify a pathname to a file within the
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="javaee_5.xsd"/>
+
+
+<!-- **************************************************** -->
+
+ <xsd:element name="webservices" type="javaee:webservicesType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The webservices element is the root element for the web services
+ deployment descriptor. It specifies the set of web service
+ descriptions that are to be deployed into the Java EE Application Server
+ and the dependencies they have on container resources and services.
+
+ Used in: webservices.xml
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:key name="webservice-description-name-key">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The webservice-description-name identifies the collection of
+ port-components associated with a WSDL file and JAX-RPC mapping. The
+ name must be unique within the deployment descriptor.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:selector xpath="javaee:webservice-description"/>
+ <xsd:field xpath="javaee:webservice-description-name"/>
+ </xsd:key>
+ </xsd:element>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="handler-chainType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The handler-chain element defines the handlerchain.
+ Handlerchain can be defined such that the handlers in the
+ handlerchain operate,all ports of a service, on a specific
+ port or on a list of protocol-bindings. The choice of elements
+ service-name-pattern, port-name-pattern and protocol-bindings
+ are used to specify whether the handlers in handler-chain are
+ for a service, port or protocol binding. If none of these
+ choices are specified with the handler-chain element then the
+ handlers specified in the handler-chain will be applied on
+ everything.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+
+ <xsd:choice minOccurs="0" maxOccurs="1">
+ <xsd:element name="service-name-pattern"
+ type="javaee:qname-pattern" />
+ <xsd:element name="port-name-pattern"
+ type="javaee:qname-pattern" />
+ <xsd:element name="protocol-bindings"
+ type="javaee:protocol-bindingListType"/>
+ </xsd:choice>
+
+ <xsd:element name="handler"
+ type="javaee:port-component_handlerType"
+ minOccurs="1" maxOccurs="unbounded"/>
+ </xsd:sequence>
+
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="handler-chainsType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The handler-chains element defines the handlerchains associated
+ with this service or service endpoint.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="handler-chain"
+ type="javaee:handler-chainType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="port-componentType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The port-component element associates a WSDL port with a web service
+ interface and implementation. It defines the name of the port as a
+ component, optional description, optional display name, optional iconic
+ representations, WSDL port QName, Service Endpoint Interface, Service
+ Implementation Bean.
+
+ This element also associates a WSDL service with a JAX-WS Provider
+ implementation.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="display-name"
+ type="javaee:display-nameType"
+ minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="icon"
+ type="javaee:iconType"
+ minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="port-component-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The port-component-name element specifies a port component's
+ name. This name is assigned by the module producer to name
+ the service implementation bean in the module's deployment
+ descriptor. The name must be unique among the port component
+ names defined in the same module.
+
+ Used in: port-component
+
+ Example:
+ <port-component-name>EmployeeService
+ </port-component-name>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="wsdl-service"
+ type="javaee:xsdQNameType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the name space and local name part of the WSDL
+ service QName. This is required to be specified for
+ port components that are JAX-WS Provider implementations.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="wsdl-port"
+ type="javaee:xsdQNameType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the name space and local name part of the WSDL
+ port QName. This is not required to be specified for port
+ components that are JAX-WS Provider implementations
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="enable-mtom"
+ type="javaee:true-falseType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Used to enable or disable SOAP MTOM/XOP mechanism for an
+ endpoint implementation.
+
+ Not to be specified for JAX-RPC runtime
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="protocol-binding"
+ type="javaee:protocol-bindingType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Used to specify the protocol binding used by the port-component.
+ If this element is not specified, then the default binding is
+ used (SOAP 1.1 over HTTP)
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="service-endpoint-interface"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The service-endpoint-interface element contains the
+ fully-qualified name of the port component's Service Endpoint
+ Interface.
+
+ Used in: port-component
+
+ Example:
+ <remote>com.wombat.empl.EmployeeService</remote>
+
+ This may not be specified in case there is no Service
+ Enpoint Interface as is the case with directly using an
+ implementation class with the @WebService annotation.
+
+ When the port component is a Provider implementation
+ this is not specified.
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="service-impl-bean"
+ type="javaee:service-impl-beanType"/>
+
+ <xsd:choice>
+ <xsd:element name="handler"
+ type="javaee:port-component_handlerType"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+ To be used with JAX-RPC based runtime only.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="handler-chains"
+ type="javaee:handler-chainsType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+ To be used with JAX-WS based runtime only.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="port-component_handlerType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Declares the handler for a port-component. Handlers can access the
+ init-param name/value pairs using the HandlerInfo interface.
+
+ Used in: port-component
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="handler-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the name of the handler. The name must be unique within the
+ module.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="handler-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines a fully qualified class name for the handler implementation.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="init-param"
+ type="javaee:param-valueType"
+ minOccurs="0" maxOccurs="unbounded"/>
+
+ <xsd:element name="soap-header"
+ type="javaee:xsdQNameType"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the QName of a SOAP header that will be processed by the
+ handler.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="soap-role"
+ type="javaee:string"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The soap-role element contains a SOAP actor definition that the
+ Handler will play as a role.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:simpleType name="protocol-URIAliasType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Defines the type that is used for specifying tokens that
+ start with ## which are used to alias existing standard
+ protocol bindings and support aliases for new standard
+ binding URIs that are introduced in future specifications.
+
+ The following tokens alias the standard protocol binding
+ URIs:
+
+ ##SOAP11_HTTP = "http://schemas.xmlsoap.org/wsdl/soap/http"
+ ##SOAP11_HTTP_MTOM =
+ "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true"
+ ##SOAP12_HTTP = "http://www.w3.org/2003/05/soap/bindings/HTTP/"
+ ##SOAP12_HTTP_MTOM =
+ "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true"
+ ##XML_HTTP = "http://www.w3.org/2004/08/wsdl/http"
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="##.+"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+ <xsd:simpleType name="protocol-bindingListType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Defines the type used for specifying a list of
+ protocol-bindingType(s). For e.g.
+
+ ##SOAP11_HTTP ##SOAP12_HTTP ##XML_HTTP
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:list itemType="javaee:protocol-bindingType"/>
+ </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+ <xsd:simpleType name="protocol-bindingType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Defines the type used for specifying the URI for the
+ protocol binding used by the port-component. For
+ portability one could use one of the following tokens that
+ alias the standard binding types:
+
+ ##SOAP11_HTTP
+ ##SOAP11_HTTP_MTOM
+ ##SOAP12_HTTP
+ ##SOAP12_HTTP_MTOM
+ ##XML_HTTP
+
+ Other specifications could define tokens that start with ##
+ to alias new standard binding URIs that are introduced.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:union memberTypes="xsd:anyURI javaee:protocol-URIAliasType"/>
+ </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+ <xsd:simpleType name="qname-pattern">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is used to specify the QName pattern in the
+ attribute service-name-pattern and port-name-pattern in
+ the handler-chain element
+
+ For example, the various forms acceptable here for
+ service-name-pattern attribute in handler-chain element
+ are :
+
+ Exact Name: service-name-pattern="ns1:EchoService"
+
+ In this case, handlers specified in this
+ handler-chain element will apply to all ports with
+ this exact service name. The namespace prefix must
+ have been declared in a namespace declaration
+ attribute in either the start-tag of the element
+ where the prefix is used or in an an ancestor
+ element (i.e. an element in whose content the
+ prefixed markup occurs)
+
+ Pattern : service-name-pattern="ns1:EchoService*"
+
+ In this case, handlers specified in this
+ handler-chain element will apply to all ports whose
+ Service names are like EchoService1, EchoServiceFoo
+ etc. The namespace prefix must have been declared in
+ a namespace declaration attribute in either the
+ start-tag of the element where the prefix is used or
+ in an an ancestor element (i.e. an element in whose
+ content the prefixed markup occurs)
+
+ Wild Card : service-name-pattern="*"
+
+ In this case, handlers specified in this handler-chain
+ element will apply to ports of all service names.
+
+ The same can be applied to port-name attribute in
+ handler-chain element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="\*|([\i-[:]][\c-[:]]*:)?[\i-[:]][\c-[:]]*\*?"/>
+ </xsd:restriction>
+
+ </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="service-impl-beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The service-impl-bean element defines the web service implementation.
+ A service implementation can be an EJB bean class or JAX-RPC web
+ component. Existing EJB implementations are exposed as a web service
+ using an ejb-link.
+
+ Used in: port-component
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="ejb-link"
+ type="javaee:ejb-linkType"/>
+ <xsd:element name="servlet-link"
+ type="javaee:servlet-linkType"/>
+ </xsd:choice>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="servlet-linkType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The servlet-link element is used in the service-impl-bean element
+ to specify that a Service Implementation Bean is defined as a
+ JAX-RPC Service Endpoint.
+
+ The value of the servlet-link element must be the servlet-name of
+ a JAX-RPC Service Endpoint in the same WAR file.
+
+ Used in: service-impl-bean
+
+ Example:
+ <servlet-link>StockQuoteService</servlet-link>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="webservice-descriptionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The webservice-description element defines a WSDL document file
+ and the set of Port components associated with the WSDL ports
+ defined in the WSDL document. There may be multiple
+ webservice-descriptions defined within a module.
+
+ All WSDL file ports must have a corresponding port-component element
+ defined.
+
+ Used in: webservices
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="description"
+ type="javaee:descriptionType"
+ minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="display-name"
+ type="javaee:display-nameType"
+ minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="icon"
+ type="javaee:iconType"
+ minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="webservice-description-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The webservice-description-name identifies the collection of
+ port-components associated with a WSDL file and JAX-RPC
+ mapping. The name must be unique within the deployment descriptor.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="wsdl-file"
+ type="javaee:pathType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The wsdl-file element contains the name of a WSDL file in the
+ module. The file name is a relative path within the module.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="jaxrpc-mapping-file"
+ type="javaee:pathType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The jaxrpc-mapping-file element contains the name of a file that
+ describes the JAX-RPC mapping between the Java interaces used by
+ the application and the WSDL description in the wsdl-file. The
+ file name is a relative path within the module.
+
+ This is not required when JAX-WS based runtime is used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="port-component"
+ type="javaee:port-componentType"
+ minOccurs="1" maxOccurs="unbounded">
+ <xsd:key name="port-component_handler-name-key">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the name of the handler. The name must be unique
+ within the module.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:selector xpath="javaee:handler"/>
+ <xsd:field xpath="javaee:handler-name"/>
+ </xsd:key>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="webservicesType">
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="webservice-description"
+ type="javaee:webservice-descriptionType"
+ minOccurs="1" maxOccurs="unbounded">
+ <xsd:key name="port-component-name-key">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The port-component-name element specifies a port
+ component's name. This name is assigned by the module
+ producer to name the service implementation bean in the
+ module's deployment descriptor. The name must be unique
+ among the port component names defined in the same module.
+
+ Used in: port-component
+
+ Example:
+ <port-component-name>EmployeeService
+ </port-component-name>
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:selector xpath="javaee:port-component"/>
+ <xsd:field xpath="javaee:port-component-name"/>
+ </xsd:key>
+ </xsd:element>
+ </xsd:sequence>
+
+ <xsd:attribute name="version"
+ type="javaee:dewey-versionType"
+ fixed="1.2"
+ use="required">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The required value for the version is 1.2.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+</xsd:schema>
+
Property changes on: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_1_2.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_client_1_2.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_client_1_2.xsd (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_client_1_2.xsd 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,615 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.2">
+ <xsd:annotation>
+ <xsd:documentation>
+ @(#)javaee_web_services_client_1_2.xsds 1.19 02/13/06
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2003-2005 Sun Microsystems, Inc.
+ 4150 Network Circle
+ Santa Clara, California 95054
+ U.S.A
+ All rights reserved.
+
+ Sun Microsystems, Inc. has intellectual property rights
+ relating to technology described in this document. In
+ particular, and without limitation, these intellectual
+ property rights may include one or more of the U.S. patents
+ listed at http://www.sun.com/patents and one or more
+ additional patents or pending patent applications in the
+ U.S. and other countries.
+
+ This document and the technology which it describes are
+ distributed under licenses restricting their use, copying,
+ distribution, and decompilation. No part of this document
+ may be reproduced in any form by any means without prior
+ written authorization of Sun and its licensors, if any.
+
+ Third-party software, including font technology, is
+ copyrighted and licensed from Sun suppliers.
+
+ Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
+ JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+ Cup logo are trademarks or registered trademarks of Sun
+ Microsystems, Inc. in the U.S. and other countries.
+
+ Federal Acquisitions: Commercial Software - Government Users
+ Subject to Standard License Terms and Conditions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ (C) Copyright International Business Machines Corporation 2002
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="port-component-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The port-component-ref element declares a client dependency
+ on the container for resolving a Service Endpoint Interface
+ to a WSDL port. It optionally associates the Service Endpoint
+ Interface with a particular port-component. This is only used
+ by the container for a Service.getPort(Class) method call.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="service-endpoint-interface"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The service-endpoint-interface element defines a fully qualified
+ Java class that represents the Service Endpoint Interface of a
+ WSDL port.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="enable-mtom"
+ type="javaee:true-falseType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Used to enable or disable SOAP MTOM/XOP mechanism on the client
+ side for a port-component.
+
+ Not to be specified for JAX-RPC runtime
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="port-component-link"
+ type="javaee:string"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The port-component-link element links a port-component-ref
+ to a specific port-component required to be made available
+ by a service reference.
+
+ The value of a port-component-link must be the
+ port-component-name of a port-component in the same module
+ or another module in the same application unit. The syntax
+ for specification follows the syntax defined for ejb-link
+ in the EJB 2.0 specification.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:group name="service-refGroup">
+ <xsd:sequence>
+ <xsd:element name="service-ref"
+ type="javaee:service-refType"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:key name="service-ref_handler-name-key">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the name of the handler. The name must be unique
+ within the module.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:selector xpath="javaee:handler"/>
+ <xsd:field xpath="javaee:handler-name"/>
+ </xsd:key>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:group>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="service-refType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The service-ref element declares a reference to a Web
+ service. It contains optional description, display name and
+ icons, a declaration of the required Service interface,
+ an optional WSDL document location, an optional set
+ of JAX-RPC mappings, an optional QName for the service element,
+ an optional set of Service Endpoint Interfaces to be resolved
+ by the container to a WSDL port, and an optional set of handlers.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="service-ref-name"
+ type="javaee:jndi-nameType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The service-ref-name element declares logical name that the
+ components in the module use to look up the Web service. It
+ is recommended that all service reference names start with
+ "service/".
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="service-interface"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The service-interface element declares the fully qualified class
+ name of the JAX-RPC Service interface the client depends on.
+ In most cases the value will be javax.xml.rpc.Service. A JAX-RPC
+ generated Service Interface class may also be specified.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="service-ref-type"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The service-ref-type element declares the type of the service-ref
+ element that is injected or returned when a JNDI lookup is done.
+ This must be either a fully qualified name of Service class or
+ the fully qualified name of service endpoint interface class.
+ This is only used with JAX-WS runtime where the corresponding
+ @WebServiceRef annotation can be used to denote both a Service
+ or a Port.
+
+ If this is not specified, then the type of service-ref element
+ that is injected or returned when a JNDI lookup is done is
+ always a Service interface/class.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="wsdl-file"
+ type="javaee:xsdAnyURIType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The wsdl-file element contains the URI location of a WSDL
+ file. The location is relative to the root of the module.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="jaxrpc-mapping-file"
+ type="javaee:pathType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The jaxrpc-mapping-file element contains the name of a file that
+ describes the JAX-RPC mapping between the Java interaces used by
+ the application and the WSDL description in the wsdl-file. The
+ file name is a relative path within the module file.
+
+ This is not required when JAX-WS based runtime is used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="service-qname"
+ type="javaee:xsdQNameType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The service-qname element declares the specific WSDL service
+ element that is being refered to. It is not specified if no
+ wsdl-file is declared.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="port-component-ref"
+ type="javaee:port-component-refType"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The port-component-ref element declares a client dependency
+ on the container for resolving a Service Endpoint Interface
+ to a WSDL port. It optionally associates the Service Endpoint
+ Interface with a particular port-component. This is only used
+ by the container for a Service.getPort(Class) method call.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:choice>
+ <xsd:element name="handler"
+ type="javaee:service-ref_handlerType"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Declares the handler for a port-component. Handlers can
+ access the init-param name/value pairs using the
+ HandlerInfo interface. If port-name is not specified, the
+ handler is assumed to be associated with all ports of the
+ service.
+
+ To be used with JAX-RPC based runtime only.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="handler-chains"
+ type="javaee:service-ref_handler-chainsType"
+ minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+ To be used with JAX-WS based runtime only.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+
+ <xsd:group ref="javaee:resourceGroup"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="service-ref_handler-chainType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The handler-chain element defines the handlerchain.
+ Handlerchain can be defined such that the handlers in the
+ handlerchain operate,all ports of a service, on a specific
+ port or on a list of protocol-bindings. The choice of elements
+ service-name-pattern, port-name-pattern and protocol-bindings
+ are used to specify whether the handlers in handler-chain are
+ for a service, port or protocol binding. If none of these
+ choices are specified with the handler-chain element then the
+ handlers specified in the handler-chain will be applied on
+ everything.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+
+ <xsd:choice minOccurs="0" maxOccurs="1">
+ <xsd:element name="service-name-pattern"
+ type="javaee:service-ref_qname-pattern" />
+ <xsd:element name="port-name-pattern"
+ type="javaee:service-ref_qname-pattern" />
+ <xsd:element name="protocol-bindings"
+ type="javaee:service-ref_protocol-bindingListType"/>
+ </xsd:choice>
+
+ <xsd:element name="handler"
+ type="javaee:service-ref_handlerType"
+ minOccurs="1" maxOccurs="unbounded"/>
+ </xsd:sequence>
+
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="service-ref_handler-chainsType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The handler-chains element defines the handlerchains associated with this
+ service or service endpoint.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="handler-chain"
+ type="javaee:service-ref_handler-chainType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:complexType name="service-ref_handlerType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Declares the handler for a port-component. Handlers can access the
+ init-param name/value pairs using the HandlerInfo interface. If
+ port-name is not specified, the handler is assumed to be associated
+ with all ports of the service.
+
+ Used in: service-ref
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="handler-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the name of the handler. The name must be unique
+ within the module.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="handler-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines a fully qualified class name for the handler
+ implementation.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="init-param"
+ type="javaee:param-valueType"
+ minOccurs="0" maxOccurs="unbounded"/>
+
+ <xsd:element name="soap-header"
+ type="javaee:xsdQNameType"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Defines the QName of a SOAP header that will be processed
+ by the handler.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="soap-role"
+ type="javaee:string"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The soap-role element contains a SOAP actor definition that
+ the Handler will play as a role.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="port-name"
+ type="javaee:string"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The port-name element defines the WSDL port-name that a
+ handler should be associated with.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+<!-- **************************************************** -->
+
+ <xsd:simpleType name="service-ref_protocol-URIAliasType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Defines the type that is used for specifying tokens that
+ start with ## which are used to alias existing standard
+ protocol bindings and support aliases for new standard
+ binding URIs that are introduced in future specifications.
+
+ The following tokens alias the standard protocol binding
+ URIs:
+
+ ##SOAP11_HTTP = "http://schemas.xmlsoap.org/wsdl/soap/http"
+ ##SOAP11_HTTP_MTOM =
+ "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true"
+ ##SOAP12_HTTP = "http://www.w3.org/2003/05/soap/bindings/HTTP/"
+ ##SOAP12_HTTP_MTOM =
+ "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true"
+ ##XML_HTTP = "http://www.w3.org/2004/08/wsdl/http"
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="##.+"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+ <xsd:simpleType name="service-ref_protocol-bindingListType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Defines the type used for specifying a list of
+ protocol-bindingType(s). For e.g.
+
+ ##SOAP11_HTTP ##SOAP12_HTTP ##XML_HTTP
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:list itemType="javaee:service-ref_protocol-bindingType"/>
+ </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+ <xsd:simpleType name="service-ref_protocol-bindingType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Defines the type used for specifying the URI for the
+ protocol binding used by the port-component. For
+ portability one could use one of the following tokens that
+ alias the standard binding types:
+
+ ##SOAP11_HTTP
+ ##SOAP11_HTTP_MTOM
+ ##SOAP12_HTTP
+ ##SOAP12_HTTP_MTOM
+ ##XML_HTTP
+
+ Other specifications could define tokens that start with ##
+ to alias new standard binding URIs that are introduced.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:union memberTypes="xsd:anyURI javaee:service-ref_protocol-URIAliasType"/>
+ </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+ <xsd:simpleType name="service-ref_qname-pattern">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is used to specify the QName pattern in the
+ attribute service-name-pattern and port-name-pattern in
+ the handler-chain element
+
+ For example, the various forms acceptable here for
+ service-name-pattern attribute in handler-chain element
+ are :
+
+ Exact Name: service-name-pattern="ns1:EchoService"
+
+ In this case, handlers specified in this
+ handler-chain element will apply to all ports with
+ this exact service name. The namespace prefix must
+ have been declared in a namespace declaration
+ attribute in either the start-tag of the element
+ where the prefix is used or in an an ancestor
+ element (i.e. an element in whose content the
+ prefixed markup occurs)
+
+ Pattern : service-name-pattern="ns1:EchoService*"
+
+ In this case, handlers specified in this
+ handler-chain element will apply to all ports whose
+ Service names are like EchoService1, EchoServiceFoo
+ etc. The namespace prefix must have been declared in
+ a namespace declaration attribute in either the
+ start-tag of the element where the prefix is used or
+ in an an ancestor element (i.e. an element in whose
+ content the prefixed markup occurs)
+
+ Wild Card : service-name-pattern="*"
+
+ In this case, handlers specified in this handler-chain
+ element will apply to ports of all service names.
+
+ The same can be applied to port-name attribute in
+ handler-chain element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="\*|([\i-[:]][\c-[:]]*:)?[\i-[:]][\c-[:]]*\*?"/>
+ </xsd:restriction>
+
+ </xsd:simpleType>
+
+</xsd:schema>
+
Property changes on: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/javaee_web_services_client_1_2.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_1_2.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_1_2.xsd (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_1_2.xsd 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,2108 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+
+<xsd:schema
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.2">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ $Id: web-facesconfig_1_2.xsd,v 1.15 2008/03/26 17:46:42 rlubke Exp $
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2005 Sun Microsystems, Inc.,
+ 901 San Antonio Road,
+ Palo Alto, California 94303, U.S.A.
+ All rights reserved.
+
+ Sun Microsystems, Inc. has intellectual property
+ rights relating to technology described in this document. In
+ particular, and without limitation, these intellectual
+ property rights may include one or more of the U.S. patents
+ listed at http://www.sun.com/patents and one or more
+ additional patents or pending patent applications in the
+ U.S. and other countries.
+
+ This document and the technology which it describes are
+ distributed under licenses restricting their use, copying,
+ distribution, and decompilation. No part of this document
+ may be reproduced in any form by any means without prior
+ written authorization of Sun and its licensors, if any.
+
+ Third-party software, including font technology, is
+ copyrighted and licensed from Sun suppliers.
+
+ Sun, Sun Microsystems, the Sun logo, Solaris, Java, Java EE,
+ JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+ Cup logo are trademarks or registered trademarks of Sun
+ Microsystems, Inc. in the U.S. and other countries.
+
+ Federal Acquisitions: Commercial Software - Government Users
+ Subject to Standard License Terms and Conditions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ <![CDATA[
+
+ The XML Schema for the JavaServer Faces Application
+ Configuration File (Version 1.2).
+
+ All JavaServer Faces configuration files must indicate
+ the JavaServer Faces schema by indicating the JavaServer
+ Faces namespace:
+
+ http://java.sun.com/xml/ns/javaee
+
+ and by indicating the version of the schema by
+ using the version element as shown below:
+
+ <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="..."
+ version="1.2">
+ ...
+ </faces-config>
+
+ The instance documents may indicate the published
+ version of the schema using xsi:schemaLocation attribute
+ for javaee namespace with the following location:
+
+ http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd
+
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="javaee_5.xsd"/>
+
+ <!-- **************************************************** -->
+
+ <xsd:element name = "faces-config" type="javaee:faces-configType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-config" element is the root of the configuration
+ information hierarchy, and contains nested elements for all
+ of the other configuration settings.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:unique name="faces-config-converter-ID-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Converter IDs must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:converter"/>
+ <xsd:field xpath="javaee:converter-id"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-converter-for-class-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ 'converter-for-class' element values must be unique
+ within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:converter"/>
+ <xsd:field xpath="javaee:converter-for-class"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-validator-ID-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Validator IDs must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:validator"/>
+ <xsd:field xpath="javaee:validator-id"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-managed-bean-name-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Managed bean names must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:managed-bean"/>
+ <xsd:field xpath="javaee:managed-bean-name"/>
+ </xsd:unique>
+ </xsd:element>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-configType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-config" element is the root of the configuration
+ information hierarchy, and contains nested elements for all
+ of the other configuration settings.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="application"
+ type="javaee:faces-config-applicationType"/>
+ <xsd:element name="factory"
+ type="javaee:faces-config-factoryType"/>
+ <xsd:element name="component"
+ type="javaee:faces-config-componentType"/>
+ <xsd:element name="converter"
+ type="javaee:faces-config-converterType"/>
+ <xsd:element name="managed-bean"
+ type="javaee:faces-config-managed-beanType"/>
+ <xsd:element name="navigation-rule"
+ type="javaee:faces-config-navigation-ruleType"/>
+ <xsd:element name="referenced-bean"
+ type="javaee:faces-config-referenced-beanType"/>
+ <xsd:element name="render-kit"
+ type="javaee:faces-config-render-kitType"/>
+ <xsd:element name="lifecycle"
+ type="javaee:faces-config-lifecycleType"/>
+ <xsd:element name="validator"
+ type="javaee:faces-config-validatorType"/>
+ <xsd:element name="faces-config-extension"
+ type="javaee:faces-config-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ <xsd:attribute name="version"
+ type="javaee:faces-config-versionType"
+ use="required"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for faces-config. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-applicationType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "application" element provides a mechanism to define the
+ various per-application-singleton implementation artifacts for
+ a particular web application that is utilizing
+ JavaServer Faces. For nested elements that are not specified,
+ the JSF implementation must provide a suitable default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="action-listener"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "action-listener" element contains the fully
+ qualified class name of the concrete
+ ActionListener implementation class that will be
+ called during the Invoke Application phase of the
+ request processing lifecycle.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="default-render-kit-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-render-kit-id" element allows the
+ application to define a renderkit to be used other
+ than the standard one.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="message-bundle"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The base name of a resource bundle representing
+ the message resources for this application. See
+ the JavaDocs for the "java.util.ResourceBundle"
+ class for more information on the syntax of
+ resource bundle names.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="navigation-handler"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "navigation-handler" element contains the
+ fully qualified class name of the concrete
+ NavigationHandler implementation class that will
+ be called during the Invoke Application phase
+ of the request processing lifecycle, if the
+ default ActionListener (provided by the JSF
+ implementation) is used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="view-handler"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "view-handler" element contains the fully
+ qualified class name of the concrete ViewHandler
+ implementation class that will be called during
+ the Restore View and Render Response phases of the
+ request processing lifecycle. The faces
+ implementation must provide a default
+ implementation of this class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="state-manager"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "state-manager" element contains the fully
+ qualified class name of the concrete StateManager
+ implementation class that will be called during
+ the Restore View and Render Response phases of the
+ request processing lifecycle. The faces
+ implementation must provide a default
+ implementation of this class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="el-resolver"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "el-resolver" element contains the fully
+ qualified class name of the concrete
+ javax.el.ELResolver implementation class
+ that will be used during the processing of
+ EL expressions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property-resolver"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-resolver" element contains the fully
+ qualified class name of the concrete
+ PropertyResolver implementation class that will
+ be used during the processing of value binding
+ expressions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="variable-resolver"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "variable-resolver" element contains the fully
+ qualified class name of the concrete
+ VariableResolver implementation class that will
+ be used during the processing of value binding
+ expressions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element
+ name="locale-config"
+ type="javaee:faces-config-locale-configType"/>
+ <xsd:element
+ name="resource-bundle"
+ type="javaee:faces-config-application-resource-bundleType"/>
+ <xsd:element name="application-extension"
+ type="javaee:faces-config-application-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="faces-config-application-resource-bundleType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The resource-bundle element inside the application element
+ references a java.util.ResourceBundle instance by name
+ using the var element. ResourceBundles referenced in this
+ manner may be returned by a call to
+ Application.getResourceBundle() passing the current
+ FacesContext for this request and the value of the var
+ element below.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="base-name"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The fully qualified class name of the
+ java.util.ResourceBundle instance.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="var"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The name by which this ResourceBundle instance
+ is retrieved by a call to
+ Application.getResourceBundle().
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-application-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for application. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-factoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "factory" element provides a mechanism to define the
+ various Factories that comprise parts of the implementation
+ of JavaServer Faces. For nested elements that are not
+ specified, the JSF implementation must provide a suitable
+ default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="application-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "application-factory" element contains the
+ fully qualified class name of the concrete
+ ApplicationFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(APPLICATION_FACTORY) is
+ called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="faces-context-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-context-factory" element contains the
+ fully qualified class name of the concrete
+ FacesContextFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(FACES_CONTEXT_FACTORY)
+ is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="lifecycle-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "lifecycle-factory" element contains the fully
+ qualified class name of the concrete LifecycleFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="render-kit-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit-factory" element contains the fully
+ qualified class name of the concrete RenderKitFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(RENDER_KIT_FACTORY) is
+ called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="factory-extension"
+ type="javaee:faces-config-factory-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-factory-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for factory. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-attributeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute" element represents a named, typed, value
+ associated with the parent UIComponent via the generic
+ attributes mechanism.
+
+ Attribute names must be unique within the scope of the parent
+ (or related) component.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="attribute-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute-name" element represents the name under
+ which the corresponding value will be stored, in the
+ generic attributes of the UIComponent we are related
+ to.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute-class" element represents the Java type
+ of the value associated with this attribute name.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="default-value"
+ type="javaee:faces-config-default-valueType"
+ minOccurs="0"/>
+ <xsd:element name="suggested-value"
+ type="javaee:faces-config-suggested-valueType"
+ minOccurs="0"/>
+ <xsd:element name="attribute-extension"
+ type="javaee:faces-config-attribute-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-attribute-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for attribute. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-componentType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component" element represents a concrete UIComponent
+ implementation class that should be registered under the
+ specified type identifier, along with its associated
+ properties and attributes. Component types must be unique
+ within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ are recognized by the implementation logic of this component.
+ Nested "property" elements identify JavaBeans properties of
+ the component class that may be exposed for manipulation
+ via tools.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="component-type"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component-type" element represents the name under
+ which the corresponding UIComponent class should be
+ registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="component-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component-class" element represents the fully
+ qualified class name of a concrete UIComponent
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="facet"
+ type="javaee:faces-config-facetType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="component-extension"
+ type="javaee:faces-config-component-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-component-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Extension element for component. It may contain
+ implementation specific content.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-default-localeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-locale" element declares the default locale
+ for this application instance.
+
+ It must be specified as :language:[_:country:[_:variant:]]
+ without the colons, for example "ja_JP_SJIS". The
+ separators between the segments may be '-' or '_'.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-localeType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+
+ <xsd:complexType name="faces-config-default-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-value" contains the value for the property or
+ attribute in which this element resides. This value differs
+ from the "suggested-value" in that the property or attribute
+ must take the value, whereas in "suggested-value" taking the
+ value is optional.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-el-expressionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ EL expressions present within a faces config file
+ must start with the character sequence of '#{' and
+ end with '}'.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="#\{.*\}"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-facetType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Define the name and other design-time information for a facet
+ that is associated with a renderer or a component.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="facet-name"
+ type="javaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "facet-name" element represents the facet name
+ under which a UIComponent will be added to its parent.
+ It must be of type "Identifier".
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="facet-extension"
+ type="javaee:faces-config-facet-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-facet-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for facet. It may contain implementation
+ specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-from-view-idType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The value of from-view-id must contain one of the following
+ values:
+
+ - The exact match for a view identifier that is recognized
+ by the the ViewHandler implementation being used (such as
+ "/index.jsp" if you are using the default ViewHandler).
+
+ - A proper prefix of a view identifier, plus a trailing
+ "*" character. This pattern indicates that all view
+ identifiers that match the portion of the pattern up to
+ the asterisk will match the surrounding rule. When more
+ than one match exists, the match with the longest pattern
+ is selected.
+
+ - An "*" character, which means that this pattern applies
+ to all view identifiers.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-from-actionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "from-action" element contains an action reference
+ expression that must have been executed (by the default
+ ActionListener for handling application level events)
+ in order to select the navigation rule. If not specified,
+ this rule will be relevant no matter which action reference
+ was executed (or if no action reference was executed).
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-el-expressionType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-converterType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter" element represents a concrete Converter
+ implementation class that should be registered under the
+ specified converter identifier. Converter identifiers must
+ be unique within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ may be configured on the corresponding UIComponent in order
+ to affect the operation of the Converter. Nested "property"
+ elements identify JavaBeans properties of the Converter
+ implementation class that may be configured to affect the
+ operation of the Converter. "attribute" and "property"
+ elements are intended to allow component developers to
+ more completely describe their components to tools and users.
+ These elements have no required runtime semantics.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:choice>
+ <xsd:element name="converter-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter-id" element represents the
+ identifier under which the corresponding
+ Converter class should be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="converter-for-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter-for-class" element represents the
+ fully qualified class name for which a Converter
+ class will be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+
+ <xsd:element name="converter-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter-class" element represents the fully
+ qualified class name of a concrete Converter
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "attribute" elements identify generic
+ attributes that may be configured on the
+ corresponding UIComponent in order to affect the
+ operation of the Converter. This attribute is
+ primarily for design-time tools and is not
+ specified to have any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "property" elements identify JavaBeans
+ properties of the Converter implementation class
+ that may be configured to affect the operation of
+ the Converter. This attribute is primarily for
+ design-time tools and is not specified to have
+ any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="converter-extension"
+ type="javaee:faces-config-converter-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-converter-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for converter. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-lifecycleType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "lifecycle" element provides a mechanism to specify
+ modifications to the behaviour of the default Lifecycle
+ implementation for this web application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="phase-listener"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "phase-listener" element contains the fully
+ qualified class name of the concrete PhaseListener
+ implementation class that will be registered on
+ the Lifecycle.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="lifecycle-extension"
+ type="javaee:faces-config-lifecycle-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-lifecycle-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for lifecycle. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-localeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The localeType defines valid locale defined by ISO-639-1
+ and ISO-3166.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="([a-z]{2})[_|\-]?([\p{L}]{2})?[_|\-]?(\w+)?"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-locale-configType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "locale-config" element allows the app developer to
+ declare the supported locales for this application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="default-locale"
+ type="javaee:faces-config-default-localeType"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="supported-locale"
+ type="javaee:faces-config-supported-localeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-managed-beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean" element represents a JavaBean, of a
+ particular class, that will be dynamically instantiated
+ at runtime (by the default VariableResolver implementation)
+ if it is referenced as the first element of a value binding
+ expression, and no corresponding bean can be identified in
+ any scope. In addition to the creation of the managed bean,
+ and the optional storing of it into the specified scope,
+ the nested managed-property elements can be used to
+ initialize the contents of settable JavaBeans properties of
+ the created instance.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="managed-bean-name"
+ type="javaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean-name" element represents the
+ attribute name under which a managed bean will
+ be searched for, as well as stored (unless the
+ "managed-bean-scope" value is "none").
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="managed-bean-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean-class" element represents the fully
+ qualified class name of the Java class that will be
+ used`to instantiate a new instance if creation of the
+ specified`managed bean is requested.
+
+ The specified class must conform to standard JavaBeans
+ conventions. In particular, it must have a public
+ zero-arguments constructor, and zero or more public
+ property setters.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element
+ name="managed-bean-scope"
+ type="javaee:faces-config-managed-bean-scopeOrNoneType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean-scope" element represents the scope
+ into which a newly created instance of the specified
+ managed bean will be stored (unless the value is
+ "none").
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element name="managed-property"
+ type="javaee:faces-config-managed-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="map-entries"
+ type="javaee:faces-config-map-entriesType"/>
+ <xsd:element name="list-entries"
+ type="javaee:faces-config-list-entriesType"/>
+ </xsd:choice>
+ <xsd:element name="managed-bean-extension"
+ type="javaee:faces-config-managed-bean-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-managed-bean-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for managed-bean. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-managed-bean-scopeOrNoneType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ <![CDATA[
+ Defines the legal values for the <managed-bean-scope>
+ element's body content, which includes all of the scopes
+ normally used in a web application, plus the "none" value
+ indicating that a created bean should not be stored into
+ any scope.
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:enumeration value="request"/>
+ <xsd:enumeration value="session"/>
+ <xsd:enumeration value="application"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-managed-propertyType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-property" element represents an individual
+ property of a managed bean that will be configured to the
+ specified value (or value set) if the corresponding
+ managed bean is automatically created.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="property-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-name" element represents the JavaBeans
+ property name under which the corresponding value may
+ be stored.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property-class"
+ type="javaee:java-typeType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-class" element represents the Java type
+ of the value associated with this property name.
+ If not specified, it can be inferred from existing
+ classes; however, this element should be specified
+ if the configuration file is going to be the source
+ for generating the corresponding classes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element name="map-entries"
+ type="javaee:faces-config-map-entriesType"/>
+ <xsd:element name="null-value"
+ type="javaee:faces-config-null-valueType">
+ </xsd:element>
+ <xsd:element name="value"
+ type="javaee:faces-config-valueType"/>
+ <xsd:element name="list-entries"
+ type="javaee:faces-config-list-entriesType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-map-entryType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "map-entry" element reprsents a single key-entry pair
+ that will be added to the computed value of a managed
+ property of type java.util.Map.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="key"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "key" element is the String representation of a
+ map key that will be stored in a managed property of
+ type java.util.Map.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element name="null-value"
+ type="javaee:faces-config-null-valueType"/>
+ <xsd:element name="value"
+ type="javaee:faces-config-valueType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-map-entriesType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "map-entries' element represents a set of key-entry pairs
+ that will be added to the computed value of a managed property
+ of type java.util.Map. In addition, the Java class types
+ of the key and entry values may be optionally declared.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="key-class"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "key-class" element defines the Java type to which
+ each "key" element in a set of "map-entry" elements
+ will be converted to. If omitted, "java.lang.String"
+ is assumed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="value-class"
+ type="javaee:faces-config-value-classType"
+ minOccurs="0"/>
+ <xsd:element name="map-entry"
+ type="javaee:faces-config-map-entryType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-navigation-caseType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "navigation-case" element describes a particular
+ combination of conditions that must match for this case to
+ be executed, and the view id of the component tree that
+ should be selected next.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="from-action"
+ type="javaee:faces-config-from-actionType"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="from-outcome"
+ type="javaee:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "from-outcome" element contains a logical outcome
+ string returned by the execution of an application
+ action method selected via an "actionRef" property
+ (or a literal value specified by an "action" property)
+ of a UICommand component. If specified, this rule
+ will be relevant only if the outcome value matches
+ this element's value. If not specified, this rule
+ will be relevant no matter what the outcome value was.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="to-view-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "to-view-id" element contains the view identifier
+ of the next view that should be displayed if this
+ navigation rule is matched.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element
+ name="redirect"
+ type="javaee:faces-config-redirectType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-navigation-ruleType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "navigation-rule" element represents an individual
+ decision rule that will be utilized by the default
+ NavigationHandler implementation to make decisions on
+ what view should be displayed next, based on the
+ view id being processed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="from-view-id"
+ type="javaee:faces-config-from-view-idType"
+ minOccurs="0"/>
+ <xsd:element name="navigation-case"
+ type="javaee:faces-config-navigation-caseType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element
+ name="navigation-rule-extension"
+ type="javaee:faces-config-navigation-rule-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-navigation-rule-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for navigation-rule. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-null-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "null-value" element indicates that the managed
+ property in which we are nested will be explicitly
+ set to null if our managed bean is automatically
+ created. This is different from omitting the managed
+ property element entirely, which will cause no
+ property setter to be called for this property.
+
+ The "null-value" element can only be used when the
+ associated "property-class" identifies a Java class,
+ not a Java primitive.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-propertyType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property" element represents a JavaBean property of the
+ Java class represented by our parent element.
+
+ Property names must be unique within the scope of the Java
+ class that is represented by the parent element, and must
+ correspond to property names that will be recognized when
+ performing introspection against that class via
+ java.beans.Introspector.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="property-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-name" element represents the JavaBeans
+ property name under which the corresponding value
+ may be stored.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property-class"
+ type="javaee:java-typeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-class" element represents the Java type
+ of the value associated with this property name.
+ If not specified, it can be inferred from existing
+ classes; however, this element should be specified if
+ the configuration file is going to be the source for
+ generating the corresponding classes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="default-value"
+ type="javaee:faces-config-default-valueType"
+ minOccurs="0"/>
+ <xsd:element name="suggested-value"
+ type="javaee:faces-config-suggested-valueType"
+ minOccurs="0"/>
+ <xsd:element name="property-extension"
+ type="javaee:faces-config-property-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-property-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for property. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-redirectType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "redirect" element indicates that navigation to the
+ specified "to-view-id" should be accomplished by
+ performing an HTTP redirect rather than the usual
+ ViewHandler mechanisms.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-referenced-beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "referenced-bean" element represents at design time the
+ promise that a Java object of the specified type will exist at
+ runtime in some scope, under the specified key. This can be
+ used by design time tools to construct user interface dialogs
+ based on the properties of the specified class. The presence
+ or absence of a referenced bean element has no impact on the
+ JavaServer Faces runtime environment inside a web application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="referenced-bean-name"
+ type="javaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "referenced-bean-name" element represents the
+ attribute name under which the corresponding
+ referenced bean may be assumed to be stored, in one
+ of 'request', 'session', or 'application' scopes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="referenced-bean-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "referenced-bean-class" element represents the
+ fully qualified class name of the Java class
+ (either abstract or concrete) or Java interface
+ implemented by the corresponding referenced bean.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-render-kitType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit" element represents a concrete RenderKit
+ implementation that should be registered under the specified
+ render-kit-id. If no render-kit-id is specified, the
+ identifier of the default RenderKit
+ (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="render-kit-id"
+ type="javaee:string"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit-id" element represents an identifier
+ for the RenderKit represented by the parent
+ "render-kit" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="render-kit-class"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit-class" element represents the fully
+ qualified class name of a concrete RenderKit
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="renderer"
+ type="javaee:faces-config-rendererType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="render-kit-extension"
+ type="javaee:faces-config-render-kit-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-rendererType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "renderer" element represents a concrete Renderer
+ implementation class that should be registered under the
+ specified component family and renderer type identifiers,
+ in the RenderKit associated with the parent "render-kit"
+ element. Combinations of component family and
+ renderer type must be unique within the RenderKit
+ associated with the parent "render-kit" element.
+
+ Nested "attribute" elements identify generic component
+ attributes that are recognized by this renderer.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="component-family"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component-family" element represents the
+ component family for which the Renderer represented
+ by the parent "renderer" element will be used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="renderer-type"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "renderer-type" element represents a renderer type
+ identifier for the Renderer represented by the parent
+ "renderer" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="renderer-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "renderer-class" element represents the fully
+ qualified class name of a concrete Renderer
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="facet"
+ type="javaee:faces-config-facetType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="renderer-extension"
+ type="javaee:faces-config-renderer-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-renderer-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for renderer. It may contain implementation
+ specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-render-kit-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for render-kit. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-suggested-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "suggested-value" contains the value for the property or
+ attribute in which this element resides. This value is
+ advisory only and is intended for tools to use when
+ populating pallettes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-supported-localeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "supported-locale" element allows authors to declare
+ which locales are supported in this application instance.
+
+ It must be specified as :language:[_:country:[_:variant:]]
+ without the colons, for example "ja_JP_SJIS". The
+ separators between the segments may be '-' or '_'.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-localeType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-validatorType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator" element represents a concrete Validator
+ implementation class that should be registered under the
+ specified validator identifier. Validator identifiers must
+ be unique within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ may be configured on the corresponding UIComponent in order
+ to affect the operation of the Validator. Nested "property"
+ elements identify JavaBeans properties of the Validator
+ implementation class that may be configured to affect the
+ operation of the Validator. "attribute" and "property"
+ elements are intended to allow component developers to
+ more completely describe their components to tools and users.
+ These elements have no required runtime semantics.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="validator-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator-id" element represents the identifier
+ under which the corresponding Validator class should
+ be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="validator-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator-class" element represents the fully
+ qualified class name of a concrete Validator
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "attribute" elements identify generic
+ attributes that may be configured on the
+ corresponding UIComponent in order to affect the
+ operation of the Validator. This attribute is
+ primarily for design-time tools and is not
+ specified to have any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "property" elements identify JavaBeans
+ properties of the Validator implementation class
+ that may be configured to affect the operation of
+ the Validator. This attribute is primarily for
+ design-time tools and is not specified to have
+ any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="validator-extension"
+ type="javaee:faces-config-validator-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-validator-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for validator. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "value" element is the String representation of
+ a literal value to which a scalar managed property
+ will be set, or a value binding expression ("#{...}")
+ that will be used to calculate the required value.
+ It will be converted as specified for the actual
+ property type.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:union
+ memberTypes="javaee:faces-config-el-expressionType xsd:string"/>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-value-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "value-class" element defines the Java type to which each
+ "value" element's value will be converted to, prior to adding
+ it to the "list-entries" list for a managed property that is
+ a java.util.List, or a "map-entries" map for a managed
+ property that is a java.util.Map.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:fully-qualified-classType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-list-entriesType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "list-entries" element represents a set of initialization
+ elements for a managed property that is a java.util.List or an
+ array. In the former case, the "value-class" element can
+ optionally be used to declare the Java type to which each
+ value should be converted before adding it to the Collection.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="value-class"
+ type="javaee:faces-config-value-classType"
+ minOccurs="0"/>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="null-value"
+ type="javaee:faces-config-null-valueType"/>
+ <xsd:element name="value"
+ type="javaee:faces-config-valueType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-versionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type contains the recognized versions of
+ faces-config supported.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="1.2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+</xsd:schema>
Property changes on: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_1_2.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_2_0.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_2_0.xsd (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_2_0.xsd 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,2729 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+
+<xsd:schema
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="2.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ $Id: web-facesconfig_2_0.xsd,v 1.1.8.2 2008/03/20 21:12:50 edburns Exp $
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2007 Sun Microsystems, Inc.,
+ 901 San Antonio Road,
+ Palo Alto, California 94303, U.S.A.
+ All rights reserved.
+
+ Sun Microsystems, Inc. has intellectual property
+ rights relating to technology described in this document. In
+ particular, and without limitation, these intellectual
+ property rights may include one or more of the U.S. patents
+ listed at http://www.sun.com/patents and one or more
+ additional patents or pending patent applications in the
+ U.S. and other countries.
+
+ This document and the technology which it describes are
+ distributed under licenses restricting their use, copying,
+ distribution, and decompilation. No part of this document
+ may be reproduced in any form by any means without prior
+ written authorization of Sun and its licensors, if any.
+
+ Third-party software, including font technology, is
+ copyrighted and licensed from Sun suppliers.
+
+ Sun, Sun Microsystems, the Sun logo, Solaris, Java, Java EE,
+ JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+ Cup logo are trademarks or registered trademarks of Sun
+ Microsystems, Inc. in the U.S. and other countries.
+
+ Federal Acquisitions: Commercial Software - Government Users
+ Subject to Standard License Terms and Conditions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ <![CDATA[
+
+ The XML Schema for the JavaServer Faces Application
+ Configuration File (Version 2.0).
+
+ All JavaServer Faces configuration files must indicate
+ the JavaServer Faces schema by indicating the JavaServer
+ Faces namespace:
+
+ http://java.sun.com/xml/ns/javaee
+
+ and by indicating the version of the schema by
+ using the version element as shown below:
+
+ <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="..."
+ version="2.0">
+ ...
+ </faces-config>
+
+ The instance documents may indicate the published
+ version of the schema using xsi:schemaLocation attribute
+ for javaee namespace with the following location:
+
+ http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd
+
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="javaee_5.xsd"/>
+
+ <!-- **************************************************** -->
+
+ <xsd:element name = "faces-config" type="javaee:faces-configType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-config" element is the root of the configuration
+ information hierarchy, and contains nested elements for all
+ of the other configuration settings.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:unique name="faces-config-behavior-ID-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Behavior IDs must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:behavior"/>
+ <xsd:field xpath="javaee:behavior-id"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-converter-ID-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Converter IDs must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:converter"/>
+ <xsd:field xpath="javaee:converter-id"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-converter-for-class-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ 'converter-for-class' element values must be unique
+ within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:converter"/>
+ <xsd:field xpath="javaee:converter-for-class"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-validator-ID-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Validator IDs must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:validator"/>
+ <xsd:field xpath="javaee:validator-id"/>
+ </xsd:unique>
+
+ <xsd:unique name="faces-config-managed-bean-name-uniqueness">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Managed bean names must be unique within a document.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:selector xpath="javaee:managed-bean"/>
+ <xsd:field xpath="javaee:managed-bean-name"/>
+ </xsd:unique>
+ </xsd:element>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-configType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-config" element is the root of the configuration
+ information hierarchy, and contains nested elements for all
+ of the other configuration settings.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="application"
+ type="javaee:faces-config-applicationType"/>
+ <xsd:element name="ordering"
+ type="javaee:faces-config-orderingType"/>
+ <xsd:element name="absolute-ordering"
+ type="javaee:faces-config-absoluteOrderingType"
+ minOccurs="0"
+ maxOccurs="1"/>
+ <xsd:element name="factory"
+ type="javaee:faces-config-factoryType"/>
+ <xsd:element name="component"
+ type="javaee:faces-config-componentType"/>
+ <xsd:element name="converter"
+ type="javaee:faces-config-converterType"/>
+ <xsd:element name="managed-bean"
+ type="javaee:faces-config-managed-beanType"/>
+ <xsd:element name="name"
+ type="javaee:java-identifierType"
+ minOccurs="0"
+ maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "name" element within the top level "faces-config"
+ element declares the name of this application
+ configuration resource. Such names are used
+ in the document ordering scheme specified in section
+ JSF.11.4.6.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="navigation-rule"
+ type="javaee:faces-config-navigation-ruleType"/>
+ <xsd:element name="referenced-bean"
+ type="javaee:faces-config-referenced-beanType"/>
+ <xsd:element name="render-kit"
+ type="javaee:faces-config-render-kitType"/>
+ <xsd:element name="lifecycle"
+ type="javaee:faces-config-lifecycleType"/>
+ <xsd:element name="validator"
+ type="javaee:faces-config-validatorType"/>
+ <xsd:element name="behavior"
+ type="javaee:faces-config-behaviorType"/>
+ <xsd:element name="faces-config-extension"
+ type="javaee:faces-config-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name="metadata-complete"
+ type="xsd:boolean"
+ use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The metadata-complete attribute defines whether this
+ JavaServer Faces application is complete, or whether
+ the class files available to this module and packaged with
+ this application should be examined for annotations
+ that specify configuration information.
+
+ This attribute is only inspected on the application
+ configuration resource file located at "WEB-INF/faces-config.xml".
+ The presence of this attribute on any application configuration
+ resource other than the one located at "WEB-INF/faces-config.xml",
+ including any files named using the javax.faces.CONFIG_FILES
+ attribute, must be ignored.
+
+ If metadata-complete is set to "true", the JavaServer Faces
+ runtime must ignore any annotations that specify configuration
+ information, which might be present in the class files
+ of the application.
+
+ If metadata-complete is not specified or is set to
+ "false", the JavaServer Faces runtime must examine the class
+ files of the application for annotations, as specified by
+ the specification.
+
+ If "WEB-INF/faces-config.xml" is not present, the JavaServer
+ Faces runtime will assume metadata-complete to be "false".
+
+ The value of this attribute will have no impact on
+ runtime annotations such as @ResourceDependency or
+ @ListenerFor.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="id" type="xsd:ID" />
+ <xsd:attribute name="version"
+ type="javaee:faces-config-versionType"
+ use="required"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for faces-config. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+
+ <xsd:complexType name="faces-config-orderingType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Please see section JSF.11.4.6 for the specification of this element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="after"
+ type="javaee:faces-config-ordering-orderingType"
+ minOccurs="0"
+ maxOccurs="1"/>
+ <xsd:element name="before"
+ type="javaee:faces-config-ordering-orderingType"
+ minOccurs="0"
+ maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="faces-config-ordering-orderingType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This element contains a sequence of "id" elements, each of which
+ refers to an application configuration resource by the "id"
+ declared on its faces-config element. This element can also contain
+ a single "others" element which specifies that this document comes
+ before or after other documents within the application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="name" type="javaee:java-identifierType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="others" type="javaee:faces-config-ordering-othersType" minOccurs="0" maxOccurs="1" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="faces-config-ordering-othersType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This element indicates that the ordering sub-element in which
+ it was placed should take special action regarding the ordering
+ of this application resource relative to other
+ application configuration resources. See section JSF.11.4.6
+ for the complete specification.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+
+ <xsd:complexType name="faces-config-absoluteOrderingType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Only relevant if this is placed within the /WEB-INF/faces-config.xml.
+ Please see section JSF.11.4.6 for the specification for details.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="name" type="javaee:java-identifierType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="others" type="javaee:faces-config-ordering-othersType" minOccurs="0" maxOccurs="1" />
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+
+ <xsd:complexType name="faces-config-applicationType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "application" element provides a mechanism to define the
+ various per-application-singleton implementation artifacts for
+ a particular web application that is utilizing
+ JavaServer Faces. For nested elements that are not specified,
+ the JSF implementation must provide a suitable default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="action-listener"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "action-listener" element contains the fully
+ qualified class name of the concrete
+ ActionListener implementation class that will be
+ called during the Invoke Application phase of the
+ request processing lifecycle.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="default-render-kit-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-render-kit-id" element allows the
+ application to define a renderkit to be used other
+ than the standard one.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="message-bundle"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The base name of a resource bundle representing
+ the message resources for this application. See
+ the JavaDocs for the "java.util.ResourceBundle"
+ class for more information on the syntax of
+ resource bundle names.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="navigation-handler"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "navigation-handler" element contains the
+ fully qualified class name of the concrete
+ NavigationHandler implementation class that will
+ be called during the Invoke Application phase
+ of the request processing lifecycle, if the
+ default ActionListener (provided by the JSF
+ implementation) is used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="view-handler"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "view-handler" element contains the fully
+ qualified class name of the concrete ViewHandler
+ implementation class that will be called during
+ the Restore View and Render Response phases of the
+ request processing lifecycle. The faces
+ implementation must provide a default
+ implementation of this class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="state-manager"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "state-manager" element contains the fully
+ qualified class name of the concrete StateManager
+ implementation class that will be called during
+ the Restore View and Render Response phases of the
+ request processing lifecycle. The faces
+ implementation must provide a default
+ implementation of this class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="el-resolver"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "el-resolver" element contains the fully
+ qualified class name of the concrete
+ javax.el.ELResolver implementation class
+ that will be used during the processing of
+ EL expressions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property-resolver"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-resolver" element contains the fully
+ qualified class name of the concrete
+ PropertyResolver implementation class that will
+ be used during the processing of value binding
+ expressions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="variable-resolver"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "variable-resolver" element contains the fully
+ qualified class name of the concrete
+ VariableResolver implementation class that will
+ be used during the processing of value binding
+ expressions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="resource-handler"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The "resource-handler" element contains the
+ fully qualified class name of the concrete
+ ResourceHandler implementation class that
+ will be used during rendering and decoding
+ of resource requests The standard
+ constructor based decorator pattern used for
+ other application singletons will be
+ honored.
+
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="system-event-listener"
+ type="javaee:faces-config-system-event-listenerType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ </xsd:element>
+ <xsd:element
+ name="locale-config"
+ type="javaee:faces-config-locale-configType"/>
+ <xsd:element
+ name="resource-bundle"
+ type="javaee:faces-config-application-resource-bundleType"/>
+ <xsd:element name="application-extension"
+ type="javaee:faces-config-application-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element
+ name="default-validators"
+ type="javaee:faces-config-default-validatorsType"/>
+ </xsd:choice>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="faces-config-application-resource-bundleType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The resource-bundle element inside the application element
+ references a java.util.ResourceBundle instance by name
+ using the var element. ResourceBundles referenced in this
+ manner may be returned by a call to
+ Application.getResourceBundle() passing the current
+ FacesContext for this request and the value of the var
+ element below.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="base-name"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The fully qualified class name of the
+ java.util.ResourceBundle instance.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="var"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The name by which this ResourceBundle instance
+ is retrieved by a call to
+ Application.getResourceBundle().
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-application-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for application. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-factoryType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "factory" element provides a mechanism to define the
+ various Factories that comprise parts of the implementation
+ of JavaServer Faces. For nested elements that are not
+ specified, the JSF implementation must provide a suitable
+ default.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="application-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "application-factory" element contains the
+ fully qualified class name of the concrete
+ ApplicationFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(APPLICATION_FACTORY) is
+ called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="exception-handler-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "exception-handler-factory" element contains the
+ fully qualified class name of the concrete
+ ExceptionHandlerFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(EXCEPTION_HANDLER_FACTORY)
+ is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="external-context-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "external-context-factory" element contains the
+ fully qualified class name of the concrete
+ ExternalContextFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(EXTERNAL_CONTEXT_FACTORY)
+ is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="faces-context-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "faces-context-factory" element contains the
+ fully qualified class name of the concrete
+ FacesContextFactory implementation class that will
+ be called when
+ FactoryFinder.getFactory(FACES_CONTEXT_FACTORY)
+ is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="partial-view-context-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "partial-view-context-factory" element contains the
+ fully qualified class name of the concrete
+ PartialViewContextFactory implementation class that will
+ be called when FactoryFinder.getFactory
+ (FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY) is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="lifecycle-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "lifecycle-factory" element contains the fully
+ qualified class name of the concrete LifecycleFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="view-declaration-language-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "view-declaration-language-factory" element contains
+ the fully qualified class name of the concrete
+ ViewDeclarationLanguageFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(VIEW_DECLARATION_FACTORY) is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="tag-handler-delegate-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "tag-handler-delegate-factory" element contains
+ the fully qualified class name of the concrete
+ ViewDeclarationLanguageFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(TAG_HANDLER_DELEGATE_FACTORY) is called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="render-kit-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit-factory" element contains the fully
+ qualified class name of the concrete RenderKitFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(RENDER_KIT_FACTORY) is
+ called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="visit-context-factory"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "visit-context-factory" element contains the fully
+ qualified class name of the concrete VisitContextFactory
+ implementation class that will be called when
+ FactoryFinder.getFactory(VISIT_CONTEXT_FACTORY) is
+ called.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="factory-extension"
+ type="javaee:faces-config-factory-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-factory-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for factory. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-attributeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute" element represents a named, typed, value
+ associated with the parent UIComponent via the generic
+ attributes mechanism.
+
+ Attribute names must be unique within the scope of the parent
+ (or related) component.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="attribute-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute-name" element represents the name under
+ which the corresponding value will be stored, in the
+ generic attributes of the UIComponent we are related
+ to.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute-class" element represents the Java type
+ of the value associated with this attribute name.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="default-value"
+ type="javaee:faces-config-default-valueType"
+ minOccurs="0"/>
+ <xsd:element name="suggested-value"
+ type="javaee:faces-config-suggested-valueType"
+ minOccurs="0"/>
+ <xsd:element name="attribute-extension"
+ type="javaee:faces-config-attribute-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name = "id" type = "xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-attribute-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for attribute. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-componentType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component" element represents a concrete UIComponent
+ implementation class that should be registered under the
+ specified type identifier, along with its associated
+ properties and attributes. Component types must be unique
+ within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ are recognized by the implementation logic of this component.
+ Nested "property" elements identify JavaBeans properties of
+ the component class that may be exposed for manipulation
+ via tools.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="component-type"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component-type" element represents the name under
+ which the corresponding UIComponent class should be
+ registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="component-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component-class" element represents the fully
+ qualified class name of a concrete UIComponent
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="facet"
+ type="javaee:faces-config-facetType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="component-extension"
+ type="javaee:faces-config-component-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-component-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Extension element for component. It may contain
+ implementation specific content.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-default-localeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-locale" element declares the default locale
+ for this application instance.
+
+ It must be specified as :language:[_:country:[_:variant:]]
+ without the colons, for example "ja_JP_SJIS". The
+ separators between the segments may be '-' or '_'.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-localeType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+
+ <xsd:complexType name="faces-config-default-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-value" contains the value for the property or
+ attribute in which this element resides. This value differs
+ from the "suggested-value" in that the property or attribute
+ must take the value, whereas in "suggested-value" taking the
+ value is optional.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-el-expressionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ EL expressions present within a faces config file
+ must start with the character sequence of '#{' and
+ end with '}'.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="#\{.*\}"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-facetType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Define the name and other design-time information for a facet
+ that is associated with a renderer or a component.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="facet-name"
+ type="javaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "facet-name" element represents the facet name
+ under which a UIComponent will be added to its parent.
+ It must be of type "Identifier".
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="facet-extension"
+ type="javaee:faces-config-facet-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-facet-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for facet. It may contain implementation
+ specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-from-view-idType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The value of from-view-id must contain one of the following
+ values:
+
+ - The exact match for a view identifier that is recognized
+ by the the ViewHandler implementation being used (such as
+ "/index.jsp" if you are using the default ViewHandler).
+
+ - A proper prefix of a view identifier, plus a trailing
+ "*" character. This pattern indicates that all view
+ identifiers that match the portion of the pattern up to
+ the asterisk will match the surrounding rule. When more
+ than one match exists, the match with the longest pattern
+ is selected.
+
+ - An "*" character, which means that this pattern applies
+ to all view identifiers.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-from-actionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "from-action" element contains an action reference
+ expression that must have been executed (by the default
+ ActionListener for handling application level events)
+ in order to select the navigation rule. If not specified,
+ this rule will be relevant no matter which action reference
+ was executed (or if no action reference was executed).
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-el-expressionType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-ifType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "if" element defines a condition that must resolve
+ to true in order for the navigation case on which it is
+ defined to be matched, with the existing match criteria
+ (action method and outcome) as a prerequiste, if present.
+ The condition is defined declaratively using a value
+ expression in the body of this element. The expression is
+ evaluated at the time the navigation case is being matched.
+ If the "from-outcome" is omitted and this element is
+ present, the navigation handler will match a null outcome
+ and use the condition return value to determine if the
+ case should be considered a match.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-el-expressionType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-converterType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter" element represents a concrete Converter
+ implementation class that should be registered under the
+ specified converter identifier. Converter identifiers must
+ be unique within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ may be configured on the corresponding UIComponent in order
+ to affect the operation of the Converter. Nested "property"
+ elements identify JavaBeans properties of the Converter
+ implementation class that may be configured to affect the
+ operation of the Converter. "attribute" and "property"
+ elements are intended to allow component developers to
+ more completely describe their components to tools and users.
+ These elements have no required runtime semantics.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:choice>
+ <xsd:element name="converter-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter-id" element represents the
+ identifier under which the corresponding
+ Converter class should be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="converter-for-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter-for-class" element represents the
+ fully qualified class name for which a Converter
+ class will be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+
+ <xsd:element name="converter-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "converter-class" element represents the fully
+ qualified class name of a concrete Converter
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "attribute" elements identify generic
+ attributes that may be configured on the
+ corresponding UIComponent in order to affect the
+ operation of the Converter. This attribute is
+ primarily for design-time tools and is not
+ specified to have any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "property" elements identify JavaBeans
+ properties of the Converter implementation class
+ that may be configured to affect the operation of
+ the Converter. This attribute is primarily for
+ design-time tools and is not specified to have
+ any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="converter-extension"
+ type="javaee:faces-config-converter-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-converter-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for converter. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-lifecycleType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "lifecycle" element provides a mechanism to specify
+ modifications to the behaviour of the default Lifecycle
+ implementation for this web application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="phase-listener"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "phase-listener" element contains the fully
+ qualified class name of the concrete PhaseListener
+ implementation class that will be registered on
+ the Lifecycle.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="lifecycle-extension"
+ type="javaee:faces-config-lifecycle-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-lifecycle-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for lifecycle. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-localeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The localeType defines valid locale defined by ISO-639-1
+ and ISO-3166.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="([a-z]{2})[_|\-]?([\p{L}]{2})?[_|\-]?(\w+)?"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-locale-configType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "locale-config" element allows the app developer to
+ declare the supported locales for this application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="default-locale"
+ type="javaee:faces-config-default-localeType"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="supported-locale"
+ type="javaee:faces-config-supported-localeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-default-validatorsType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "default-validators" element allows the app developer to
+ register a set of validators, referenced by identifier, that
+ are automatically assigned to any EditableValueHolder component
+ in the application, unless overridden or disabled locally.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="validator-id"
+ type="javaee:string"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator-id" element represents the identifier
+ of a registered validator.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-managed-beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean" element represents a JavaBean, of a
+ particular class, that will be dynamically instantiated
+ at runtime (by the default VariableResolver implementation)
+ if it is referenced as the first element of a value binding
+ expression, and no corresponding bean can be identified in
+ any scope. In addition to the creation of the managed bean,
+ and the optional storing of it into the specified scope,
+ the nested managed-property elements can be used to
+ initialize the contents of settable JavaBeans properties of
+ the created instance.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="managed-bean-name"
+ type="javaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean-name" element represents the
+ attribute name under which a managed bean will
+ be searched for, as well as stored (unless the
+ "managed-bean-scope" value is "none").
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="managed-bean-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean-class" element represents the fully
+ qualified class name of the Java class that will be
+ used`to instantiate a new instance if creation of the
+ specified`managed bean is requested.
+
+ The specified class must conform to standard JavaBeans
+ conventions. In particular, it must have a public
+ zero-arguments constructor, and zero or more public
+ property setters.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element
+ name="managed-bean-scope"
+ type="javaee:faces-config-managed-bean-scopeOrNoneType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-bean-scope" element represents the scope
+ into which a newly created instance of the specified
+ managed bean will be stored (unless the value is
+ "none").
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element name="managed-property"
+ type="javaee:faces-config-managed-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="map-entries"
+ type="javaee:faces-config-map-entriesType"/>
+ <xsd:element name="list-entries"
+ type="javaee:faces-config-list-entriesType"/>
+ </xsd:choice>
+ <xsd:element name="managed-bean-extension"
+ type="javaee:faces-config-managed-bean-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="eager"
+ type="xsd:boolean"
+ use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This attribute is only considered when associated with
+ an application-scoped managed bean. If the value of the eager
+ attribute is true the runtime must instantiate this class
+ and store the instance within the application scope when the
+ application starts.
+
+ If eager is unspecified or is false, the default "lazy"
+ instantiation and scoped storage of the managed bean
+ will occur.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-managed-bean-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for managed-bean. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-managed-bean-scopeOrNoneType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ <![CDATA[
+ Defines the legal values for the <managed-bean-scope>
+ element's body content, which includes all of the scopes
+ normally used in a web application, plus the "none" value
+ indicating that a created bean should not be stored into
+ any scope. Alternatively, an EL expression may be used
+ as the value of this element. The result of evaluating this
+ expression must by of type java.util.Map.
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string">
+ <xsd:pattern value="view|request|session|application|none|#\{.*\}"/>
+ </xsd:restriction>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-managed-propertyType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "managed-property" element represents an individual
+ property of a managed bean that will be configured to the
+ specified value (or value set) if the corresponding
+ managed bean is automatically created.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="property-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-name" element represents the JavaBeans
+ property name under which the corresponding value may
+ be stored.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property-class"
+ type="javaee:java-typeType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-class" element represents the Java type
+ of the value associated with this property name.
+ If not specified, it can be inferred from existing
+ classes; however, this element should be specified
+ if the configuration file is going to be the source
+ for generating the corresponding classes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element name="map-entries"
+ type="javaee:faces-config-map-entriesType"/>
+ <xsd:element name="null-value"
+ type="javaee:faces-config-null-valueType">
+ </xsd:element>
+ <xsd:element name="value"
+ type="javaee:faces-config-valueType"/>
+ <xsd:element name="list-entries"
+ type="javaee:faces-config-list-entriesType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-map-entryType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "map-entry" element reprsents a single key-entry pair
+ that will be added to the computed value of a managed
+ property of type java.util.Map.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="key"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "key" element is the String representation of a
+ map key that will be stored in a managed property of
+ type java.util.Map.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element name="null-value"
+ type="javaee:faces-config-null-valueType"/>
+ <xsd:element name="value"
+ type="javaee:faces-config-valueType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-map-entriesType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "map-entries' element represents a set of key-entry pairs
+ that will be added to the computed value of a managed property
+ of type java.util.Map. In addition, the Java class types
+ of the key and entry values may be optionally declared.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="key-class"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "key-class" element defines the Java type to which
+ each "key" element in a set of "map-entry" elements
+ will be converted to. If omitted, "java.lang.String"
+ is assumed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="value-class"
+ type="javaee:faces-config-value-classType"
+ minOccurs="0"/>
+ <xsd:element name="map-entry"
+ type="javaee:faces-config-map-entryType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-navigation-caseType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "navigation-case" element describes a particular
+ combination of conditions that must match for this case to
+ be executed, and the view id of the component tree that
+ should be selected next.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="from-action"
+ type="javaee:faces-config-from-actionType"
+ minOccurs="0">
+ </xsd:element>
+ <xsd:element name="from-outcome"
+ type="javaee:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "from-outcome" element contains a logical outcome
+ string returned by the execution of an application
+ action method selected via an "actionRef" property
+ (or a literal value specified by an "action" property)
+ of a UICommand component. If specified, this rule
+ will be relevant only if the outcome value matches
+ this element's value. If not specified, this rule
+ will be relevant if the outcome value is non-null
+ or, if the "if" element is present, will be relevant
+ for any outcome value, with the assumption that the
+ condition specified in the "if" element ultimately
+ determines if this rule is a match.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="if"
+ type="javaee:faces-config-ifType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Please see section JSF.7.4.2 for the specification of this element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="to-view-id"
+ type="javaee:faces-config-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "to-view-id" element contains the view identifier
+ of the next view that should be displayed if this
+ navigation rule is matched. If the contents is a
+ value expression, it should be resolved by the
+ navigation handler to obtain the view identifier.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element
+ name="redirect"
+ type="javaee:faces-config-redirectType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-navigation-ruleType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "navigation-rule" element represents an individual
+ decision rule that will be utilized by the default
+ NavigationHandler implementation to make decisions on
+ what view should be displayed next, based on the
+ view id being processed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="from-view-id"
+ type="javaee:faces-config-from-view-idType"
+ minOccurs="0"/>
+ <xsd:element name="navigation-case"
+ type="javaee:faces-config-navigation-caseType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element
+ name="navigation-rule-extension"
+ type="javaee:faces-config-navigation-rule-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-navigation-rule-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for navigation-rule. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-null-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "null-value" element indicates that the managed
+ property in which we are nested will be explicitly
+ set to null if our managed bean is automatically
+ created. This is different from omitting the managed
+ property element entirely, which will cause no
+ property setter to be called for this property.
+
+ The "null-value" element can only be used when the
+ associated "property-class" identifies a Java class,
+ not a Java primitive.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-propertyType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property" element represents a JavaBean property of the
+ Java class represented by our parent element.
+
+ Property names must be unique within the scope of the Java
+ class that is represented by the parent element, and must
+ correspond to property names that will be recognized when
+ performing introspection against that class via
+ java.beans.Introspector.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="property-name"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-name" element represents the JavaBeans
+ property name under which the corresponding value
+ may be stored.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="property-class"
+ type="javaee:java-typeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "property-class" element represents the Java type
+ of the value associated with this property name.
+ If not specified, it can be inferred from existing
+ classes; however, this element should be specified if
+ the configuration file is going to be the source for
+ generating the corresponding classes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="default-value"
+ type="javaee:faces-config-default-valueType"
+ minOccurs="0"/>
+ <xsd:element name="suggested-value"
+ type="javaee:faces-config-suggested-valueType"
+ minOccurs="0"/>
+ <xsd:element name="property-extension"
+ type="javaee:faces-config-property-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-property-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for property. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-redirectType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "redirect" element indicates that navigation to the
+ specified "to-view-id" should be accomplished by
+ performing an HTTP redirect rather than the usual
+ ViewHandler mechanisms.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="view-param"
+ type="javaee:faces-config-redirect-viewParamType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="include-view-params" type="xsd:boolean" use="optional"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-redirect-viewParamType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "view-param" element, only valid within
+ a "redirect" element, contains child "name"
+ and "value" elements that must be included in the
+ redirect url when the redirect is performed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="name"
+ type="javaee:string"
+ minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="value"
+ type="javaee:string"
+ minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-referenced-beanType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "referenced-bean" element represents at design time the
+ promise that a Java object of the specified type will exist at
+ runtime in some scope, under the specified key. This can be
+ used by design time tools to construct user interface dialogs
+ based on the properties of the specified class. The presence
+ or absence of a referenced bean element has no impact on the
+ JavaServer Faces runtime environment inside a web application.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="referenced-bean-name"
+ type="javaee:java-identifierType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "referenced-bean-name" element represents the
+ attribute name under which the corresponding
+ referenced bean may be assumed to be stored, in one
+ of 'request', 'session', 'view', 'application'
+ or a custom scope.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="referenced-bean-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "referenced-bean-class" element represents the
+ fully qualified class name of the Java class
+ (either abstract or concrete) or Java interface
+ implemented by the corresponding referenced bean.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-render-kitType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit" element represents a concrete RenderKit
+ implementation that should be registered under the specified
+ render-kit-id. If no render-kit-id is specified, the
+ identifier of the default RenderKit
+ (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="render-kit-id"
+ type="javaee:string"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit-id" element represents an identifier
+ for the RenderKit represented by the parent
+ "render-kit" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="render-kit-class"
+ type="javaee:fully-qualified-classType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "render-kit-class" element represents the fully
+ qualified class name of a concrete RenderKit
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="renderer"
+ type="javaee:faces-config-rendererType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="client-behavior-renderer"
+ type="javaee:faces-config-client-behavior-rendererType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="render-kit-extension"
+ type="javaee:faces-config-render-kit-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-client-behavior-rendererType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "client-behavior-renderer" element represents a concrete
+ ClientBehaviorRenderer implementation class that should be
+ registered under the specified behavior renderer type identifier,
+ in the RenderKit associated with the parent "render-kit"
+ element. Client Behavior renderer type must be unique within the RenderKit
+ associated with the parent "render-kit" element.
+
+ Nested "attribute" elements identify generic component
+ attributes that are recognized by this renderer.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:element name="client-behavior-renderer-type"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "client-behavior-renderer-type" element represents a renderer type
+ identifier for the Client Behavior Renderer represented by the parent
+ "client-behavior-renderer" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="client-behavior-renderer-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "client-behavior-renderer-class" element represents the fully
+ qualified class name of a concrete Client Behavior Renderer
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="faces-config-rendererType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "renderer" element represents a concrete Renderer
+ implementation class that should be registered under the
+ specified component family and renderer type identifiers,
+ in the RenderKit associated with the parent "render-kit"
+ element. Combinations of component family and
+ renderer type must be unique within the RenderKit
+ associated with the parent "render-kit" element.
+
+ Nested "attribute" elements identify generic component
+ attributes that are recognized by this renderer.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="component-family"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "component-family" element represents the
+ component family for which the Renderer represented
+ by the parent "renderer" element will be used.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="renderer-type"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "renderer-type" element represents a renderer type
+ identifier for the Renderer represented by the parent
+ "renderer" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="renderer-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "renderer-class" element represents the fully
+ qualified class name of a concrete Renderer
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="facet"
+ type="javaee:faces-config-facetType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="renderer-extension"
+ type="javaee:faces-config-renderer-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-renderer-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for renderer. It may contain implementation
+ specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-render-kit-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for render-kit. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-suggested-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "suggested-value" contains the value for the property or
+ attribute in which this element resides. This value is
+ advisory only and is intended for tools to use when
+ populating pallettes.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:string"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-supported-localeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "supported-locale" element allows authors to declare
+ which locales are supported in this application instance.
+
+ It must be specified as :language:[_:country:[_:variant:]]
+ without the colons, for example "ja_JP_SJIS". The
+ separators between the segments may be '-' or '_'.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="javaee:faces-config-localeType">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-behaviorType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "behavior" element represents a concrete Behavior
+ implementation class that should be registered under the
+ specified behavior identifier. Behavior identifiers must
+ be unique within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ may be configured on the corresponding UIComponent in order
+ to affect the operation of the Behavior. Nested "property"
+ elements identify JavaBeans properties of the Behavior
+ implementation class that may be configured to affect the
+ operation of the Behavior. "attribute" and "property"
+ elements are intended to allow component developers to
+ more completely describe their components to tools and users.
+ These elements have no required runtime semantics.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="behavior-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "behavior-id" element represents the identifier
+ under which the corresponding Behavior class should
+ be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="behavior-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "behavior-class" element represents the fully
+ qualified class name of a concrete Behavior
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "attribute" elements identify generic
+ attributes that may be configured on the
+ corresponding UIComponent in order to affect the
+ operation of the Behavior. This attribute is
+ primarily for design-time tools and is not
+ specified to have any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "property" elements identify JavaBeans
+ properties of the Behavior implementation class
+ that may be configured to affect the operation of
+ the Behavior. This attribute is primarily for
+ design-time tools and is not specified to have
+ any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="behavior-extension"
+ type="javaee:faces-config-behavior-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-behavior-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for behavior. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-validatorType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator" element represents a concrete Validator
+ implementation class that should be registered under the
+ specified validator identifier. Validator identifiers must
+ be unique within the entire web application.
+
+ Nested "attribute" elements identify generic attributes that
+ may be configured on the corresponding UIComponent in order
+ to affect the operation of the Validator. Nested "property"
+ elements identify JavaBeans properties of the Validator
+ implementation class that may be configured to affect the
+ operation of the Validator. "attribute" and "property"
+ elements are intended to allow component developers to
+ more completely describe their components to tools and users.
+ These elements have no required runtime semantics.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="javaee:descriptionGroup"/>
+ <xsd:element name="validator-id"
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator-id" element represents the identifier
+ under which the corresponding Validator class should
+ be registered.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="validator-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "validator-class" element represents the fully
+ qualified class name of a concrete Validator
+ implementation class.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="attribute"
+ type="javaee:faces-config-attributeType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "attribute" elements identify generic
+ attributes that may be configured on the
+ corresponding UIComponent in order to affect the
+ operation of the Validator. This attribute is
+ primarily for design-time tools and is not
+ specified to have any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:element>
+ <xsd:element name="property"
+ type="javaee:faces-config-propertyType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Nested "property" elements identify JavaBeans
+ properties of the Validator implementation class
+ that may be configured to affect the operation of
+ the Validator. This attribute is primarily for
+ design-time tools and is not specified to have
+ any meaning at runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="validator-extension"
+ type="javaee:faces-config-validator-extensionType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name = "faces-config-validator-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Extension element for validator. It may contain
+ implementation specific content.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-valueType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "value" element is the String representation of
+ a literal value to which a scalar managed property
+ will be set, or a value binding expression ("#{...}")
+ that will be used to calculate the required value.
+ It will be converted as specified for the actual
+ property type.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:union
+ memberTypes="javaee:faces-config-el-expressionType xsd:string"/>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-value-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "value-class" element defines the Java type to which each
+ "value" element's value will be converted to, prior to adding
+ it to the "list-entries" list for a managed property that is
+ a java.util.List, or a "map-entries" map for a managed
+ property that is a java.util.Map.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:restriction base="javaee:fully-qualified-classType"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-list-entriesType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "list-entries" element represents a set of initialization
+ elements for a managed property that is a java.util.List or an
+ array. In the former case, the "value-class" element can
+ optionally be used to declare the Java type to which each
+ value should be converted before adding it to the Collection.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="value-class"
+ type="javaee:faces-config-value-classType"
+ minOccurs="0"/>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="null-value"
+ type="javaee:faces-config-null-valueType"/>
+ <xsd:element name="value"
+ type="javaee:faces-config-valueType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="faces-config-system-event-listenerType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The presence of this element within the "application" element in
+ an application configuration resource file indicates the
+ developer wants to add an SystemEventListener to this
+ application instance. Elements nested within this element allow
+ selecting the kinds of events that will be delivered to the
+ listener instance, and allow selecting the kinds of classes that
+ can be the source of events that are delivered to the listener
+ instance.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="system-event-listener-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "system-event-listener-class" element contains
+ the fully qualified class name of the concrete
+ SystemEventListener implementation class that will be
+ called when events of the type specified by the
+ "system-event-class" are sent by the runtime.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="system-event-class"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "system-event-class" element contains the fully
+ qualified class name of the SystemEvent subclass for
+ which events will be delivered to the class whose fully
+ qualified class name is given by the
+ "system-event-listener-class" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="source-class" minOccurs="0"
+ type="javaee:fully-qualified-classType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "source-class" element, if present, contains the
+ fully qualified class name of the class that will be the
+ source for the event to be delivered to the class whose
+ fully qualified class name is given by the
+ "system-event-listener-class" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+ <xsd:simpleType name="faces-config-versionType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ This type contains the recognized versions of
+ faces-config supported.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="2.0"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- **************************************************** -->
+
+</xsd:schema>
Property changes on: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesconfig_2_0.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesuicomponent_2_0.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesuicomponent_2_0.xsd (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesuicomponent_2_0.xsd 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,253 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+
+<xsd:schema
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="2.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ $Id: web-facesuicomponent_2_0.xsd,v 1.1.8.2 2008/03/20 21:12:50 edburns Exp $
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2007 Sun Microsystems, Inc.,
+ 901 San Antonio Road,
+ Palo Alto, California 94303, U.S.A.
+ All rights reserved.
+
+ Sun Microsystems, Inc. has intellectual property
+ rights relating to technology described in this document. In
+ particular, and without limitation, these intellectual
+ property rights may include one or more of the U.S. patents
+ listed at http://www.sun.com/patents and one or more
+ additional patents or pending patent applications in the
+ U.S. and other countries.
+
+ This document and the technology which it describes are
+ distributed under licenses restricting their use, copying,
+ distribution, and decompilation. No part of this document
+ may be reproduced in any form by any means without prior
+ written authorization of Sun and its licensors, if any.
+
+ Third-party software, including font technology, is
+ copyrighted and licensed from Sun suppliers.
+
+ Sun, Sun Microsystems, the Sun logo, Solaris, Java, Java EE,
+ JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+ Cup logo are trademarks or registered trademarks of Sun
+ Microsystems, Inc. in the U.S. and other countries.
+
+ Federal Acquisitions: Commercial Software - Government Users
+ Subject to Standard License Terms and Conditions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ <![CDATA[
+
+ The XML Schema for a JavaServer Faces UIComponent (Version 2.0).
+
+ The elements in this schema may be used in an XHTML page for
+ a composite component, by pulling in the composite namespace:
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:composite="http://java.sun.com/jsf/composite">
+
+ <composite:interface>
+ <composite:attribute name="foo" default="bar" />
+ </composite:/interface>
+ <!-- the rest omitted -->
+</html>
+
+ The elements in this schema may also be used in a facelet taglibrary
+ file in the same manner:
+
+<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:composite="http://java.sun.com/jsf/composite"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibary_2_0.xsd"
+ version="2.0">
+ <namespace>http://domain.com/test_schema</namespace>
+ <tag>
+ <tag-name>testSchema</tag-name>
+ <component>
+ <component-type>javax.faces.Input</component-type>
+ <renderer-type>javax.faces.Text</renderer-type>
+ <handler-class>com.sun.faces.facelets.tag.jsf.ComponentHandler</handler-class>
+ <component-extension>
+
+ <composite:attribute name="foo" default="bar" />
+
+ </component-extension>
+ </component>
+ </tag>
+</facelet-taglib>
+
+ The instance documents may indicate the published
+ version of the schema using xsi:schemaLocation attribute
+ for javaee namespace with the following location:
+
+ http://java.sun.com/xml/ns/javaee/web-facesuicomponent_2_0.xsd
+
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="javaee_5.xsd"/>
+
+ <!-- **************************************************** -->
+
+ <xsd:element name = "attribute" type="javaee:uicomponent-attributeType">
+ </xsd:element>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="uicomponent-attributeType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attribute" element declares an attribute of this
+ ui component.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="attribute"
+ type="javaee:uicomponent-attributeType"/>
+ </xsd:choice>
+
+ <xsd:attribute name="name"
+ type="xsd:string"
+ use="required"/>
+
+ <xsd:attribute name="displayName"
+ type="xsd:string"
+ use="optional"/>
+
+ <xsd:attribute name="shortDescription"
+ type="xsd:string"
+ use="optional"/>
+
+ <xsd:attribute name="default"
+ type="xsd:string"
+ use="optional"/>
+
+ <xsd:attribute name="method-signature"
+ type="xsd:string"
+ use="optional">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ Provides the signature of the Java method. The syntax of
+ the method-signature element is as follows (taken from
+ function-signature in web-jsptaglibrary_2_1.xsd):
+
+ MethodSignature ::= ReturnType S MethodName S?
+ '(' S? Parameters? S? ')'
+
+ ReturnType ::= Type
+
+ MethodName ::= Identifier
+
+ Parameters ::= Parameter
+ | ( Parameter S? ',' S? Parameters )
+
+ Parameter ::= Type
+
+ Where:
+
+ * Type is a basic type or a fully qualified
+ Java class name (including package name),
+ as per the 'Type' production in the Java
+ Language Specification, Second Edition,
+ Chapter 18.
+
+ * Identifier is a Java identifier, as per
+ the 'Identifier' production in the Java
+ Language Specification, Second
+ Edition, Chapter 18.
+
+ Example:
+
+ java.lang.String nickName( java.lang.String, int )
+
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:attribute>
+
+ <xsd:attribute name="applyTo"
+ type="xsd:string"
+ use="optional"/>
+
+ <xsd:attribute name="required"
+ type="xsd:boolean"
+ use="optional"/>
+
+ <xsd:attribute name="preferred"
+ type="xsd:boolean"
+ use="optional"/>
+
+ <xsd:attribute name="expert"
+ type="xsd:boolean"
+ use="optional"/>
+
+
+ </xsd:complexType>
+
+ <!-- **************************************************** -->
+
+</xsd:schema>
Property changes on: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-facesuicomponent_2_0.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-partialresponse_2_0.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-partialresponse_2_0.xsd (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-partialresponse_2_0.xsd 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,293 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+<xsd:schema
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="2.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ $Id: web-partialresponse_2_0.xsd,v 1.0 2008/12/04 21:12:50 rogerk Exp $
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2007 Sun Microsystems, Inc.,
+ 901 San Antonio Road,
+ Palo Alto, California 94303, U.S.A.
+ All rights reserved.
+
+ Sun Microsystems, Inc. has intellectual property
+ rights relating to technology described in this document. In
+ particular, and without limitation, these intellectual
+ property rights may include one or more of the U.S. patents
+ listed at http://www.sun.com/patents and one or more
+ additional patents or pending patent applications in the
+ U.S. and other countries.
+
+ This document and the technology which it describes are
+ distributed under licenses restricting their use, copying,
+ distribution, and decompilation. No part of this document
+ may be reproduced in any form by any means without prior
+ written authorization of Sun and its licensors, if any.
+
+ Third-party software, including font technology, is
+ copyrighted and licensed from Sun suppliers.
+
+ Sun, Sun Microsystems, the Sun logo, Solaris, Java, Java EE,
+ JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+ Cup logo are trademarks or registered trademarks of Sun
+ Microsystems, Inc. in the U.S. and other countries.
+
+ Federal Acquisitions: Commercial Software - Government Users
+ Subject to Standard License Terms and Conditions.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ <![CDATA[
+
+ The XML Schema for the JavaServer Faces (Version 2.0)
+ Partial Response used in JSF Ajax frameworks.
+
+ ]]>
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="javaee_5.xsd"/>
+
+ <!-- **************************************************** -->
+
+ <xsd:element name = "partial-response" type="javaee:partial-responseType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "partial-response" element is the root of the partial
+ response information hierarchy, and contains nested elements for all
+ possible elements that can exist in the response.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <!-- **************************************************** -->
+
+ <xsd:complexType name="partial-responseType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "partial-response" element is the root of thei partial
+ response information hierarchy, and contains nested elements for all
+ possible elements that can exist in the response.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="changes"
+ type="javaee:partial-response-changesType"
+ minOccurs="0"
+ maxOccurs="1"/>
+ <xsd:element name="redirect"
+ type="javaee:partial-response-redirectType"
+ minOccurs="0"
+ maxOccurs="1"/>
+ <xsd:element name="error"
+ type="javaee:partial-response-errorType"
+ minOccurs="0"
+ maxOccurs="1"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="partial-response-changesType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="update"
+ type="javaee:partial-response-updateType"/>
+ <xsd:element name="insert"
+ type="javaee:partial-response-insertType"/>
+ <xsd:element name="delete"
+ type="javaee:partial-response-deleteType"/>
+ <xsd:element name="attributes"
+ type="javaee:partial-response-attributesType"/>
+ <xsd:element name="eval" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "eval" element enables this element's contents to be executed as JavaScript.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="extension"
+ type="javaee:partial-response-extensionType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="partial-response-updateType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "update" element enables DOM elements matching the "id"
+ attribute to be updated with the contents of this element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="id" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="partial-response-insertType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "insert" element enables content to be inserted into the DOM
+ before or after an existing DOM element as specified by the
+ nested "before" or "after" elements. The elements "before" and
+ "after" are mutually exclusive - one of them must be specified.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="1" maxOccurs="1">
+ <xsd:element name="before">
+ <xsd:complexType>
+ <xsd:attribute name="id" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="after">
+ <xsd:complexType>
+ <xsd:attribute name="id" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:complexType name="partial-response-deleteType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "delete" element enables DOM elements matching the "id"
+ attribute to be removed.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="id" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="partial-response-attributesType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "attributes" element enables attributes of DOM elements matching the "id"
+ attribute to be updated. If this element is used, then it must contain at
+ least one "attribute" element.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="attribute" minOccurs="1" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="partial-response-redirectType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "redirect" element enables a redirect to the location as specified by the
+ "url" attribute.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="url" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="partial-response-errorType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The "error" element contains error information from the server.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="error-name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="error-message" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="partial-response-extensionType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Extension element for partial response. It may contain
+ implementation specific content.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+ <xsd:any namespace="##any"
+ processContents="lax"
+ minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ </xsd:complexType>
+
+</xsd:schema>
+
+
+
+
Property changes on: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/web-partialresponse_2_0.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/xml.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/xml.xsd (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/xml.xsd 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,82 @@
+<?xml version='1.0'?>
+
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xs:annotation>
+ <xs:documentation>
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang or xml:space attributes
+ on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ <schema . . .>
+ . . .
+ <import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ <type . . .>
+ . . .
+ <attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes</xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2001/03/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself. In other words, if the XML Schema namespace changes, the version
+ of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2001/03/xml.xsd will not change.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang" type="xs:language">
+ <xs:annotation>
+ <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values . . .</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="space" default="preserve">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ </xs:attributeGroup>
+
+</xs:schema>
Property changes on: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/xml.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestBase.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestBase.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestBase.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,80 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.logging.LogManager;
+
+import org.junit.After;
+import org.junit.Before;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class CdkTestBase {
+
+ protected File testSourceDirectory;
+
+ @Before
+ public void setUpSourceDirectory() throws Exception {
+ testSourceDirectory = getJavaFile("test.source.properties")
+ .getParentFile();
+ InputStream stream = this.getClass().getResourceAsStream(
+ "logging.properties");
+ if (null != stream) {
+ try {
+ LogManager.getLogManager().readConfiguration(stream);
+ } catch (Exception e) {
+ // Ignore it.
+ } finally {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ // Ignore it.
+ }
+ }
+ }
+ }
+
+ @After
+ public void tearDownSourceDirectory() {
+ testSourceDirectory = null;
+ }
+
+ protected File getJavaFile(String name) throws URISyntaxException {
+ ClassLoader classLoader = this.getClass().getClassLoader();
+ URL testResource = classLoader.getResource(name);
+ URI testUri = testResource.toURI();
+ final File classFile = new File(testUri);
+ return classFile;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestBase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/CdkProcessorTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/CdkProcessorTest.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/CdkProcessorTest.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -28,13 +28,8 @@
import static javax.lang.model.util.ElementFilter.*;
import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
import java.net.URISyntaxException;
-import java.net.URL;
import java.util.Set;
-import java.util.logging.LogManager;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.Processor;
@@ -48,10 +43,9 @@
import org.easymock.Capture;
import org.easymock.CaptureType;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import org.richfaces.cdk.CdkContext;
+import org.richfaces.cdk.CdkTestBase;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.Component;
import org.richfaces.cdk.apt.CdkProcessor.BeanProperty;
@@ -68,7 +62,7 @@
* @author asmirnov(a)exadel.com
*
*/
-public class CdkProcessorTest {
+public class CdkProcessorTest extends CdkTestBase {
private static final String ANNOTATION2 = TestAnnotation2.class.getName();
@@ -107,35 +101,8 @@
.of(TestAnnotation.class.getName());
private static final String COMPONENT_CLASS_JAVA = "org/richfaces/cdk/test/component/AbstractTestComponent.java";
- private File testSourceDirectory;
private ClassLoader testLoader;
- @Before
- public void setUp() throws Exception {
- testSourceDirectory = getJavaFile("test.source.properties")
- .getParentFile();
- InputStream stream = this.getClass().getResourceAsStream(
- "logging.properties");
- if (null != stream) {
- try {
- LogManager.getLogManager().readConfiguration(stream);
- } catch (Exception e) {
- // Ignore it.
- } finally {
- try {
- stream.close();
- } catch (IOException e) {
- // Ignore it.
- }
- }
- }
- }
-
- @After
- public void tearDown() {
- testSourceDirectory = null;
- }
-
/**
* Test method for
* {@link org.richfaces.cdk.apt.CdkProcessor#process(java.util.Set, javax.annotation.processing.RoundEnvironment)}
@@ -336,12 +303,4 @@
return fileObject;
}
- private File getJavaFile(String name) throws URISyntaxException {
- ClassLoader classLoader = this.getClass().getClassLoader();
- URL testResource = classLoader.getResource(name);
- URI testUri = testResource.toURI();
- final File classFile = new File(testUri);
- return classFile;
- }
-
}
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/freemarker/FreeMarkerRendererTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/freemarker/FreeMarkerRendererTest.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/freemarker/FreeMarkerRendererTest.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -20,7 +20,8 @@
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.apt.TestAnnotation;
import org.richfaces.cdk.model.Component;
-import org.richfaces.cdk.model.JsfComponent;
+import org.richfaces.cdk.model.Searchable;
+import org.richfaces.cdk.model.Visitable;
public class FreeMarkerRendererTest {
@@ -60,8 +61,7 @@
@Test
public void testProcessComponent() throws Exception {
final StringWriter output = new StringWriter();
- Component component = new Component();
- component.setType(new Component.Type("foo.Bar"));
+ Component component = new Component(new Component.Type("foo.Bar"));
FreeMarkerRenderer<Component, Boolean> renderer = new FreeMarkerRenderer<Component, Boolean>(){
@Override
@@ -80,7 +80,7 @@
}
@Override
- protected boolean isMyComponent(JsfComponent c) {
+ protected boolean isMyComponent(Visitable c) {
return true;
}
};
Deleted: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbMarshallTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbMarshallTest.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbMarshallTest.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -1,81 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk.jaxb;
-
-import static org.easymock.EasyMock.*;
-import static org.junit.Assert.*;
-import static javax.lang.model.util.ElementFilter.*;
-
-import java.io.StringReader;
-import java.util.Set;
-
-import javax.xml.bind.JAXB;
-
-import org.junit.Test;
-import org.richfaces.cdk.jaxb.model.Child;
-import org.richfaces.cdk.jaxb.model.Root;
-
-/**
- * <p class="changed_added_4_0">
- * </p>
- *
- * @author asmirnov(a)exadel.com
- *
- */
-public class JaxbMarshallTest extends JaxbTestBase {
-
- @Test
- public void testRootElement() throws Exception {
- Root root = unmarshal(
- Root.class,
- "<root-config xmlns='http://foo.bar/schema' ><name>foo</name><children><id>xxx</id><value>bar</value></children></root-config>");
- assertEquals("foo", root.getName());
- Set<Child> children = root.getChildren();
- assertEquals(1, children.size());
- assertEquals("xxx", children.iterator().next().getId());
- }
-
- @Test
- public void testUniqueElement() throws Exception {
- Root root = unmarshal(
- Root.class,
- "<root-config xmlns='http://foo.bar/schema' ><name>foo</name><children><id>xxx</id><value>bar</value></children><children><id>xxx</id><value>baz</value></children></root-config>");
- assertEquals("foo", root.getName());
- Set<Child> children = root.getChildren();
- assertEquals(1, children.size());
- assertEquals("xxx", children.iterator().next().getId());
- }
-
- @Test
- public void testExtensions() throws Exception {
- Root root = unmarshal(
- Root.class,
- "<root-config xmlns='http://foo.bar/schema' ><name>foo</name><children><id>xxx</id><value>bar</value><extension><e:myExtension xmlns:e=\"http://foo.bar/extensions\">eee</e:myExtension><s:foo xmlns:s=\"urn:foo\">foo</s:foo></extension></children></root-config>");
- Set<Child> children = root.getChildren();
- assertEquals(1, children.size());
- Child child = children.iterator().next();
- assertEquals(1, child.getExtension().getExtensions().size());
- assertEquals("eee", child.getWrapped());
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbTestBase.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbTestBase.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbTestBase.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -1,48 +0,0 @@
-package org.richfaces.cdk.jaxb;
-
-import java.io.ByteArrayOutputStream;
-import java.io.StringReader;
-
-import javax.xml.bind.JAXB;
-
-import org.junit.After;
-import org.junit.Before;
-
-public class JaxbTestBase {
-
- protected static final String XML_PROLOG = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
-
- public JaxbTestBase() {
- super();
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @throws java.lang.Exception
- */
- @Before
- public void setUp() throws Exception {
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @throws java.lang.Exception
- */
- @After
- public void tearDown() throws Exception {
- }
-
- protected <T> T unmarshal(Class<T> type, String src) {
- StringBuilder xml = new StringBuilder(XML_PROLOG);
- xml.append(src);
- StringReader reader = new StringReader(xml.toString());
- T result = JAXB.unmarshal(reader, type);
- return result;
- }
-
- protected <T> String marshal(T root){
- ByteArrayOutputStream xml = new ByteArrayOutputStream();
- JAXB.marshal(root, xml);
- return new String(xml.toByteArray());
- }
-}
\ No newline at end of file
Added: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ComponentLibraryTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ComponentLibraryTest.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ComponentLibraryTest.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,150 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.render.RenderKitFactory;
+
+import org.junit.Test;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class ComponentLibraryTest {
+
+ /**
+ * Test method for {@link org.richfaces.cdk.model.ComponentLibrary#merge(org.richfaces.cdk.model.ComponentLibrary)}.
+ */
+ @Test
+ public void testMergeComponentLibrary() {
+ ComponentLibrary lib = new ComponentLibrary();
+ ComponentLibrary otherLib = new ComponentLibrary();
+ Component component = lib.findOrCreateComponent("foo.Bar");
+ Component component2 = otherLib.findOrCreateComponent("foo.Bar");
+ otherLib.findOrCreateComponent("foo.baz");
+ otherLib.findOrCreateRenderKit("foo.kit");
+ lib.merge(otherLib);
+ assertEquals(2, lib.getComponents().size());
+ assertEquals(1, lib.getRenderKits().size());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.model.ComponentLibrary#accept(org.richfaces.cdk.model.LibraryVisitor, java.lang.Object)}.
+ */
+ @Test
+ public void testAcceptLibraryVisitorOfRPP() {
+ ComponentLibrary lib = new ComponentLibrary();
+ final Component component = lib.findOrCreateComponent("foo.Bar");
+ LibraryVisitor<Boolean, Boolean> visitor = new LibraryVisitor<Boolean, Boolean>() {
+
+ @Override
+ public Boolean visit(Visitable c, Boolean param) {
+ return component == c?Boolean.TRUE:null;
+ }
+ };
+ assertTrue(lib.accept(visitor, null));
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.model.ComponentLibrary#findOrCreateComponent(java.lang.String)}.
+ */
+ @Test
+ public void testFindOrCreateComponent() {
+ ComponentLibrary lib = new ComponentLibrary();
+ Component component = lib.findOrCreateComponent("foo.Bar");
+ assertNotNull(component);
+ assertEquals(new Component.Type("foo.Bar"), component.getKey());
+ assertSame(component, lib.findOrCreateComponent("foo.Bar"));
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.model.ComponentLibrary#findOrCreateRenderer(java.lang.String, java.lang.String)}.
+ */
+ @Test
+ public void testFindOrCreateRenderKit() {
+ ComponentLibrary lib = new ComponentLibrary();
+ RenderKit renderKit = lib.findOrCreateRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT);
+ assertNotNull(renderKit);
+ assertSame(renderKit, lib.findOrCreateRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT));
+ }
+
+
+ /**
+ * Test method for {@link org.richfaces.cdk.model.ComponentLibrary#merge(org.richfaces.cdk.model.Mergeable, org.richfaces.cdk.model.Mergeable)}.
+ */
+ @Test
+ public void testMergeTT() {
+ ModelBean foo = new ModelBean("foo");
+ foo.setResult("Result");
+ foo.setDoNotReplace("Important");
+ ModelBean bar = new ModelBean("bar");
+ bar.setVizited(true);
+ Object result = new Object();
+ bar.setResult(result);
+ bar.readOnly = "readOnly";
+ bar.writeOnly = "writeOnly";
+ bar.setDoNotReplace("Replaced");
+ ComponentLibrary.merge(foo, bar);
+ assertSame(result, foo.getResult());
+ assertEquals(new ModelBean.Type("foo"), foo.getKey());
+ assertTrue(foo.isVizited());
+ assertEquals("Important", foo.getDoNotReplace());
+ assertNull(foo.readOnly);
+ assertNull(foo.writeOnly);
+ }
+
+ /**
+ * Test method for {@link org.richfaces.cdk.model.ComponentLibrary#accept(java.lang.Iterable, org.richfaces.cdk.model.LibraryVisitor, java.lang.Object, java.lang.Object)}.
+ */
+ @Test
+ public void testAcceptIterableOfTLibraryVisitorOfRPPR() {
+ List<ModelBean> beans = new ArrayList<ModelBean>();
+ ModelBean foo = new ModelBean("foo");
+ foo.setResult("foo");
+ beans.add(foo);
+ ModelBean bar = new ModelBean("bar");
+ beans.add(bar);
+ LibraryVisitor<Object, String> visitor = new LibraryVisitor<Object, String>() {
+
+ @Override
+ public Object visit(Visitable c, String param) {
+ ModelBean bean = (ModelBean) c;
+ bean.setDoNotReplace(param);
+ return bean.getResult();
+ }
+ };
+ Object result = ComponentLibrary.accept(beans, visitor, "visited", null);
+ assertTrue(foo.isVizited()||bar.isVizited());
+ assertFalse(foo.isVizited()&&bar.isVizited());
+ assertEquals("foo", result);
+ assertEquals("visited", foo.getDoNotReplace());
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ComponentLibraryTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ModelBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ModelBean.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ModelBean.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,160 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@SuppressWarnings("serial")
+public class ModelBean implements ModelElement<ModelBean,ModelBean.Type> {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
+ private static final long serialVersionUID = -4853397197172488116L;
+
+ @SuppressWarnings("serial")
+ public static final class Type extends Key {
+
+ public Type(String type) {
+ super(type);
+ }
+
+ }
+
+ private boolean vizited = false;
+
+ private Type type;
+
+ String readOnly;
+
+ String writeOnly;
+
+ private Object result;
+
+ private String doNotReplace;
+
+ public ModelBean() {
+
+ }
+
+ public ModelBean(String name) {
+ this.type = new Type(name);
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the vizited
+ */
+ @Merge
+ public boolean isVizited() {
+ return vizited;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param vizited the vizited to set
+ */
+ public void setVizited(boolean vizited) {
+ this.vizited = vizited;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the result
+ */
+ @Merge
+ public Object getResult() {
+ return result;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param result the result to set
+ */
+ public void setResult(Object result) {
+ this.result = result;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the readOnly
+ */
+ @Merge
+ public String getReadOnly() {
+ return readOnly;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param writeOnly the writeOnly to set
+ */
+ public void setWriteOnly(String writeOnly) {
+ this.writeOnly = writeOnly;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the doNotReplace
+ */
+ @Merge(false)
+ public String getDoNotReplace() {
+ return doNotReplace;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param doNotReplace the doNotReplace to set
+ */
+ public void setDoNotReplace(String doNotReplace) {
+ this.doNotReplace = doNotReplace;
+ }
+
+
+ @Override
+ public void merge(ModelBean other) {
+ ComponentLibrary.merge(this, other);
+ }
+
+ @Override
+ public Type getKey() {
+ return type;
+ }
+
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ vizited = true;
+ return (R) visitor.visit(this, param);
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ModelBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/CdkResolverTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/CdkResolverTest.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/CdkResolverTest.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,91 @@
+package org.richfaces.cdk.xmlconfig;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.logging.LogManager;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.richfaces.cdk.CdkContext;
+import org.richfaces.cdk.CdkTestBase;
+import org.richfaces.cdk.StandardSources;
+import org.richfaces.cdk.apt.TestAnnotation2;
+import org.xml.sax.InputSource;
+
+public class CdkResolverTest extends CdkTestBase {
+
+
+ @Test
+ public void testResolveSystemIdSystem() throws Exception {
+ // Prepare Mock compilation context.
+ CdkContext cdkContext = createMockContext();
+ expect(cdkContext.getLoader()).andStubReturn(
+ CdkEntityResolver.class.getClassLoader());
+ replay(cdkContext);
+ CdkEntityResolver entityResolver = new CdkEntityResolver(cdkContext);
+ InputSource input = entityResolver.resolveSystemId("http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd");
+ assertNotNull(input);
+ }
+
+ @Test
+ public void testResolveSystemIdResource() throws Exception {
+ // Prepare Mock compilation context.
+ CdkContext cdkContext = createMockContext();
+ ClassLoader loader = new ClassLoader(CdkEntityResolver.class.getClassLoader()){
+ @Override
+ public InputStream getResourceAsStream(String name) {
+ if("foo/bar.xml".equals(name)){
+ return new ByteArrayInputStream("baz".getBytes());
+ } else {
+ return super.getResourceAsStream(name);
+ }
+ }
+ };
+ expect(cdkContext.getLoader()).andStubReturn(
+ loader);
+ replay(cdkContext);
+ CdkEntityResolver entityResolver = new CdkEntityResolver(cdkContext);
+ InputSource input = entityResolver.resolveSystemId("urn:resource:foo/bar.xml");
+ assertNotNull(input);
+ }
+
+ @Test
+ public void testResolveSystemIdAttributes() throws Exception {
+ // Prepare Mock compilation context.
+ CdkContext cdkContext = createMockContext();
+ ClassLoader loader = CdkEntityResolver.class.getClassLoader();
+ expect(cdkContext.getLoader()).andStubReturn(
+ loader);
+ replay(cdkContext);
+ CdkEntityResolver entityResolver = new CdkEntityResolver(cdkContext);
+ InputSource input = entityResolver.resolveSystemId("urn:attributes:javax.faces.component.UIComponent.xml");
+ assertNotNull(input);
+ }
+
+ private CdkContext createMockContext() {
+ CdkContext cdkContext = createMock(CdkContext.class);
+ expect(cdkContext.getJavaSource()).andStubReturn(testSourceDirectory);
+ expect(cdkContext.getJavaSourceOutput()).andStubReturn(null);
+ expect(cdkContext.getResourceOutput()).andStubReturn(null);
+ return cdkContext;
+ }
+
+ @Test
+ public void testGetProjectInputSource() throws Exception {
+ CdkContext cdkContext = createMockContext();
+ expect(cdkContext.getSourceFolder(StandardSources.FACES_CONFIGS)).andReturn(this.testSourceDirectory);
+ replay(cdkContext);
+ CdkEntityResolver entityResolver = new CdkEntityResolver(cdkContext);
+ InputSource input = entityResolver.getProjectInputSource(StandardSources.FACES_CONFIGS, "org/richfaces/cdk/apt/test.html");
+ assertNotNull(input);
+ verify(cdkContext);
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/CdkResolverTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FragmentParserTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FragmentParserTest.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FragmentParserTest.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,49 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig;
+
+import static org.junit.Assert.*;
+
+import java.util.Collection;
+
+import org.junit.Test;
+import org.richfaces.cdk.AbstractCdkContext;
+import org.richfaces.cdk.model.Property;
+
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class FragmentParserTest {
+
+ @Test
+ public void parserTest() throws Exception {
+ FragmentParser parser = new FragmentParser(new AbstractCdkContext(this.getClass().getClassLoader()));
+ Collection<Property> properties = parser.parseProperties("urn:resource:org/richfaces/cdk/xmlconfig/fragment.xml");
+ assertEquals(3,properties.size());
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FragmentParserTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbMarshallTest.java (from rev 15233, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbMarshallTest.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbMarshallTest.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbMarshallTest.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,81 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+import static javax.lang.model.util.ElementFilter.*;
+
+import java.io.StringReader;
+import java.util.Set;
+
+import javax.xml.bind.JAXB;
+
+import org.junit.Test;
+import org.richfaces.cdk.xmlconfig.testmodel.Child;
+import org.richfaces.cdk.xmlconfig.testmodel.Root;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class JaxbMarshallTest extends JaxbTestBase {
+
+ @Test
+ public void testRootElement() throws Exception {
+ Root root = unmarshal(
+ Root.class,
+ "<root-config xmlns='http://foo.bar/schema' ><name>foo</name><children><id>xxx</id><value>bar</value></children></root-config>");
+ assertEquals("foo", root.getName());
+ Set<Child> children = root.getChildren();
+ assertEquals(1, children.size());
+ assertEquals("xxx", children.iterator().next().getId());
+ }
+
+ @Test
+ public void testUniqueElement() throws Exception {
+ Root root = unmarshal(
+ Root.class,
+ "<root-config xmlns='http://foo.bar/schema' ><name>foo</name><children><id>xxx</id><value>bar</value></children><children><id>xxx</id><value>baz</value></children></root-config>");
+ assertEquals("foo", root.getName());
+ Set<Child> children = root.getChildren();
+ assertEquals(1, children.size());
+ assertEquals("xxx", children.iterator().next().getId());
+ }
+
+ @Test
+ public void testExtensions() throws Exception {
+ Root root = unmarshal(
+ Root.class,
+ "<root-config xmlns='http://foo.bar/schema' ><name>foo</name><children><id>xxx</id><value>bar</value><extension><e:myExtension xmlns:e=\"http://foo.bar/extensions\">eee</e:myExtension><s:foo xmlns:s=\"urn:foo\">foo</s:foo></extension></children></root-config>");
+ Set<Child> children = root.getChildren();
+ assertEquals(1, children.size());
+ Child child = children.iterator().next();
+ assertEquals(1, child.getExtension().getExtensions().size());
+ assertEquals("eee", child.getWrapped());
+ }
+}
Property changes on: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbMarshallTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbTestBase.java (from rev 15233, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/JaxbTestBase.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbTestBase.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbTestBase.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,48 @@
+package org.richfaces.cdk.xmlconfig;
+
+import java.io.ByteArrayOutputStream;
+import java.io.StringReader;
+
+import javax.xml.bind.JAXB;
+
+import org.junit.After;
+import org.junit.Before;
+
+public class JaxbTestBase {
+
+ protected static final String XML_PROLOG = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+
+ public JaxbTestBase() {
+ super();
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @throws java.lang.Exception
+ */
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @throws java.lang.Exception
+ */
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ protected <T> T unmarshal(Class<T> type, String src) {
+ StringBuilder xml = new StringBuilder(XML_PROLOG);
+ xml.append(src);
+ StringReader reader = new StringReader(xml.toString());
+ T result = JAXB.unmarshal(reader, type);
+ return result;
+ }
+
+ protected <T> String marshal(T root){
+ ByteArrayOutputStream xml = new ByteArrayOutputStream();
+ JAXB.marshal(root, xml);
+ return new String(xml.toByteArray());
+ }
+}
\ No newline at end of file
Property changes on: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JaxbTestBase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel (from rev 15233, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/model)
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/Child.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/model/Child.java 2009-08-20 14:56:29 UTC (rev 15233)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/Child.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -21,7 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.cdk.jaxb.model;
+package org.richfaces.cdk.xmlconfig.testmodel;
import java.util.ArrayList;
import java.util.List;
@@ -109,7 +109,7 @@
/* (non-Javadoc)
- * @see org.richfaces.cdk.jaxb.model.Id#getId()
+ * @see org.richfaces.cdk.xmlconfig.testmodel.Id#getId()
*/
@Override
@XmlElement(namespace = Root.HTTP_FOO_BAR_SCHEMA)
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/Id.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/model/Id.java 2009-08-20 14:56:29 UTC (rev 15233)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/Id.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -1,4 +1,4 @@
-package org.richfaces.cdk.jaxb.model;
+package org.richfaces.cdk.xmlconfig.testmodel;
import javax.xml.bind.annotation.XmlElement;
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/Root.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/model/Root.java 2009-08-20 14:56:29 UTC (rev 15233)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/Root.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -21,7 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.cdk.jaxb.model;
+package org.richfaces.cdk.xmlconfig.testmodel;
import java.util.Set;
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/package-info.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/jaxb/model/package-info.java 2009-08-20 14:56:29 UTC (rev 15233)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/testmodel/package-info.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -18,7 +18,7 @@
namespaceURI = Root.HTTP_FOO_BAR_SCHEMA ),
@javax.xml.bind.annotation.XmlNs( prefix = "ext",
namespaceURI = Root.EXTENSIONS_NAMESPACE ) })
-package org.richfaces.cdk.jaxb.model;
+package org.richfaces.cdk.xmlconfig.testmodel;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAccessType;
Modified: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -35,10 +35,13 @@
* @author asmirnov(a)exadel.com
*
*/
-@Component(type="org.richfaces.cdk.test.TestComponent")
+@Component("org.richfaces.cdk.test.TestComponent")
public abstract class AbstractTestComponent extends UIComponent implements
ValueHolder {
+
+ private static final String COMPONENT_FAMILY="org.richfaces.Test";
+
@Attribute
private int foo;
Added: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/fragment.xml
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/fragment.xml (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/fragment.xml 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<cdk:properties xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:cdk="http://richfaces.org/cdk/extensions">
+ <!--
+ <xi:include
+ href="urn:resource:org/richfaces/cdk/xmlconfig/include.xml"
+ xpointer="xmlns(jsf=http://java.sun.com/xml/ns/javaee)xpointer(//jsf:property)"/>
+ -->
+ <!--
+ xpointer="xmlns(jsf=http://java.sun.com/xml/ns/javaee)xmlns(cdk=http://richfaces.or..."
+ -->
+ <property>
+ <description><![CDATA[
+ test property.
+ ]]></description>
+ <display-name>test</display-name>
+ <property-name>test</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:el-expression>true</cdk:el-expression>
+ </property-extension>
+ </property>
+ <property>
+ <description><![CDATA[
+ test2 property.
+ ]]></description>
+ <display-name>test2</display-name>
+ <property-name>test2</property-name>
+ <property-class>int</property-class>
+ <property-extension>
+ <cdk:el-expression>false</cdk:el-expression>
+ </property-extension>
+ </property>
+ <property>
+ <description><![CDATA[
+ test3 property.
+ ]]></description>
+ <display-name>test3</display-name>
+ <property-name>test3</property-name>
+ <property-class>double</property-class>
+ <property-extension>
+ <cdk:el-expression>false</cdk:el-expression>
+ </property-extension>
+ </property>
+</cdk:properties>
Property changes on: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/fragment.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/include.xml
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/include.xml (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/include.xml 2009-08-21 01:29:55 UTC (rev 15243)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<cdk:properties xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:cdk="http://richfaces.org/cdk/extensions">
+ <property>
+ <description><![CDATA[
+ test2 property.
+ ]]></description>
+ <display-name>test2</display-name>
+ <property-name>test2</property-name>
+ <property-class>int</property-class>
+ <property-extension>
+ <cdk:el-expression>false</cdk:el-expression>
+ </property-extension>
+ </property>
+ <property>
+ <description><![CDATA[
+ test3 property.
+ ]]></description>
+ <display-name>test3</display-name>
+ <property-name>test3</property-name>
+ <property-class>double</property-class>
+ <property-extension>
+ <cdk:el-expression>false</cdk:el-expression>
+ </property-extension>
+ </property>
+</cdk:properties>
Property changes on: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/include.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2009-08-20 16:52:34 UTC (rev 15242)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2009-08-21 01:29:55 UTC (rev 15243)
@@ -25,6 +25,7 @@
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.annotations.Generate;
import java.util.List;
import javax.faces.component.UIComponent;
@@ -35,7 +36,8 @@
* @author asmirnov(a)exadel.com
*
*/
-@Component(type="org.richfaces.cdk.test.TestComponent",className="org.richfaces.cdk.test.UITestComponent")
+@Component("org.richfaces.cdk.test.TestComponent")
+@Generate("org.richfaces.cdk.test.UITestComponent")
public abstract class AbstractTestComponent extends UIComponent implements
ValueHolder {
15 years, 4 months
JBoss Rich Faces SVN: r15242 - in root: framework/trunk/impl/src/main/java/org/richfaces/context and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-20 12:52:34 -0400 (Thu, 20 Aug 2009)
New Revision: 15242
Added:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxEventOptions.java
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
root/framework/trunk/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java
Log:
AjaxRendererUtils refactoring
a4j:push bug fixing
Added: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxEventOptions.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxEventOptions.java (rev 0)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxEventOptions.java 2009-08-20 16:52:34 UTC (rev 15242)
@@ -0,0 +1,97 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.renderkit;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.ajax4jsf.javascript.ScriptStringBase;
+import org.ajax4jsf.javascript.ScriptUtils;
+
+/**
+ * @author Nick Belaevski
+ * @since 4.0
+ */
+public class AjaxEventOptions extends ScriptStringBase {
+
+ /**
+ *
+ */
+ public static final String PARAMETERS = "parameters";
+
+ private Map<String, Object> options = new HashMap<String, Object>();
+
+ public void appendScript(StringBuffer functionString) {
+ functionString.append(ScriptUtils.toScript(options));
+ }
+
+ public boolean isEmpty() {
+ return options.isEmpty();
+ }
+
+ public Object get(String optionName) {
+ return options.get(optionName);
+ }
+
+ public void set(String optionName, Object optionValue) {
+ options.put(optionName, optionValue);
+ }
+
+ public void remove(String optionName) {
+ options.remove(optionName);
+ }
+
+ @SuppressWarnings("unchecked")
+ public Map<String, Object> getParameters() {
+ Map<String, Object> parameters = (Map<String, Object>) options.get(PARAMETERS);
+ if (parameters == null) {
+ parameters = new LinkedHashMap<String, Object>();
+ options.put(PARAMETERS, parameters);
+ }
+
+ return parameters;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Object getParameter(String parameterName) {
+ Object result = null;
+ Map<String, Object> parameters = (Map<String, Object>) options.get(PARAMETERS);
+ if (parameters != null) {
+ result = parameters.get(parameterName);
+ }
+
+ return result;
+ }
+
+ public void setParameter(String parameterName, Object parameterValue) {
+ getParameters().put(parameterName, parameterValue);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void removeParameter(String parameterName) {
+ Map<String, Object> parameters = (Map<String, Object>) options.get(PARAMETERS);
+ if (parameters != null) {
+ parameters.remove(parameterName);
+ }
+ }
+}
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-20 16:40:21 UTC (rev 15241)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-20 16:52:34 UTC (rev 15242)
@@ -290,185 +290,183 @@
}
}
- public static Map<String, Object> buildEventOptions(FacesContext facesContext,
+ public static AjaxEventOptions buildEventOptions(FacesContext facesContext,
UIComponent component) {
- Map<String,Object> options = new LinkedHashMap<String, Object>();
- appendParameters(facesContext, component, options);
-
- String clientId = component.getClientId(facesContext);
- options.put(clientId, clientId);
- return options;
+ AjaxEventOptions ajaxEventOptions = new AjaxEventOptions();
+ appendParameters(facesContext, component, ajaxEventOptions.getParameters());
+
+ return ajaxEventOptions;
}
- public static Map<String, Object> buildEventOptions(FacesContext facesContext,
- UIComponent uiComponent, Map<String, Object> params) {
-
- return buildEventOptions(facesContext, uiComponent, params, false);
- }
+// public static AjaxEventOptions buildEventOptions(FacesContext facesContext,
+// UIComponent uiComponent, Map<String, Object> params) {
+//
+// return buildEventOptions(facesContext, uiComponent, params, false);
+// }
/**
* @param facesContext
* @param uiComponent
* @return
*/
- public static Map<String, Object> buildEventOptions(FacesContext facesContext,
- UIComponent uiComponent, Map<String, Object> params, boolean omitDefaultActionUrl) {
- String clientId = uiComponent.getClientId(facesContext);
- Map<String, Object> componentAttributes = uiComponent.getAttributes();
- Map<String, Object> options = new HashMap<String, Object>();
-
- UIComponent nestingContainer = (UIComponent) findAjaxContainer(
- facesContext, uiComponent);
- String containerClientId = nestingContainer.getClientId(facesContext);
- if (containerClientId != null && !AjaxViewRoot.ROOT_ID.equals(containerClientId)) {
- options.put("containerId", containerClientId);
- }
-
- Map<String, Object> parameters = new HashMap<String, Object>();
- UIComponent targetComponent = (uiComponent instanceof AjaxSupport)?uiComponent.getParent():uiComponent;
- // UIForm form = getNestingForm(uiComponent);
- // "input" - if assigned to html input element.
- boolean input = targetComponent instanceof EditableValueHolder;
- // Action component - button etc.
-// boolean action = targetComponent instanceof ActionSource;
-
- boolean ajaxSingle = Boolean.TRUE.equals(componentAttributes
- .get(AJAX_SINGLE_ATTR));
- // For input components in single mode or without form submit input
- // control )
- if (ajaxSingle ) {
- parameters.put(AJAX_SINGLE_PARAMETER_NAME, targetComponent.getClientId(facesContext));
- // options.put("single", JSReference.TRUE);
- if (input) {
- options.put("control", JSReference.THIS);
- }
- }
- // Control value for submit
- String controlName;
- Object controlValue;
- // TODO - make compatible with JSF RI/MyFaces ? use submittedValue ( if
- // any ) for UIInput, converted value for ValueHolder.
- controlName = clientId;
- controlValue = clientId;
- parameters.put(controlName, controlValue);
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
-
- String ajaxActionURL = ajaxContext.getAjaxActionURL(facesContext);
- if (omitDefaultActionUrl) {
- UIComponent form = getNestingForm(uiComponent);
- if (form != null && !rendererUtils.isBooleanAttribute(form, "ajaxSubmit")) {
- if (rendererUtils.getActionUrl(facesContext).equals(ajaxActionURL)) {
- ajaxActionURL = null;
- }
- }
- }
-
- if (ajaxActionURL != null) {
- // Setup action URL. For portlet environment, it will be different from
- // page.
- options.put("actionUrl", ajaxActionURL);
- }
-
- // Add application-wide Ajax parameters
- parameters.putAll(ajaxContext.getCommonAjaxParameters());
- // add child parameters
- appendParameters(facesContext, uiComponent, parameters);
-
- if (params != null) {
- parameters.putAll(params);
- }
-
- if (!parameters.isEmpty()) {
- options.put("parameters", parameters);
- }
- // parameter to render only current list of areas.
-// if (isAjaxLimitToList(uiComponent)) {
-// Set<? extends Object> ajaxAreas = getAjaxAreas(uiComponent);
-// Set<String> areasIds = new HashSet<String>();
-// if (null != ajaxAreas) {
-// for (Iterator<? extends Object> iter = ajaxAreas.iterator(); iter.hasNext();) {
-// String id = (String) iter.next();
-// UIComponent comp = RendererUtils.getInstance().
-// findComponentFor(uiComponent, id);
-// if (null != comp) {
-// areasIds.add(comp.getClientId(facesContext));
-// } else {
-// areasIds.add(id);
-// }
+// public static Map<String, Object> buildEventOptions(FacesContext facesContext,
+// UIComponent uiComponent, Map<String, Object> params, boolean omitDefaultActionUrl) {
+// String clientId = uiComponent.getClientId(facesContext);
+// Map<String, Object> componentAttributes = uiComponent.getAttributes();
+// Map<String, Object> options = new HashMap<String, Object>();
+//
+// UIComponent nestingContainer = (UIComponent) findAjaxContainer(
+// facesContext, uiComponent);
+// String containerClientId = nestingContainer.getClientId(facesContext);
+// if (containerClientId != null && !AjaxViewRoot.ROOT_ID.equals(containerClientId)) {
+// options.put("containerId", containerClientId);
+// }
+//
+// Map<String, Object> parameters = new HashMap<String, Object>();
+// UIComponent targetComponent = (uiComponent instanceof AjaxSupport)?uiComponent.getParent():uiComponent;
+// // UIForm form = getNestingForm(uiComponent);
+// // "input" - if assigned to html input element.
+// boolean input = targetComponent instanceof EditableValueHolder;
+// // Action component - button etc.
+//// boolean action = targetComponent instanceof ActionSource;
+//
+// boolean ajaxSingle = Boolean.TRUE.equals(componentAttributes
+// .get(AJAX_SINGLE_ATTR));
+// // For input components in single mode or without form submit input
+// // control )
+// if (ajaxSingle ) {
+// parameters.put(AJAX_SINGLE_PARAMETER_NAME, targetComponent.getClientId(facesContext));
+// // options.put("single", JSReference.TRUE);
+// if (input) {
+// options.put("control", JSReference.THIS);
+// }
+// }
+// // Control value for submit
+// String controlName;
+// Object controlValue;
+// // TODO - make compatible with JSF RI/MyFaces ? use submittedValue ( if
+// // any ) for UIInput, converted value for ValueHolder.
+// controlName = clientId;
+// controlValue = clientId;
+// parameters.put(controlName, controlValue);
+// AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+//
+// String ajaxActionURL = ajaxContext.getAjaxActionURL(facesContext);
+// if (omitDefaultActionUrl) {
+// UIComponent form = getNestingForm(uiComponent);
+// if (form != null && !rendererUtils.isBooleanAttribute(form, "ajaxSubmit")) {
+// if (rendererUtils.getActionUrl(facesContext).equals(ajaxActionURL)) {
+// ajaxActionURL = null;
// }
// }
-// options.put("affected", areasIds);
// }
- String oncomplete = getAjaxOncomplete(uiComponent);
- if (null != oncomplete) {
- options.put(ONCOMPLETE_ATTR_NAME, buildAjaxOncomplete(oncomplete));
- }
-
- String beforeupdate = getAjaxOnBeforeDomUpdate(uiComponent);
- if (null != beforeupdate) {
- options.put(ONBEFOREDOMUPDATE_ATTR_NAME, buildAjaxOnBeforeDomUpdate(beforeupdate));
- }
-
-
- String status = getAjaxStatus(uiComponent);
- if (null != status) {
- options.put("status", status);
- }
- String queue = (String) componentAttributes.get(AJAX_QUEUE_ATTR);
- String implicitQueue = null;
-
- Integer requestDelay = (Integer) componentAttributes
- .get(AJAX_DELAY_ATTR);
- if (null != requestDelay && requestDelay.intValue() > 0) {
- options.put(AJAX_DELAY_ATTR, requestDelay);
- if (null == queue) {
- implicitQueue = clientId;
- }
- }
- Boolean ignoreDupResponses = (Boolean) componentAttributes
- .get(AJAX_ABORT_ATTR);
- if (null != ignoreDupResponses && ignoreDupResponses.booleanValue()) {
- options.put(AJAX_ABORT_ATTR, JSReference.TRUE);
- if (null == queue) {
- implicitQueue = clientId;
- }
- }
+//
+// if (ajaxActionURL != null) {
+// // Setup action URL. For portlet environment, it will be different from
+// // page.
+// options.put("actionUrl", ajaxActionURL);
+// }
+//
+// // Add application-wide Ajax parameters
+// parameters.putAll(ajaxContext.getCommonAjaxParameters());
+// // add child parameters
+// appendParameters(facesContext, uiComponent, parameters);
+//
+// if (params != null) {
+// parameters.putAll(params);
+// }
+//
+// if (!parameters.isEmpty()) {
+// options.put("parameters", parameters);
+// }
+// // parameter to render only current list of areas.
+//// if (isAjaxLimitToList(uiComponent)) {
+//// Set<? extends Object> ajaxAreas = getAjaxAreas(uiComponent);
+//// Set<String> areasIds = new HashSet<String>();
+//// if (null != ajaxAreas) {
+//// for (Iterator<? extends Object> iter = ajaxAreas.iterator(); iter.hasNext();) {
+//// String id = (String) iter.next();
+//// UIComponent comp = RendererUtils.getInstance().
+//// findComponentFor(uiComponent, id);
+//// if (null != comp) {
+//// areasIds.add(comp.getClientId(facesContext));
+//// } else {
+//// areasIds.add(id);
+//// }
+//// }
+//// }
+//// options.put("affected", areasIds);
+//// }
+// String oncomplete = getAjaxOncomplete(uiComponent);
+// if (null != oncomplete) {
+// options.put(ONCOMPLETE_ATTR_NAME, buildAjaxOncomplete(oncomplete));
+// }
+//
+// String beforeupdate = getAjaxOnBeforeDomUpdate(uiComponent);
+// if (null != beforeupdate) {
+// options.put(ONBEFOREDOMUPDATE_ATTR_NAME, buildAjaxOnBeforeDomUpdate(beforeupdate));
+// }
+//
+//
+// String status = getAjaxStatus(uiComponent);
+// if (null != status) {
+// options.put("status", status);
+// }
+// String queue = (String) componentAttributes.get(AJAX_QUEUE_ATTR);
+// String implicitQueue = null;
+//
+// Integer requestDelay = (Integer) componentAttributes
+// .get(AJAX_DELAY_ATTR);
+// if (null != requestDelay && requestDelay.intValue() > 0) {
+// options.put(AJAX_DELAY_ATTR, requestDelay);
+// if (null == queue) {
+// implicitQueue = clientId;
+// }
+// }
+// Boolean ignoreDupResponses = (Boolean) componentAttributes
+// .get(AJAX_ABORT_ATTR);
+// if (null != ignoreDupResponses && ignoreDupResponses.booleanValue()) {
+// options.put(AJAX_ABORT_ATTR, JSReference.TRUE);
+// if (null == queue) {
+// implicitQueue = clientId;
+// }
+// }
+//
+// if (null != queue) {
+// options.put(AJAX_QUEUE_ATTR, queue);
+// } else if (implicitQueue != null) {
+// options.put("implicitEventsQueue", clientId);
+// }
+//
+// ExternalContext externalContext = facesContext.getExternalContext();
+// String namespace = externalContext.encodeNamespace("");
+// if (namespace != null && namespace.length() != 0) {
+// options.put("namespace", namespace);
+// }
+//
+// String similarityGroupingId = (String) componentAttributes.get(SIMILARITY_GROUPING_ID_ATTR);
+// if (similarityGroupingId == null || similarityGroupingId.length() == 0) {
+// similarityGroupingId = clientId;
+// } else {
+// similarityGroupingId = externalContext.encodeNamespace(similarityGroupingId);
+// }
+//
+// options.put(SIMILARITY_GROUPING_ID_ATTR, similarityGroupingId);
+//
+// // request timeout.
+// Integer timeout = (Integer) componentAttributes.get("timeout");
+// if (null != timeout && timeout.intValue() > 0) {
+// options.put("timeout", timeout);
+// }
+// // Encoding for requests
+// String encoding = (String) componentAttributes.get("encoding");
+// if (null != encoding) {
+// options.put("encoding", encoding);
+// }
+// return options;
+// }
- if (null != queue) {
- options.put(AJAX_QUEUE_ATTR, queue);
- } else if (implicitQueue != null) {
- options.put("implicitEventsQueue", clientId);
- }
-
- ExternalContext externalContext = facesContext.getExternalContext();
- String namespace = externalContext.encodeNamespace("");
- if (namespace != null && namespace.length() != 0) {
- options.put("namespace", namespace);
- }
-
- String similarityGroupingId = (String) componentAttributes.get(SIMILARITY_GROUPING_ID_ATTR);
- if (similarityGroupingId == null || similarityGroupingId.length() == 0) {
- similarityGroupingId = clientId;
- } else {
- similarityGroupingId = externalContext.encodeNamespace(similarityGroupingId);
- }
-
- options.put(SIMILARITY_GROUPING_ID_ATTR, similarityGroupingId);
-
- // request timeout.
- Integer timeout = (Integer) componentAttributes.get("timeout");
- if (null != timeout && timeout.intValue() > 0) {
- options.put("timeout", timeout);
- }
- // Encoding for requests
- String encoding = (String) componentAttributes.get("encoding");
- if (null != encoding) {
- options.put("encoding", encoding);
- }
- return options;
- }
-
// /**
// * Create call to Ajax Submit function with first two parameters
// *
@@ -1111,7 +1109,7 @@
}
}
- if (!hasSubmittingBehavior || (parametersMap != null && !parametersMap.isEmpty())) {
+ if (!hasSubmittingBehavior) {
JSFunction jsFunction = new JSFunction(AJAX_FUNCTION_NAME, JSReference.THIS, JSReference.EVENT);
if (parametersMap != null && !parametersMap.isEmpty()) {
jsFunction.addParameter(parametersMap);
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java 2009-08-20 16:40:21 UTC (rev 15241)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java 2009-08-20 16:52:34 UTC (rev 15242)
@@ -31,6 +31,8 @@
*/
public class PartialViewContextFactoryImpl extends PartialViewContextFactory {
+ public static final String RICHFACES_AJAX = "RICHFACES_AJAX";
+
private PartialViewContextFactory parentFactory;
public PartialViewContextFactoryImpl(PartialViewContextFactory parentFactory) {
@@ -42,7 +44,7 @@
public PartialViewContext getPartialViewContext(final FacesContext context) {
PartialViewContext partialViewContext = parentFactory.getPartialViewContext(context);
- String clientId = context.getExternalContext().getRequestParameterMap().get("RICHFACES_AJAX");
+ String clientId = context.getExternalContext().getRequestParameterMap().get(RICHFACES_AJAX);
if (clientId != null) {
partialViewContext = new PartialViewContextImpl(partialViewContext, clientId);
}
Modified: root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js
===================================================================
--- root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js 2009-08-20 16:40:21 UTC (rev 15241)
+++ root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js/4_0_0.js 2009-08-20 16:52:34 UTC (rev 15242)
@@ -269,12 +269,17 @@
options = options || {};
var sourceId = (typeof source == 'object' && source.id) ? source.id : source;
- options.execute = "@component";
- options.render = "@component";
- options.RICHFACES_AJAX = sourceId;
- options[sourceId] = sourceId;
+ parameters = options.parameters || {};
+ parameters.execute = "@component";
+ parameters.render = "@component";
- jsf.ajax.request(source, event, options);
+ if (!parameters.RICHFACES_AJAX) {
+ parameters.RICHFACES_AJAX = sourceId;
+ }
+
+ parameters[sourceId] = sourceId;
+
+ jsf.ajax.request(source, event, parameters);
};
var RICHFACES_AJAX_STATUS = "richfaces:ajaxStatus";
Modified: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java 2009-08-20 16:40:21 UTC (rev 15241)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java 2009-08-20 16:52:34 UTC (rev 15242)
@@ -1,7 +1,5 @@
package org.ajax4jsf.renderkit;
-import java.util.Map;
-
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.ActionSource;
@@ -85,21 +83,21 @@
UIComponent parent = bContext.getComponent();
FacesContext context = bContext.getFacesContext();
- JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(parent, context, "RichFaces.ajax");
+ JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(parent, context, AjaxRendererUtils.AJAX_FUNCTION_NAME);
- Map<String, Object> options = buildOptions(context, bContext);
+ AjaxEventOptions options = buildOptions(context, bContext);
ajaxFunction.addParameter(options);
return ajaxFunction.toString();
}
- public Map<String, Object> buildOptions(FacesContext context, ClientBehaviorContext bContext) {
+ public AjaxEventOptions buildOptions(FacesContext context, ClientBehaviorContext bContext) {
UIComponent parent = bContext.getComponent();
String eventName = bContext.getEventName();
- Map<String,Object> options = AjaxRendererUtils.buildEventOptions(context, parent);
- options.put(PartialViewContextImpl.BEHAVIOR_EVENT_PARAMETER, eventName);
- options.put(PartialViewContextFactoryImpl.RICHFACES_AJAX, parent.getClientId());
+ AjaxEventOptions options = AjaxRendererUtils.buildEventOptions(context, parent);
+ options.setParameter(PartialViewContextImpl.BEHAVIOR_EVENT_PARAMETER, eventName);
+ options.setParameter(PartialViewContextFactoryImpl.RICHFACES_AJAX, parent.getClientId());
return options;
}
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java 2009-08-20 16:40:21 UTC (rev 15241)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java 2009-08-20 16:52:34 UTC (rev 15242)
@@ -36,6 +36,7 @@
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.javascript.ScriptUtils;
+import org.ajax4jsf.renderkit.AjaxEventOptions;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.richfaces.component.UIAjaxFunction;
@@ -71,10 +72,10 @@
// Create AJAX Submit function.
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
component, context, AjaxRendererUtils.AJAX_FUNCTION_NAME);
- Map<String, Object> options = AjaxRendererUtils.buildEventOptions(context, component);
+ AjaxEventOptions options = AjaxRendererUtils.buildEventOptions(context, component);
ajaxFunction.addParameter(options);
- Map<String, Object> parameters = options;
+ Map<String, Object> parameters = options.getParameters();
// if (null == parameters) {
// parameters = new HashMap<String, Object>();
// options.put("parameters", parameters);
15 years, 4 months
JBoss Rich Faces SVN: r15241 - root/ui/trunk/components/core/src/main/resources/META-INF.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-20 12:40:21 -0400 (Thu, 20 Aug 2009)
New Revision: 15241
Modified:
root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xml
Log:
add behavior
Modified: root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xml
===================================================================
--- root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xml 2009-08-20 16:38:57 UTC (rev 15240)
+++ root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xml 2009-08-20 16:40:21 UTC (rev 15241)
@@ -47,5 +47,13 @@
<renderer-type>org.richfaces.AjaxLogRenderer</renderer-type>
</component>
</tag>
+
+ <tag>
+ <tag-name>ajax</tag-name>
+ <behavior>
+ <behavior-id>org.ajax4jsf.behavior.Ajax</behavior-id>
+ <handler-class>org.ajax4jsf.facelets.tag.AjaxHandler</handler-class>
+ </behavior>
+ </tag>
</facelet-taglib>
15 years, 4 months
JBoss Rich Faces SVN: r15240 - root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-20 12:38:57 -0400 (Thu, 20 Aug 2009)
New Revision: 15240
Added:
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java
Log:
a4j:ajax Behavior Renderer
Added: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java (rev 0)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBeahaviorRenderer.java 2009-08-20 16:38:57 UTC (rev 15240)
@@ -0,0 +1,105 @@
+package org.ajax4jsf.renderkit;
+
+import java.util.Map;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.ActionSource;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.component.behavior.ClientBehaviorContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AjaxBehaviorEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.render.ClientBehaviorRenderer;
+import javax.faces.render.FacesBehaviorRenderer;
+import javax.faces.render.RenderKitFactory;
+
+import org.ajax4jsf.component.behavior.AjaxBehavior;
+import org.ajax4jsf.javascript.JSFunction;
+import org.richfaces.context.PartialViewContextFactoryImpl;
+import org.richfaces.context.PartialViewContextImpl;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+@FacesBehaviorRenderer(rendererType="org.ajax4jsf.behavior.Ajax",renderKitId=RenderKitFactory.HTML_BASIC_RENDER_KIT)
+@ResourceDependencies({
+ @ResourceDependency(name="jquery.js", target="head"),
+ @ResourceDependency(name="richfaces.js", target="head")
+})
+public class AjaxBeahaviorRenderer extends ClientBehaviorRenderer {
+ @Override
+ public void decode(FacesContext context, UIComponent component, ClientBehavior behavior) {
+
+ if (null == context || null == component || null == behavior) {
+ throw new NullPointerException();
+ }
+
+ if (!(behavior instanceof AjaxBehavior)) {
+ throw new IllegalArgumentException("org.ajax4jsf.component.behavior.AjaxBehavior required: " + behavior);
+ }
+
+ AjaxBehavior ajaxBehavior = (AjaxBehavior)behavior;
+
+ if (ajaxBehavior.isDisabled()) {
+ return;
+ }
+
+ component.queueEvent(createEvent(component, ajaxBehavior));
+ }
+
+ private static AjaxBehaviorEvent createEvent(UIComponent component, AjaxBehavior ajaxBehavior) {
+ AjaxBehaviorEvent event = new AjaxBehaviorEvent(component, ajaxBehavior);
+ PhaseId phaseId = isImmediate(component, ajaxBehavior) ? PhaseId.APPLY_REQUEST_VALUES : PhaseId.INVOKE_APPLICATION;
+ event.setPhaseId(phaseId);
+
+ return event;
+ }
+
+ private static boolean isImmediate(UIComponent component, AjaxBehavior ajaxBehavior) {
+ boolean immediate = false;
+
+ if (ajaxBehavior.isImmediateSet()) {
+ immediate = ajaxBehavior.isImmediate();
+ } else if (component instanceof EditableValueHolder) {
+ immediate = ((EditableValueHolder)component).isImmediate();
+ } else if (component instanceof ActionSource) {
+ immediate = ((ActionSource)component).isImmediate();
+ }
+ return immediate;
+ }
+
+ @Override
+ public String getScript(ClientBehaviorContext behaviorContext, ClientBehavior behavior) {
+ String script = null;
+ if(behavior instanceof AjaxBehavior) {
+ script = buildAjaxCommand(behaviorContext, (AjaxBehavior)behavior);
+ }
+ return script;
+ }
+
+ public String buildAjaxCommand(ClientBehaviorContext bContext, AjaxBehavior behavior) {
+ UIComponent parent = bContext.getComponent();
+ FacesContext context = bContext.getFacesContext();
+
+ JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(parent, context, "RichFaces.ajax");
+
+ Map<String, Object> options = buildOptions(context, bContext);
+ ajaxFunction.addParameter(options);
+
+ return ajaxFunction.toString();
+ }
+
+ public Map<String, Object> buildOptions(FacesContext context, ClientBehaviorContext bContext) {
+ UIComponent parent = bContext.getComponent();
+ String eventName = bContext.getEventName();
+
+ Map<String,Object> options = AjaxRendererUtils.buildEventOptions(context, parent);
+ options.put(PartialViewContextImpl.BEHAVIOR_EVENT_PARAMETER, eventName);
+ options.put(PartialViewContextFactoryImpl.RICHFACES_AJAX, parent.getClientId());
+ return options;
+ }
+}
15 years, 4 months
JBoss Rich Faces SVN: r15239 - in root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets: tag and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-20 12:35:59 -0400 (Thu, 20 Aug 2009)
New Revision: 15239
Added:
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java
Log:
a4j:ajax Behavior tag handler
Added: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java (rev 0)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java 2009-08-20 16:35:59 UTC (rev 15239)
@@ -0,0 +1,155 @@
+package org.ajax4jsf.facelets.tag;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import javax.el.ELContext;
+import javax.el.MethodExpression;
+import javax.faces.application.Application;
+import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.ClientBehaviorHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.AjaxBehaviorEvent;
+import javax.faces.event.AjaxBehaviorListener;
+import javax.faces.view.BehaviorHolderAttachedObjectHandler;
+import javax.faces.view.facelets.BehaviorConfig;
+import javax.faces.view.facelets.CompositeFaceletHandler;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.TagAttribute;
+import javax.faces.view.facelets.TagException;
+import javax.faces.view.facelets.TagHandler;
+
+import org.ajax4jsf.component.behavior.AjaxBehavior;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+
+public class AjaxHandler extends TagHandler implements BehaviorHolderAttachedObjectHandler {
+
+ private final TagAttribute event;
+ private final TagAttribute execute;
+ private final TagAttribute render;
+ private final TagAttribute onevent;
+ private final TagAttribute onerror;
+ private final TagAttribute disabled;
+ private final TagAttribute immediate;
+ private final TagAttribute listener;
+ private final TagAttribute limitRender;
+
+ public AjaxHandler(BehaviorConfig config) {
+ super(config);
+ this.event = this.getAttribute("event");
+ this.execute = this.getAttribute("execute");
+ this.render = this.getAttribute("render");
+ this.onevent = this.getAttribute("onevent");
+ this.onerror = this.getAttribute("onerror");
+ this.disabled = this.getAttribute("disabled");
+ this.immediate = this.getAttribute("immediate");
+ this.listener = this.getAttribute("listener");
+ this.limitRender = this.getAttribute("limitRender");
+ }
+
+ public void apply(FaceletContext f�ontext, UIComponent parent) throws IOException {
+ String eventName = getEventName();
+ if(!isWrapping()) {
+ applyAttachedObject(f�ontext, parent, eventName);
+ } else {
+ this.nextHandler.apply(f�ontext, parent);
+ }
+ }
+
+ public void applyAttachedObject(FaceletContext fContext, UIComponent parent, String eventName) {
+ ClientBehaviorHolder bHolder = (ClientBehaviorHolder) parent;
+ if (null == eventName) {
+ eventName = bHolder.getDefaultEventName();
+ if (null == eventName) {
+ throw new TagException(this.tag, "Event attribute could not be determined: " + eventName);
+ }
+ } else {
+ Collection<String> eventNames = bHolder.getEventNames();
+ if (!eventNames.contains(eventName)) {
+ throw new TagException(this.tag, eventName + "event is not supported for the " + parent.getClass().getSimpleName());
+ }
+ }
+ AjaxBehavior ajaxBehavior = createBehavior(fContext, parent, eventName);
+ bHolder.addClientBehavior(eventName, ajaxBehavior);
+ }
+
+
+ public AjaxBehavior createBehavior(FaceletContext fContext, UIComponent parent, String eventName) {
+ Application application = fContext.getFacesContext().getApplication();
+ AjaxBehavior ajaxBehavior = (AjaxBehavior)application.createBehavior(AjaxBehavior.BEHAVIOR_ID);
+
+ setBehaviorAttribute(fContext, ajaxBehavior, this.onevent, String.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.onerror, String.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.disabled, Boolean.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.immediate, Boolean.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.execute, Object.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.render, Object.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.limitRender, Boolean.class);
+
+ registerBehaviorListener(fContext, ajaxBehavior, listener);
+
+ return ajaxBehavior;
+ }
+
+ public void applyAttachedObject(FacesContext context, UIComponent parent) {
+ FaceletContext ctx = (FaceletContext) context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
+ applyAttachedObject(ctx, parent, getEventName());
+ }
+
+ private void setBehaviorAttribute(FaceletContext ctx, AjaxBehavior behavior, TagAttribute attr, Class<?> type) {
+ if (attr != null) {
+ behavior.setValueExpression(attr.getLocalName(),
+ attr.getValueExpression(ctx, type));
+ }
+ }
+
+ public String getEventName() {
+ return (this.event != null) ? this.event.getValue() : null;
+ }
+
+ public String getFor() {
+ return null;
+ }
+
+ private boolean isWrapping() {
+ return ((this.nextHandler instanceof TagHandler) || (this.nextHandler instanceof CompositeFaceletHandler));
+ }
+
+ public void registerBehaviorListener(FaceletContext fContext, AjaxBehavior behavior, TagAttribute listenerAttr) {
+ if(listenerAttr != null) {
+ MethodExpression mExpression = listenerAttr.getMethodExpression(fContext, Object.class, new Class[]{AjaxBehaviorEvent.class});
+ behavior.addAjaxBehaviorListener(new AjaxBehaviorListenerImpl(mExpression));
+ }
+ }
+
+ public class AjaxBehaviorListenerImpl implements AjaxBehaviorListener {
+
+ private MethodExpression methodExpression;
+
+ public AjaxBehaviorListenerImpl() {};
+
+ public AjaxBehaviorListenerImpl(MethodExpression expression) {
+ this.methodExpression = expression;
+ }
+
+ public void processAjaxBehavior(AjaxBehaviorEvent event) throws AbortProcessingException {
+ if(methodExpression != null) {
+ ELContext elContext = FacesContext.getCurrentInstance().getELContext();
+
+ try {
+ methodExpression.invoke(elContext, new Object[] {event});
+ } catch (Exception e) {
+ //TODO: log or message ??
+ throw new AbortProcessingException(e);
+ }
+ }
+ }
+
+ }
+
+}
15 years, 4 months
JBoss Rich Faces SVN: r15238 - root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-20 12:32:03 -0400 (Thu, 20 Aug 2009)
New Revision: 15238
Modified:
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
Log:
a4j:ajax Behavior
Modified: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2009-08-20 16:31:07 UTC (rev 15237)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2009-08-20 16:32:03 UTC (rev 15238)
@@ -1,8 +1,80 @@
package org.ajax4jsf.component.behavior;
-import javax.faces.component.behavior.ClientBehaviorBase;
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.component.behavior.FacesBehavior;
+import javax.faces.context.FacesContext;
-public class AjaxBehavior extends ClientBehaviorBase {
+/**
+ * @author Anton Belevich
+ *
+ */
+@FacesBehavior(value="org.ajax4jsf.behavior.Ajax")
+public class AjaxBehavior extends javax.faces.component.behavior.AjaxBehavior {
+
+ public static final String BEHAVIOR_ID = "org.ajax4jsf.behavior.Ajax";
+ public static final String LIMIT_RENDER = "limitRender";
+
+ private boolean limitRender;
+
+ public boolean isLimitRender() {
+ if(this.limitRender) {
+ return this.limitRender;
+ }
+
+ ValueExpression ex = getValueExpression(LIMIT_RENDER);
+ if(ex != null) {
+ ELContext elContext = FacesContext.getCurrentInstance().getELContext();
+ Boolean value = ((Boolean)ex.getValue(elContext));
+ return value != null ? value.booleanValue() : false;
+ }
+
+ return this.limitRender;
+ }
+
+
+ public void setLimitRender(boolean limitRender) {
+ this.limitRender = limitRender;
+ clearInitialState();
+ }
+
+ @Override
+ public String getRendererType() {
+ return BEHAVIOR_ID;
+ }
+ @Override
+ public Object saveState(FacesContext context) {
+ Object superState = super.saveState(context);
+ Object[] values;
+
+ if (initialStateMarked()) {
+ if (superState == null) {
+ values = null;
+ } else {
+ values = new Object[] { superState };
+ }
+ } else {
+ values = new Object[1];
+ values[0] = superState;
+ values[1] = limitRender;
+ }
+
+ return values;
+ }
+
+ @Override
+ public void restoreState(FacesContext context, Object state) {
+ if (state != null) {
+
+ Object[] values = (Object[]) state;
+ super.restoreState(context, values[0]);
+
+ if (values.length != 1) {
+ limitRender = ((Boolean)values[1]).booleanValue();
+ clearInitialState();
+ }
+ }
+ }
}
15 years, 4 months