cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r562416 - /cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java
Date Fri, 03 Aug 2007 11:40:30 GMT
Author: gkossakowski
Date: Fri Aug  3 04:40:29 2007
New Revision: 562416

URL: http://svn.apache.org/viewvc?view=rev&rev=562416
Log:
Remove ParametersMap inner class since it has been extracted to be top-level class.

Modified:
    cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java

Modified: cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java?view=diff&rev=562416&r1=562415&r2=562416
==============================================================================
--- cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java
(original)
+++ cocoon/trunk/core/cocoon-expression-language/cocoon-expression-language-impl/src/main/java/org/apache/cocoon/objectmodel/helper/TemplateObjectModelHelper.java
Fri Aug  3 04:40:29 2007
@@ -18,13 +18,9 @@
 
 import java.beans.PropertyDescriptor;
 import java.lang.reflect.Method;
-import java.util.Collection;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
-import java.util.Set;
 
-import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.components.flow.FlowHelper;
 import org.apache.commons.jxpath.DynamicPropertyHandler;
@@ -116,157 +112,5 @@
         
         return map;
     }
-    
-    protected static final class ParametersMap extends Parameters implements Map {
-
-        protected final Parameters wrappedParameters;
-        protected Map map;
-
-        public ParametersMap(Parameters wrapped) {
-            wrappedParameters = wrapped;
-        }
-
-        public boolean equals(Object arg0) {
-            return wrappedParameters.equals(arg0);
-        }
-
-        public String[] getNames() {
-            return wrappedParameters.getNames();
-        }
-
-        public String getParameter(String arg0, String arg1) {
-            return wrappedParameters.getParameter(arg0, arg1);
-        }
-
-        public String getParameter(String arg0) throws ParameterException {
-            return wrappedParameters.getParameter(arg0);
-        }
-
-        public boolean getParameterAsBoolean(String arg0, boolean arg1) {
-            return wrappedParameters.getParameterAsBoolean(arg0, arg1);
-        }
-
-        public boolean getParameterAsBoolean(String arg0) throws ParameterException {
-            return wrappedParameters.getParameterAsBoolean(arg0);
-        }
-
-        public float getParameterAsFloat(String arg0, float arg1) {
-            return wrappedParameters.getParameterAsFloat(arg0, arg1);
-        }
-
-        public float getParameterAsFloat(String arg0) throws ParameterException {
-            return wrappedParameters.getParameterAsFloat(arg0);
-        }
-
-        public int getParameterAsInteger(String arg0, int arg1) {
-            return wrappedParameters.getParameterAsInteger(arg0, arg1);
-        }
-
-        public int getParameterAsInteger(String arg0) throws ParameterException {
-            return wrappedParameters.getParameterAsInteger(arg0);
-        }
-
-        public long getParameterAsLong(String arg0, long arg1) {
-            return wrappedParameters.getParameterAsLong(arg0, arg1);
-        }
-
-        public long getParameterAsLong(String arg0) throws ParameterException {
-            return wrappedParameters.getParameterAsLong(arg0);
-        }
-
-        public Iterator getParameterNames() {
-            return wrappedParameters.getParameterNames();
-        }
-
-        public int hashCode() {
-            return wrappedParameters.hashCode();
-        }
-
-        public boolean isParameter(String arg0) {
-            return wrappedParameters.isParameter(arg0);
-        }
-
-        public void makeReadOnly() {
-            wrappedParameters.makeReadOnly();
-        }
 
-        public Parameters merge(Parameters arg0) {
-            return wrappedParameters.merge(arg0);
-        }
-
-        public void removeParameter(String arg0) {
-            wrappedParameters.removeParameter(arg0);
-        }
-
-        public String setParameter(String arg0, String arg1) throws IllegalStateException
{
-            return wrappedParameters.setParameter(arg0, arg1);
-        }
-
-        public void clear() {
-            this.checkWriteable();
-        }
-
-        protected Map getMap() {
-            if ( this.map == null ) {
-                this.map = new HashMap();
-                String[] names = this.getNames();
-                for(int i=0; i<names.length;i++) {
-                    map.put(names[i], this.getParameter(names[i], null));
-                }
-            }
-            return this.map;
-        }
-
-        public boolean containsKey(Object arg0) {
-            if ( arg0 == null ) {
-                return false;
-            }
-            return this.getParameter(arg0.toString(), null) != null;
-        }
-
-        public boolean containsValue(Object arg0) {
-            return this.getMap().containsValue(arg0);
-        }
-
-        public Set entrySet() {
-            return this.getMap().entrySet();
-        }
-
-        public Object get(Object arg0) {
-            if ( arg0 == null ) {
-                return null;
-            }
-            return this.getParameter(arg0.toString(), null);
-        }
-
-        public boolean isEmpty() {
-            return this.getNames().length == 0;
-        }
-
-        public Set keySet() {
-            return this.getMap().keySet();
-        }
-
-        public Object put(Object arg0, Object arg1) {
-            this.checkWriteable();
-            return null;
-        }
-
-        public void putAll(Map arg0) {
-            this.checkWriteable();
-        }
-
-        public Object remove(Object arg0) {
-            this.checkWriteable();
-            return null;
-        }
-
-        public int size() {
-            return this.getNames().length;
-        }
-
-        public Collection values() {
-            return this.getMap().values();
-        }
-    }
 }



Mime
View raw message