Author: nbelaevski
Date: 2011-03-24 14:55:40 -0400 (Thu, 24 Mar 2011)
New Revision: 22303
Removed:
trunk/core/api/src/main/java/org/ajax4jsf/javascript/AjaxSubmitFunction.java
trunk/core/api/src/main/java/org/ajax4jsf/javascript/JSBind.java
trunk/core/api/src/main/java/org/richfaces/component/TemplateComponent.java
trunk/core/api/src/main/java/org/richfaces/event/
trunk/core/api/src/main/java/org/richfaces/skin/SkinConfiguration.java
trunk/core/impl/src/main/java/org/ajax4jsf/context/
trunk/core/impl/src/main/java/org/ajax4jsf/package-info.java
trunk/core/impl/src/main/java/org/richfaces/component/nsutils/
trunk/core/impl/src/main/java/org/richfaces/component/util/
trunk/core/impl/src/main/java/org/richfaces/context/AttributesContext.java
trunk/core/impl/src/main/java/org/richfaces/event/
trunk/core/impl/src/main/java/org/richfaces/json/
trunk/core/impl/src/main/java/org/richfaces/renderkit/AttributeParametersEncoder.java
trunk/core/impl/src/main/java/org/richfaces/renderkit/Expression.java
trunk/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptions.java
trunk/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptionsContributor.java
trunk/core/impl/src/main/java/org/richfaces/skin/DummySkinConfiguration.java
trunk/core/impl/src/test/java/org/richfaces/component/nsutils/
Log:
Legacy classes and resources removal
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/javascript/AjaxSubmitFunction.java
===================================================================
---
trunk/core/api/src/main/java/org/ajax4jsf/javascript/AjaxSubmitFunction.java 2011-03-24
17:33:21 UTC (rev 22302)
+++
trunk/core/api/src/main/java/org/ajax4jsf/javascript/AjaxSubmitFunction.java 2011-03-24
18:55:40 UTC (rev 22303)
@@ -1,100 +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.ajax4jsf.javascript;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.faces.component.UIComponent;
-
-/**
- * @author shura
- *
- */
-public class AjaxSubmitFunction extends JSFunction {
-
- /**
- * Name Javasript function for submit AJAX request
- */
- public static final String AJAX_FUNCTION_NAME = "A4J.AJAX.Submit";
-
- // private static Log log = LogFactory.getLog(AjaxSubmitFunction.class);
- public static final String AJAX_REGIONS_ATTRIBUTE = "reRender";
-
- /**
- * Attribute to keep
- */
- public static final String LIMITRENDER_ATTR_NAME = "limitRender";
-
- /**
- * Attribute for keep JavaScript funtion name for call after complete
- * request.
- */
- public static final String ONCOMPLETE_ATTR_NAME = "oncomplete";
-
- /**
- * Attribute for keep clientId of status component
- */
- public static final String STATUS_ATTR_NAME = "status";
- private Map<String, Object> options = new HashMap<String, Object>();
- private Map<String, String> requestParameters = new HashMap<String,
String>();
-
- // private static final Class<?> OBJECT_ARRAY_CLASS = (new
Object[0]).getClass();
- private UIComponent component;
-
- /**
- *
- */
- public AjaxSubmitFunction(UIComponent component) {
- this(component, AJAX_FUNCTION_NAME);
- }
-
- /**
- * @param name
- */
- public AjaxSubmitFunction(UIComponent component, String name) {
- super(name);
- this.component = component;
-
- // Fill parameters and options values.
- }
-
- /**
- * @return the options
- */
- public Map<String, Object> getOptions() {
- return this.options;
- }
-
- /**
- * @return the requestParameters
- */
- public Map<String, String> getRequestParameters() {
- return this.requestParameters;
- }
-
- public UIComponent getComponent() {
- return component;
- }
-}
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/javascript/JSBind.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/javascript/JSBind.java 2011-03-24 17:33:21
UTC (rev 22302)
+++ trunk/core/api/src/main/java/org/ajax4jsf/javascript/JSBind.java 2011-03-24 18:55:40
UTC (rev 22303)
@@ -1,67 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - 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.ajax4jsf.javascript;
-
-import java.io.IOException;
-
-/**
- * Created 04.08.2008
- * @author Nick Belaevski
- * @since 3.2.2
- */
-public class JSBind extends ScriptStringBase {
- private JSFunction function;
- private String[] vars;
-
- public JSBind(JSFunction function, String... vars) {
- super();
- this.function = function;
- this.vars = vars;
- }
-
- public void appendScript(Appendable target) throws IOException {
- target.append("function () {");
- target.append("var vars = {");
-
- boolean isFirst = true;
-
- for (String var : vars) {
- if (isFirst) {
- isFirst = false;
- } else {
- target.append(',');
- }
-
- target.append(var);
- target.append(':');
- target.append(var);
- }
-
- target.append("};");
- target.append("return function() { with (vars) {");
- target.append(function.toScript());
- target.append("}}}()");
- }
-
-}
Deleted: trunk/core/api/src/main/java/org/richfaces/component/TemplateComponent.java
===================================================================
--- trunk/core/api/src/main/java/org/richfaces/component/TemplateComponent.java 2011-03-24
17:33:21 UTC (rev 22302)
+++ trunk/core/api/src/main/java/org/richfaces/component/TemplateComponent.java 2011-03-24
18:55:40 UTC (rev 22303)
@@ -1,38 +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.component;
-
-/**
- * @author Nick Belaevski
- * mailto:nbelaevski@exadel.com
- * created 10.08.2007
- *
- */
-public interface TemplateComponent {
- public static final String TEMPLATE_CLIENT_ID = "{componentId}";
-
- public void startTemplateEncode();
-
- public void endTemplateEncode();
-}
Deleted: trunk/core/api/src/main/java/org/richfaces/skin/SkinConfiguration.java
===================================================================
--- trunk/core/api/src/main/java/org/richfaces/skin/SkinConfiguration.java 2011-03-24
17:33:21 UTC (rev 22302)
+++ trunk/core/api/src/main/java/org/richfaces/skin/SkinConfiguration.java 2011-03-24
18:55:40 UTC (rev 22303)
@@ -1,72 +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.skin;
-
-import javax.faces.context.FacesContext;
-
-/**
- * Fine tuning parameters for components configuration.
- * For any skin, calculation of concrete component parameners done by special
"configuration",
- * pointed as special skin parameter ( or by default configuration ).
- * Work like "transformation" of limited set Skin parameters to fine-grained
individual component
- * parameters.
- * @author shura
- *
- */
-public interface SkinConfiguration {
-
- /**
- * Get value for configuration parameter. If parameter set as EL-expression,
- * calculate it value.
- *
- * @param context -
- * {@link FacesContext } for current request.
- * @param name
- * name of paremeter.
- * @return value of parameter in config, or null
- */
- public Object getParameter(FacesContext context, String name);
-
- /**
- * Get value for skin parameter, for build extensible ( mandatory/fine tuning ) with
three-stage checks :
- * <ul>
- * <li>first, check value for parameter with given name. If value not null,
return it</li>
- * <li>second, got parameter value from skin by skinName key. If not null,
return it.</li>
- * <li>if both above parameters is null, return default value.</li>
- * </ul>
- * @param context - Current JSF context.
- * @param name - name of parameter.
- * @param skinName - name of according ( default ) parameter i Skin for same purpose.
may be <code>null</code>.
- * @param defaultValue - default parameter value.
- * @return - value of parameter.
- */
- public Object getParameter(FacesContext context, String name, String skinName, Object
defaultValue);
-
- /**
- * Test for present parameter for given name.
- * @param name of parameter to test
- * @return true if parameter present in configuration.
- */
- public boolean containsParameter(String name);
-}
Deleted: trunk/core/impl/src/main/java/org/ajax4jsf/package-info.java
===================================================================
--- trunk/core/impl/src/main/java/org/ajax4jsf/package-info.java 2011-03-24 17:33:21 UTC
(rev 22302)
+++ trunk/core/impl/src/main/java/org/ajax4jsf/package-info.java 2011-03-24 18:55:40 UTC
(rev 22303)
@@ -1,4 +0,0 @@
-/**
- * Base package for AJAX classes
- */
-package org.ajax4jsf;
Deleted: trunk/core/impl/src/main/java/org/richfaces/context/AttributesContext.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/context/AttributesContext.java 2011-03-24
17:33:21 UTC (rev 22302)
+++ trunk/core/impl/src/main/java/org/richfaces/context/AttributesContext.java 2011-03-24
18:55:40 UTC (rev 22303)
@@ -1,20 +0,0 @@
-package org.richfaces.context;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class AttributesContext {
- private Map<String, Object> attributesMap = new HashMap<String,
Object>();
-
- public Object getAttribute(String name) {
- return attributesMap.get(name);
- }
-
- public Object setAttribute(String name, Object value) {
- if (value != null) {
- return attributesMap.put(name, value);
- } else {
- return attributesMap.remove(name);
- }
- }
-}
Deleted:
trunk/core/impl/src/main/java/org/richfaces/renderkit/AttributeParametersEncoder.java
===================================================================
---
trunk/core/impl/src/main/java/org/richfaces/renderkit/AttributeParametersEncoder.java 2011-03-24
17:33:21 UTC (rev 22302)
+++
trunk/core/impl/src/main/java/org/richfaces/renderkit/AttributeParametersEncoder.java 2011-03-24
18:55:40 UTC (rev 22303)
@@ -1,34 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - 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.renderkit;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import java.io.IOException;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 30.01.2007
- */
-public interface AttributeParametersEncoder {
- public void doEncode(FacesContext context, UIComponent component) throws
IOException;
-}
Deleted: trunk/core/impl/src/main/java/org/richfaces/renderkit/Expression.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/renderkit/Expression.java 2011-03-24
17:33:21 UTC (rev 22302)
+++ trunk/core/impl/src/main/java/org/richfaces/renderkit/Expression.java 2011-03-24
18:55:40 UTC (rev 22303)
@@ -1,78 +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.renderkit;
-
-/**
- * @author Nick Belaevski - mailto:nbelaevski@exadel.com
- * created 20.06.2007
- */
-public class Expression {
- private Object expression;
-
- public Expression(Object expression) {
- super();
- this.expression = expression;
- }
-
- public Object getExpression() {
- return expression;
- }
-
- public String toString() {
- return super.toString() + "[" + expression + "]";
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
-
- result = prime * result + ((expression == null) ? 0 : expression.hashCode());
-
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (obj == null) {
- return false;
- }
-
- if (getClass() != obj.getClass()) {
- return false;
- }
-
- final Expression other = (Expression) obj;
-
- if (expression == null) {
- if (other.expression != null) {
- return false;
- }
- } else if (!expression.equals(other.expression)) {
- return false;
- }
-
- return true;
- }
-}
Deleted: trunk/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptions.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptions.java 2011-03-24
17:33:21 UTC (rev 22302)
+++ trunk/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptions.java 2011-03-24
18:55:40 UTC (rev 22303)
@@ -1,109 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - 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.renderkit;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.faces.component.UIComponent;
-
-import org.ajax4jsf.javascript.JSFunctionDefinition;
-import org.ajax4jsf.javascript.ScriptStringBase;
-import org.ajax4jsf.javascript.ScriptUtils;
-
-/**
- * @author Maksim Kaszynski
- */
-public class ScriptOptions extends ScriptStringBase {
- protected Map<String, Object> opts = new HashMap<String, Object>();
- private UIComponent component;
-
- public ScriptOptions(UIComponent component) {
- this.component = component;
- }
-
- public void appendScript(Appendable target) throws IOException {
- ScriptUtils.appendScript(target, opts);
- }
-
- public void addOption(String name) {
- if (name != null) {
- Object value = component.getAttributes().get(name);
-
- addOption(name, value);
- }
- }
-
- @SuppressWarnings("unchecked")
- public void addOption(String name, Object value) {
- if (value != null) {
- Object object = opts.get(name);
-
- if ((object instanceof Map) && (value instanceof Map)) {
- ((Map) object).putAll((Map) value);
- } else {
- opts.put(name, value);
- }
- }
- }
-
- public void addEventHandler(String event, String handler) {
- if ((event != null) && (handler != null)) {
- JSFunctionDefinition functionDefinition = new
JSFunctionDefinition("event");
-
- functionDefinition.addToBody(handler);
- functionDefinition.addToBody(";return true;");
- addEventHandler(event, functionDefinition);
- }
- }
-
- public void addEventHandler(String event) {
- if (event != null) {
- String handler = (String) component.getAttributes().get(event);
-
- addEventHandler(event, handler);
- }
- }
-
- public void addEventHandler(String event, JSFunctionDefinition definition) {
- if ((event != null) && (definition != null)) {
- opts.put(event, definition);
- }
- }
-
- public Map<String, Object> getMap() {
- return opts;
- }
-
- public void merge(ScriptOptions anotherOptions) {
- Iterator<Entry<String, Object>> entrySetIterator =
anotherOptions.opts.entrySet().iterator();
-
- while (entrySetIterator.hasNext()) {
- Entry<String, Object> entry = entrySetIterator.next();
-
- addOption(entry.getKey(), entry.getValue());
- }
- }
-}
Deleted:
trunk/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptionsContributor.java
===================================================================
---
trunk/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptionsContributor.java 2011-03-24
17:33:21 UTC (rev 22302)
+++
trunk/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptionsContributor.java 2011-03-24
18:55:40 UTC (rev 22303)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - 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.renderkit;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 18.12.2006
- */
-public interface ScriptOptionsContributor {
-
- /**
- * Create script options if component class is known for renderer to contribute
- *
- * @param context
- * @param component
- * @return Built {@link ScriptOptions} instance or null if component is not
acceptable
- */
- public ScriptOptions buildOptions(FacesContext context, UIComponent component);
-}
Deleted: trunk/core/impl/src/main/java/org/richfaces/skin/DummySkinConfiguration.java
===================================================================
---
trunk/core/impl/src/main/java/org/richfaces/skin/DummySkinConfiguration.java 2011-03-24
17:33:21 UTC (rev 22302)
+++
trunk/core/impl/src/main/java/org/richfaces/skin/DummySkinConfiguration.java 2011-03-24
18:55:40 UTC (rev 22303)
@@ -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.skin;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author shura
- */
-public class DummySkinConfiguration implements SkinConfiguration {
- private Skin skin;
-
- /**
- * @param skin
- */
- public DummySkinConfiguration(Skin skin) {
- super();
- this.skin = skin;
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.skin.SkinConfiguration#containsParameter(java.lang.String)
- */
- public boolean containsParameter(String name) {
- return skin.containsProperty(name);
- }
-
- /*
- * (non-Javadoc)
- * @see
org.richfaces.skin.SkinConfiguration#getParameter(javax.faces.context.FacesContext,
java.lang.String)
- */
- public Object getParameter(FacesContext context, String name) {
- return skin.getParameter(context, name);
- }
-
- /*
- * (non-Javadoc)
- * @see
org.richfaces.skin.SkinConfiguration#getParameter(javax.faces.context.FacesContext,
String, String, Object)
- */
- public Object getParameter(FacesContext context, String name, String skinName, Object
defaultValue) {
- Object parameter = skin.getParameter(context, name);
-
- if (null == parameter) {
- parameter = defaultValue;
- }
-
- return parameter;
- }
-}