JBoss Rich Faces SVN: r15016 - in root/cdk/trunk/plugins/generator: src/main/java/org/ajax4jsf and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-07-24 19:43:17 -0400 (Fri, 24 Jul 2009)
New Revision: 15016
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCompilationContext.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/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/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/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/TagLibrary.java
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/xmlutils/dtd/xerces/XercesDefinitionFactory.java
Removed:
root/cdk/trunk/plugins/generator/src/main/java/org/ajax4jsf/templatecompiler/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/AttributeBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacetBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/PropertyBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibraryBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java
Modified:
root/cdk/trunk/plugins/generator/pom.xml
Log:
Fix project build
Modified: root/cdk/trunk/plugins/generator/pom.xml
===================================================================
--- root/cdk/trunk/plugins/generator/pom.xml 2009-07-24 19:46:55 UTC (rev 15015)
+++ root/cdk/trunk/plugins/generator/pom.xml 2009-07-24 23:43:17 UTC (rev 15016)
@@ -22,20 +22,13 @@
<target>1.6</target>
</configuration>
</plugin>
- <!--plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jaxb2-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>xjc</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <packageName>org.richfaces.cdk.model</packageName>
- </configuration>
- </plugin -->
+ <!--
+ plugin> <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jaxb2-maven-plugin</artifactId> <executions> <execution>
+ <goals> <goal>xjc</goal> </goals> </execution> </executions>
+ <configuration> <packageName>org.richfaces.cdk.model</packageName>
+ </configuration> </plugin
+ -->
</plugins>
</build>
<dependencies>
@@ -50,17 +43,14 @@
<artifactId>freemarker</artifactId>
<version>2.3.9</version>
</dependency>
+ <!--
+ <dependency> <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId> <version>2.1</version>
+ </dependency> <dependency> <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId> <version>2.1.10</version>
+ </dependency>
+ -->
<dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>2.1</version>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- <version>2.1.10</version>
- </dependency>
- <dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.0.0-SNAPSHOT</version>
@@ -85,18 +75,14 @@
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
</dependency>
- <dependency>
- <groupId>com.google.collections</groupId>
+ <!--
+ <dependency> <groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
- <version>1.0-rc2</version>
- </dependency>
+ <version>1.0-rc2</version> </dependency> <dependency>
+ <groupId>org.w3c.css</groupId> <artifactId>sac</artifactId>
+ <version>1.3</version> </dependency>
+ -->
<dependency>
- <groupId>org.w3c.css</groupId>
- <artifactId>sac</artifactId>
- <version>1.3</version>
- </dependency>
-
- <dependency>
<groupId>wutka</groupId>
<artifactId>dtdparser</artifactId>
<version>1.21</version>
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCompilationContext.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCompilationContext.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCompilationContext.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -0,0 +1,37 @@
+/*
+ * $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"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class AbstractCompilationContext {
+
+ public AbstractCompilationContext(ClassLoader loader) {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCompilationContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: 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 (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -0,0 +1,33 @@
+/*
+ * $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 builds JSF library model from different sources</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class LibraryBuilder {
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java (from rev 15014, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/AttributeBean.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -0,0 +1,17 @@
+package org.richfaces.cdk.model;
+
+public class Attribute {
+
+ private String type;
+
+ private String family;
+
+ private String className;
+
+ private String superClass;
+
+ private String renderKit;
+
+ private String template;
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Attribute.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/AttributeBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/AttributeBean.java 2009-07-24 19:46:55 UTC (rev 15015)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/AttributeBean.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -1,17 +0,0 @@
-package org.richfaces.cdk.model;
-
-public class AttributeBean {
-
- private String type;
-
- private String family;
-
- private String className;
-
- private String superClass;
-
- private String renderKit;
-
- private String template;
-
-}
Added: 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 (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -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.model;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class Behavior implements JsfComponent {
+
+ /* (non-Javadoc)
+ * @see org.richfaces.cdk.model.JsfComponent#getType()
+ */
+ @Override
+ public String getType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java (from rev 15014, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentBean.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -0,0 +1,87 @@
+package org.richfaces.cdk.model;
+
+import java.util.List;
+
+/**
+ * That class represents JSF component in the CDK.
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class Component implements JsfComponent {
+
+ /**
+ * <p class="changed_added_4_0">Component type</p>
+ */
+ private String type;
+
+ /**
+ * <p class="changed_added_4_0">component family</p>
+ */
+ private String family;
+
+ /**
+ * <p class="changed_added_4_0">Cenerated component class</p>
+ */
+ private String className;
+
+ /**
+ * <p class="changed_added_4_0">Base class for generated component</p>
+ */
+ private String superClass;
+
+ /**
+ * <p class="changed_added_4_0">Long description for documentation</p>
+ */
+ private String description;
+
+ /**
+ * <p class="changed_added_4_0">Short name for IDE tools</p>
+ */
+ private String displayname;
+
+ /**
+ * <p class="changed_added_4_0">Icon name for IDE tools</p>
+ */
+ private String icon;
+
+ /**
+ * <p class="changed_added_4_0">Component attributes</p>
+ */
+ private List<Property> attributes;
+
+ /**
+ * <p class="changed_added_4_0">VDL tag. This is bidirectional one to one relation.</p>
+ */
+ private Tag tag;
+
+ /**
+ * <p class="changed_added_4_0">Application level events fired by the component</p>
+ */
+ private List<Event> events;
+
+ /**
+ * <p class="changed_added_4_0">Renderer for the final component. This is bidirectional one to one relation.</p>
+ */
+ private Attribute renderer;
+
+ /**
+ * <p class="changed_added_4_0">Facets recognised by the component</p>
+ */
+ private List<Facet> facets;
+
+ /* (non-Javadoc)
+ * @see org.richfaces.cdk.model.JsfComponent#getType()
+ */
+ 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;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentBean.java 2009-07-24 19:46:55 UTC (rev 15015)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentBean.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -1,87 +0,0 @@
-package org.richfaces.cdk.model;
-
-import java.util.List;
-
-/**
- * That class represents JSF component in the CDK.
- * @author asmirnov(a)exadel.com
- *
- */
-public class ComponentBean implements JsfComponent {
-
- /**
- * <p class="changed_added_4_0">Component type</p>
- */
- private String type;
-
- /**
- * <p class="changed_added_4_0">component family</p>
- */
- private String family;
-
- /**
- * <p class="changed_added_4_0">Cenerated component class</p>
- */
- private String className;
-
- /**
- * <p class="changed_added_4_0">Base class for generated component</p>
- */
- private String superClass;
-
- /**
- * <p class="changed_added_4_0">Long description for documentation</p>
- */
- private String description;
-
- /**
- * <p class="changed_added_4_0">Short name for IDE tools</p>
- */
- private String displayname;
-
- /**
- * <p class="changed_added_4_0">Icon name for IDE tools</p>
- */
- private String icon;
-
- /**
- * <p class="changed_added_4_0">Component attributes</p>
- */
- private List<PropertyBean> attributes;
-
- /**
- * <p class="changed_added_4_0">VDL tag. This is bidirectional one to one relation.</p>
- */
- private TagBean tag;
-
- /**
- * <p class="changed_added_4_0">Application level events fired by the component</p>
- */
- private List<EventBean> events;
-
- /**
- * <p class="changed_added_4_0">Renderer for the final component. This is bidirectional one to one relation.</p>
- */
- private AttributeBean renderer;
-
- /**
- * <p class="changed_added_4_0">Facets recognised by the component</p>
- */
- private List<FacetBean> facets;
-
- /* (non-Javadoc)
- * @see org.richfaces.cdk.model.JsfComponent#getType()
- */
- 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;
- }
-
-}
Added: 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 (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -0,0 +1,55 @@
+/*
+ * $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;
+
+/**
+ * <p class="changed_added_4_0">That class contains model of all JSF components asscoiated with that project</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class ComponentLibrary {
+
+ /**
+ * <p class="changed_added_4_0">JSF components in that library</p>
+ */
+ private List<Component> components;
+
+ /**
+ * <p class="changed_added_4_0">JSF renderer associated with that library</p>
+ */
+ private List<Renderer> renderers;
+
+ private List<Converter> converters;
+
+ private List<Validator> validators;
+
+ private List<Behavior> behaviors;
+ /**
+ * <p class="changed_added_4_0">Tag library with references of all used tags</p>
+ */
+ private TagLibrary tagLibrary;
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: 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 (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -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.model;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class Converter implements JsfComponent {
+
+ /* (non-Javadoc)
+ * @see org.richfaces.cdk.model.JsfComponent#getType()
+ */
+ @Override
+ public String getType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Event.java (from rev 15014, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventBean.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Event.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Event.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -0,0 +1,43 @@
+/*
+ * $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
+ *
+ */
+public class Event {
+
+ private String name;
+
+ private String description;
+
+ private String className;
+
+ private String listenerInterface;
+
+ private String sourceInterface;
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Event.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventBean.java 2009-07-24 19:46:55 UTC (rev 15015)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventBean.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -1,43 +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;
-
-/**
- * <p class="changed_added_4_0"></p>
- * @author asmirnov(a)exadel.com
- *
- */
-public class EventBean {
-
- private String name;
-
- private String description;
-
- private String className;
-
- private String listenerInterface;
-
- private String sourceInterface;
-
-}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java (from rev 15014, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacetBean.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -0,0 +1,37 @@
+/*
+ * $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
+ *
+ */
+public class Facet {
+
+ private String name;
+
+ private String description;
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacetBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacetBean.java 2009-07-24 19:46:55 UTC (rev 15015)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacetBean.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -1,37 +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;
-
-/**
- * <p class="changed_added_4_0"></p>
- * @author asmirnov(a)exadel.com
- *
- */
-public class FacetBean {
-
- private String name;
-
- private String description;
-
-}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java (from rev 15014, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/PropertyBean.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -0,0 +1,115 @@
+/**
+ * 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;
+
+/**
+ * That class represents JSF component property.
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class Property {
+
+ /**
+ * <p class="changed_added_4_0">Bean property name of component attribute</p>
+ */
+ private String name;
+
+ /**
+ * <p class="changed_added_4_0">Name of the attribute type class</p>
+ */
+ private String classname;
+
+ /**
+ * <p class="changed_added_4_0">Attribute description</p>
+ */
+ private String description;
+
+ /**
+ * <p class="changed_added_4_0">Display name for IDE</p>
+ */
+ private String displayname;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ 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 classname
+ */
+ public String getClassname() {
+ return classname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param classname the classname to set
+ */
+ public void setClassname(String classname) {
+ this.classname = classname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the displayname
+ */
+ public String getDisplayname() {
+ return displayname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param displayname the displayname to set
+ */
+ public void setDisplayname(String displayname) {
+ this.displayname = displayname;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/PropertyBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/PropertyBean.java 2009-07-24 19:46:55 UTC (rev 15015)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/PropertyBean.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -1,115 +0,0 @@
-/**
- * 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;
-
-/**
- * That class represents JSF component property.
- * @author asmirnov(a)exadel.com
- *
- */
-public class PropertyBean {
-
- /**
- * <p class="changed_added_4_0">Bean property name of component attribute</p>
- */
- private String name;
-
- /**
- * <p class="changed_added_4_0">Name of the attribute type class</p>
- */
- private String classname;
-
- /**
- * <p class="changed_added_4_0">Attribute description</p>
- */
- private String description;
-
- /**
- * <p class="changed_added_4_0">Display name for IDE</p>
- */
- private String displayname;
-
- /**
- * <p class="changed_added_4_0"></p>
- * @return the name
- */
- 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 classname
- */
- public String getClassname() {
- return classname;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param classname the classname to set
- */
- public void setClassname(String classname) {
- this.classname = classname;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @return the displayname
- */
- public String getDisplayname() {
- return displayname;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param displayname the displayname to set
- */
- public void setDisplayname(String displayname) {
- this.displayname = displayname;
- }
-
-}
Added: 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 (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -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.model;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class Renderer implements JsfComponent {
+
+ /* (non-Javadoc)
+ * @see org.richfaces.cdk.model.JsfComponent#getType()
+ */
+ @Override
+ public String getType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Tag.java (from rev 15014, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagBean.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Tag.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Tag.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -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.model;
+
+/**
+ * <p class="changed_added_4_0">That bean represents VDL tag</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class Tag {
+
+ /**
+ * <p class="changed_added_4_0">Tag name</p>
+ */
+ private String name;
+
+ /**
+ * <p class="changed_added_4_0">Tag library for which that tag is belong.
+ * This is bidirectional many to one relation.</p>
+ */
+ private TagLibrary library;
+
+ /**
+ * <p class="changed_added_4_0">Facelets VDL tag handler class.</p>
+ */
+ private String tagHandlerClass;
+
+ /**
+ * <p class="changed_added_4_0">Facelets VDL tag handler base class for generation.</p>
+ */
+ private String tagHandlerSuperClass;
+
+ /**
+ * <p class="changed_added_4_0">Jsp tag class</p>
+ */
+ private String jspClass;
+
+ /**
+ * <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;
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Tag.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagBean.java 2009-07-24 19:46:55 UTC (rev 15015)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagBean.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -1,65 +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;
-
-/**
- * <p class="changed_added_4_0">That bean represents VDL tag</p>
- * @author asmirnov(a)exadel.com
- *
- */
-public class TagBean {
-
- /**
- * <p class="changed_added_4_0">Tag name</p>
- */
- private String name;
-
- /**
- * <p class="changed_added_4_0">Tag library for which that tag is belong.
- * This is bidirectional many to one relation.</p>
- */
- private TagLibraryBean library;
-
- /**
- * <p class="changed_added_4_0">Facelets VDL tag handler class.</p>
- */
- private String tagHandlerClass;
-
- /**
- * <p class="changed_added_4_0">Facelets VDL tag handler base class for generation.</p>
- */
- private String tagHandlerSuperClass;
-
- /**
- * <p class="changed_added_4_0">Jsp tag class</p>
- */
- private String jspClass;
-
- /**
- * <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;
-
-}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibrary.java (from rev 15014, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibraryBean.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibrary.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibrary.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -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.model;
+
+import java.util.List;
+
+/**
+ * <p class="changed_added_4_0">That bean represents whole tag library.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class TagLibrary {
+
+ /**
+ * <p class="changed_added_4_0">Collection of tags associated with that library</p>
+ */
+ private List<Tag> tags;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the tags
+ */
+ public List<Tag> getTags() {
+ return tags;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param tags the tags to set
+ */
+ public void setTags(List<Tag> tags) {
+ this.tags = tags;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibrary.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibraryBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibraryBean.java 2009-07-24 19:46:55 UTC (rev 15015)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibraryBean.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -1,37 +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;
-
-/**
- * <p class="changed_added_4_0">That bean represents whole tag library.</p>
- * @author asmirnov(a)exadel.com
- *
- */
-public class TagLibraryBean {
-
- private List<TagBean> tags;
-
-}
Added: 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 (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -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.model;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class Validator implements JsfComponent {
+
+ /* (non-Javadoc)
+ * @see org.richfaces.cdk.model.JsfComponent#getType()
+ */
+ @Override
+ public String getType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java 2009-07-24 19:46:55 UTC (rev 15015)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -1,143 +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.xmlutils.dtd.xerces;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.parsers.XMLGrammarPreparser;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.grammars.Grammar;
-import org.apache.xerces.xni.grammars.XMLGrammarDescription;
-import org.apache.xerces.xni.grammars.XSGrammar;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xs.XSModel;
-import org.richfaces.cdk.Logger;
-import org.richfaces.cdk.LoggerFactory;
-import org.richfaces.cdk.xmlutils.dtd.DocumentDefinition;
-import org.richfaces.cdk.xmlutils.dtd.DocumentDefinitionFactory;
-
-/**
- * <p class="changed_added_4_0">
- * That class implements {@link DocumentDefinitionFactory} that parses XML
- * schema using Xerces Xml Schema API
- * </p>
- *
- * @author asmirnov(a)exadel.com
- *
- */
-public class XedrceDefinitionFactory extends DocumentDefinitionFactory {
-
- private final Logger log = LoggerFactory.getLogger();
- /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
- public static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
- /** Validation feature id (http://xml.org/sax/features/validation). */
- public static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
- /**
- * Schema validation feature id
- * (http://apache.org/xml/features/validation/schema).
- */
- public static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
- /**
- * Schema full checking feature id
- * (http://apache.org/xml/features/validation/schema-full-checking).
- */
- public static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
-
- // feature: continue-after-fatal-error
- public final static String CONTINUE_AFTER_FATAL_ERROR = Constants.XERCES_FEATURE_PREFIX
- + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
- /** Property identifier: symbol table. */
- public static final String SYMBOL_TABLE = Constants.XERCES_PROPERTY_PREFIX
- + Constants.SYMBOL_TABLE_PROPERTY;
- /** Property identifier: error reporter. */
- public static final String ERROR_REPORTER = Constants.XERCES_PROPERTY_PREFIX
- + Constants.ERROR_REPORTER_PROPERTY;
- /** Property identifier: error handler. */
- public static final String ERROR_HANDLER = Constants.XERCES_PROPERTY_PREFIX
- + Constants.ERROR_HANDLER_PROPERTY;
- /** Property identifier: entity resolver. */
- public static final String ENTITY_RESOLVER = Constants.XERCES_PROPERTY_PREFIX
- + Constants.ENTITY_RESOLVER_PROPERTY;
- /** Property identifier: grammar pool . */
- public static final String GRAMMAR_POOL = Constants.XERCES_PROPERTY_PREFIX
- + Constants.XMLGRAMMAR_POOL_PROPERTY;
-
- private Map<URL, DocumentDefinition> definitions = new HashMap<URL, DocumentDefinition>();
-
- @Override
- public synchronized DocumentDefinition getDocumentDefinition(URL resource) {
- DocumentDefinition def = null;
- if (definitions.containsKey(resource)) {
- def = definitions.get(resource);
- } else {
-
- try {
- def = initDefinition(resource);
- } catch (Exception e) {
- log.error("An error has occured", e);
- }
-
- if (def != null) {
- definitions.put(resource, def);
- }
- }
- return def;
- }
-
- public DocumentDefinition initDefinition(URL resource) {
- XMLGrammarPreparser preparser = new XMLGrammarPreparser();
- // preparser.registerPreparser(XMLGrammarDescription.XML_DTD, null);
- preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
-
- // preparser.setProperty(GRAMMAR_POOL, grammarPool);
- preparser.setFeature(NAMESPACES_FEATURE_ID, true);
- preparser.setFeature(VALIDATION_FEATURE_ID, true);
- // note we can set schema features just in case...
- preparser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
- preparser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);
-
- try {
- Grammar g = preparser.preparseGrammar(
- XMLGrammarDescription.XML_SCHEMA,
- createInputSource(resource));
- XSGrammar grammar = (XSGrammar) g;
- XSModel model = grammar.toXSModel();
- // TODO - make DocumentDefinition from XML schema.
- } catch (XNIException e) {
- log.error(e);
- } catch (IOException e) {
- log.error(e);
- }
- return null;
- }
-
- protected XMLInputSource createInputSource(URL resource) {
- return new XMLInputSource(null, resource.toExternalForm(), null);
- }
-
-}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XercesDefinitionFactory.java (from rev 15014, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XercesDefinitionFactory.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XercesDefinitionFactory.java 2009-07-24 23:43:17 UTC (rev 15016)
@@ -0,0 +1,143 @@
+/*
+ * $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.xmlutils.dtd.xerces;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.xerces.impl.Constants;
+import org.apache.xerces.parsers.XMLGrammarPreparser;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.grammars.Grammar;
+import org.apache.xerces.xni.grammars.XMLGrammarDescription;
+import org.apache.xerces.xni.grammars.XSGrammar;
+import org.apache.xerces.xni.parser.XMLInputSource;
+import org.apache.xerces.xs.XSModel;
+import org.richfaces.cdk.Logger;
+import org.richfaces.cdk.LoggerFactory;
+import org.richfaces.cdk.xmlutils.dtd.DocumentDefinition;
+import org.richfaces.cdk.xmlutils.dtd.DocumentDefinitionFactory;
+
+/**
+ * <p class="changed_added_4_0">
+ * That class implements {@link DocumentDefinitionFactory} that parses XML
+ * schema using Xerces Xml Schema API
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class XercesDefinitionFactory extends DocumentDefinitionFactory {
+
+ private final Logger log = LoggerFactory.getLogger();
+ /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
+ public static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
+ /** Validation feature id (http://xml.org/sax/features/validation). */
+ public static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
+ /**
+ * Schema validation feature id
+ * (http://apache.org/xml/features/validation/schema).
+ */
+ public static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
+ /**
+ * Schema full checking feature id
+ * (http://apache.org/xml/features/validation/schema-full-checking).
+ */
+ public static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
+
+ // feature: continue-after-fatal-error
+ public final static String CONTINUE_AFTER_FATAL_ERROR = Constants.XERCES_FEATURE_PREFIX
+ + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
+ /** Property identifier: symbol table. */
+ public static final String SYMBOL_TABLE = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.SYMBOL_TABLE_PROPERTY;
+ /** Property identifier: error reporter. */
+ public static final String ERROR_REPORTER = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.ERROR_REPORTER_PROPERTY;
+ /** Property identifier: error handler. */
+ public static final String ERROR_HANDLER = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.ERROR_HANDLER_PROPERTY;
+ /** Property identifier: entity resolver. */
+ public static final String ENTITY_RESOLVER = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.ENTITY_RESOLVER_PROPERTY;
+ /** Property identifier: grammar pool . */
+ public static final String GRAMMAR_POOL = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.XMLGRAMMAR_POOL_PROPERTY;
+
+ private Map<URL, DocumentDefinition> definitions = new HashMap<URL, DocumentDefinition>();
+
+ @Override
+ public synchronized DocumentDefinition getDocumentDefinition(URL resource) {
+ DocumentDefinition def = null;
+ if (definitions.containsKey(resource)) {
+ def = definitions.get(resource);
+ } else {
+
+ try {
+ def = initDefinition(resource);
+ } catch (Exception e) {
+ log.error("An error has occured", e);
+ }
+
+ if (def != null) {
+ definitions.put(resource, def);
+ }
+ }
+ return def;
+ }
+
+ public DocumentDefinition initDefinition(URL resource) {
+ XMLGrammarPreparser preparser = new XMLGrammarPreparser();
+ // preparser.registerPreparser(XMLGrammarDescription.XML_DTD, null);
+ preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
+
+ // preparser.setProperty(GRAMMAR_POOL, grammarPool);
+ preparser.setFeature(NAMESPACES_FEATURE_ID, true);
+ preparser.setFeature(VALIDATION_FEATURE_ID, true);
+ // note we can set schema features just in case...
+ preparser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
+ preparser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);
+
+ try {
+ Grammar g = preparser.preparseGrammar(
+ XMLGrammarDescription.XML_SCHEMA,
+ createInputSource(resource));
+ XSGrammar grammar = (XSGrammar) g;
+ XSModel model = grammar.toXSModel();
+ // TODO - make DocumentDefinition from XML schema.
+ } catch (XNIException e) {
+ log.error(e);
+ } catch (IOException e) {
+ log.error(e);
+ }
+ return null;
+ }
+
+ protected XMLInputSource createInputSource(URL resource) {
+ return new XMLInputSource(null, resource.toExternalForm(), null);
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XercesDefinitionFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 5 months
JBoss Rich Faces SVN: r15014 - in root/cdk/trunk/plugins/generator/src/test/java/org/richfaces: cdk/xmlutils and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-07-24 15:43:52 -0400 (Fri, 24 Jul 2009)
New Revision: 15014
Removed:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/builder/config/
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/builder/generator/
Modified:
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyMergeTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodySerializerTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XPathComparatorTest.java
Log:
All obsolette test classes has been removed
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyMergeTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyMergeTest.java 2009-07-24 19:42:30 UTC (rev 15013)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyMergeTest.java 2009-07-24 19:43:52 UTC (rev 15014)
@@ -21,8 +21,6 @@
package org.richfaces.cdk.xmlutils;
-import org.richfaces.cdk.xmlutils.XMLBodyMerge;
-
import junit.framework.TestCase;
/**
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodySerializerTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodySerializerTest.java 2009-07-24 19:42:30 UTC (rev 15013)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodySerializerTest.java 2009-07-24 19:43:52 UTC (rev 15014)
@@ -24,18 +24,11 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
+import junit.framework.TestCase;
-import org.richfaces.builder.config.ParsingException;
-import org.richfaces.cdk.xmlutils.XMLBody;
-import org.richfaces.cdk.xmlutils.XMLBodySerializer;
-import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import junit.framework.TestCase;
-
/**
* @author Maksim Kaszynski
*
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyTest.java 2009-07-24 19:42:30 UTC (rev 15013)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyTest.java 2009-07-24 19:43:52 UTC (rev 15014)
@@ -27,9 +27,6 @@
import junit.framework.TestCase;
-import org.richfaces.builder.config.ParsingException;
-import org.richfaces.cdk.xmlutils.XMLBody;
-
/**
* @author shura
*
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XPathComparatorTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XPathComparatorTest.java 2009-07-24 19:42:30 UTC (rev 15013)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XPathComparatorTest.java 2009-07-24 19:43:52 UTC (rev 15014)
@@ -24,13 +24,11 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
-import org.richfaces.cdk.xmlutils.XMLBody;
-import org.richfaces.cdk.xmlutils.XPathComparator;
+import junit.framework.TestCase;
+
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import junit.framework.TestCase;
-
/**
* @author Maksim Kaszynski
*
15 years, 5 months
JBoss Rich Faces SVN: r15013 - in root/framework/trunk: impl and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-07-24 15:42:30 -0400 (Fri, 24 Jul 2009)
New Revision: 15013
Modified:
root/framework/trunk/api/pom.xml
root/framework/trunk/impl/pom.xml
root/framework/trunk/version-matrix/pom.xml
Log:
Remove Apache common-collections dependencies. Use google-collections instead or create own project-specific classes - https://jira.jboss.org/jira/browse/RF-7556
Remove Jakarta Digester dependencies - https://jira.jboss.org/jira/browse/RF-7557
Modified: root/framework/trunk/api/pom.xml
===================================================================
--- root/framework/trunk/api/pom.xml 2009-07-24 19:41:59 UTC (rev 15012)
+++ root/framework/trunk/api/pom.xml 2009-07-24 19:42:30 UTC (rev 15013)
@@ -17,10 +17,6 @@
<dependencies>
<dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- </dependency>
- <dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</dependency>
Modified: root/framework/trunk/impl/pom.xml
===================================================================
--- root/framework/trunk/impl/pom.xml 2009-07-24 19:41:59 UTC (rev 15012)
+++ root/framework/trunk/impl/pom.xml 2009-07-24 19:42:30 UTC (rev 15013)
@@ -136,10 +136,6 @@
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
- <groupId>commons-digester</groupId>
- <artifactId>commons-digester</artifactId>
- </dependency>
- <dependency>
<groupId>opensymphony</groupId>
<artifactId>oscache</artifactId>
<optional>true</optional>
Modified: root/framework/trunk/version-matrix/pom.xml
===================================================================
--- root/framework/trunk/version-matrix/pom.xml 2009-07-24 19:41:59 UTC (rev 15012)
+++ root/framework/trunk/version-matrix/pom.xml 2009-07-24 19:42:30 UTC (rev 15013)
@@ -227,11 +227,6 @@
<!-- TODO: remove commons dependencies -->
<dependency>
- <groupId>commons-digester</groupId>
- <artifactId>commons-digester</artifactId>
- <version>1.8.1</version>
- </dependency>
- <dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
15 years, 5 months
JBoss Rich Faces SVN: r15012 - in root/cdk/trunk/plugins/generator: src/main/java/org/ajax4jsf and 15 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-07-24 15:41:59 -0400 (Fri, 24 Jul 2009)
New Revision: 15012
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkException.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/ParsingException.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Attribute.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/DocumentDefinition.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/DocumentDefinitionFactory.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Element.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Node.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/wutka/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/
Removed:
root/cdk/trunk/plugins/generator/src/main/java/org/ajax4jsf/builder/
root/cdk/trunk/plugins/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ActionSource2PropertyProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ComponentModelBuilder.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ComponentPropertyProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ELPropertyProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ExpressionPropertyProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/PrimitivePropertyProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/PropertyProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/methods/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/state/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/config/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/generator/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/velocity/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/xml/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Attribute.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinition.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinitionFactory.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Element.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Node.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/wutka/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/ant/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/builder/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/el/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/A4JRendererElementsFactory.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/Attribute.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/BodyElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/DeclarationElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/ElementsArray.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/ElementsFactory.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/JSTLElementsFactory.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/RootElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/TemplateElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/TemplateElementBase.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/CDATAElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/CommentElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLAttributes.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLTags.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HtmlAttributesFactory.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/PIElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/TextElement.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/attribute/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/jsp/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/std/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/vcp/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/utils/
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/velocity/
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/builder/xml/
Modified:
root/cdk/trunk/plugins/generator/pom.xml
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/NamesListComparator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XMLBody.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XMLBodyMerge.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XMLBodySerializer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XPathComparator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/wutka/WutkaDefinitionFactory.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyMergeTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodySerializerTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XPathComparatorTest.java
Log:
All obsolette classes has been removed
Modified: root/cdk/trunk/plugins/generator/pom.xml
===================================================================
--- root/cdk/trunk/plugins/generator/pom.xml 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/pom.xml 2009-07-24 19:41:59 UTC (rev 15012)
@@ -95,5 +95,11 @@
<artifactId>sac</artifactId>
<version>1.3</version>
</dependency>
+
+ <dependency>
+ <groupId>wutka</groupId>
+ <artifactId>dtdparser</artifactId>
+ <version>1.21</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ActionSource2PropertyProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ActionSource2PropertyProcessor.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ActionSource2PropertyProcessor.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,111 +0,0 @@
-/**
- * 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.builder.component;
-
-import java.util.Arrays;
-import java.util.List;
-
-import javax.faces.component.ActionSource2;
-import javax.faces.el.MethodBinding;
-
-import org.richfaces.builder.component.methods.VelocityMethodBody;
-import org.richfaces.builder.config.PropertyBean;
-import org.richfaces.builder.generator.GeneratorException;
-import org.richfaces.builder.generator.JSFGeneratorConfiguration;
-import org.richfaces.builder.model.JavaClass;
-import org.richfaces.builder.model.JavaField;
-import org.richfaces.builder.model.JavaLanguageElement;
-import org.richfaces.builder.model.JavaMethod;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-@SuppressWarnings("deprecation")
-public class ActionSource2PropertyProcessor extends ComponentPropertyProcessor {
-
- private static final List<String> ACCEPTED_NAMES = Arrays.asList("action", "actionListener", "actionExpression");
-
- @Override
- public boolean accept(PropertyBean propertyBean, JavaClass javaClass,
- JSFGeneratorConfiguration configuration) {
-
- boolean result = !propertyBean.isExist();
-
- if (result) {
- result = ActionSource2.class.isAssignableFrom(javaClass.getSuperClass());
- if (result) {
- result = ACCEPTED_NAMES.contains(propertyBean.getName());
- }
- }
-
- return result;
- }
-
- @Override
- public void process(PropertyBean propertyBean, JavaClass javaClass,
- JSFGeneratorConfiguration configuration) {
-
- JavaField field = getField(propertyBean, configuration);
- JavaMethod accessor = getAccessor(configuration, propertyBean, field);
- JavaMethod mutator = getMutator(configuration, propertyBean, field);
-
- if("action".equals(propertyBean.getName())) {
-
- try {
- accessor.setMethodBody(new VelocityMethodBody(configuration) {
- @Override
- public String getTemplate() {
- return "snippets/get-action.vm";
- }
- });
- mutator.setMethodBody(new VelocityMethodBody(configuration) {
- @Override
- public String getTemplate() {
- return "snippets/set-action.vm";
- }
- });
-
- } catch (GeneratorException e) {
- e.printStackTrace();
- }
-
- } else {
- javaClass.addField(field);
- }
-
- if (field.getType().getName().equals(MethodBinding.class.getName())) {
-
- for(JavaLanguageElement el : new JavaLanguageElement[] {field, accessor, mutator}) {
- el.addAnnotation(SuppressWarnings.class, "\"deprecation\"");
- }
-
- }
-
-
- //Do not add variable
- javaClass.addMethod(accessor);
- javaClass.addMethod(mutator);
-
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ComponentModelBuilder.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ComponentModelBuilder.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ComponentModelBuilder.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,206 +0,0 @@
-/**
- * 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.builder.component;
-
-import static org.richfaces.builder.model.Argument.*;
-
-import java.util.Collection;
-
-import javax.faces.component.UIComponentBase;
-import javax.faces.context.FacesContext;
-
-import org.richfaces.builder.component.state.ComponentStateManager;
-import org.richfaces.builder.config.ComponentBean;
-import org.richfaces.builder.config.PropertyBean;
-import org.richfaces.builder.config.RendererBean;
-import org.richfaces.builder.generator.GeneratorException;
-import org.richfaces.builder.generator.JSFGeneratorConfiguration;
-import org.richfaces.builder.model.JavaClass;
-import org.richfaces.builder.model.JavaConstructor;
-import org.richfaces.builder.model.JavaField;
-import org.richfaces.builder.model.JavaMethod;
-import org.richfaces.builder.model.JavaModifier;
-import org.richfaces.builder.model.JavaPackage;
-import org.richfaces.builder.model.MethodBody;
-
-/**
- * Build component class model from configs
- * @author Maksim Kaszynski
- *
- */
-public class ComponentModelBuilder {
-
- private PropertyProcessor[] propertyProcessors = {
- new ActionSource2PropertyProcessor(),
- new ExpressionPropertyProcessor(),
- new PrimitivePropertyProcessor(),
- new ELPropertyProcessor(),
- new ComponentPropertyProcessor()};
-
- public JavaClass build(ComponentBean componentBean, JSFGeneratorConfiguration configuration) {
-
- String superclassname =
- componentBean.getSuperclass();
-
- JavaClass javaClass =
- new JavaClass(componentBean.getSimpleClassName(),
- new JavaPackage(componentBean.getPackageName()));
-
- try {
- Class<?> superClass =
- Class.forName(superclassname, false, configuration.getClassLoader());
-
- javaClass.setSuperClass(superClass);
-
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- javaClass.setSuperClass(UIComponentBase.class);
- }
-
- javaClass.addModifier(JavaModifier.PUBLIC);
-
- javaClass.addField(getComponentFamily(componentBean));
- javaClass.addField(getComponentType(componentBean));
-
- javaClass.addMethod(getConstructor(componentBean, javaClass));
-
- Collection<PropertyBean> properties = componentBean.getProperties();
-
- for (PropertyBean propertyBean : properties) {
- PropertyProcessor proc = null;
-
- for (int i = 0; i < propertyProcessors.length && proc == null; i++) {
-
- PropertyProcessor processor =
- propertyProcessors[i];
-
- if (processor.accept(propertyBean, javaClass, configuration)) {
- proc = processor;
- }
- }
-
- if (proc != null) {
- proc.process(propertyBean, javaClass, configuration);
- }
- }
-
- javaClass.addMethod(getComponentFamilyMethod(componentBean));
-
- ComponentStateManager stateManager = new ComponentStateManager(javaClass);
-
- JavaMethod saveState = getSaveStateTemplate();
- try {
- saveState.setMethodBody(stateManager.getSaveStateMethodBody(configuration));
- } catch (GeneratorException e) {
- e.printStackTrace();
- }
- javaClass.addMethod(saveState);
-
- JavaMethod restoreState = getRestoreStateTemplate();
- try {
- restoreState.setMethodBody(stateManager.getRestoreStateMethodBody(configuration));
- } catch (GeneratorException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- javaClass.addMethod(restoreState);
-
-
-
- return javaClass;
-
- }
-
- private JavaMethod getComponentFamilyMethod(ComponentBean componentBean) {
- JavaMethod javaMethod = new JavaMethod("getFamily", String.class);
- javaMethod.addModifier(JavaModifier.PUBLIC);
- javaMethod.setMethodBody(new MethodBody() {
- @Override
- public String toCode() {
- return "return COMPONENT_FAMILY;";
- }
- });
- return javaMethod;
- }
-
- private JavaMethod getRestoreStateTemplate() {
- JavaMethod method =
- new JavaMethod("restoreState",
- Void.TYPE,
- arg("context", FacesContext.class),
- arg("state", Object.class));
- method.addModifier(JavaModifier.PUBLIC);
- method.addAnnotation(Override.class);
-
- return method;
- }
-
- private JavaMethod getSaveStateTemplate() {
- JavaMethod method =
- new JavaMethod("saveState",
- Object.class,
- arg("context", FacesContext.class));
- method.addModifier(JavaModifier.PUBLIC);
- method.addAnnotation(Override.class);
- method.setMethodBody(new MethodBody() {
- @Override
- public String toCode() {
- return "return super.saveState(context);";
- }
- });
- return method;
- }
-
- private JavaField getComponentType(ComponentBean componentBean) {
- JavaField field = new JavaField(String.class, "COMPONENT_TYPE");
- field.addModifier(JavaModifier.PUBLIC);
- field.addModifier(JavaModifier.STATIC);
- field.addModifier(JavaModifier.FINAL);
- field.setValue("\"" + componentBean.getName() + "\"");
- return field;
- }
- private JavaField getComponentFamily(ComponentBean componentBean) {
- JavaField field = new JavaField(String.class, "COMPONENT_FAMILY");
- field.addModifier(JavaModifier.PUBLIC);
- field.addModifier(JavaModifier.STATIC);
- field.addModifier(JavaModifier.FINAL);
- field.setValue("\"" + componentBean.getFamily() + "\"");
- return field;
- }
-
- private JavaMethod getConstructor(ComponentBean componentBean, JavaClass javaClass) {
- final RendererBean renderer = componentBean.getRenderer();
- JavaMethod method = new JavaConstructor(javaClass);
- method.addModifier(JavaModifier.PUBLIC);
- method.setMethodBody(new MethodBody(method) {
- @Override
- public String toCode() {
- if (renderer != null) {
- return "setRendererType(\"" + renderer.getName() + "\");";
- }
- return super.toCode();
- }
- });
-
- return method;
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ComponentPropertyProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ComponentPropertyProcessor.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ComponentPropertyProcessor.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,133 +0,0 @@
-/**
- * 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.builder.component;
-
-import org.richfaces.builder.config.PropertyBean;
-import org.richfaces.builder.generator.JSFGeneratorConfiguration;
-import org.richfaces.builder.model.Argument;
-import org.richfaces.builder.model.JavaClass;
-import org.richfaces.builder.model.JavaComment;
-import org.richfaces.builder.model.JavaField;
-import org.richfaces.builder.model.JavaLanguageElement;
-import org.richfaces.builder.model.JavaMethod;
-import org.richfaces.builder.model.JavaModifier;
-import org.richfaces.builder.model.JavaPrimitive;
-import org.richfaces.builder.model.MethodBody;
-
-/**
- * Default property handler - a fallback one.
- * @author Maksim Kaszynski
- *
- */
-public class ComponentPropertyProcessor implements PropertyProcessor {
-
- public boolean accept(PropertyBean propertyBean, JavaClass javaClass, JSFGeneratorConfiguration configuration) {
- return !propertyBean.isExist();
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.builder.render.PropertyProcessor#process(org.richfaces.builder.config.PropertyBean, org.richfaces.builder.model.JavaClass)
- */
- public void process(PropertyBean propertyBean, JavaClass javaClass, JSFGeneratorConfiguration configuration) {
- JavaField field = getField(propertyBean, configuration);
-
- javaClass.addField(field);
- javaClass.addMethod(getAccessor(configuration, propertyBean, field));
- javaClass.addMethod(getMutator(configuration, propertyBean, field));
- }
-
- protected JavaField getField(PropertyBean propertyBean, JSFGeneratorConfiguration configuration) {
- String name = propertyBean.getName();
- String defaultvalue = propertyBean.getDefaultvalue();
- Class<?> propertyClass = getType(propertyBean, configuration.getClassLoader());
- JavaField field = new JavaField(propertyClass, "_" + name, defaultvalue);
- field.getComments().add(new JavaComment(propertyBean.getXmlEncodedDescription()));
- field.getModifiers().add(JavaModifier.PRIVATE);
-
- if (propertyBean.isTransient()) {
- field.addModifier(JavaModifier.TRANSIENT);
- }
-
- handleDeprecation(field.getType(), field);
- return field;
- }
-
- protected Class<?> getType(PropertyBean propertyBean, ClassLoader classLoader) {
- if (propertyBean.isSimpleType()) {
- try {
- Class<?> clazz = JavaPrimitive.forName(propertyBean.getClassname());
- return clazz;
- } catch (Exception e) {
- e.printStackTrace();
- }
- } else {
- try {
- Class<?> clazz = Class.forName(propertyBean.getClassname(), false, classLoader);
- return clazz;
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- return Object.class;
- }
-
- protected JavaMethod getAccessor(JSFGeneratorConfiguration configuration, PropertyBean propertyBean, final JavaField field) {
- JavaMethod accessor =
- new JavaMethod(propertyBean.getGetterName(), field.getType());
-
- accessor.setMethodBody(new MethodBody() {
- @Override
- public String toCode() {
- return "return " + field.getName() + ";";
- }
- });
-
- accessor.addModifier(JavaModifier.PUBLIC);
- handleDeprecation(field.getType(), accessor);
-
- return accessor;
- }
-
- protected JavaMethod getMutator(JSFGeneratorConfiguration configuration, PropertyBean propertyBean, final JavaField field) {
- JavaMethod mutator =
- new JavaMethod(propertyBean.getSetterName(),
- new Argument(field.getName(), field.getType()));
-
- mutator.setMethodBody(new MethodBody(mutator) {
- @Override
- public String toCode() {
- return "this." + field.getName() + " = " + field.getName() + ";";
- }
- });
-
- handleDeprecation(field.getType(), mutator);
- mutator.addModifier(JavaModifier.PUBLIC);
- return mutator;
- }
-
- protected void handleDeprecation(Class<?> type, JavaLanguageElement element) {
- if (type.isAnnotationPresent(Deprecated.class)) {
- element.addAnnotation(SuppressWarnings.class, "\"deprecation\"");
- }
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ELPropertyProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ELPropertyProcessor.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ELPropertyProcessor.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,65 +0,0 @@
-/**
- * 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.builder.component;
-
-import org.richfaces.builder.component.methods.ELPropertyAccessorMethodBody;
-import org.richfaces.builder.config.PropertyBean;
-import org.richfaces.builder.generator.GeneratorException;
-import org.richfaces.builder.generator.JSFGeneratorConfiguration;
-import org.richfaces.builder.model.JavaClass;
-import org.richfaces.builder.model.JavaField;
-import org.richfaces.builder.model.JavaMethod;
-import org.richfaces.builder.model.MethodBody;
-
-/**
- * Processing of EL-enabled properties
- * @author Maksim Kaszynski
- *
- */
-public class ELPropertyProcessor extends ComponentPropertyProcessor {
-
- @Override
- public boolean accept(PropertyBean propertyBean, JavaClass javaClass, JSFGeneratorConfiguration configuration) {
- return !(propertyBean.isExist() || propertyBean.isSimpleType()) && propertyBean.isEl() ;
- }
-
- @Override
- protected JavaMethod getAccessor(JSFGeneratorConfiguration config, PropertyBean propertyBean, JavaField field) {
- field.setValue("null");
-
- JavaMethod accessor = super.getAccessor(config, propertyBean, field);
-
- try {
- ELPropertyAccessorMethodBody propertyAccessorMethodBody =
- new ELPropertyAccessorMethodBody(config, propertyBean, field);
-
- accessor.setMethodBody(propertyAccessorMethodBody);
-
- } catch (GeneratorException e) {
- accessor.setMethodBody(new MethodBody());
- e.printStackTrace();
- }
-
- return accessor;
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ExpressionPropertyProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ExpressionPropertyProcessor.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/ExpressionPropertyProcessor.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,73 +0,0 @@
-/**
- * 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.builder.component;
-
-import javax.el.Expression;
-import javax.faces.el.MethodBinding;
-import javax.faces.el.ValueBinding;
-
-import org.richfaces.builder.config.PropertyBean;
-import org.richfaces.builder.generator.JSFGeneratorConfiguration;
-import org.richfaces.builder.model.JavaClass;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-@SuppressWarnings("deprecation")
-public class ExpressionPropertyProcessor extends ComponentPropertyProcessor {
-
- private static final Class<?>[] acceptedClasses = {
- MethodBinding.class,
- ValueBinding.class,
- Expression.class};
-
- @Override
- public boolean accept(PropertyBean propertyBean, JavaClass javaClass,
- JSFGeneratorConfiguration configuration) {
-
- boolean result =
- !propertyBean.isExist() &&
- propertyBean.isEl() &&
- propertyBean.isElonly();
-
- if (result) {
- Class<?> type =
- getType(propertyBean, configuration.getClassLoader());
-
- result = false;
-
- for (Class<?> clazz : acceptedClasses) {
- if (clazz.isAssignableFrom(type)) {
- result = true;
- break;
- }
- }
-
-
- }
-
-
-
- return result;
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/PrimitivePropertyProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/PrimitivePropertyProcessor.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/PrimitivePropertyProcessor.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,141 +0,0 @@
-/**
- * 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.builder.component;
-
-import javax.el.ELException;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
-
-import org.richfaces.builder.component.methods.VelocityMethodBody;
-import org.richfaces.builder.config.PropertyBean;
-import org.richfaces.builder.generator.GeneratorException;
-import org.richfaces.builder.generator.JSFGeneratorConfiguration;
-import org.richfaces.builder.model.JavaClass;
-import org.richfaces.builder.model.JavaField;
-import org.richfaces.builder.model.JavaMethod;
-import org.richfaces.builder.model.JavaModifier;
-import org.richfaces.builder.model.JavaPrimitive;
-import org.richfaces.builder.model.MethodBody;
-
-/**
- * Handle primitive properties
- * @author Maksim Kaszynski
- *
- */
-public class PrimitivePropertyProcessor extends ComponentPropertyProcessor {
-
- class PrimitiveELPropertyAccessorMethodBody extends VelocityMethodBody {
-
- public PrimitiveELPropertyAccessorMethodBody(
- JSFGeneratorConfiguration configuration, JavaField field, JavaField field2, PropertyBean property)
- throws GeneratorException {
- super(configuration);
- getContext().put("field1", field);
- getContext().put("field2", field2);
- getContext().put("wrapperClass", JavaPrimitive.wrapperType(field.getType()));
- getContext().put("property", property);
- addType(ValueExpression.class);
- addType(ELException.class);
- addType(FacesException.class);
- }
-
- @Override
- public String getTemplate() {
- return "snippets/primitive-el-property-accessor.vm";
- }
- }
-
- class PrimitivePropertyAccessorMethodBody extends VelocityMethodBody {
-
- public PrimitivePropertyAccessorMethodBody(
- JSFGeneratorConfiguration configuration, JavaField field, JavaField field2)
- throws GeneratorException {
- super(configuration);
- getContext().put("field1", field);
- getContext().put("field2", field2);
- }
-
- @Override
- public String getTemplate() {
- return "snippets/primitive-property-accessor.vm";
- }
- }
-
- class PrimitivePropertyMutatorMethodBody extends VelocityMethodBody {
-
- public PrimitivePropertyMutatorMethodBody(
- JSFGeneratorConfiguration configuration, JavaField field, JavaField field2)
- throws GeneratorException {
- super(configuration);
- getContext().put("field1", field);
- getContext().put("field2", field2);
- }
-
- @Override
- public String getTemplate() {
- return "snippets/primitive-property-mutator.vm";
- }
- }
-
- @Override
- public boolean accept(PropertyBean propertyBean, JavaClass javaClass, JSFGeneratorConfiguration configuration) {
- return propertyBean.isSimpleType() && super.accept(propertyBean, javaClass, configuration);
- }
-
- @Override
- public void process(PropertyBean propertyBean, JavaClass javaClass, JSFGeneratorConfiguration configuration) {
- JavaField field = getField(propertyBean, configuration);
- JavaField field2 = new JavaField(boolean.class, field.getName() + "Set", "false");
- field2.addModifier(JavaModifier.PRIVATE);
- if (propertyBean.isTransient()) {
- field2.addModifier(JavaModifier.TRANSIENT);
- }
- JavaMethod accessor = getAccessor(configuration, propertyBean, field);
- MethodBody accessorMethodBody;
-
- try {
- if (propertyBean.isEl()) {
- accessorMethodBody = new PrimitiveELPropertyAccessorMethodBody(configuration, field, field2, propertyBean);
- } else {
- accessorMethodBody = new PrimitivePropertyAccessorMethodBody(configuration, field, field2);
- }
- accessor.setMethodBody(accessorMethodBody);
- } catch (GeneratorException e) {
- e.printStackTrace();
- }
-
- JavaMethod mutator = getMutator(configuration, propertyBean, field);
-
- try {
- PrimitivePropertyMutatorMethodBody mutatorBody = new PrimitivePropertyMutatorMethodBody(configuration, field, field2);
- mutator.setMethodBody(mutatorBody);
- } catch (GeneratorException e) {
- e.printStackTrace();
- }
-
- javaClass.addField(field);
- javaClass.addField(field2);
- javaClass.addMethod(accessor);
- javaClass.addMethod(mutator);
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/PropertyProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/PropertyProcessor.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/component/PropertyProcessor.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,36 +0,0 @@
-/**
- * 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.builder.component;
-
-import org.richfaces.builder.config.PropertyBean;
-import org.richfaces.builder.generator.JSFGeneratorConfiguration;
-import org.richfaces.builder.model.JavaClass;
-
-/**
- * Process single property - add field to class, accessor, mutator, etc.
- * @author Maksim Kaszynski
- *
- */
-public interface PropertyProcessor {
- boolean accept(PropertyBean propertyBean, JavaClass javaClass, JSFGeneratorConfiguration configuration);
- void process(PropertyBean propertyBean, JavaClass javaClass, JSFGeneratorConfiguration configuration);
-}
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkException.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkException.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkException.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -0,0 +1,68 @@
+/*
+ * $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"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class CdkException extends Exception {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
+ public CdkException() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ */
+ public CdkException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param cause
+ */
+ public CdkException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ * @param cause
+ */
+ public CdkException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils (from rev 15003, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/xml)
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/NamesListComparator.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/xml/NamesListComparator.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/NamesListComparator.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.builder.xml;
+package org.richfaces.cdk.xmlutils;
import java.util.Comparator;
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/ParsingException.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/ParsingException.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/ParsingException.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -0,0 +1,43 @@
+package org.richfaces.cdk.xmlutils;
+
+import org.richfaces.cdk.CdkException;
+
+public class ParsingException extends CdkException {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
+ public ParsingException() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ * @param cause
+ */
+ public ParsingException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ */
+ public ParsingException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param cause
+ */
+ public ParsingException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/ParsingException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XMLBody.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/xml/XMLBody.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XMLBody.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.builder.xml;
+package org.richfaces.cdk.xmlutils;
import java.io.IOException;
import java.io.InputStream;
@@ -35,7 +35,6 @@
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
-import org.richfaces.builder.config.ParsingException;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XMLBodyMerge.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/xml/XMLBodyMerge.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XMLBodyMerge.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.builder.xml;
+package org.richfaces.cdk.xmlutils;
import java.util.ArrayList;
import java.util.Collections;
@@ -34,7 +34,6 @@
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
-import org.richfaces.builder.config.ParsingException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XMLBodySerializer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/xml/XMLBodySerializer.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XMLBodySerializer.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.builder.xml;
+package org.richfaces.cdk.xmlutils;
import java.io.StringWriter;
@@ -30,7 +30,6 @@
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
-import org.richfaces.builder.config.ParsingException;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.NodeList;
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XPathComparator.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/builder/xml/XPathComparator.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/XPathComparator.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.builder.xml;
+package org.richfaces.cdk.xmlutils;
import java.util.Comparator;
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Attribute.java (from rev 15003, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Attribute.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Attribute.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Attribute.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -0,0 +1,35 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * 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.xmlutils.dtd;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Attribute extends Node{
+
+ public Attribute(String name) {
+ super(name);
+ }
+
+
+}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/DocumentDefinition.java (from rev 15003, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinition.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/DocumentDefinition.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/DocumentDefinition.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -0,0 +1,62 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * 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.xmlutils.dtd;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class DocumentDefinition {
+ private Map<String, Element> elements = new HashMap<String, Element>();
+
+ private URL url;
+
+ private Element rootElement;
+
+ public DocumentDefinition(URL url, Element rootElement) {
+ super();
+ this.url = url;
+ this.rootElement = rootElement;
+ }
+
+ public void addElement(Element e) {
+ elements.put(e.getName(), e);
+ }
+
+ public Element getElement(String name) {
+ return elements.get(name);
+ }
+
+ public URL getUrl() {
+ return url;
+ }
+
+ public Element getRootElement() {
+ return rootElement;
+ }
+
+
+}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/DocumentDefinitionFactory.java (from rev 15003, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinitionFactory.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/DocumentDefinitionFactory.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/DocumentDefinitionFactory.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * 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.xmlutils.dtd;
+
+import java.net.URL;
+
+import org.richfaces.cdk.xmlutils.dtd.wutka.WutkaDefinitionFactory;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public abstract class DocumentDefinitionFactory {
+
+ private static DocumentDefinitionFactory instance =
+ new WutkaDefinitionFactory();
+
+ public static DocumentDefinitionFactory instance() {
+ return instance;
+ }
+
+ public abstract DocumentDefinition getDocumentDefinition(URL resource);
+}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Element.java (from rev 15003, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Element.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Element.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Element.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * 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.xmlutils.dtd;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Element extends Node{
+
+ private Map<String, Attribute> attributes = new HashMap<String, Attribute>();
+
+ public Element(String name) {
+ super(name);
+ }
+
+ public void addAttribute(Attribute attribute) {
+ attributes.put(attribute.getName(), attribute);
+ }
+
+ public Map<String, Attribute> getAttributes() {
+ return attributes;
+ }
+
+
+}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Node.java (from rev 15003, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Node.java)
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Node.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/Node.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * 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.xmlutils.dtd;
+
+/**
+ * Reduced DOM
+ * @author Maksim Kaszynski
+ *
+ */
+public class Node {
+
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public Node(String name) {
+ super();
+ this.name = name;
+ }
+
+}
Copied: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/wutka (from rev 15003, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/wutka)
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/wutka/WutkaDefinitionFactory.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/wutka/WutkaDefinitionFactory.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/wutka/WutkaDefinitionFactory.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,19 +19,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.dtd.wutka;
+package org.richfaces.cdk.xmlutils.dtd.wutka;
import java.net.URL;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.richfaces.dtd.Attribute;
-import org.richfaces.dtd.DocumentDefinition;
-import org.richfaces.dtd.DocumentDefinitionFactory;
-import org.richfaces.dtd.Element;
+import org.richfaces.cdk.Logger;
+import org.richfaces.cdk.LoggerFactory;
+import org.richfaces.cdk.xmlutils.dtd.Attribute;
+import org.richfaces.cdk.xmlutils.dtd.DocumentDefinition;
+import org.richfaces.cdk.xmlutils.dtd.DocumentDefinitionFactory;
+import org.richfaces.cdk.xmlutils.dtd.Element;
import com.wutka.dtd.DTD;
import com.wutka.dtd.DTDAttribute;
@@ -44,7 +44,7 @@
*/
public class WutkaDefinitionFactory extends DocumentDefinitionFactory{
- private final Log log = LogFactory.getLog(this.getClass());
+ private final Logger log = LoggerFactory.getLogger();
private Map<URL, DocumentDefinition> definitions
= new HashMap<URL, DocumentDefinition>();
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -0,0 +1,143 @@
+/*
+ * $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.xmlutils.dtd.xerces;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.xerces.impl.Constants;
+import org.apache.xerces.parsers.XMLGrammarPreparser;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.grammars.Grammar;
+import org.apache.xerces.xni.grammars.XMLGrammarDescription;
+import org.apache.xerces.xni.grammars.XSGrammar;
+import org.apache.xerces.xni.parser.XMLInputSource;
+import org.apache.xerces.xs.XSModel;
+import org.richfaces.cdk.Logger;
+import org.richfaces.cdk.LoggerFactory;
+import org.richfaces.cdk.xmlutils.dtd.DocumentDefinition;
+import org.richfaces.cdk.xmlutils.dtd.DocumentDefinitionFactory;
+
+/**
+ * <p class="changed_added_4_0">
+ * That class implements {@link DocumentDefinitionFactory} that parses XML
+ * schema using Xerces Xml Schema API
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class XedrceDefinitionFactory extends DocumentDefinitionFactory {
+
+ private final Logger log = LoggerFactory.getLogger();
+ /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
+ public static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
+ /** Validation feature id (http://xml.org/sax/features/validation). */
+ public static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
+ /**
+ * Schema validation feature id
+ * (http://apache.org/xml/features/validation/schema).
+ */
+ public static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
+ /**
+ * Schema full checking feature id
+ * (http://apache.org/xml/features/validation/schema-full-checking).
+ */
+ public static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
+
+ // feature: continue-after-fatal-error
+ public final static String CONTINUE_AFTER_FATAL_ERROR = Constants.XERCES_FEATURE_PREFIX
+ + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
+ /** Property identifier: symbol table. */
+ public static final String SYMBOL_TABLE = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.SYMBOL_TABLE_PROPERTY;
+ /** Property identifier: error reporter. */
+ public static final String ERROR_REPORTER = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.ERROR_REPORTER_PROPERTY;
+ /** Property identifier: error handler. */
+ public static final String ERROR_HANDLER = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.ERROR_HANDLER_PROPERTY;
+ /** Property identifier: entity resolver. */
+ public static final String ENTITY_RESOLVER = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.ENTITY_RESOLVER_PROPERTY;
+ /** Property identifier: grammar pool . */
+ public static final String GRAMMAR_POOL = Constants.XERCES_PROPERTY_PREFIX
+ + Constants.XMLGRAMMAR_POOL_PROPERTY;
+
+ private Map<URL, DocumentDefinition> definitions = new HashMap<URL, DocumentDefinition>();
+
+ @Override
+ public synchronized DocumentDefinition getDocumentDefinition(URL resource) {
+ DocumentDefinition def = null;
+ if (definitions.containsKey(resource)) {
+ def = definitions.get(resource);
+ } else {
+
+ try {
+ def = initDefinition(resource);
+ } catch (Exception e) {
+ log.error("An error has occured", e);
+ }
+
+ if (def != null) {
+ definitions.put(resource, def);
+ }
+ }
+ return def;
+ }
+
+ public DocumentDefinition initDefinition(URL resource) {
+ XMLGrammarPreparser preparser = new XMLGrammarPreparser();
+ // preparser.registerPreparser(XMLGrammarDescription.XML_DTD, null);
+ preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
+
+ // preparser.setProperty(GRAMMAR_POOL, grammarPool);
+ preparser.setFeature(NAMESPACES_FEATURE_ID, true);
+ preparser.setFeature(VALIDATION_FEATURE_ID, true);
+ // note we can set schema features just in case...
+ preparser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
+ preparser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);
+
+ try {
+ Grammar g = preparser.preparseGrammar(
+ XMLGrammarDescription.XML_SCHEMA,
+ createInputSource(resource));
+ XSGrammar grammar = (XSGrammar) g;
+ XSModel model = grammar.toXSModel();
+ // TODO - make DocumentDefinition from XML schema.
+ } catch (XNIException e) {
+ log.error(e);
+ } catch (IOException e) {
+ log.error(e);
+ }
+ return null;
+ }
+
+ protected XMLInputSource createInputSource(URL resource) {
+ return new XMLInputSource(null, resource.toExternalForm(), null);
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlutils/dtd/xerces/XedrceDefinitionFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Attribute.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Attribute.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Attribute.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,35 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * 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.dtd;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public class Attribute extends Node{
-
- public Attribute(String name) {
- super(name);
- }
-
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinition.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinition.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinition.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,62 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * 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.dtd;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public class DocumentDefinition {
- private Map<String, Element> elements = new HashMap<String, Element>();
-
- private URL url;
-
- private Element rootElement;
-
- public DocumentDefinition(URL url, Element rootElement) {
- super();
- this.url = url;
- this.rootElement = rootElement;
- }
-
- public void addElement(Element e) {
- elements.put(e.getName(), e);
- }
-
- public Element getElement(String name) {
- return elements.get(name);
- }
-
- public URL getUrl() {
- return url;
- }
-
- public Element getRootElement() {
- return rootElement;
- }
-
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinitionFactory.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinitionFactory.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/DocumentDefinitionFactory.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * 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.dtd;
-
-import java.net.URL;
-
-import org.richfaces.dtd.wutka.WutkaDefinitionFactory;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public abstract class DocumentDefinitionFactory {
-
- private static DocumentDefinitionFactory instance =
- new WutkaDefinitionFactory();
-
- public static DocumentDefinitionFactory instance() {
- return instance;
- }
-
- public abstract DocumentDefinition getDocumentDefinition(URL resource);
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Element.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Element.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Element.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,48 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * 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.dtd;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public class Element extends Node{
-
- private Map<String, Attribute> attributes = new HashMap<String, Attribute>();
-
- public Element(String name) {
- super(name);
- }
-
- public void addAttribute(Attribute attribute) {
- attributes.put(attribute.getName(), attribute);
- }
-
- public Map<String, Attribute> getAttributes() {
- return attributes;
- }
-
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Node.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Node.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/dtd/Node.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * 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.dtd;
-
-/**
- * Reduced DOM
- * @author Maksim Kaszynski
- *
- */
-public class Node {
-
- private String name;
-
- public String getName() {
- return name;
- }
-
- public Node(String name) {
- super();
- this.name = name;
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/A4JRendererElementsFactory.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/A4JRendererElementsFactory.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/A4JRendererElementsFactory.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,175 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.builder.CompilationException;
-import org.richfaces.templatecompiler.elements.html.CDATAElement;
-import org.richfaces.templatecompiler.elements.html.CommentElement;
-import org.richfaces.templatecompiler.elements.html.PIElement;
-import org.richfaces.templatecompiler.elements.html.TextElement;
-import org.richfaces.templatecompiler.elements.vcp.AjaxRenderedAreaElement;
-import org.richfaces.templatecompiler.elements.vcp.HeaderScriptsElement;
-import org.richfaces.templatecompiler.elements.vcp.HeaderStylesElement;
-import org.w3c.dom.Node;
-
-/**
- * Tag processors factory.
- *
- * @author ayukhovich(a)exadel.com (latest modification by $Author:
- * maksimkaszynski $)
- * @version $Revision: 1.1.2.2 $ $Date: 2007/02/26 20:48:44 $
- *
- */
-public class A4JRendererElementsFactory implements ElementsFactory {
-
- private static final Log log = LogFactory.getLog(A4JRendererElementsFactory.class);
-
- public static final String TEMPLATES_PATH = "META-INF/templates";
-
- public static final String TEMPLATES_TEMPLATECOMPILER_PATH = TEMPLATES_PATH+"/templatecompiler";
-
- private final static String DEFAULT_CLASS_ELEMENT_PROCESSOR = "org.richfaces.templatecompiler.elements.html.HTMLElement";
-
- private final static Class[] paramClasses = new Class[] { Node.class,
- CompilationContext.class };
-
- private final static HashMap<String, String> mapClasses = new HashMap<String, String>();
-
- static {
- mapClasses
- .put("c:set",
- "org.richfaces.templatecompiler.elements.std.SetTemplateElement");
- mapClasses
- .put("c:object",
- "org.richfaces.templatecompiler.elements.std.ObjectTemplateElement");
- mapClasses.put("c:if",
- "org.richfaces.templatecompiler.elements.std.IFTemplateElement");
- mapClasses
- .put("c:forEach",
- "org.richfaces.templatecompiler.elements.std.ForEachTemplateElement");
- mapClasses
- .put("f:clientid",
- "org.richfaces.templatecompiler.elements.vcp.FClientIDTemplateElement");
- mapClasses
- .put("f:clientId",
- "org.richfaces.templatecompiler.elements.vcp.FClientIDTemplateElement");
- mapClasses.put("f:insertComponent",
- "org.richfaces.templatecompiler.elements.vcp.InsertComponent");
-
- mapClasses
- .put("f:call",
- "org.richfaces.templatecompiler.elements.vcp.FCallTemplateElement");
- mapClasses
- .put("f:resource",
- "org.richfaces.templatecompiler.elements.vcp.FResourceTemplateElement");
-
- mapClasses
- .put("u:insertFacet",
- "org.richfaces.templatecompiler.elements.vcp.UInsertFacetTemplateElement");
-
- mapClasses
- .put("vcp:body",
- "org.richfaces.templatecompiler.elements.vcp.VcpBodyTemplateElement");
- mapClasses.put("vcp:mock", "");
-
- mapClasses.put("jsp:scriptlet",
- "org.richfaces.templatecompiler.elements.jsp.Scriptlet");
- mapClasses.put("jsp:declaration",
- "org.richfaces.templatecompiler.elements.jsp.Declaration");
- mapClasses.put("jsp:directive.page",
- "org.richfaces.templatecompiler.elements.jsp.DirectivePage");
- mapClasses.put("jsp:expression",
- "org.richfaces.templatecompiler.elements.jsp.Expression");
- mapClasses.put("h:styles", HeaderStylesElement.class.getName());
- mapClasses.put("h:scripts", HeaderScriptsElement.class.getName());
- mapClasses.put("f:template", RootElement.class.getName());
- mapClasses.put("f:root", RootElement.class.getName());
- mapClasses.put("jsp:root", RootElement.class.getName());
- mapClasses.put("ajax:update", AjaxRenderedAreaElement.class.getName());
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.templatecompiler.elements.ElementsFactory#getProcessor(org.w3c.dom.Node, org.richfaces.templatecompiler.builder.CompilationContext)
- */
- public TemplateElement getProcessor(final Node nodeElement,
- final CompilationContext componentBean) throws CompilationException {
- TemplateElement returnValue = null;
-
- short nodeType = nodeElement.getNodeType();
- if (Node.CDATA_SECTION_NODE == nodeType) {
- returnValue =new CDATAElement(nodeElement, componentBean);
- } else if (Node.TEXT_NODE == nodeType) {
- returnValue =new TextElement(nodeElement, componentBean);
- } else if (Node.COMMENT_NODE == nodeType) {
- returnValue =new CommentElement(nodeElement, componentBean);
- } else if (Node.PROCESSING_INSTRUCTION_NODE == nodeType) {
- returnValue =new PIElement(nodeElement, componentBean);
- } else if (Node.ELEMENT_NODE == nodeType) {
- String className = (String) mapClasses.get(nodeElement.getNodeName());
-
- if (className == null) {
- className = DEFAULT_CLASS_ELEMENT_PROCESSOR;
- }
-
- if (!className.equals("")) {
- Class class1;
- try {
- log.debug("loading class: " + className);
-
- class1 = Class.forName(className);
- Object[] objects = new Object[2];
- objects[0] = nodeElement;
- objects[1] = componentBean;
-
- returnValue = (TemplateElement) class1.getConstructor(
- paramClasses).newInstance(objects);
- } catch (InstantiationException e) {
- throw new CompilationException("InstantiationException: "
- + e.getLocalizedMessage(), e);
- } catch (IllegalAccessException e) {
- throw new CompilationException("IllegalAccessException: "
- + e.getLocalizedMessage(), e);
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (SecurityException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- throw new CompilationException("InvocationTargetException: "
- + e.getMessage(), e);
- } catch (NoSuchMethodException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- throw new CompilationException(" error loading class: "
- + e.getLocalizedMessage());
- }
- }
- }
- return returnValue;
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/Attribute.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/Attribute.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/Attribute.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,40 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-/**
- * Interface for HTLM-attributes.
- *
- * @author ayukhovich(a)exadel.com (latest modification by $Author:
- * alexeyyukhovich $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/02/26 20:48:44 $
- *
- */
-public interface Attribute {
- public void copyValues(final Attribute src);
-
- public String getName();
-
- public String getValue();
-
- public String getCode();
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/BodyElement.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/BodyElement.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/BodyElement.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,31 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-/**
- * Marker interface for central body element ( for renderer, contain encodeChildren method content )
- * @author shura
- *
- */
-public interface BodyElement {
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/DeclarationElement.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/DeclarationElement.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/DeclarationElement.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,32 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-/**
- * Marker interdace for {@link TemplateElement} processed as declaration, outside
- * of encode... methods
- * @author shura
- *
- */
-public interface DeclarationElement {
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/ElementsArray.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/ElementsArray.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/ElementsArray.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,55 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.richfaces.templatecompiler.builder.CompilationException;
-
-/**
- * @author ayukhovich(a)exadel.com (latest modification by $Author:
- * alexeyyukhovich $)
- * @version $Revision: 1.1.2.3 $ $Date: 2007/02/26 20:48:45 $
- *
- */
-class ElementsArray extends ArrayList<TemplateElement> {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- public String toCode() throws CompilationException {
- StringBuffer buf = new StringBuffer();
-
- Iterator<TemplateElement> i = iterator();
- boolean hasNext = i.hasNext();
- while (hasNext) {
- TemplateElement o = i.next();
- if (o != null) {
- buf.append(o.toCode());
- }
- hasNext = i.hasNext();
- } // while
- return buf.toString();
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/ElementsFactory.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/ElementsFactory.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/ElementsFactory.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,37 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.builder.CompilationException;
-import org.w3c.dom.Node;
-
-/**
- * @author shura
- *
- */
-public interface ElementsFactory {
-
- public abstract TemplateElement getProcessor(final Node nodeElement,
- final CompilationContext componentBean) throws CompilationException;
-
-}
\ No newline at end of file
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/JSTLElementsFactory.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/JSTLElementsFactory.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/JSTLElementsFactory.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,43 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.builder.CompilationException;
-import org.w3c.dom.Node;
-
-/**
- * @author shura
- *
- */
-public class JSTLElementsFactory implements ElementsFactory {
-
- /* (non-Javadoc)
- * @see org.richfaces.templatecompiler.elements.ElementsFactory#getProcessor(org.w3c.dom.Node, org.richfaces.templatecompiler.builder.CompilationContext)
- */
- public TemplateElement getProcessor(Node nodeElement,
- CompilationContext componentBean) throws CompilationException {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/RootElement.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/RootElement.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/RootElement.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,196 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-import java.util.Iterator;
-import java.util.ListIterator;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.velocity.VelocityContext;
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.builder.CompilationException;
-import org.richfaces.templatecompiler.elements.vcp.VcpBodyTemplateElement;
-import org.w3c.dom.Node;
-
-/**
- * @author shura
- *
- */
-public class RootElement extends TemplateElementBase {
-
- private static final String TEMPLATE = A4JRendererElementsFactory.TEMPLATES_TEMPLATECOMPILER_PATH+"/ComponentTemplate.vm";
- private static final String ENCODE_BEGIN_TEMPLATE = A4JRendererElementsFactory.TEMPLATES_TEMPLATECOMPILER_PATH+"/EncodeBegin.vm";
- private static final String ENCODE_END_TEMPLATE = A4JRendererElementsFactory.TEMPLATES_TEMPLATECOMPILER_PATH+"/EncodeEnd.vm";
- private static final String ENCODE_CHILDREN_TEMPLATE = A4JRendererElementsFactory.TEMPLATES_TEMPLATECOMPILER_PATH+"/EncodeChildren.vm";
-
- final private static String regexComponent = "(.*)" + VcpBodyTemplateElement.STR_VCB_BODY + "(.*)"
- + VcpBodyTemplateElement.STR_VCB_BODY + "(.*)";
-
- final private static Pattern patternComponent = Pattern.compile(
- regexComponent, Pattern.UNIX_LINES + Pattern.DOTALL);
-
- /**
- * @param element
- * @param componentBean
- */
- public RootElement(Node element, CompilationContext componentBean) {
- super(element, componentBean);
- // TODO apply global attributes
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getBeginElement()
- */
- public String getBeginElement() throws CompilationException {
- VelocityContext context = new VelocityContext();
- context.put("component", this.getComponentBean());
- return this.getComponentBean().processTemplate(getTemplateName(), context);
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.templatecompiler.elements.TemplateElementBase#toCode()
- */
- public String toCode() throws CompilationException {
- VelocityContext context = new VelocityContext();
- context.put("component", this.getComponentBean());
- StringBuffer code = new StringBuffer();
- String beginElement = this.getBeginElement();
- if (null != beginElement) {
- code.append(beginElement);
- code.append("\n");
- }
- StringBuffer declarationsCode = new StringBuffer();
- StringBuffer methodCode = new StringBuffer();
- for (ListIterator<TemplateElement> iter = getSubElements().listIterator(); iter.hasNext();) {
- TemplateElement element = iter.next();
- String toCode = element.toCode();
- if(element instanceof DeclarationElement){
- declarationsCode.append(toCode);
- } /*else if(element instanceof BodyElement){
- // All collected code put to encodeBegin method.
- if (methodCode.length()>0) {
- context.put("body", methodCode.toString());
- code.append(this.getComponentBean().processTemplate(
- getEncodeBeginTemplateName(), context));
- }
- // If body contain any code, create encodeChildren method.
- if (toCode.length()>0) {
- context.put("body", toCode);
- code.append(this.getComponentBean().processTemplate(
- getEncodeChildrenTemplateName(), context));
- }
- methodCode = new StringBuffer();
- } */
- else {
- methodCode.append(toCode);
- }
- }
-
- if (methodCode.length()>0) {
-
- Matcher matcher = patternComponent.matcher(methodCode);
-
- String strEncodeBegin;
- String strEncodeChildren;
- String strEncodeEnd;
-
- if (matcher.find()) {
- strEncodeBegin = matcher.group(1);
- // put content before body element to encodeBegin
- if (strEncodeBegin.trim().length()>0) {
- context.put("body", strEncodeBegin);
- code.append(this.getComponentBean().processTemplate(
- getEncodeBeginTemplateName(), context));
- }
- strEncodeChildren = matcher.group(2);
- if (strEncodeChildren.trim().length()>0 ) {
- // put content of body element
- context.put("body", strEncodeChildren);
- code.append(this.getComponentBean().processTemplate(
- getEncodeChildrenTemplateName(), context));
- }
-
- strEncodeEnd = matcher.group(3);
- if(strEncodeEnd.trim().length()>0){
- // All code after body put to encodeEnd method.
- context.put("body", strEncodeEnd);
- code.append(this.getComponentBean().processTemplate(
- getEncodeEndTemplateName(), context));
- }
- } else {
- // All collected code put to encodeEnd method.
- context.put("body", methodCode.toString());
- code.append(this.getComponentBean().processTemplate(
- getEncodeEndTemplateName(), context));
- }
- }
- if(declarationsCode.length()>0){
- code.append(declarationsCode);
- }
- String endElement = this.getEndElement();
- if (endElement != null) {
- code.append(endElement);
- code.append("\n");
- }
- return code.toString();
- }
-
- /**
- * @return
- */
- protected String getEncodeBeginTemplateName() {
- return ENCODE_BEGIN_TEMPLATE;
- }
-
- /**
- * @return
- */
- protected String getEncodeEndTemplateName() {
- return ENCODE_END_TEMPLATE;
- }
- /**
- * @return
- */
- protected String getEncodeChildrenTemplateName() {
- return ENCODE_CHILDREN_TEMPLATE;
- }
- /**
- * @return
- */
- protected String getTemplateName() {
- return TEMPLATE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getEndElement()
- */
- public String getEndElement() throws CompilationException {
- // TODO Auto-generated method stub
- return "\n}";
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/TemplateElement.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/TemplateElement.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/TemplateElement.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,51 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-import java.util.ArrayList;
-
-import org.richfaces.templatecompiler.builder.CompilationException;
-
-/**
- * Intarace for tag processors.
- *
- * @author ayukhovich(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.2 $ $Date: 2007/02/26 20:48:43 $
- *
- */
-public interface TemplateElement {
- public String getBeginElement() throws CompilationException;
-
- public String getEndElement() throws CompilationException;
-
- public boolean isSkipBody();
-
- public void addSubElement(TemplateElement e);
-
- public String toCode() throws CompilationException;
-
- /**
- * @return the subElements
- */
- public ArrayList<TemplateElement> getSubElements();
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/TemplateElementBase.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/TemplateElementBase.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/TemplateElementBase.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,93 +0,0 @@
-/**
- * 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.templatecompiler.elements;
-
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.builder.CompilationException;
-import org.w3c.dom.Node;
-
-/**
- * Abstract base class for tag processors.
- *
- * @author ayukhovich(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.3 $ $Date: 2007/02/26 20:48:44 $
- */
-public abstract class TemplateElementBase implements TemplateElement {
-
-
- private CompilationContext componentBean;
-
- private ElementsArray subElements = new ElementsArray();
-
-
- public TemplateElementBase(final Node element,
- final CompilationContext componentBean) {
- this.componentBean = componentBean;
- };
-
- public boolean isSkipBody() {
- // by default, children process by compiler.
- return false;
- }
-
- public void addSubElement(TemplateElement e) {
- this.subElements.add(e);
- }
-
- public String toCode() throws CompilationException {
- StringBuffer buf = new StringBuffer();
-
- String beginElement = this.getBeginElement();
- if (null != beginElement) {
- buf.append(beginElement);
- buf.append("\n");
- }
-
- if (this.subElements.size() != 0) {
- buf.append(this.subElements.toCode());
- }
-
- String endElement = this.getEndElement();
- if (endElement != null) {
- buf.append(endElement);
- buf.append("\n");
- }
-
- return buf.toString();
- }
-
- /**
- * @return the componentBean
- */
- public CompilationContext getComponentBean() {
- return componentBean;
- }
-
- /**
- * @return the subElements
- */
- public ElementsArray getSubElements() {
- return this.subElements;
- }
-
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/CDATAElement.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/CDATAElement.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/CDATAElement.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,69 +0,0 @@
-/**
- * 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.templatecompiler.elements.html;
-
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.el.ELParser;
-import org.richfaces.templatecompiler.elements.TemplateElementBase;
-import org.w3c.dom.Node;
-
-/**
- * @author shura
- *
- */
-public class CDATAElement extends TemplateElementBase {
-
- private String htmlText;
-
- public CDATAElement(Node element, CompilationContext componentBean) {
- super(element, componentBean);
- this.htmlText = element.getNodeValue();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getBeginElement()
- */
- public String getBeginElement() {
- StringBuffer retValue = new StringBuffer();
- if ((null != this.htmlText) && (this.htmlText.length() > 0)) {
- retValue.append(" writer.write(\"<![CDATA[\");\n");
- retValue.append(" writer.write(convertToString(").append(
- ELParser.compileEL(this.htmlText, this.getComponentBean()))
- .append("));\n");
- retValue.append(" writer.write(\"]]>\");\n");
- }
- return retValue.toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getEndElement()
- */
- public String getEndElement() {
- // Do nothitg - text not have childs
- return null;
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/CommentElement.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/CommentElement.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/CommentElement.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,70 +0,0 @@
-/**
- * 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.templatecompiler.elements.html;
-
-import java.util.Formatter;
-
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.el.ELParser;
-import org.richfaces.templatecompiler.elements.TemplateElementBase;
-import org.w3c.dom.Node;
-
-/**
- * @author shura
- *
- */
-public class CommentElement extends TemplateElementBase {
-
- private String htmlText;
-
- public CommentElement(Node element, CompilationContext componentBean) {
- super(element, componentBean);
- this.htmlText = element.getNodeValue();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getBeginElement()
- */
- public String getBeginElement() {
- String retValue = null;
- if ((null != this.htmlText) && (this.htmlText.length() > 0)) {
- Object[] params = { ELParser.compileEL(this.htmlText, this.getComponentBean()) };
- retValue = new Formatter().format(
- "writer.writeComment(convertToString(%s));\n", params)
- .toString();
- }
- return retValue;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getEndElement()
- */
- public String getEndElement() {
- // Do nothitg - text not have childs
- return null;
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLAttributes.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLAttributes.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLAttributes.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,63 +0,0 @@
-/**
- * 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.templatecompiler.elements.html;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.richfaces.templatecompiler.elements.Attribute;
-
-/**
- * Processing HTLM-attributes.
- *
- * @author ayukhovich(a)exadel.com (latest modification by $Author:
- * alexeyyukhovich $)
- * @version $Revision: 1.1.2.2 $ $Date: 2007/02/26 20:48:41 $
- *
- */
-public class HTMLAttributes {
- private LinkedHashMap attributesMap = new LinkedHashMap();
-
-
- public void addAttribute(String nameAttribute, String valueAttribute) {
-
- Attribute attribute = HtmlAttributesFactory.getProcessor(
- nameAttribute, valueAttribute);
-
- if (attribute != null) {
- Attribute oldElemet = (Attribute) this.attributesMap.get(attribute
- .getName());
-
- if (oldElemet != null) {
- oldElemet.copyValues(attribute);
- } else {
- this.attributesMap.put(attribute.getName(), attribute);
- }
- } else {
- System.out.println("attribute is null");
- }
- }
-
- public Map getAttributes() {
- return this.attributesMap;
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLElement.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLElement.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLElement.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,187 +0,0 @@
-/**
- * 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.templatecompiler.elements.html;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Formatter;
-import java.util.List;
-import java.util.TreeSet;
-
-import org.apache.velocity.VelocityContext;
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.builder.CompilationException;
-import org.richfaces.templatecompiler.el.ELParser;
-import org.richfaces.templatecompiler.elements.A4JRendererElementsFactory;
-import org.richfaces.templatecompiler.elements.TemplateElementBase;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * Processing template HTLM-attributes.
- *
- * @author ayukhovich(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.3 $ $Date: 2007/02/26 20:48:42 $
- *
- */
-public class HTMLElement extends TemplateElementBase {
- final static private String PRE_TAG_NAME = "pre";
-
- private static final String PASS_THRU_ATTR = "x:passThruWithExclusions";
-
- private static final List<String> DEFAULT_EXCLUSIONS = Arrays.asList("class", "id");
-
- private static final String TEMPLATE = A4JRendererElementsFactory.TEMPLATES_TEMPLATECOMPILER_PATH
- + "/HTMLElement.vm";
-
- private String htmlTag;
-
- private String htmlText;
-
- private HTMLAttributes htmlAttributes = new HTMLAttributes();
-
- private Collection<String> passThruAttributes = null;
-
- private CompilationContext componentBean;
-
- /**
- *
- * @param element
- * @param variables
- */
- public HTMLElement(final Node element,
- final CompilationContext componentBean) {
- super(element, componentBean);
-
- this.passThruAttributes = null;
- this.htmlTag = element.getNodeName();
- this.componentBean = componentBean;
- processingAttributes(element.getAttributes());
- }
-
- /**
- * @return string contain
- * @throws CompilationException
- */
- public String getBeginElement() throws CompilationException {
- VelocityContext context = new VelocityContext();
- context.put("htmlTag", this.htmlTag);
- context.put("htmlAttributes", this.htmlAttributes.getAttributes());
- context.put("passThruAttributes", this.passThruAttributes);
- if (this.htmlText != null) {
- context.put("htmlText", this.htmlText);
- }
- return this.componentBean.processTemplate(getTemplateName(), context);
-
- }
-
- /**
- * @return
- */
- protected String getTemplateName() {
- // TODO Auto-generated method stub
- return TEMPLATE;
- }
-
- /**
- * @return
- */
- public String getEndElement() {
- String sReturnValue;
-
- Object[] objects = new Object[1];
- objects[0] = this.htmlTag;
-
- sReturnValue = new Formatter().format("writer.endElement(\"%s\");",
- objects).toString();
- return sReturnValue;
- }
-
- /**
- *
- * @param attributes
- */
- public void processingAttributes(NamedNodeMap attributes) {
- if (attributes == null) {
- return;
- }
-
- for (int iElement = 0; iElement != attributes.getLength(); iElement++) {
- Node attribute = attributes.item(iElement);
- String attributeName = attribute.getNodeName();
- String attributeValue = attribute.getNodeValue();
-
- if (attributeName.equals(PASS_THRU_ATTR)) {
- processingPassThruAtrribute(attributeValue);
- } else {
- this.htmlAttributes.addAttribute(attributeName, ELParser
- .compileEL(attributeValue, this.componentBean));
- }
-
- } // for
- }
-
- /**
- *
- * @param listPassThruAttributes
- */
- private void processingPassThruAtrribute(String listPassThruAttributes) {
-
- passThruAttributes =
- new TreeSet<String>(HTMLTags.getAttributes(this.htmlTag));
-
- String[] excludeAttributes = listPassThruAttributes.split(",");
-
- passThruAttributes.removeAll(DEFAULT_EXCLUSIONS);
-
- for (String attribute : excludeAttributes) {
- passThruAttributes.remove(attribute);
- }
-
- }
-
- /**
- * Set a body text for HTML-tag
- *
- * @param nodeText
- */
- public void setText(final String nodeText) {
- String tempStr = null;
- // if TAG is not PRE test do not trim
- if (nodeText.trim().length() != 0) {
- if (this.htmlTag.compareToIgnoreCase(PRE_TAG_NAME) == 0) {
- tempStr = nodeText;
- } else {
- tempStr = nodeText.trim();
- }
- }
-
- if (null != tempStr) {
- if (null == this.htmlText) {
- this.htmlText = ELParser.compileEL(tempStr, this.componentBean);
- } else {
- this.htmlText = this.htmlText
- + ELParser.compileEL(tempStr, this.componentBean);
- }
- }
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLTags.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLTags.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HTMLTags.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,107 +0,0 @@
-/**
- * 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.templatecompiler.elements.html;
-
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.net.URL;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.Map.Entry;
-
-import org.richfaces.dtd.DocumentDefinition;
-import org.richfaces.dtd.DocumentDefinitionFactory;
-import org.richfaces.dtd.Element;
-
-
-/**
- * @author yukhovich
- * @author Maksim Kaszynski
- */
-public class HTMLTags {
- /**
- *
- */
-
- private static final String HTML_SCHEMA = "META-INF/schema/html/xhtml1-transitional.dtd";
-
- private static final URL HTML_DTD = HTMLTags.class.getClassLoader().getResource(HTML_SCHEMA);
-
- @SuppressWarnings("unchecked")
- public static Set<String> getAttributes(String tagName) {
- Set<String> atrs = Collections.emptySet();
-
- DocumentDefinition dtd =
- DocumentDefinitionFactory.instance().getDocumentDefinition(HTML_DTD);
-
- if (dtd != null) {
- Element element = dtd.getElement(tagName);
-
- if (element != null) {
- atrs = element.getAttributes().keySet();
- }
- }
-
- return atrs;
-
- }
-
- /**
- * Look for tags.bin, and compare with it
- * @param args
- * @throws Exception
- */
- public static void main(String [] args) throws Exception{
- InputStream stream = HTMLTags.class.getClassLoader().getResourceAsStream("META-INF/templates/templatecompiler/tags.bin");
-
- ObjectInputStream stream2 = new ObjectInputStream(stream);
-
- @SuppressWarnings("unchecked")
- Map<String, List<String>> m =
- (Map<String, List<String>>) stream2.readObject();
-
- Set<String> newAttrs = new TreeSet<String>();
-
- Set<Entry<String,List<String>>> entrySet = m.entrySet();
- for (Entry<String, List<String>> entry : entrySet) {
- String element = entry.getKey();
-
- Set<String> attributes = HTMLTags.getAttributes(element);
- List<String> attributeList = entry.getValue();
-
- if (attributeList != null && attributes != null) {
- attributes.removeAll(attributeList);
- }
- newAttrs.addAll(attributes);
-
- System.out.println(element + attributes);
-
- }
-
- System.out.println(newAttrs);
- }
-
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HtmlAttributesFactory.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HtmlAttributesFactory.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/HtmlAttributesFactory.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,93 +0,0 @@
-/**
- * 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.templatecompiler.elements.html;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-
-import org.richfaces.templatecompiler.elements.Attribute;
-
-/**
- * Factory for processing HTLM-attributes.
- *
- * @author ayukhovich(a)exadel.com (latest modification by $Author:
- * alexeyyukhovich $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/02/26 20:48:42 $
- *
- */
-public class HtmlAttributesFactory {
- private final static String DEFAULT_CLASS_ATTRIBUTE_PROCESSOR = "org.richfaces.templatecompiler.elements.html.attribute.HtmlAttribute";
-
- private final static Class[] paramClasses = new Class[] { String.class,
- String.class };
-
- private final static HashMap mapClasses = new HashMap();
-
- static {
- // mapClasses.put("x:passThruWithExclusions",
- // "org.richfaces.templatecompiler.elements.html.attribute.PassThruWithExclusions");
- mapClasses.put("x:otherParameters", "");
- }
-
- public static Attribute getProcessor(String attributeName,
- String attributeValue) {
- Attribute returnValue = null;
-
- String className = (String) mapClasses.get(attributeName);
-
- if (className == null) {
- className = DEFAULT_CLASS_ATTRIBUTE_PROCESSOR;
- }
-
- if (!className.equals("")) {
- Class class1;
- try {
- class1 = Class.forName(className);
- try {
- try {
- Object[] objects = new Object[2];
- objects[0] = attributeName;
- objects[1] = attributeValue;
- returnValue = (Attribute) class1.getConstructor(
- paramClasses).newInstance(objects);
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (SecurityException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- } catch (NoSuchMethodException e) {
- e.printStackTrace();
- }
- } catch (ClassNotFoundException e1) {
- e1.printStackTrace();
- }
- }
-
- return returnValue;
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/PIElement.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/PIElement.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/PIElement.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,68 +0,0 @@
-/**
- * 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.templatecompiler.elements.html;
-
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.el.ELParser;
-import org.richfaces.templatecompiler.elements.TemplateElementBase;
-import org.w3c.dom.Node;
-
-/**
- * @author shura
- *
- */
-public class PIElement extends TemplateElementBase {
-
- private String htmlText;
-
- public PIElement(Node element, CompilationContext componentBean) {
- super(element, componentBean);
- this.htmlText = element.getNodeValue();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getBeginElement()
- */
- public String getBeginElement() {
- StringBuffer retValue = new StringBuffer();
- if ((null != this.htmlText) && (this.htmlText.length() > 0)) {
- retValue.append(" writer.write(\"<![CDATA[\");\n");
- retValue.append(" writer.write(").append(
- ELParser.compileEL(this.htmlText, this.getComponentBean())).append(");\n");
- retValue.append(" writer.write(\"]]>\");\n");
- }
- return null; // retValue.toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getEndElement()
- */
- public String getEndElement() {
- // Do nothitg - text not have childs
- return null;
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/TextElement.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/TextElement.java 2009-07-24 19:18:42 UTC (rev 15011)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/templatecompiler/elements/html/TextElement.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -1,70 +0,0 @@
-/**
- * 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.templatecompiler.elements.html;
-
-import java.util.Formatter;
-
-import org.richfaces.templatecompiler.builder.CompilationContext;
-import org.richfaces.templatecompiler.el.ELParser;
-import org.richfaces.templatecompiler.elements.TemplateElementBase;
-import org.w3c.dom.Node;
-
-/**
- * @author shura
- *
- */
-public class TextElement extends TemplateElementBase {
-
- private String htmlText;
-
- public TextElement(Node element, CompilationContext componentBean) {
- super(element, componentBean);
- this.htmlText = element.getNodeValue().trim();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getBeginElement()
- */
- public String getBeginElement() {
- String retValue = null;
- if ((null != this.htmlText) && (this.htmlText.length() > 0)) {
- Object[] params = { ELParser.compileEL(this.htmlText, this.getComponentBean()) };
- retValue = new Formatter().format(
- "writer.writeText(convertToString(%s),null);\n", params)
- .toString();
- }
- return retValue;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.richfaces.templatecompiler.elements.TemplateElement#getEndElement()
- */
- public String getEndElement() {
- // Do nothitg - text not have childs
- return null;
- }
-
-}
Copied: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils (from rev 15003, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/builder/xml)
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyMergeTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/builder/xml/XMLBodyMergeTest.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyMergeTest.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,9 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.builder.xml;
+package org.richfaces.cdk.xmlutils;
-import org.richfaces.builder.xml.XMLBodyMerge;
+import org.richfaces.cdk.xmlutils.XMLBodyMerge;
import junit.framework.TestCase;
@@ -46,7 +46,7 @@
}
/**
- * Test method for {@link org.richfaces.builder.xml.XMLBodyMerge#add(org.w3c.dom.Node)}.
+ * Test method for {@link org.richfaces.cdk.xmlutils.XMLBodyMerge#add(org.w3c.dom.Node)}.
*/
public void testAddNode() {
XMLBodyMerge merge = new XMLBodyMerge("//node()");
@@ -54,28 +54,28 @@
}
/**
- * Test method for {@link org.richfaces.builder.xml.XMLBodyMerge#add(org.richfaces.builder.xml.XMLBody)}.
+ * Test method for {@link org.richfaces.cdk.xmlutils.XMLBodyMerge#add(org.richfaces.cdk.xmlutils.XMLBody)}.
*/
public void testAddXMLBody() {
//fail("Not yet implemented");
}
/**
- * Test method for {@link org.richfaces.builder.xml.XMLBodyMerge#getLength()}.
+ * Test method for {@link org.richfaces.cdk.xmlutils.XMLBodyMerge#getLength()}.
*/
public void testGetLength() {
//fail("Not yet implemented");
}
/**
- * Test method for {@link org.richfaces.builder.xml.XMLBodyMerge#item(int)}.
+ * Test method for {@link org.richfaces.cdk.xmlutils.XMLBodyMerge#item(int)}.
*/
public void testItem() {
//fail("Not yet implemented");
}
/**
- * Test method for {@link org.richfaces.builder.xml.XMLBodyMerge#getContent()}.
+ * Test method for {@link org.richfaces.cdk.xmlutils.XMLBodyMerge#getContent()}.
*/
public void testGetContent() {
//fail("Not yet implemented");
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodySerializerTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/builder/xml/XMLBodySerializerTest.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodySerializerTest.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.builder.xml;
+package org.richfaces.cdk.xmlutils;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
@@ -28,8 +28,8 @@
import javax.xml.parsers.DocumentBuilderFactory;
import org.richfaces.builder.config.ParsingException;
-import org.richfaces.builder.xml.XMLBody;
-import org.richfaces.builder.xml.XMLBodySerializer;
+import org.richfaces.cdk.xmlutils.XMLBody;
+import org.richfaces.cdk.xmlutils.XMLBodySerializer;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -61,7 +61,7 @@
}
/**
- * Test method for {@link org.richfaces.builder.xml.XMLBodySerializer#serialize(org.w3c.dom.NodeList, org.w3c.dom.Document)}.
+ * Test method for {@link org.richfaces.cdk.xmlutils.XMLBodySerializer#serialize(org.w3c.dom.NodeList, org.w3c.dom.Document)}.
*/
public void testSerialize() throws ParsingException{
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/builder/xml/XMLBodyTest.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XMLBodyTest.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.builder.xml;
+package org.richfaces.cdk.xmlutils;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
@@ -28,7 +28,7 @@
import junit.framework.TestCase;
import org.richfaces.builder.config.ParsingException;
-import org.richfaces.builder.xml.XMLBody;
+import org.richfaces.cdk.xmlutils.XMLBody;
/**
* @author shura
@@ -56,7 +56,7 @@
/**
* Test method for
- * {@link org.richfaces.builder.xml.XMLBody#loadXML(java.io.InputStream)}.
+ * {@link org.richfaces.cdk.xmlutils.XMLBody#loadXML(java.io.InputStream)}.
*
* @throws ParsingException
*/
@@ -80,7 +80,7 @@
/**
* Test method for
- * {@link org.richfaces.builder.xml.XMLBody#isRootName(java.lang.String)}.
+ * {@link org.richfaces.cdk.xmlutils.XMLBody#isRootName(java.lang.String)}.
*
* @throws ParsingException
*/
@@ -98,7 +98,7 @@
}
/**
- * Test method for {@link org.richfaces.builder.xml.XMLBody#getDoctype()}.
+ * Test method for {@link org.richfaces.cdk.xmlutils.XMLBody#getDoctype()}.
*
* @throws ParsingException
*/
@@ -118,7 +118,7 @@
/**
* Test method for
- * {@link org.richfaces.builder.xml.XMLBody#getRootNameSpace()}.
+ * {@link org.richfaces.cdk.xmlutils.XMLBody#getRootNameSpace()}.
*
* @throws ParsingException
*/
@@ -133,7 +133,7 @@
}
/**
- * Test method for {@link org.richfaces.builder.xml.XMLBody#getContent()}.
+ * Test method for {@link org.richfaces.cdk.xmlutils.XMLBody#getContent()}.
*
* @throws ParsingException
*/
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XPathComparatorTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/builder/xml/XPathComparatorTest.java 2009-07-24 13:21:35 UTC (rev 15003)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlutils/XPathComparatorTest.java 2009-07-24 19:41:59 UTC (rev 15012)
@@ -19,13 +19,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.builder.xml;
+package org.richfaces.cdk.xmlutils;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
-import org.richfaces.builder.xml.XMLBody;
-import org.richfaces.builder.xml.XPathComparator;
+import org.richfaces.cdk.xmlutils.XMLBody;
+import org.richfaces.cdk.xmlutils.XPathComparator;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
15 years, 5 months
JBoss Rich Faces SVN: r15011 - in root/framework/trunk: api/src/test/java/org/ajax4jsf/framework and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-07-24 15:18:42 -0400 (Fri, 24 Jul 2009)
New Revision: 15011
Removed:
root/framework/trunk/api/src/test/java/org/ajax4jsf/framework/util/
root/framework/trunk/api/src/test/java/org/richfaces/
Modified:
root/framework/trunk/impl/pom.xml
root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
root/framework/trunk/impl/src/test/resources/log4j.xml
Log:
- framework/impl tests switched to log4j-over-slf4j logger
- added debug statements to AbstractBaseResource
Modified: root/framework/trunk/impl/pom.xml
===================================================================
--- root/framework/trunk/impl/pom.xml 2009-07-24 18:33:17 UTC (rev 15010)
+++ root/framework/trunk/impl/pom.xml 2009-07-24 19:18:42 UTC (rev 15011)
@@ -170,7 +170,7 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
+ <artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2009-07-24 18:33:17 UTC (rev 15010)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2009-07-24 19:18:42 UTC (rev 15011)
@@ -102,17 +102,31 @@
if (classLoader != null) {
URL classResource = classLoader.getResource(thisClass.getName().replace('.', '/') + ".class");
- URLConnection connection;
- try {
- connection = classResource.openConnection();
- connection.setUseCaches(false);
- long classLastModifiedDate = connection.getLastModified();
- if (classLastModifiedDate > 0) {
- lastModified = new Date(classLastModifiedDate);
+ if (classResource != null) {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(MessageFormat.format("Located source for the resource class: {0}", classResource));
}
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+
+ URLConnection connection;
+ try {
+ connection = classResource.openConnection();
+ connection.setUseCaches(false);
+ long classLastModifiedDate = connection.getLastModified();
+ if (classLastModifiedDate > 0) {
+ lastModified = new Date(classLastModifiedDate);
+
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(MessageFormat.format("Last source modification date is: {0,date}", lastModified));
+ }
+ }
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ } else {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Source for the resource class has not been located");
+ }
}
}
}
@@ -122,6 +136,10 @@
if (lastModified == null) {
lastModified = (Date) ApplicationContext.getInstance(context).
getAttribute(ResourceHandlerImpl.HANDLER_START_TIME_ATTRIBUTE);
+
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(MessageFormat.format("Using resource handler start time as last modified date: {0,date}", lastModified));
+ }
}
return lastModified;
Modified: root/framework/trunk/impl/src/test/resources/log4j.xml
===================================================================
--- root/framework/trunk/impl/src/test/resources/log4j.xml 2009-07-24 18:33:17 UTC (rev 15010)
+++ root/framework/trunk/impl/src/test/resources/log4j.xml 2009-07-24 19:18:42 UTC (rev 15011)
@@ -25,7 +25,7 @@
-->
<appender name="DEFAULT" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%t %-5p %c{2} - %m:%n"/>
+ <param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} [%c] %C %M %n%-5p: %m%n" />
</layout>
</appender>
@@ -62,7 +62,7 @@
<appender-ref ref="DEFAULT"/>
</category>
- <category name="com.exadel.vcp">
+ <category name="org.richfaces">
<priority value="DEBUG" />
<appender-ref ref="DEFAULT"/>
</category>
15 years, 5 months
JBoss Rich Faces SVN: r15010 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-07-24 14:33:17 -0400 (Fri, 24 Jul 2009)
New Revision: 15010
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.xml
Log:
RF-7586: rich:comboBox component description review
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml 2009-07-24 18:19:00 UTC (rev 15009)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml 2009-07-24 18:33:17 UTC (rev 15010)
@@ -3,14 +3,14 @@
<sectioninfo>
<keywordset>
<keyword>rich:comboBox</keyword>
- </keywordset>
+ </keywordset>
<releaseinfo>3.2.0</releaseinfo>
</sectioninfo>
<section>
<title>Description</title>
- <para>The <emphasis role="bold">
- <property><rich:comboBox></property>
- </emphasis> is a component, that provides editable combo box element on a page.</para>
+ <para>
+ The <emphasis role="bold"><property><rich:comboBox></property></emphasis> is a component creates combobox element with built-in Ajax capability.
+ </para>
<figure>
<title><emphasis role="bold"><property><rich:comboBox></property></emphasis> component</title>
<mediaobject>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.xml 2009-07-24 18:19:00 UTC (rev 15009)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/comboBox.xml 2009-07-24 18:33:17 UTC (rev 15010)
@@ -43,18 +43,12 @@
<section>
<title>Creating the Component with a Page Tag</title>
<para>Here is a simple example as it could be used on a page: </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
<programlisting role="XML"><![CDATA[...
<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" />
...]]></programlisting>
</section>
<section>
<title>Creating the Component Dynamically Using Java</title>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlComboBox;
...
HtmlComboBox myComboBox = new HtmlComboBox();
@@ -86,9 +80,6 @@
<itemizedlist>
<listitem>
<para>Using the <emphasis><property>"suggestionValues"</property></emphasis> attribute, that defines the suggestion collection</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
<programlisting role="XML"><![CDATA[...
<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" />
...]]></programlisting>
@@ -98,9 +89,7 @@
Using the <emphasis role="bold"><property><f:selectItem /></property></emphasis> or <emphasis role="bold">
<property><f:selectItems /></property></emphasis> JSF components.
</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+
<programlisting role="XML"><![CDATA[...
<rich:comboBox value="#{bean.state}" valueChangeListener="#{bean.selectionChanged}">
<f:selectItems value="#{bean.selectItems}"/>
@@ -127,9 +116,7 @@
The <emphasis><property> "directInputSuggestions"</property></emphasis> attribute defines, how the first value from the suggested one appears in an input field.
If it's "true" the first value appears with the suggested part highlighted.
</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+
<programlisting role="XML"><![CDATA[...
<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" directInputSuggestions="true" />
...]]></programlisting>
@@ -149,9 +136,7 @@
The <emphasis><property> "selectFirstOnUpdate"</property></emphasis> attribute defines if the first value from suggested is selected in a popup list.
If it's "false" nothing is selected in the list before a user hovers some item with the mouse.
</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+
<programlisting role="XML"><![CDATA[...
<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" selectFirstOnUpdate="false" />
...]]></programlisting>
@@ -175,9 +160,7 @@
<para>
The <emphasis><property>"defaultLabel"</property></emphasis> attribute defines the default label of the input element. Simple example is placed below.
</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+
<programlisting role="XML"><![CDATA[...
<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" defaultLabel="Select a city..." />
...]]></programlisting>
@@ -197,9 +180,7 @@
With the help of the <emphasis><property>"disabled"</property></emphasis> attribute you can disable the whole
<emphasis role="bold"><property><rich:comboBox></property></emphasis> component. See the following example.
</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+
<programlisting role="XML"><![CDATA[...
<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" defaultLabel="Select a city..." disabled="true" />
...]]></programlisting>
@@ -215,18 +196,8 @@
</mediaobject>
</figure>
<para>
- The
- <emphasis>
- <property>
- "enableManualInput"
- </property>
- </emphasis>
- attribute enables/disables input field, so when
- <code>
- enableManualInput = "false"
- </code>,
- user can only pick the value manually and has no possibility to type in the value
- (default value is "false").
+ The <emphasis><property>"enableManualInput"</property></emphasis> attribute enables/disables input field, so when <code>enableManualInput = "false"</code>,
+ user can only pick the value manually and has no possibility to type in the value (default value is "false").
</para>
<!--para>
The <emphasis role="bold"><property><rich:comboBox></property></emphasis> component provides the possibility to use
@@ -944,8 +915,7 @@
<section>
<title>Relevant Resources Links</title>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/comboBox.jsf?c=comboBox">On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold"><property><rich:comboBox></property></emphasis> usage
- and sources for the given example.
- </para>
+ Visit the <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/comboBox.jsf?c=comboBox">ComboBox page</ulink> at RichFaces LiveDemo for examples of component usage and their sources.
+ </para>
</section>
</section>
\ No newline at end of file
15 years, 5 months
JBoss Rich Faces SVN: r15009 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-07-24 14:19:00 -0400 (Fri, 24 Jul 2009)
New Revision: 15009
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.xml
Log:
RF-7588: rich:contextMenu component description review
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.desc.xml 2009-07-24 17:55:06 UTC (rev 15008)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.desc.xml 2009-07-24 18:19:00 UTC (rev 15009)
@@ -7,11 +7,10 @@
</sectioninfo>
<section>
<title>Description</title>
- <para>The <emphasis role="bold">
- <property><rich:contextMenu></property>
- </emphasis> component is used for creation multileveled
- context menus that are activated after a user defines an event (<emphasis><property>"onmouseover"</property></emphasis>, <emphasis><property>"onclick"</property></emphasis>,
- etc.) on any element on the page.</para>
+ <para>
+ The <emphasis role="bold"><property><rich:contextMenu></property></emphasis> component is used for creation of multilevelled context menus that are activated after defined events like <emphasis><property>"onmouseover"</property></emphasis>, <emphasis><property>"onclick"</property></emphasis> etc.
+ The component could be applied to any element on the page.
+ </para>
<figure>
<title><emphasis role="bold">
<property><rich:contextMenu></property>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.xml 2009-07-24 17:55:06 UTC (rev 15008)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.xml 2009-07-24 18:19:00 UTC (rev 15009)
@@ -42,18 +42,13 @@
<section>
<title>Creating the Component with a Page Tag</title>
<para>To create the simplest variant on a page use the following syntax:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
<programlisting role="XML"><![CDATA[...
<rich:contextMenu event="oncontextmenu" attached="true">
...]]></programlisting>
</section>
<section>
- <title>Creating the Component Dynamically Using Java</title>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+
+ <title>Creating the Component Dynamically Using Java</title>
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.ContextMenu;
...
html.ContextMenu myContextMenu = new html.ContextMenu();
@@ -94,24 +89,24 @@
component is attached to the parent component or to the component, which
<emphasis><property>"id"</property></emphasis> is specified in the
<emphasis><property>"attachTo"</property></emphasis> attribute.
- An example is placed below.</para>
+ </para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
<rich:contextMenu event="oncontextmenu" attachTo="pic1" submitMode="none">
- <rich:menuItem value="Zoom In" onclick="enlarge();" id="zin"/>
- <rich:menuItem value="Zoom Out" onclick="decrease();" id="zout"/>
+ <rich:menuItem value="Zoom In" onclick="enlarge();" id="zin"/>
+ <rich:menuItem value="Zoom Out" onclick="decrease();" id="zout"/>
</rich:contextMenu>
<h:panelGrid columns="1" columnClasses="cent">
- <h:panelGroup id="picture">
- <h:graphicImage value="/richfaces/jQuery/images/pic1.png" id="pic"/>
- </h:panelGroup>
+ <h:panelGroup id="picture">
+ <h:graphicImage value="/richfaces/jQuery/images/pic1.png" id="pic"/>
+ </h:panelGroup>
</h:panelGrid>
<h:panelGrid columns="1" columnClasses="cent">
- <h:panelGroup id="picture1">
- <h:graphicImage value="/richfaces/jQuery/images/pic2.png" id="pic1"/>
- </h:panelGroup>
+ <h:panelGroup id="picture1">
+ <h:graphicImage value="/richfaces/jQuery/images/pic2.png" id="pic1"/>
+ </h:panelGroup>
</h:panelGrid>
...]]></programlisting>
<para>The <code>"enlarge()"</code> and
@@ -171,60 +166,54 @@
<para id="ex">
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[...
-<h:form id="form">
- <rich:contextMenu attached="false" id="menu" submitMode="ajax">
- <rich:menuItem ajaxSingle="true">
- <b>{car} {model}</b> details
- <a4j:actionparam name="det" assignTo="#{ddmenu.current}" value="{car} {model} details"/>
- </rich:menuItem>
- <rich:menuGroup value="Actions">
- <rich:menuItem ajaxSingle="true">
- Put <b>{car} {model}</b> To Basket
- <a4j:actionparam name="bask" assignTo="#{ddmenu.current}" value="Put {car} {model} To Basket"/>
- </rich:menuItem>
- <rich:menuItem value="Read Comments" ajaxSingle="true">
- <a4j:actionparam name="bask" assignTo="#{ddmenu.current}" value="Read Comments"/>
- </rich:menuItem>
- <rich:menuItem ajaxSingle="true">
- Go to <b>{car}</b> site
- <a4j:actionparam name="bask" assignTo="#{ddmenu.current}" value="Go to {car} site"/>
- </rich:menuItem>
- </rich:menuGroup>
- </rich:contextMenu>
+ <programlisting role="XML"><![CDATA[<h:form id="form">
+ <rich:contextMenu attached="false" id="menu" submitMode="ajax">
+ <rich:menuItem ajaxSingle="true">
+ <b>{car} {model}</b> details
+ <a4j:actionparam name="det" assignTo="#{ddmenu.current}" value="{car} {model} details"/>
+ </rich:menuItem>
+ <rich:menuGroup value="Actions">
+ <rich:menuItem ajaxSingle="true">
+ Put <b>{car} {model}</b> To Basket
+ <a4j:actionparam name="bask" assignTo="#{ddmenu.current}" value="Put {car} {model} To Basket"/>
+ </rich:menuItem>
+ <rich:menuItem value="Read Comments" ajaxSingle="true">
+ <a4j:actionparam name="bask" assignTo="#{ddmenu.current}" value="Read Comments"/>
+ </rich:menuItem>
+ <rich:menuItem ajaxSingle="true">
+ Go to <b>{car}</b> site
+ <a4j:actionparam name="bask" assignTo="#{ddmenu.current}" value="Go to {car} site"/>
+ </rich:menuItem>
+ </rich:menuGroup>
+ </rich:contextMenu>
- <h:panelGrid columns="2">
- <rich:dataTable value="#{dataTableScrollerBean.tenRandomCars}" var="car" id="table"
- onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
- onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" rowClasses="cur">
- <rich:column>
- <f:facet name="header">Make</f:facet>
- <h:outputText value="#{car.make}"/>
- </rich:column>
- <rich:column>
- <f:facet name="header">Model</f:facet>
- <h:outputText value="#{car.model}"/>
- </rich:column>
- <rich:column>
- <f:facet name="header">Price</f:facet>
- <h:outputText value="#{car.price}" />
- </rich:column>
-
- <rich:componentControl event="onRowClick" for="menu" operation="show">
- <f:param value="#{car.model}" name="model"/>
- <f:param value="#{car.make}" name="car"/>
- </rich:componentControl>
- </rich:dataTable>
-
- <a4j:outputPanel ajaxRendered="true">
- <rich:panel>
- <f:facet name="header">Last Menu Action</f:facet>
- <h:outputText value="#{ddmenu.current}"></h:outputText>
- </rich:panel>
- </a4j:outputPanel>
- </h:panelGrid>
- </h:form>
- ...]]></programlisting>
+ <h:panelGrid columns="2">
+ <rich:dataTable value="#{dataTableScrollerBean.tenRandomCars}" var="car" id="table" onRowMouseOver="this.style.backgroundColor='#F8F8F8'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" rowClasses="cur">
+ <rich:column>
+ <f:facet name="header">Make</f:facet>
+ <h:outputText value="#{car.make}"/>
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">Model</f:facet>
+ <h:outputText value="#{car.model}"/>
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">Price</f:facet>
+ <h:outputText value="#{car.price}" />
+ </rich:column>
+ <rich:componentControl event="onRowClick" for="menu" operation="show">
+ <f:param value="#{car.model}" name="model"/>
+ <f:param value="#{car.make}" name="car"/>
+ </rich:componentControl>
+ </rich:dataTable>
+ <a4j:outputPanel ajaxRendered="true">
+ <rich:panel>
+ <f:facet name="header">Last Menu Action</f:facet>
+ <h:outputText value="#{ddmenu.current}"></h:outputText>
+ </rich:panel>
+ </a4j:outputPanel>
+ </h:panelGrid>
+</h:form>]]></programlisting>
<para>This is a result:</para>
<figure>
<title>The <emphasis>
@@ -300,37 +289,27 @@
</emphasis> item's attributes are ignored. Menu items don't fire any submits
themselves. The behavior is fully defined by the components nested inside items.</para>
- <note><title>Note:</title><para> As the <emphasis role="bold">
- <property><rich:contextMenu></property>
- </emphasis> component doesn't provide its own form, use it between
- <emphasis role="bold">
- <property><h:form></property>
- </emphasis> and <emphasis role="bold">
- <property></h:form></property>
- </emphasis> tags.</para></note>
-
<note>
- <title>Note:</title>
- <para>When using
- <emphasis role="bold">
- <property><rich:contextMenu></property>
- </emphasis> component with
- <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis> JSF component, specify id for
- <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis> or move
- <emphasis role="bold">
- <property><rich:contextMenu></property>
- </emphasis> out from
- <emphasis role="bold">
- <property><h:outputText></property>
- </emphasis>to provide component's correct work.
- </para>
+ <title>Notes:</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ When nesting <emphasis role="bold"><property><rich:contextMenu></property></emphasis> into JSF <emphasis role="bold"><property><h:outputText></property></emphasis>,
+ specify an <code>id</code> for <emphasis role="bold"><property><h:outputText></property></emphasis>, otherwise, do not nest the <emphasis role="bold"><property><rich:contextMenu></property></emphasis> to make it work properly.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ As the <emphasis role="bold"><property><rich:contextMenu></property></emphasis> component doesn't provide its own form,
+ use it between <emphasis role="bold"><property><h:form></property></emphasis> and <emphasis role="bold"><property></h:form></property></emphasis> tags.
+ </para>
+ </listitem>
+ </itemizedlist>
</note>
-
<!-- <para>It's possible to handle events for contextMenu from JavaScript code. A simplest example of usage JavaScript API is placed below:</para>
<para>
@@ -658,11 +637,9 @@
<section>
<title>Relevant Resources Links</title>
- <para><ulink
- url="http://livedemo.exadel.com/richfaces-demo/richfaces/contextMenu.jsf?c=con..."
- >On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold">
- <property><rich:contextMenu></property>
- </emphasis> usage and sources for the given example. </para>
+ <para>
+ Visit the <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/contextMenu.jsf?c=con...">ContextMenu page</ulink> at RichFaces LiveDemo fro examples of component usage and their sources.
+ </para>
</section>
</section>
15 years, 5 months
JBoss Rich Faces SVN: r15008 - branches/community/3.3.X/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-07-24 13:55:06 -0400 (Fri, 24 Jul 2009)
New Revision: 15008
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/resources/images/calendar_init.png
Log:
RF-7532: rich:calendar component description review
Modified: branches/community/3.3.X/docs/userguide/en/src/main/resources/images/calendar_init.png
===================================================================
(Binary files differ)
15 years, 5 months