struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [11/57] [partial] struts git commit: Merges xwork packages into struts
Date Wed, 17 Jun 2015 21:09:11 GMT
http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatcher.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatcher.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatcher.java
deleted file mode 100644
index 3d64c33..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/NamespaceMatcher.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2002-2006,2009 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.opensymphony.xwork2.config.impl;
-
-import com.opensymphony.xwork2.util.PatternMatcher;
-
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Matches namespace strings against a wildcard pattern matcher
- *
- * @Since 2.1
- */
-public class NamespaceMatcher extends AbstractMatcher<NamespaceMatch> {
-     public NamespaceMatcher(PatternMatcher<?> patternMatcher,
-            Set<String> namespaces) {
-        super(patternMatcher);
-        for (String name : namespaces) {
-            if (!patternMatcher.isLiteral(name)) {
-                addPattern(name, new NamespaceMatch(name, null), false);
-            }
-        }
-    }
-
-    @Override
-    protected NamespaceMatch convert(String path, NamespaceMatch orig, Map<String, String> vars) {
-        /*Map<String,String> origVars = (Map<String,String>)vars;
-        Map<String,String> map = new HashMap<String,String>();
-        for (Map.Entry<String,String> entry : origVars.entrySet()) {
-            if (entry.getKey().length() == 1) {
-                map.put("ns"+entry.getKey(), entry.getValue());
-            }
-        }
-        */
-        return new NamespaceMatch(orig.getPattern(), vars);
-    }
-}

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/package.html
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/package.html b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/package.html
deleted file mode 100644
index cdfed5f..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/package.html
+++ /dev/null
@@ -1 +0,0 @@
-<body>Configuration implementation classes.</body>

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/package.html
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/package.html b/xwork-core/src/main/java/com/opensymphony/xwork2/config/package.html
deleted file mode 100644
index a3de692..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/package.html
+++ /dev/null
@@ -1 +0,0 @@
-<body>Configuration core classes.</body>

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java
deleted file mode 100644
index 82a7266..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.opensymphony.xwork2.config.providers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class CycleDetector<T> {
-    private static final String marked = "marked";
-    private static final String complete = "complete";
-    private DirectedGraph<T> graph;
-    private Map<T, String> marks;
-    private List<T> verticesInCycles;
-
-    public CycleDetector(DirectedGraph<T> graph) {
-        this.graph = graph;
-        marks = new HashMap<>();
-        verticesInCycles = new ArrayList<>();
-    }
-
-    public boolean containsCycle() {
-        for (T v : graph) {
-            if (!marks.containsKey(v)) {
-                if (mark(v)) {
-                    // return true;
-                }
-            }
-        }
-        // return false;
-        return !verticesInCycles.isEmpty();
-    }
-
-    private boolean mark(T vertex) {
-        /*
-         * return statements commented out for fail slow behavior detect all nodes in cycles instead of just the first one
-         */
-        List<T> localCycles = new ArrayList<T>();
-        marks.put(vertex, marked);
-        for (T u : graph.edgesFrom(vertex)) {
-            if (marks.containsKey(u) && marks.get(u).equals(marked)) {
-                localCycles.add(vertex);
-                // return true;
-            } else if (!marks.containsKey(u)) {
-                if (mark(u)) {
-                    localCycles.add(vertex);
-                    // return true;
-                }
-            }
-        }
-        marks.put(vertex, complete);
-        // return false;
-        verticesInCycles.addAll(localCycles);
-        return !localCycles.isEmpty();
-    }
-
-    public List<T> getVerticesInCycles() {
-        return verticesInCycles;
-    }
-}

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/DirectedGraph.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/DirectedGraph.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/DirectedGraph.java
deleted file mode 100644
index d7c6edc..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/DirectedGraph.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package com.opensymphony.xwork2.config.providers;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
-public final class DirectedGraph<T> implements Iterable<T> {
-    private final Map<T, Set<T>> mGraph = new HashMap<T, Set<T>>();
-
-    /**
-     * Adds a new node to the graph. If the node already exists, this function is a no-op.
-     * 
-     * @param node
-     *            The node to add.
-     * @return Whether or not the node was added.
-     */
-    public boolean addNode(T node) {
-        /* If the node already exists, don't do anything. */
-        if (mGraph.containsKey(node))
-            return false;
-
-        /* Otherwise, add the node with an empty set of outgoing edges. */
-        mGraph.put(node, new HashSet<T>());
-        return true;
-    }
-
-    /**
-     * Given a start node, and a destination, adds an arc from the start node to the destination. If an arc already exists, this operation is a no-op.
-     * If either endpoint does not exist in the graph, throws a NoSuchElementException.
-     * 
-     * @param start
-     *            The start node.
-     * @param dest
-     *            The destination node.
-     * @throws NoSuchElementException
-     *             If either the start or destination nodes do not exist.
-     */
-    public void addEdge(T start, T dest) {
-        /* Confirm both endpoints exist. */
-        if (!mGraph.containsKey(start)) {
-            throw new NoSuchElementException("The start node does not exist in the graph.");
-        } else if (!mGraph.containsKey(dest)) {
-            throw new NoSuchElementException("The destination node does not exist in the graph.");
-        }
-
-        /* Add the edge. */
-        mGraph.get(start).add(dest);
-    }
-
-    /**
-     * Removes the edge from start to dest from the graph. If the edge does not exist, this operation is a no-op. If either endpoint does not exist,
-     * this throws a NoSuchElementException.
-     * 
-     * @param start
-     *            The start node.
-     * @param dest
-     *            The destination node.
-     * @throws NoSuchElementException
-     *             If either node is not in the graph.
-     */
-    public void removeEdge(T start, T dest) {
-        /* Confirm both endpoints exist. */
-        if (!mGraph.containsKey(start)) {
-            throw new NoSuchElementException("The start node does not exist in the graph.");
-        } else if (!mGraph.containsKey(dest)) {
-            throw new NoSuchElementException("The destination node does not exist in the graph.");
-        }
-
-        mGraph.get(start).remove(dest);
-    }
-
-    /**
-     * Given two nodes in the graph, returns whether there is an edge from the first node to the second node. If either node does not exist in the
-     * graph, throws a NoSuchElementException.
-     * 
-     * @param start
-     *            The start node.
-     * @param end
-     *            The destination node.
-     * @return Whether there is an edge from start to end.
-     * @throws NoSuchElementException
-     *             If either endpoint does not exist.
-     */
-    public boolean edgeExists(T start, T end) {
-        /* Confirm both endpoints exist. */
-        if (!mGraph.containsKey(start)) {
-            throw new NoSuchElementException("The start node does not exist in the graph.");
-        } else if (!mGraph.containsKey(end)) {
-            throw new NoSuchElementException("The end node does not exist in the graph.");
-        }
-
-        return mGraph.get(start).contains(end);
-    }
-
-    /**
-     * Given a node in the graph, returns an immutable view of the edges leaving that node as a set of endpoints.
-     * 
-     * @param node
-     *            The node whose edges should be queried.
-     * @return An immutable view of the edges leaving that node.
-     * @throws NoSuchElementException
-     *             If the node does not exist.
-     */
-    public Set<T> edgesFrom(T node) {
-        /* Check that the node exists. */
-        Set<T> arcs = mGraph.get(node);
-        if (arcs == null)
-            throw new NoSuchElementException("Source node does not exist.");
-
-        return Collections.unmodifiableSet(arcs);
-    }
-
-    /**
-     * Returns an iterator that can traverse the nodes in the graph.
-     * 
-     * @return An iterator that traverses the nodes in the graph.
-     */
-    public Iterator<T> iterator() {
-        return mGraph.keySet().iterator();
-    }
-
-    /**
-     * Returns the number of nodes in the graph.
-     * 
-     * @return The number of nodes in the graph.
-     */
-    public int size() {
-        return mGraph.size();
-    }
-
-    /**
-     * Returns whether the graph is empty.
-     * 
-     * @return Whether the graph is empty.
-     */
-    public boolean isEmpty() {
-        return mGraph.isEmpty();
-    }
-}

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
deleted file mode 100644
index 1328205..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright 2002-2006,2009 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.opensymphony.xwork2.config.providers;
-
-import com.opensymphony.xwork2.ObjectFactory;
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.entities.InterceptorConfig;
-import com.opensymphony.xwork2.config.entities.InterceptorLocator;
-import com.opensymphony.xwork2.config.entities.InterceptorMapping;
-import com.opensymphony.xwork2.config.entities.InterceptorStackConfig;
-import com.opensymphony.xwork2.interceptor.Interceptor;
-import com.opensymphony.xwork2.util.location.Location;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * Builds a list of interceptors referenced by the refName in the supplied PackageConfig.
- *
- * @author Mike
- * @author Rainer Hermanns
- * @author tmjee
- * @version $Date$ $Id$
- */
-public class InterceptorBuilder {
-
-    private static final Logger LOG = LogManager.getLogger(InterceptorBuilder.class);
-
-
-    /**
-     * Builds a list of interceptors referenced by the refName in the supplied PackageConfig (InterceptorMapping object).
-     *
-     * @param interceptorLocator
-     * @param refName
-     * @param refParams
-     * @return list of interceptors referenced by the refName in the supplied PackageConfig (InterceptorMapping object).
-     * @throws ConfigurationException
-     */
-    public static List<InterceptorMapping> constructInterceptorReference(InterceptorLocator interceptorLocator,
-                                                                         String refName, Map<String,String> refParams, Location location, ObjectFactory objectFactory) throws ConfigurationException {
-        Object referencedConfig = interceptorLocator.getInterceptorConfig(refName);
-        List<InterceptorMapping> result = new ArrayList<>();
-
-        if (referencedConfig == null) {
-            throw new ConfigurationException("Unable to find interceptor class referenced by ref-name " + refName, location);
-        } else {
-            if (referencedConfig instanceof InterceptorConfig) {
-                InterceptorConfig config = (InterceptorConfig) referencedConfig;
-                Interceptor inter;
-                try {
-
-                    inter = objectFactory.buildInterceptor(config, refParams);
-                    result.add(new InterceptorMapping(refName, inter));
-                } catch (ConfigurationException ex) {
-              	    LOG.warn("Unable to load config class {} at {} probably due to a missing jar, which might be fine if you never plan to use the {} interceptor",
-                            config.getClassName(), ex.getLocation(), config.getName());
-                    LOG.error("Unable to load config class {}", config.getClassName(), ex);
-                }
-
-            } else if (referencedConfig instanceof InterceptorStackConfig) {
-                InterceptorStackConfig stackConfig = (InterceptorStackConfig) referencedConfig;
-
-                if ((refParams != null) && (refParams.size() > 0)) {
-                    result = constructParameterizedInterceptorReferences(interceptorLocator, stackConfig, refParams, objectFactory);
-                } else {
-                    result.addAll(stackConfig.getInterceptors());
-                }
-
-            } else {
-                LOG.error("Got unexpected type for interceptor {}. Got {}", refName, referencedConfig);
-            }
-        }
-
-        return result;
-    }
-
-    /**
-     * Builds a list of interceptors referenced by the refName in the supplied PackageConfig overriding the properties
-     * of the referenced interceptor with refParams.
-     *
-     * @param interceptorLocator
-     * @param stackConfig
-     * @param refParams          The overridden interceptor properies
-     * @return list of interceptors referenced by the refName in the supplied PackageConfig overridden with refParams.
-     */
-    private static List<InterceptorMapping> constructParameterizedInterceptorReferences(
-            InterceptorLocator interceptorLocator, InterceptorStackConfig stackConfig, Map<String,String> refParams,
-            ObjectFactory objectFactory) {
-        List<InterceptorMapping> result;
-        Map<String, Map<String, String>> params = new LinkedHashMap<>();
-
-        /*
-         * We strip
-         *
-         * <interceptor-ref name="someStack">
-         *    <param name="interceptor1.param1">someValue</param>
-         *    <param name="interceptor1.param2">anotherValue</param>
-         * </interceptor-ref>
-         *
-         * down to map
-         *  interceptor1 -> [param1 -> someValue, param2 -> anotherValue]
-         *
-         * or
-         * <interceptor-ref name="someStack">
-         *    <param name="interceptorStack1.interceptor1.param1">someValue</param>
-         *    <param name="interceptorStack1.interceptor1.param2">anotherValue</param>
-         * </interceptor-ref>
-         *
-         * down to map
-         *  interceptorStack1 -> [interceptor1.param1 -> someValue, interceptor1.param2 -> anotherValue]
-         *
-         */
-        for (String key : refParams.keySet()) {
-            String value = refParams.get(key);
-
-            try {
-                String name = key.substring(0, key.indexOf('.'));
-                key = key.substring(key.indexOf('.') + 1);
-
-                Map<String, String> map;
-                if (params.containsKey(name)) {
-                    map = params.get(name);
-                } else {
-                    map = new LinkedHashMap<>();
-                }
-
-                map.put(key, value);
-                params.put(name, map);
-
-            } catch (Exception e) {
-                LOG.warn("No interceptor found for name = {}", key);
-            }
-        }
-
-        result = new ArrayList<>(stackConfig.getInterceptors());
-
-        for (String key : params.keySet()) {
-
-            Map<String, String> map = params.get(key);
-
-
-            Object interceptorCfgObj = interceptorLocator.getInterceptorConfig(key);
-
-            /*
-             * Now we attempt to separate out param that refers to Interceptor
-             * and Interceptor stack, eg.
-             *
-             * <interceptor-ref name="someStack">
-             *    <param name="interceptor1.param1">someValue</param>
-             *    ...
-             * </interceptor-ref>
-             *
-             *  vs
-             *
-             *  <interceptor-ref name="someStack">
-             *    <param name="interceptorStack1.interceptor1.param1">someValue</param>
-             *    ...
-             *  </interceptor-ref>
-             */
-            if (interceptorCfgObj instanceof InterceptorConfig) {  //  interceptor-ref param refer to an interceptor
-                InterceptorConfig cfg = (InterceptorConfig) interceptorCfgObj;
-                Interceptor interceptor = objectFactory.buildInterceptor(cfg, map);
-
-                InterceptorMapping mapping = new InterceptorMapping(key, interceptor);
-                if (result != null && result.contains(mapping)) {
-                    // if an existing interceptor mapping exists,
-                    // we remove from the result Set, just to make sure
-                    // there's always one unique mapping.
-                    int index = result.indexOf(mapping);
-                    result.set(index, mapping);
-                } else {
-                    result.add(mapping);
-                }
-            } else
-            if (interceptorCfgObj instanceof InterceptorStackConfig) {  // interceptor-ref param refer to an interceptor stack
-
-                // If its an interceptor-stack, we call this method recursively until,
-                // all the params (eg. interceptorStack1.interceptor1.param etc.)
-                // are resolved down to a specific interceptor.
-
-                InterceptorStackConfig stackCfg = (InterceptorStackConfig) interceptorCfgObj;
-                List<InterceptorMapping> tmpResult = constructParameterizedInterceptorReferences(interceptorLocator, stackCfg, map, objectFactory);
-                for (InterceptorMapping tmpInterceptorMapping : tmpResult) {
-                    if (result.contains(tmpInterceptorMapping)) {
-                        int index = result.indexOf(tmpInterceptorMapping);
-                        result.set(index, tmpInterceptorMapping);
-                    } else {
-                        result.add(tmpInterceptorMapping);
-                    }
-                }
-            }
-        }
-
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
deleted file mode 100644
index 4ade520..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
+++ /dev/null
@@ -1,191 +0,0 @@
-package com.opensymphony.xwork2.config.providers;
-
-import com.opensymphony.xwork2.ActionProxyFactory;
-import com.opensymphony.xwork2.DefaultActionProxyFactory;
-import com.opensymphony.xwork2.factory.DefaultUnknownHandlerFactory;
-import com.opensymphony.xwork2.factory.UnknownHandlerFactory;
-import com.opensymphony.xwork2.security.AcceptedPatternsChecker;
-import com.opensymphony.xwork2.security.DefaultAcceptedPatternsChecker;
-import com.opensymphony.xwork2.security.DefaultExcludedPatternsChecker;
-import com.opensymphony.xwork2.DefaultLocaleProvider;
-import com.opensymphony.xwork2.DefaultTextProvider;
-import com.opensymphony.xwork2.DefaultUnknownHandlerManager;
-import com.opensymphony.xwork2.security.ExcludedPatternsChecker;
-import com.opensymphony.xwork2.FileManager;
-import com.opensymphony.xwork2.FileManagerFactory;
-import com.opensymphony.xwork2.LocaleProvider;
-import com.opensymphony.xwork2.ObjectFactory;
-import com.opensymphony.xwork2.TextProvider;
-import com.opensymphony.xwork2.TextProviderSupport;
-import com.opensymphony.xwork2.UnknownHandlerManager;
-import com.opensymphony.xwork2.XWorkConstants;
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.ConfigurationProvider;
-import com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor;
-import com.opensymphony.xwork2.conversion.ConversionFileProcessor;
-import com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor;
-import com.opensymphony.xwork2.conversion.NullHandler;
-import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer;
-import com.opensymphony.xwork2.conversion.TypeConverterCreator;
-import com.opensymphony.xwork2.conversion.TypeConverterHolder;
-import com.opensymphony.xwork2.conversion.impl.ArrayConverter;
-import com.opensymphony.xwork2.conversion.impl.CollectionConverter;
-import com.opensymphony.xwork2.conversion.impl.DateConverter;
-import com.opensymphony.xwork2.conversion.impl.DefaultConversionAnnotationProcessor;
-import com.opensymphony.xwork2.conversion.impl.DefaultConversionFileProcessor;
-import com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor;
-import com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer;
-import com.opensymphony.xwork2.conversion.impl.DefaultTypeConverterCreator;
-import com.opensymphony.xwork2.conversion.impl.DefaultTypeConverterHolder;
-import com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler;
-import com.opensymphony.xwork2.conversion.impl.NumberConverter;
-import com.opensymphony.xwork2.conversion.impl.StringConverter;
-import com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter;
-import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
-import com.opensymphony.xwork2.factory.ActionFactory;
-import com.opensymphony.xwork2.factory.ConverterFactory;
-import com.opensymphony.xwork2.factory.DefaultActionFactory;
-import com.opensymphony.xwork2.factory.DefaultConverterFactory;
-import com.opensymphony.xwork2.factory.DefaultInterceptorFactory;
-import com.opensymphony.xwork2.factory.DefaultResultFactory;
-import com.opensymphony.xwork2.factory.InterceptorFactory;
-import com.opensymphony.xwork2.factory.ResultFactory;
-import com.opensymphony.xwork2.inject.ContainerBuilder;
-import com.opensymphony.xwork2.inject.Scope;
-import com.opensymphony.xwork2.ognl.ObjectProxy;
-import com.opensymphony.xwork2.ognl.OgnlReflectionContextFactory;
-import com.opensymphony.xwork2.ognl.OgnlReflectionProvider;
-import com.opensymphony.xwork2.ognl.OgnlUtil;
-import com.opensymphony.xwork2.ognl.OgnlValueStackFactory;
-import com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor;
-import com.opensymphony.xwork2.ognl.accessor.ObjectAccessor;
-import com.opensymphony.xwork2.ognl.accessor.ObjectProxyPropertyAccessor;
-import com.opensymphony.xwork2.ognl.accessor.XWorkCollectionPropertyAccessor;
-import com.opensymphony.xwork2.ognl.accessor.XWorkEnumerationAccessor;
-import com.opensymphony.xwork2.ognl.accessor.XWorkIteratorPropertyAccessor;
-import com.opensymphony.xwork2.ognl.accessor.XWorkListPropertyAccessor;
-import com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor;
-import com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor;
-import com.opensymphony.xwork2.util.CompoundRoot;
-import com.opensymphony.xwork2.util.OgnlTextParser;
-import com.opensymphony.xwork2.util.PatternMatcher;
-import com.opensymphony.xwork2.util.TextParser;
-import com.opensymphony.xwork2.util.ValueStackFactory;
-import com.opensymphony.xwork2.util.WildcardHelper;
-import com.opensymphony.xwork2.util.fs.DefaultFileManager;
-import com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory;
-import com.opensymphony.xwork2.util.location.LocatableProperties;
-import com.opensymphony.xwork2.util.reflection.ReflectionContextFactory;
-import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
-import com.opensymphony.xwork2.validator.ActionValidatorManager;
-import com.opensymphony.xwork2.validator.AnnotationActionValidatorManager;
-import com.opensymphony.xwork2.validator.DefaultActionValidatorManager;
-import com.opensymphony.xwork2.validator.DefaultValidatorFactory;
-import com.opensymphony.xwork2.validator.DefaultValidatorFileParser;
-import com.opensymphony.xwork2.validator.ValidatorFactory;
-import com.opensymphony.xwork2.validator.ValidatorFileParser;
-import ognl.MethodAccessor;
-import ognl.PropertyAccessor;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-public class XWorkConfigurationProvider implements ConfigurationProvider {
-
-    public void destroy() {
-    }
-
-    public void init(Configuration configuration) throws ConfigurationException {
-    }
-
-    public void loadPackages() throws ConfigurationException {
-    }
-
-    public boolean needsReload() {
-        return false;
-    }
-
-    public void register(ContainerBuilder builder, LocatableProperties props)
-            throws ConfigurationException {
-
-        builder
-                .factory(ObjectFactory.class)
-                .factory(ActionFactory.class, DefaultActionFactory.class)
-                .factory(ResultFactory.class, DefaultResultFactory.class)
-                .factory(InterceptorFactory.class, DefaultInterceptorFactory.class)
-                .factory(com.opensymphony.xwork2.factory.ValidatorFactory.class, com.opensymphony.xwork2.factory.DefaultValidatorFactory.class)
-                .factory(ConverterFactory.class, DefaultConverterFactory.class)
-                .factory(UnknownHandlerFactory.class, DefaultUnknownHandlerFactory.class)
-
-                .factory(ActionProxyFactory.class, DefaultActionProxyFactory.class, Scope.SINGLETON)
-                .factory(ObjectTypeDeterminer.class, DefaultObjectTypeDeterminer.class, Scope.SINGLETON)
-
-                .factory(XWorkConverter.class, Scope.SINGLETON)
-                .factory(XWorkBasicConverter.class, Scope.SINGLETON)
-                .factory(ConversionPropertiesProcessor.class, DefaultConversionPropertiesProcessor.class, Scope.SINGLETON)
-                .factory(ConversionFileProcessor.class, DefaultConversionFileProcessor.class, Scope.SINGLETON)
-                .factory(ConversionAnnotationProcessor.class, DefaultConversionAnnotationProcessor.class, Scope.SINGLETON)
-                .factory(TypeConverterCreator.class, DefaultTypeConverterCreator.class, Scope.SINGLETON)
-                .factory(TypeConverterHolder.class, DefaultTypeConverterHolder.class, Scope.SINGLETON)
-
-                .factory(FileManager.class, "system", DefaultFileManager.class, Scope.SINGLETON)
-                .factory(FileManagerFactory.class, DefaultFileManagerFactory.class, Scope.SINGLETON)
-                .factory(ValueStackFactory.class, OgnlValueStackFactory.class, Scope.SINGLETON)
-                .factory(ValidatorFactory.class, DefaultValidatorFactory.class, Scope.SINGLETON)
-                .factory(ValidatorFileParser.class, DefaultValidatorFileParser.class, Scope.SINGLETON)
-                .factory(PatternMatcher.class, WildcardHelper.class, Scope.SINGLETON)
-                .factory(ReflectionProvider.class, OgnlReflectionProvider.class, Scope.SINGLETON)
-                .factory(ReflectionContextFactory.class, OgnlReflectionContextFactory.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, CompoundRoot.class.getName(), CompoundRootAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, Object.class.getName(), ObjectAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, Iterator.class.getName(), XWorkIteratorPropertyAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, Enumeration.class.getName(), XWorkEnumerationAccessor.class, Scope.SINGLETON)
-                .factory(UnknownHandlerManager.class, DefaultUnknownHandlerManager.class, Scope.SINGLETON)
-
-                // silly workarounds for ognl since there is no way to flush its caches
-                .factory(PropertyAccessor.class, List.class.getName(), XWorkListPropertyAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, ArrayList.class.getName(), XWorkListPropertyAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, HashSet.class.getName(), XWorkCollectionPropertyAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, Set.class.getName(), XWorkCollectionPropertyAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, HashMap.class.getName(), XWorkMapPropertyAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, Map.class.getName(), XWorkMapPropertyAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, Collection.class.getName(), XWorkCollectionPropertyAccessor.class, Scope.SINGLETON)
-                .factory(PropertyAccessor.class, ObjectProxy.class.getName(), ObjectProxyPropertyAccessor.class, Scope.SINGLETON)
-                .factory(MethodAccessor.class, Object.class.getName(), XWorkMethodAccessor.class, Scope.SINGLETON)
-                .factory(MethodAccessor.class, CompoundRoot.class.getName(), CompoundRootAccessor.class, Scope.SINGLETON)
-
-                .factory(TextParser.class, OgnlTextParser.class, Scope.SINGLETON)
-
-                .factory(NullHandler.class, Object.class.getName(), InstantiatingNullHandler.class, Scope.SINGLETON)
-                .factory(ActionValidatorManager.class, AnnotationActionValidatorManager.class, Scope.SINGLETON)
-                .factory(ActionValidatorManager.class, "no-annotations", DefaultActionValidatorManager.class, Scope.SINGLETON)
-                .factory(TextProvider.class, "system", DefaultTextProvider.class, Scope.SINGLETON)
-                .factory(TextProvider.class, TextProviderSupport.class, Scope.SINGLETON)
-                .factory(LocaleProvider.class, DefaultLocaleProvider.class, Scope.SINGLETON)
-                .factory(OgnlUtil.class, Scope.SINGLETON)
-                .factory(CollectionConverter.class, Scope.SINGLETON)
-                .factory(ArrayConverter.class, Scope.SINGLETON)
-                .factory(DateConverter.class, Scope.SINGLETON)
-                .factory(NumberConverter.class, Scope.SINGLETON)
-                .factory(StringConverter.class, Scope.SINGLETON)
-
-                .factory(ExcludedPatternsChecker.class, DefaultExcludedPatternsChecker.class, Scope.DEFAULT)
-                .factory(AcceptedPatternsChecker.class, DefaultAcceptedPatternsChecker.class, Scope.DEFAULT)
-        ;
-
-        props.setProperty(XWorkConstants.DEV_MODE, Boolean.FALSE.toString());
-        props.setProperty(XWorkConstants.LOG_MISSING_PROPERTIES, Boolean.FALSE.toString());
-        props.setProperty(XWorkConstants.ENABLE_OGNL_EXPRESSION_CACHE, Boolean.TRUE.toString());
-        props.setProperty(XWorkConstants.ENABLE_OGNL_EVAL_EXPRESSION, Boolean.FALSE.toString());
-        props.setProperty(XWorkConstants.RELOAD_XML_CONFIGURATION, Boolean.FALSE.toString());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
deleted file mode 100644
index 0cf7059..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
+++ /dev/null
@@ -1,1071 +0,0 @@
-/*
- * Copyright 2002-2006,2009 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.opensymphony.xwork2.config.providers;
-
-import com.opensymphony.xwork2.*;
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.ConfigurationProvider;
-import com.opensymphony.xwork2.config.ConfigurationUtil;
-import com.opensymphony.xwork2.config.entities.*;
-import com.opensymphony.xwork2.config.impl.LocatableFactory;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.ContainerBuilder;
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.inject.Scope;
-import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.ClassPathFinder;
-import com.opensymphony.xwork2.util.DomHelper;
-import com.opensymphony.xwork2.util.TextParseUtil;
-import com.opensymphony.xwork2.util.location.LocatableProperties;
-import com.opensymphony.xwork2.util.location.Location;
-import com.opensymphony.xwork2.util.location.LocationUtils;
-import org.apache.commons.lang3.BooleanUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Modifier;
-import java.net.URL;
-import java.util.*;
-
-
-/**
- * Looks in the classpath for an XML file, "xwork.xml" by default,
- * and uses it for the XWork configuration.
- *
- * @author tmjee
- * @author Rainer Hermanns
- * @author Neo
- * @version $Revision$
- */
-public class XmlConfigurationProvider implements ConfigurationProvider {
-
-    private static final Logger LOG = LogManager.getLogger(XmlConfigurationProvider.class);
-
-    private List<Document> documents;
-    private Set<String> includedFileNames;
-    private String configFileName;
-    private ObjectFactory objectFactory;
-
-    private Set<String> loadedFileUrls = new HashSet<>();
-    private boolean errorIfMissing;
-    private Map<String, String> dtdMappings;
-    private Configuration configuration;
-    private boolean throwExceptionOnDuplicateBeans = true;
-    private Map<String, Element> declaredPackages = new HashMap<>();
-
-    private FileManager fileManager;
-
-    public XmlConfigurationProvider() {
-        this("xwork.xml", true);
-    }
-
-    public XmlConfigurationProvider(String filename) {
-        this(filename, true);
-    }
-
-    public XmlConfigurationProvider(String filename, boolean errorIfMissing) {
-        this.configFileName = filename;
-        this.errorIfMissing = errorIfMissing;
-
-        Map<String, String> mappings = new HashMap<>();
-        mappings.put("-//Apache Struts//XWork 2.3//EN", "xwork-2.3.dtd");
-        mappings.put("-//Apache Struts//XWork 2.1.3//EN", "xwork-2.1.3.dtd");
-        mappings.put("-//Apache Struts//XWork 2.1//EN", "xwork-2.1.dtd");
-        mappings.put("-//Apache Struts//XWork 2.0//EN", "xwork-2.0.dtd");
-        mappings.put("-//Apache Struts//XWork 1.1.1//EN", "xwork-1.1.1.dtd");
-        mappings.put("-//Apache Struts//XWork 1.1//EN", "xwork-1.1.dtd");
-        mappings.put("-//Apache Struts//XWork 1.0//EN", "xwork-1.0.dtd");
-        setDtdMappings(mappings);
-    }
-
-    public void setThrowExceptionOnDuplicateBeans(boolean val) {
-        this.throwExceptionOnDuplicateBeans = val;
-    }
-
-    public void setDtdMappings(Map<String, String> mappings) {
-        this.dtdMappings = Collections.unmodifiableMap(mappings);
-    }
-
-    @Inject
-    public void setObjectFactory(ObjectFactory objectFactory) {
-        this.objectFactory = objectFactory;
-    }
-
-    @Inject
-    public void setFileManagerFactory(FileManagerFactory fileManagerFactory) {
-        this.fileManager = fileManagerFactory.getFileManager();
-    }
-
-    /**
-     * Returns an unmodifiable map of DTD mappings
-     */
-    public Map<String, String> getDtdMappings() {
-        return dtdMappings;
-    }
-
-    public void init(Configuration configuration) {
-        this.configuration = configuration;
-        this.includedFileNames = configuration.getLoadedFileNames();
-        loadDocuments(configFileName);
-    }
-
-    public void destroy() {
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (!(o instanceof XmlConfigurationProvider)) {
-            return false;
-        }
-
-        final XmlConfigurationProvider xmlConfigurationProvider = (XmlConfigurationProvider) o;
-
-        if ((configFileName != null) ? (!configFileName.equals(xmlConfigurationProvider.configFileName)) : (xmlConfigurationProvider.configFileName != null)) {
-            return false;
-        }
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        return ((configFileName != null) ? configFileName.hashCode() : 0);
-    }
-
-    private void loadDocuments(String configFileName) {
-        try {
-            loadedFileUrls.clear();
-            documents = loadConfigurationFiles(configFileName, null);
-        } catch (ConfigurationException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new ConfigurationException("Error loading configuration file " + configFileName, e);
-        }
-    }
-
-    public void register(ContainerBuilder containerBuilder, LocatableProperties props) throws ConfigurationException {
-        LOG.info("Parsing configuration file [{}]", configFileName);
-        Map<String, Node> loadedBeans = new HashMap<>();
-        for (Document doc : documents) {
-            Element rootElement = doc.getDocumentElement();
-            NodeList children = rootElement.getChildNodes();
-            int childSize = children.getLength();
-
-            for (int i = 0; i < childSize; i++) {
-                Node childNode = children.item(i);
-
-                if (childNode instanceof Element) {
-                    Element child = (Element) childNode;
-
-                    final String nodeName = child.getNodeName();
-
-                    if ("bean".equals(nodeName)) {
-                        String type = child.getAttribute("type");
-                        String name = child.getAttribute("name");
-                        String impl = child.getAttribute("class");
-                        String onlyStatic = child.getAttribute("static");
-                        String scopeStr = child.getAttribute("scope");
-                        boolean optional = "true".equals(child.getAttribute("optional"));
-                        Scope scope = Scope.SINGLETON;
-                        if ("default".equals(scopeStr)) {
-                            scope = Scope.DEFAULT;
-                        } else if ("request".equals(scopeStr)) {
-                            scope = Scope.REQUEST;
-                        } else if ("session".equals(scopeStr)) {
-                            scope = Scope.SESSION;
-                        } else if ("singleton".equals(scopeStr)) {
-                            scope = Scope.SINGLETON;
-                        } else if ("thread".equals(scopeStr)) {
-                            scope = Scope.THREAD;
-                        }
-
-                        if (StringUtils.isEmpty(name)) {
-                            name = Container.DEFAULT_NAME;
-                        }
-
-                        try {
-                            Class classImpl = ClassLoaderUtil.loadClass(impl, getClass());
-                            Class classType = classImpl;
-                            if (StringUtils.isNotEmpty(type)) {
-                                classType = ClassLoaderUtil.loadClass(type, getClass());
-                            }
-                            if ("true".equals(onlyStatic)) {
-                                // Force loading of class to detect no class def found exceptions
-                                classImpl.getDeclaredClasses();
-                                containerBuilder.injectStatics(classImpl);
-                            } else {
-                                if (containerBuilder.contains(classType, name)) {
-                                    Location loc = LocationUtils.getLocation(loadedBeans.get(classType.getName() + name));
-                                    if (throwExceptionOnDuplicateBeans) {
-                                        throw new ConfigurationException("Bean type " + classType + " with the name " +
-                                                name + " has already been loaded by " + loc, child);
-                                    }
-                                }
-
-                                // Force loading of class to detect no class def found exceptions
-                                classImpl.getDeclaredConstructors();
-
-                                LOG.debug("Loaded type: {} name: {} impl: {}", type, name, impl);
-                                containerBuilder.factory(classType, name, new LocatableFactory(name, classType, classImpl, scope, childNode), scope);
-                            }
-                            loadedBeans.put(classType.getName() + name, child);
-                        } catch (Throwable ex) {
-                            if (!optional) {
-                                throw new ConfigurationException("Unable to load bean: type:" + type + " class:" + impl, ex, childNode);
-                            } else {
-                                LOG.debug("Unable to load optional class: {}", impl);
-                            }
-                        }
-                    } else if ("constant".equals(nodeName)) {
-                        String name = child.getAttribute("name");
-                        String value = child.getAttribute("value");
-                        props.setProperty(name, value, childNode);
-                    } else if (nodeName.equals("unknown-handler-stack")) {
-                        List<UnknownHandlerConfig> unknownHandlerStack = new ArrayList<UnknownHandlerConfig>();
-                        NodeList unknownHandlers = child.getElementsByTagName("unknown-handler-ref");
-                        int unknownHandlersSize = unknownHandlers.getLength();
-
-                        for (int k = 0; k < unknownHandlersSize; k++) {
-                            Element unknownHandler = (Element) unknownHandlers.item(k);
-                            Location location = LocationUtils.getLocation(unknownHandler);
-                            unknownHandlerStack.add(new UnknownHandlerConfig(unknownHandler.getAttribute("name"), location));
-                        }
-
-                        if (!unknownHandlerStack.isEmpty())
-                            configuration.setUnknownHandlerStack(unknownHandlerStack);
-                    }
-                }
-            }
-        }
-    }
-
-    public void loadPackages() throws ConfigurationException {
-        List<Element> reloads = new ArrayList<Element>();
-        verifyPackageStructure();
-
-        for (Document doc : documents) {
-            Element rootElement = doc.getDocumentElement();
-            NodeList children = rootElement.getChildNodes();
-            int childSize = children.getLength();
-
-            for (int i = 0; i < childSize; i++) {
-                Node childNode = children.item(i);
-
-                if (childNode instanceof Element) {
-                    Element child = (Element) childNode;
-
-                    final String nodeName = child.getNodeName();
-
-                    if ("package".equals(nodeName)) {
-                        PackageConfig cfg = addPackage(child);
-                        if (cfg.isNeedsRefresh()) {
-                            reloads.add(child);
-                        }
-                    }
-                }
-            }
-            loadExtraConfiguration(doc);
-        }
-
-        if (reloads.size() > 0) {
-            reloadRequiredPackages(reloads);
-        }
-
-        for (Document doc : documents) {
-            loadExtraConfiguration(doc);
-        }
-
-        documents.clear();
-        declaredPackages.clear();
-        configuration = null;
-    }
-
-    private void verifyPackageStructure() {
-        DirectedGraph<String> graph = new DirectedGraph<>();
-
-        for (Document doc : documents) {
-            Element rootElement = doc.getDocumentElement();
-            NodeList children = rootElement.getChildNodes();
-            int childSize = children.getLength();
-            for (int i = 0; i < childSize; i++) {
-                Node childNode = children.item(i);
-                if (childNode instanceof Element) {
-                    Element child = (Element) childNode;
-
-                    final String nodeName = child.getNodeName();
-
-                    if ("package".equals(nodeName)) {
-                        String packageName = child.getAttribute("name");
-                        declaredPackages.put(packageName, child);
-                        graph.addNode(packageName);
-
-                        String extendsAttribute = child.getAttribute("extends");
-                        List<String> parents = ConfigurationUtil.buildParentListFromString(extendsAttribute);
-                        for (String parent : parents) {
-                            graph.addNode(parent);
-                            graph.addEdge(packageName, parent);
-                        }
-                    }
-                }
-            }
-        }
-
-        CycleDetector<String> detector = new CycleDetector<>(graph);
-        if (detector.containsCycle()) {
-            StringBuilder builder = new StringBuilder("The following packages participate in cycles:");
-            for (String packageName : detector.getVerticesInCycles()) {
-                builder.append(" ");
-                builder.append(packageName);
-            }
-            throw new ConfigurationException(builder.toString());
-        }
-    }
-
-    private void reloadRequiredPackages(List<Element> reloads) {
-        if (reloads.size() > 0) {
-            List<Element> result = new ArrayList<>();
-            for (Element pkg : reloads) {
-                PackageConfig cfg = addPackage(pkg);
-                if (cfg.isNeedsRefresh()) {
-                    result.add(pkg);
-                }
-            }
-            if ((result.size() > 0) && (result.size() != reloads.size())) {
-                reloadRequiredPackages(result);
-                return;
-            }
-
-            // Print out error messages for all misconfigured inheritance packages
-            if (result.size() > 0) {
-                for (Element rp : result) {
-                    String parent = rp.getAttribute("extends");
-                    if (parent != null) {
-                        List<PackageConfig> parents = ConfigurationUtil.buildParentsFromString(configuration, parent);
-                        if (parents != null && parents.size() <= 0) {
-                            LOG.error("Unable to find parent packages {}", parent);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Tells whether the ConfigurationProvider should reload its configuration. This method should only be called
-     * if ConfigurationManager.isReloadingConfigs() is true.
-     *
-     * @return true if the file has been changed since the last time we read it
-     */
-    public boolean needsReload() {
-
-        for (String url : loadedFileUrls) {
-            if (fileManager.fileNeedsReloading(url)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    protected void addAction(Element actionElement, PackageConfig.Builder packageContext) throws ConfigurationException {
-        String name = actionElement.getAttribute("name");
-        String className = actionElement.getAttribute("class");
-        //methodName should be null if it's not set
-        String methodName = StringUtils.trimToNull(actionElement.getAttribute("method"));
-        Location location = DomHelper.getLocationObject(actionElement);
-
-        if (location == null) {
-            LOG.warn("Location null for {}", className);
-        }
-
-        // if there isn't a class name specified for an <action/> then try to
-        // use the default-class-ref from the <package/>
-        if (StringUtils.isEmpty(className)) {
-            // if there is a package default-class-ref use that, otherwise use action support
-           /* if (StringUtils.isNotEmpty(packageContext.getDefaultClassRef())) {
-                className = packageContext.getDefaultClassRef();
-            } else {
-                className = ActionSupport.class.getName();
-            }*/
-
-        } else {
-            if (!verifyAction(className, name, location)) {
-                LOG.error("Unable to verify action [{}] with class [{}], from [{}]", name, className, location);
-                return;
-            }
-        }
-
-        Map<String, ResultConfig> results;
-        try {
-            results = buildResults(actionElement, packageContext);
-        } catch (ConfigurationException e) {
-            throw new ConfigurationException("Error building results for action " + name + " in namespace " + packageContext.getNamespace(), e, actionElement);
-        }
-
-        List<InterceptorMapping> interceptorList = buildInterceptorList(actionElement, packageContext);
-
-        List<ExceptionMappingConfig> exceptionMappings = buildExceptionMappings(actionElement, packageContext);
-
-        Set<String> allowedMethods = buildAllowedMethods(actionElement, packageContext);
-
-        ActionConfig actionConfig = new ActionConfig.Builder(packageContext.getName(), name, className)
-                .methodName(methodName)
-                .addResultConfigs(results)
-                .addInterceptors(interceptorList)
-                .addExceptionMappings(exceptionMappings)
-                .addParams(XmlHelper.getParams(actionElement))
-                .addAllowedMethod(allowedMethods)
-                .location(location)
-                .build();
-        packageContext.addActionConfig(name, actionConfig);
-
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Loaded {}{} in '{}' package: {}",
-                    StringUtils.isNotEmpty(packageContext.getNamespace()) ? (packageContext.getNamespace() + "/") : "",
-                    name, packageContext.getName(), actionConfig);
-        }
-    }
-
-    protected boolean verifyAction(String className, String name, Location loc) {
-        if (className.contains("{")) {
-            LOG.debug("Action class [{}] contains a wildcard replacement value, so it can't be verified", className);
-            return true;
-        }
-        try {
-            if (objectFactory.isNoArgConstructorRequired()) {
-                Class clazz = objectFactory.getClassInstance(className);
-                if (!Modifier.isPublic(clazz.getModifiers())) {
-                    throw new ConfigurationException("Action class [" + className + "] is not public", loc);
-                }
-                clazz.getConstructor(new Class[]{});
-            }
-        } catch (ClassNotFoundException e) {
-            LOG.debug("Class not found for action [{}]", className, e);
-            throw new ConfigurationException("Action class [" + className + "] not found", loc);
-        } catch (NoSuchMethodException e) {
-            LOG.debug("No constructor found for action [{}]", className, e);
-            throw new ConfigurationException("Action class [" + className + "] does not have a public no-arg constructor", e, loc);
-        } catch (RuntimeException ex) {
-            // Probably not a big deal, like request or session-scoped Spring beans that need a real request
-            LOG.info("Unable to verify action class [{}] exists at initialization", className);
-            LOG.debug("Action verification cause", ex);
-        } catch (Exception ex) {
-            // Default to failing fast
-            LOG.debug("Unable to verify action class [{}]", className, ex);
-            throw new ConfigurationException(ex, loc);
-        }
-        return true;
-    }
-
-    /**
-     * Create a PackageConfig from an XML element representing it.
-     */
-    protected PackageConfig addPackage(Element packageElement) throws ConfigurationException {
-        String packageName = packageElement.getAttribute("name");
-        PackageConfig packageConfig = configuration.getPackageConfig(packageName);
-        if (packageConfig != null) {
-            LOG.debug("Package [{}] already loaded, skipping re-loading it and using existing PackageConfig [{}]", packageName, packageConfig);
-            return packageConfig;
-        }
-
-        PackageConfig.Builder newPackage = buildPackageContext(packageElement);
-
-        if (newPackage.isNeedsRefresh()) {
-            return newPackage.build();
-        }
-
-        LOG.debug("Loaded {}", newPackage);
-
-        // add result types (and default result) to this package
-        addResultTypes(newPackage, packageElement);
-
-        // load the interceptors and interceptor stacks for this package
-        loadInterceptors(newPackage, packageElement);
-
-        // load the default interceptor reference for this package
-        loadDefaultInterceptorRef(newPackage, packageElement);
-
-        // load the default class ref for this package
-        loadDefaultClassRef(newPackage, packageElement);
-
-        // load the global result list for this package
-        loadGlobalResults(newPackage, packageElement);
-
-        // load the global exception handler list for this package
-        loadGobalExceptionMappings(newPackage, packageElement);
-
-        // get actions
-        NodeList actionList = packageElement.getElementsByTagName("action");
-
-        for (int i = 0; i < actionList.getLength(); i++) {
-            Element actionElement = (Element) actionList.item(i);
-            addAction(actionElement, newPackage);
-        }
-
-        // load the default action reference for this package
-        loadDefaultActionRef(newPackage, packageElement);
-
-        PackageConfig cfg = newPackage.build();
-        configuration.addPackageConfig(cfg.getName(), cfg);
-        return cfg;
-    }
-
-    protected void addResultTypes(PackageConfig.Builder packageContext, Element element) {
-        NodeList resultTypeList = element.getElementsByTagName("result-type");
-
-        for (int i = 0; i < resultTypeList.getLength(); i++) {
-            Element resultTypeElement = (Element) resultTypeList.item(i);
-            String name = resultTypeElement.getAttribute("name");
-            String className = resultTypeElement.getAttribute("class");
-            String def = resultTypeElement.getAttribute("default");
-
-            Location loc = DomHelper.getLocationObject(resultTypeElement);
-
-            Class clazz = verifyResultType(className, loc);
-            if (clazz != null) {
-                String paramName = null;
-                try {
-                    paramName = (String) clazz.getField("DEFAULT_PARAM").get(null);
-                } catch (Throwable t) {
-                    LOG.debug("The result type [{}] doesn't have a default param [DEFAULT_PARAM] defined!", className, t);
-                }
-                ResultTypeConfig.Builder resultType = new ResultTypeConfig.Builder(name, className).defaultResultParam(paramName)
-                        .location(DomHelper.getLocationObject(resultTypeElement));
-
-                Map<String, String> params = XmlHelper.getParams(resultTypeElement);
-
-                if (!params.isEmpty()) {
-                    resultType.addParams(params);
-                }
-                packageContext.addResultTypeConfig(resultType.build());
-
-                // set the default result type
-                if (BooleanUtils.toBoolean(def)) {
-                    packageContext.defaultResultType(name);
-                }
-            }
-        }
-    }
-
-    protected Class verifyResultType(String className, Location loc) {
-        try {
-            return objectFactory.getClassInstance(className);
-        } catch (ClassNotFoundException | NoClassDefFoundError e) {
-            LOG.warn("Result class [{}] doesn't exist ({}) at {}, ignoring", className, e.getClass().getSimpleName(), loc, e);
-        }
-
-        return null;
-    }
-
-    protected List<InterceptorMapping> buildInterceptorList(Element element, PackageConfig.Builder context) throws ConfigurationException {
-        List<InterceptorMapping> interceptorList = new ArrayList<>();
-        NodeList interceptorRefList = element.getElementsByTagName("interceptor-ref");
-
-        for (int i = 0; i < interceptorRefList.getLength(); i++) {
-            Element interceptorRefElement = (Element) interceptorRefList.item(i);
-
-            if (interceptorRefElement.getParentNode().equals(element) || interceptorRefElement.getParentNode().getNodeName().equals(element.getNodeName())) {
-                List<InterceptorMapping> interceptors = lookupInterceptorReference(context, interceptorRefElement);
-                interceptorList.addAll(interceptors);
-            }
-        }
-
-        return interceptorList;
-    }
-
-    /**
-     * This method builds a package context by looking for the parents of this new package.
-     * <p/>
-     * If no parents are found, it will return a root package.
-     */
-    protected PackageConfig.Builder buildPackageContext(Element packageElement) {
-        String parent = packageElement.getAttribute("extends");
-        String abstractVal = packageElement.getAttribute("abstract");
-        boolean isAbstract = Boolean.parseBoolean(abstractVal);
-        String name = StringUtils.defaultString(packageElement.getAttribute("name"));
-        String namespace = StringUtils.defaultString(packageElement.getAttribute("namespace"));
-        String strictDMIVal = StringUtils.defaultString(packageElement.getAttribute("strict-method-invocation"));
-        boolean strictDMI = Boolean.parseBoolean(strictDMIVal);
-
-        if (StringUtils.isNotEmpty(packageElement.getAttribute("externalReferenceResolver"))) {
-            throw new ConfigurationException("The 'externalReferenceResolver' attribute has been removed.  Please use " +
-                    "a custom ObjectFactory or Interceptor.", packageElement);
-        }
-
-        PackageConfig.Builder cfg = new PackageConfig.Builder(name)
-                .namespace(namespace)
-                .isAbstract(isAbstract)
-                .strictMethodInvocation(strictDMI)
-                .location(DomHelper.getLocationObject(packageElement));
-
-        if (StringUtils.isNotEmpty(StringUtils.defaultString(parent))) { // has parents, let's look it up
-            List<PackageConfig> parents = new ArrayList<>();
-            for (String parentPackageName : ConfigurationUtil.buildParentListFromString(parent)) {
-                if (configuration.getPackageConfigNames().contains(parentPackageName)) {
-                    parents.add(configuration.getPackageConfig(parentPackageName));
-                } else if (declaredPackages.containsKey(parentPackageName)) {
-                    if (configuration.getPackageConfig(parentPackageName) == null) {
-                        addPackage(declaredPackages.get(parentPackageName));
-                    }
-                    parents.add(configuration.getPackageConfig(parentPackageName));
-                } else {
-                    throw new ConfigurationException("Parent package is not defined: " + parentPackageName);
-                }
-
-            }
-
-            if (parents.size() <= 0) {
-                cfg.needsRefresh(true);
-            } else {
-                cfg.addParents(parents);
-            }
-        }
-
-        return cfg;
-    }
-
-    /**
-     * Build a map of ResultConfig objects from below a given XML element.
-     */
-    protected Map<String, ResultConfig> buildResults(Element element, PackageConfig.Builder packageContext) {
-        NodeList resultEls = element.getElementsByTagName("result");
-
-        Map<String, ResultConfig> results = new LinkedHashMap<>();
-
-        for (int i = 0; i < resultEls.getLength(); i++) {
-            Element resultElement = (Element) resultEls.item(i);
-
-            if (resultElement.getParentNode().equals(element) || resultElement.getParentNode().getNodeName().equals(element.getNodeName())) {
-                String resultName = resultElement.getAttribute("name");
-                String resultType = resultElement.getAttribute("type");
-
-                // if you don't specify a name on <result/>, it defaults to "success"
-                if (StringUtils.isEmpty(resultName)) {
-                    resultName = Action.SUCCESS;
-                }
-
-                // there is no result type, so let's inherit from the parent package
-                if (StringUtils.isEmpty(resultType)) {
-                    resultType = packageContext.getFullDefaultResultType();
-
-                    // now check if there is a result type now
-                    if (StringUtils.isEmpty(resultType)) {
-                        // uh-oh, we have a problem
-                        throw new ConfigurationException("No result type specified for result named '"
-                                + resultName + "', perhaps the parent package does not specify the result type?", resultElement);
-                    }
-                }
-
-
-                ResultTypeConfig config = packageContext.getResultType(resultType);
-
-                if (config == null) {
-                    throw new ConfigurationException("There is no result type defined for type '" + resultType
-                            + "' mapped with name '" + resultName + "'."
-                            + "  Did you mean '" + guessResultType(resultType) + "'?", resultElement);
-                }
-
-                String resultClass = config.getClassName();
-
-                // invalid result type specified in result definition
-                if (resultClass == null) {
-                    throw new ConfigurationException("Result type '" + resultType + "' is invalid");
-                }
-
-                Map<String, String> resultParams = XmlHelper.getParams(resultElement);
-
-                if (resultParams.size() == 0) // maybe we just have a body - therefore a default parameter
-                {
-                    // if <result ...>something</result> then we add a parameter of 'something' as this is the most used result param
-                    if (resultElement.getChildNodes().getLength() >= 1) {
-                        resultParams = new LinkedHashMap<String, String>();
-
-                        String paramName = config.getDefaultResultParam();
-                        if (paramName != null) {
-                            StringBuilder paramValue = new StringBuilder();
-                            for (int j = 0; j < resultElement.getChildNodes().getLength(); j++) {
-                                if (resultElement.getChildNodes().item(j).getNodeType() == Node.TEXT_NODE) {
-                                    String val = resultElement.getChildNodes().item(j).getNodeValue();
-                                    if (val != null) {
-                                        paramValue.append(val);
-                                    }
-                                }
-                            }
-                            String val = paramValue.toString().trim();
-                            if (val.length() > 0) {
-                                resultParams.put(paramName, val);
-                            }
-                        } else {
-                            LOG.warn("No default parameter defined for result [{}] of type [{}] ", config.getName(), config.getClassName());
-                        }
-                    }
-                }
-
-                // create new param map, so that the result param can override the config param
-                Map<String, String> params = new LinkedHashMap<String, String>();
-                Map<String, String> configParams = config.getParams();
-                if (configParams != null) {
-                    params.putAll(configParams);
-                }
-                params.putAll(resultParams);
-
-                ResultConfig resultConfig = new ResultConfig.Builder(resultName, resultClass)
-                        .addParams(params)
-                        .location(DomHelper.getLocationObject(element))
-                        .build();
-                results.put(resultConfig.getName(), resultConfig);
-            }
-        }
-
-        return results;
-    }
-
-    protected String guessResultType(String type) {
-        StringBuilder sb = null;
-        if (type != null) {
-            sb = new StringBuilder();
-            boolean capNext = false;
-            for (int x=0; x<type.length(); x++) {
-                char c = type.charAt(x);
-                if (c == '-') {
-                    capNext = true;
-                    continue;
-                } else if (Character.isLowerCase(c) && capNext) {
-                    c = Character.toUpperCase(c);
-                    capNext = false;
-                }
-                sb.append(c);
-            }
-        }
-        return (sb != null ? sb.toString() : null);
-    }
-
-    /**
-     * Build a map of ResultConfig objects from below a given XML element.
-     */
-    protected List<ExceptionMappingConfig> buildExceptionMappings(Element element, PackageConfig.Builder packageContext) {
-        NodeList exceptionMappingEls = element.getElementsByTagName("exception-mapping");
-
-        List<ExceptionMappingConfig> exceptionMappings = new ArrayList<>();
-
-        for (int i = 0; i < exceptionMappingEls.getLength(); i++) {
-            Element ehElement = (Element) exceptionMappingEls.item(i);
-
-            if (ehElement.getParentNode().equals(element) || ehElement.getParentNode().getNodeName().equals(element.getNodeName())) {
-                String emName = ehElement.getAttribute("name");
-                String exceptionClassName = ehElement.getAttribute("exception");
-                String exceptionResult = ehElement.getAttribute("result");
-
-                Map<String, String> params = XmlHelper.getParams(ehElement);
-
-                if (StringUtils.isEmpty(emName)) {
-                    emName = exceptionResult;
-                }
-
-                ExceptionMappingConfig ehConfig = new ExceptionMappingConfig.Builder(emName, exceptionClassName, exceptionResult)
-                        .addParams(params)
-                        .location(DomHelper.getLocationObject(ehElement))
-                        .build();
-                exceptionMappings.add(ehConfig);
-            }
-        }
-
-        return exceptionMappings;
-    }
-
-    protected Set<String> buildAllowedMethods(Element element, PackageConfig.Builder packageContext) {
-        NodeList allowedMethodsEls = element.getElementsByTagName("allowed-methods");
-
-        Set<String> allowedMethods = null;
-
-        if (allowedMethodsEls.getLength() > 0) {
-            allowedMethods = new HashSet<>();
-            Node n = allowedMethodsEls.item(0).getFirstChild();
-            if (n != null) {
-                String s = n.getNodeValue().trim();
-                if (s.length() > 0) {
-                    allowedMethods = TextParseUtil.commaDelimitedStringToSet(s);
-                }
-            }
-        } else if (packageContext.isStrictMethodInvocation()) {
-            allowedMethods = new HashSet<>();
-        }
-
-        return allowedMethods;
-    }
-
-    protected void loadDefaultInterceptorRef(PackageConfig.Builder packageContext, Element element) {
-        NodeList resultTypeList = element.getElementsByTagName("default-interceptor-ref");
-
-        if (resultTypeList.getLength() > 0) {
-            Element defaultRefElement = (Element) resultTypeList.item(0);
-            packageContext.defaultInterceptorRef(defaultRefElement.getAttribute("name"));
-        }
-    }
-
-    protected void loadDefaultActionRef(PackageConfig.Builder packageContext, Element element) {
-        NodeList resultTypeList = element.getElementsByTagName("default-action-ref");
-
-        if (resultTypeList.getLength() > 0) {
-            Element defaultRefElement = (Element) resultTypeList.item(0);
-            packageContext.defaultActionRef(defaultRefElement.getAttribute("name"));
-        }
-    }
-
-    /**
-     * Load all of the global results for this package from the XML element.
-     */
-    protected void loadGlobalResults(PackageConfig.Builder packageContext, Element packageElement) {
-        NodeList globalResultList = packageElement.getElementsByTagName("global-results");
-
-        if (globalResultList.getLength() > 0) {
-            Element globalResultElement = (Element) globalResultList.item(0);
-            Map<String, ResultConfig> results = buildResults(globalResultElement, packageContext);
-            packageContext.addGlobalResultConfigs(results);
-        }
-    }
-
-    protected void loadDefaultClassRef(PackageConfig.Builder packageContext, Element element) {
-        NodeList defaultClassRefList = element.getElementsByTagName("default-class-ref");
-        if (defaultClassRefList.getLength() > 0) {
-            Element defaultClassRefElement = (Element) defaultClassRefList.item(0);
-            packageContext.defaultClassRef(defaultClassRefElement.getAttribute("class"));
-        }
-    }
-
-    /**
-     * Load all of the global results for this package from the XML element.
-     */
-    protected void loadGobalExceptionMappings(PackageConfig.Builder packageContext, Element packageElement) {
-        NodeList globalExceptionMappingList = packageElement.getElementsByTagName("global-exception-mappings");
-
-        if (globalExceptionMappingList.getLength() > 0) {
-            Element globalExceptionMappingElement = (Element) globalExceptionMappingList.item(0);
-            List<ExceptionMappingConfig> exceptionMappings = buildExceptionMappings(globalExceptionMappingElement, packageContext);
-            packageContext.addGlobalExceptionMappingConfigs(exceptionMappings);
-        }
-    }
-
-    protected InterceptorStackConfig loadInterceptorStack(Element element, PackageConfig.Builder context) throws ConfigurationException {
-        String name = element.getAttribute("name");
-
-        InterceptorStackConfig.Builder config = new InterceptorStackConfig.Builder(name)
-                .location(DomHelper.getLocationObject(element));
-        NodeList interceptorRefList = element.getElementsByTagName("interceptor-ref");
-
-        for (int j = 0; j < interceptorRefList.getLength(); j++) {
-            Element interceptorRefElement = (Element) interceptorRefList.item(j);
-            List<InterceptorMapping> interceptors = lookupInterceptorReference(context, interceptorRefElement);
-            config.addInterceptors(interceptors);
-        }
-
-        return config.build();
-    }
-
-    protected void loadInterceptorStacks(Element element, PackageConfig.Builder context) throws ConfigurationException {
-        NodeList interceptorStackList = element.getElementsByTagName("interceptor-stack");
-
-        for (int i = 0; i < interceptorStackList.getLength(); i++) {
-            Element interceptorStackElement = (Element) interceptorStackList.item(i);
-
-            InterceptorStackConfig config = loadInterceptorStack(interceptorStackElement, context);
-
-            context.addInterceptorStackConfig(config);
-        }
-    }
-
-    protected void loadInterceptors(PackageConfig.Builder context, Element element) throws ConfigurationException {
-        NodeList interceptorList = element.getElementsByTagName("interceptor");
-
-        for (int i = 0; i < interceptorList.getLength(); i++) {
-            Element interceptorElement = (Element) interceptorList.item(i);
-            String name = interceptorElement.getAttribute("name");
-            String className = interceptorElement.getAttribute("class");
-
-            Map<String, String> params = XmlHelper.getParams(interceptorElement);
-            InterceptorConfig config = new InterceptorConfig.Builder(name, className)
-                    .addParams(params)
-                    .location(DomHelper.getLocationObject(interceptorElement))
-                    .build();
-
-            context.addInterceptorConfig(config);
-        }
-
-        loadInterceptorStacks(element, context);
-    }
-
-    //    protected void loadPackages(Element rootElement) throws ConfigurationException {
-    //        NodeList packageList = rootElement.getElementsByTagName("package");
-    //
-    //        for (int i = 0; i < packageList.getLength(); i++) {
-    //            Element packageElement = (Element) packageList.item(i);
-    //            addPackage(packageElement);
-    //        }
-    //    }
-    private List<Document> loadConfigurationFiles(String fileName, Element includeElement) {
-        List<Document> docs = new ArrayList<>();
-        List<Document> finalDocs = new ArrayList<>();
-        if (!includedFileNames.contains(fileName)) {
-            LOG.debug("Loading action configurations from: {}", fileName);
-
-            includedFileNames.add(fileName);
-
-            Iterator<URL> urls = null;
-            InputStream is = null;
-
-            IOException ioException = null;
-            try {
-                urls = getConfigurationUrls(fileName);
-            } catch (IOException ex) {
-                ioException = ex;
-            }
-
-            if (urls == null || !urls.hasNext()) {
-                if (errorIfMissing) {
-                    throw new ConfigurationException("Could not open files of the name " + fileName, ioException);
-                } else {
-                    LOG.info("Unable to locate configuration files of the name {}, skipping", fileName);
-                    return docs;
-                }
-            }
-
-            URL url = null;
-            while (urls.hasNext()) {
-                try {
-                    url = urls.next();
-                    is = fileManager.loadFile(url);
-
-                    InputSource in = new InputSource(is);
-
-                    in.setSystemId(url.toString());
-
-                    docs.add(DomHelper.parse(in, dtdMappings));
-                    loadedFileUrls.add(url.toString());
-                } catch (XWorkException e) {
-                    if (includeElement != null) {
-                        throw new ConfigurationException("Unable to load " + url, e, includeElement);
-                    } else {
-                        throw new ConfigurationException("Unable to load " + url, e);
-                    }
-                } catch (Exception e) {
-                    throw new ConfigurationException("Caught exception while loading file " + fileName, e, includeElement);
-                } finally {
-                    if (is != null) {
-                        try {
-                            is.close();
-                        } catch (IOException e) {
-                            LOG.error("Unable to close input stream", e);
-                        }
-                    }
-                }
-            }
-
-            //sort the documents, according to the "order" attribute
-            Collections.sort(docs, new Comparator<Document>() {
-                public int compare(Document doc1, Document doc2) {
-                    return XmlHelper.getLoadOrder(doc1).compareTo(XmlHelper.getLoadOrder(doc2));
-                }
-            });
-
-            for (Document doc : docs) {
-                Element rootElement = doc.getDocumentElement();
-                NodeList children = rootElement.getChildNodes();
-                int childSize = children.getLength();
-
-                for (int i = 0; i < childSize; i++) {
-                    Node childNode = children.item(i);
-
-                    if (childNode instanceof Element) {
-                        Element child = (Element) childNode;
-
-                        final String nodeName = child.getNodeName();
-
-                        if ("include".equals(nodeName)) {
-                            String includeFileName = child.getAttribute("file");
-                            if (includeFileName.indexOf('*') != -1) {
-                                // handleWildCardIncludes(includeFileName, docs, child);
-                                ClassPathFinder wildcardFinder = new ClassPathFinder();
-                                wildcardFinder.setPattern(includeFileName);
-                                Vector<String> wildcardMatches = wildcardFinder.findMatches();
-                                for (String match : wildcardMatches) {
-                                    finalDocs.addAll(loadConfigurationFiles(match, child));
-                                }
-                            } else {
-                                finalDocs.addAll(loadConfigurationFiles(includeFileName, child));
-                            }
-                        }
-                    }
-                }
-                finalDocs.add(doc);
-            }
-
-            LOG.debug("Loaded action configuration from: {}", fileName);
-        }
-        return finalDocs;
-    }
-
-    protected Iterator<URL> getConfigurationUrls(String fileName) throws IOException {
-        return ClassLoaderUtil.getResources(fileName, XmlConfigurationProvider.class, false);
-    }
-
-    /**
-     * Allows subclasses to load extra information from the document
-     *
-     * @param doc The configuration document
-     */
-    protected void loadExtraConfiguration(Document doc) {
-        // no op
-    }
-
-    /**
-     * Looks up the Interceptor Class from the interceptor-ref name and creates an instance, which is added to the
-     * provided List, or, if this is a ref to a stack, it adds the Interceptor instances from the List to this stack.
-     *
-     * @param interceptorRefElement Element to pull interceptor ref data from
-     * @param context               The PackageConfig to lookup the interceptor from
-     * @return A list of Interceptor objects
-     */
-    private List<InterceptorMapping> lookupInterceptorReference(PackageConfig.Builder context, Element interceptorRefElement) throws ConfigurationException {
-        String refName = interceptorRefElement.getAttribute("name");
-        Map<String, String> refParams = XmlHelper.getParams(interceptorRefElement);
-
-        Location loc = LocationUtils.getLocation(interceptorRefElement);
-        return InterceptorBuilder.constructInterceptorReference(context, refName, refParams, loc, objectFactory);
-    }
-
-    List<Document> getDocuments() {
-        return documents;
-    }
-
-    @Override
-    public String toString() {
-        return "XmlConfigurationProvider{" +
-                "configFileName='" + configFileName + '\'' +
-                '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlHelper.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlHelper.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlHelper.java
deleted file mode 100644
index 84e09d3..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlHelper.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2002-2006,2009 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.opensymphony.xwork2.config.providers;
-
-import org.apache.commons.lang3.StringUtils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-
-/**
- * XML utilities.
- *
- * @author Mike
- */
-public class XmlHelper {
-
-
-    /**
-     * This method will find all the parameters under this <code>paramsElement</code> and return them as
-     * Map<String, String>. For example,
-     * <pre>
-     *   <result ... >
-     *      <param name="param1">value1</param>
-     *      <param name="param2">value2</param>
-     *      <param name="param3">value3</param>
-     *   </result>
-     * </pre>
-     * will returns a Map<String, String> with the following key, value pairs :-
-     * <ul>
-     * <li>param1 - value1</li>
-     * <li>param2 - value2</li>
-     * <li>param3 - value3</li>
-     * </ul>
-     *
-     * @param paramsElement
-     * @return
-     */
-    public static Map<String, String> getParams(Element paramsElement) {
-        LinkedHashMap<String, String> params = new LinkedHashMap<>();
-
-        if (paramsElement == null) {
-            return params;
-        }
-
-        NodeList childNodes = paramsElement.getChildNodes();
-
-        for (int i = 0; i < childNodes.getLength(); i++) {
-            Node childNode = childNodes.item(i);
-
-            if ((childNode.getNodeType() == Node.ELEMENT_NODE) && "param".equals(childNode.getNodeName())) {
-                Element paramElement = (Element) childNode;
-                String paramName = paramElement.getAttribute("name");
-
-                String val = getContent(paramElement);
-                if (val.length() > 0) {
-                    params.put(paramName, val);
-                }
-            }
-        }
-
-        return params;
-    }
-
-    /**
-     * This method will return the content of this particular <code>element</code>.
-     * For example,
-     * <p/>
-     * <pre>
-     *    <result>something_1</result>
-     * </pre>
-     * When the {@link org.w3c.dom.Element} <code>&lt;result&gt;</code> is passed in as
-     * argument (<code>element</code> to this method, it returns the content of it,
-     * namely, <code>something_1</code> in the example above.
-     *
-     * @return
-     */
-    public static String getContent(Element element) {
-        StringBuilder paramValue = new StringBuilder();
-        NodeList childNodes = element.getChildNodes();
-        for (int j = 0; j < childNodes.getLength(); j++) {
-            Node currentNode = childNodes.item(j);
-            if (currentNode != null && currentNode.getNodeType() == Node.TEXT_NODE) {
-                String val = currentNode.getNodeValue();
-                if (val != null) {
-                    paramValue.append(val.trim());
-                }
-            }
-        }
-        return paramValue.toString().trim();
-    }
-
-    /**
-     * Return the value of the "order" attribute from the root element
-     */
-     public static Integer getLoadOrder(Document doc) {
-        Element rootElement = doc.getDocumentElement();
-        String number = rootElement.getAttribute("order");
-        if (StringUtils.isNotBlank(number)) {
-            try {
-                return Integer.parseInt(number);
-            } catch (NumberFormatException e) {
-                return Integer.MAX_VALUE;
-            }
-        } else {
-            //no order specified
-            return Integer.MAX_VALUE;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/package.html
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/package.html b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/package.html
deleted file mode 100644
index 946fc4e..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/package.html
+++ /dev/null
@@ -1 +0,0 @@
-<body>Configuration provider classes.</body>

http://git-wip-us.apache.org/repos/asf/struts/blob/31af5842/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/ConversionAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/ConversionAnnotationProcessor.java b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/ConversionAnnotationProcessor.java
deleted file mode 100644
index 159f8d5..0000000
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/ConversionAnnotationProcessor.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.opensymphony.xwork2.conversion;
-
-import com.opensymphony.xwork2.conversion.annotations.TypeConversion;
-
-import java.util.Map;
-
-/**
- * Used to process {@link com.opensymphony.xwork2.conversion.annotations.TypeConversion}
- * annotation to read defined Converters
- */
-public interface ConversionAnnotationProcessor {
-
-    /**
-     * Process annotation and build {@link TypeConverter} base on provided annotation
-     * and assigning it under given key
-     *
-     * @param mapping keeps converters per given key
-     * @param tc annotation which keeps information about converter
-     * @param key key under which converter should be registered
-     */
-    void process(Map<String, Object> mapping, TypeConversion tc, String key);
-
-}


Mime
View raw message