Author: alexsmirnov
Date: 2010-05-19 19:16:19 -0400 (Wed, 19 May 2010)
New Revision: 17150
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionAdapter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionBean.java
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacesConfigBean.java
Log:
OPEN - issue RF-8363: Functions support
https://jira.jboss.org/browse/RF-8363
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacesConfigBean.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacesConfigBean.java 2010-05-19
23:04:01 UTC (rev 17149)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacesConfigBean.java 2010-05-19
23:16:19 UTC (rev 17150)
@@ -242,6 +242,7 @@
* @return the functions
*/
@XmlElement(name = "function", namespace =
ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ @XmlJavaTypeAdapter(FunctionAdapter.class)
public List<FunctionModel> getFunctions() {
return this.functions;
}
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionAdapter.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionAdapter.java
(rev 0)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionAdapter.java 2010-05-19
23:16:19 UTC (rev 17150)
@@ -0,0 +1,45 @@
+/*
+ * $Id: FunctionAdapter.java 16722 2010-04-06 00:29:33Z alexsmirnov $
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig.model;
+
+import org.richfaces.cdk.model.FunctionModel;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class FunctionAdapter extends AdapterBase<FunctionBean, FunctionModel> {
+
+ @Override
+ protected Class<? extends FunctionBean> getBeanClass(FunctionModel prop) {
+ return FunctionBean.class;
+ }
+
+ @Override
+ protected Class<? extends FunctionModel> getModelClass(FunctionBean bean) {
+ return FunctionModel.class;
+ }
+
+}
Property changes on:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionAdapter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionBean.java
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionBean.java
(rev 0)
+++
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionBean.java 2010-05-19
23:16:19 UTC (rev 17150)
@@ -0,0 +1,87 @@
+package org.richfaces.cdk.xmlconfig.model;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.richfaces.cdk.annotations.TagType;
+import org.richfaces.cdk.model.ClassName;
+import org.richfaces.cdk.model.ComponentLibrary;
+
+@XmlType(name = "functionType", namespace =
ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+public class FunctionBean extends DescriptionGroupBean {
+
+ private String name;
+
+ private String signature;
+
+ private TagType type;
+
+ private ClassName functionClass;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ @XmlElement(name = "function-name", namespace =
ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public String getName() {
+ return this.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 signature
+ */
+ @XmlElement(name = "function-signature", namespace =
ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public String getSignature() {
+ return this.signature;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param signature the signature to set
+ */
+ public void setSignature(String signature) {
+ this.signature = signature;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the type
+ */
+ public TagType getType() {
+ return this.type;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type the type to set
+ */
+ public void setType(TagType type) {
+ this.type = type;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the functionClass
+ */
+ @XmlElement(name = "function-class", namespace =
ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public ClassName getFunctionClass() {
+ return this.functionClass;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param functionClass the functionClass to set
+ */
+ public void setFunctionClass(ClassName functionClass) {
+ this.functionClass = functionClass;
+ }
+}
Property changes on:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FunctionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain