forked from pool/apache-commons-chain
This commit is contained in:
commit
c4525a2c92
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
66
apache-commons-chain-1.2-portlet20.patch
Normal file
66
apache-commons-chain-1.2-portlet20.patch
Normal file
@ -0,0 +1,66 @@
|
||||
diff -Nru src/test/org/apache/commons/chain/web/portlet/MockPortletContext.java src/test/org/apache/commons/chain/web/portlet-gil/MockPortletContext.java
|
||||
--- src/test/org/apache/commons/chain/web/portlet/MockPortletContext.java 2008-05-29 18:43:14.000000000 +0200
|
||||
+++ src/test/org/apache/commons/chain/web/portlet-gil/MockPortletContext.java 2012-05-26 17:40:42.000000000 +0200
|
||||
@@ -135,4 +135,9 @@
|
||||
attributes.put(name, value);
|
||||
}
|
||||
|
||||
+ public Enumeration<String> getContainerRuntimeOptions() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
}
|
||||
diff -Nru src/test/org/apache/commons/chain/web/portlet/MockPortletRequest.java src/test/org/apache/commons/chain/web/portlet-gil/MockPortletRequest.java
|
||||
--- src/test/org/apache/commons/chain/web/portlet/MockPortletRequest.java 2008-05-29 18:43:14.000000000 +0200
|
||||
+++ src/test/org/apache/commons/chain/web/portlet-gil/MockPortletRequest.java 2012-05-26 18:10:29.000000000 +0200
|
||||
@@ -27,6 +27,7 @@
|
||||
import javax.portlet.PortletMode;
|
||||
import javax.portlet.PortletPreferences;
|
||||
import javax.portlet.WindowState;
|
||||
+import javax.servlet.http.Cookie;
|
||||
import java.security.Principal;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
@@ -312,4 +313,24 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ public Map<String, String[]> getPublicParameterMap() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public Map<String, String[]> getPrivateParameterMap() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public Cookie[] getCookies() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public String getWindowID() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
}
|
||||
diff -Nru src/test/org/apache/commons/chain/web/portlet/MockPortletSession.java src/test/org/apache/commons/chain/web/portlet-gil/MockPortletSession.java
|
||||
--- src/test/org/apache/commons/chain/web/portlet/MockPortletSession.java 2008-05-29 18:43:14.000000000 +0200
|
||||
+++ src/test/org/apache/commons/chain/web/portlet-gil/MockPortletSession.java 2012-05-26 17:44:41.000000000 +0200
|
||||
@@ -172,4 +172,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ public Map<String, Object> getAttributeMap(int scope) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public Map<String, Object> getAttributeMap() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
}
|
336
apache-commons-chain-1.2-tests-servlet31.patch
Normal file
336
apache-commons-chain-1.2-tests-servlet31.patch
Normal file
@ -0,0 +1,336 @@
|
||||
diff -Nru commons-chain-1.2-src/src/test/org/apache/commons/chain/web/servlet/MockHttpServletRequest.java commons-chain-1.2-src.servlet/src/test/org/apache/commons/chain/web/servlet/MockHttpServletRequest.java
|
||||
--- commons-chain-1.2-src/src/test/org/apache/commons/chain/web/servlet/MockHttpServletRequest.java 2008-05-29 18:43:14.000000000 +0200
|
||||
+++ commons-chain-1.2-src.servlet/src/test/org/apache/commons/chain/web/servlet/MockHttpServletRequest.java 2015-06-17 03:36:16.057356781 +0200
|
||||
@@ -20,12 +20,23 @@
|
||||
import org.apache.commons.chain.web.MockEnumeration;
|
||||
import org.apache.commons.chain.web.MockPrincipal;
|
||||
|
||||
+import javax.servlet.AsyncContext;
|
||||
+import javax.servlet.DispatcherType;
|
||||
import javax.servlet.RequestDispatcher;
|
||||
+import javax.servlet.ServletContext;
|
||||
+import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletInputStream;
|
||||
+import javax.servlet.ServletRequest;
|
||||
+import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
+import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
+import javax.servlet.http.Part;
|
||||
+import javax.servlet.http.HttpUpgradeHandler;
|
||||
import java.io.BufferedReader;
|
||||
+import java.io.IOException;
|
||||
+import java.lang.IllegalStateException;
|
||||
import java.security.Principal;
|
||||
import java.util.*;
|
||||
|
||||
@@ -466,5 +477,76 @@
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
+ public Part getPart(String name) throws IOException, IllegalStateException, ServletException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public Collection<Part> getParts() throws IOException, IllegalStateException, ServletException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public void logout() throws ServletException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public void login(String username, String password) throws ServletException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public DispatcherType getDispatcherType() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public AsyncContext getAsyncContext() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public boolean isAsyncSupported() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public boolean isAsyncStarted() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public AsyncContext startAsync() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public ServletContext getServletContext() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public <T extends HttpUpgradeHandler> T upgrade(Class<T> arg0) throws IOException, ServletException {
|
||||
+ throw new RuntimeException("Not implemented");
|
||||
+ }
|
||||
+
|
||||
+ public String changeSessionId() {
|
||||
+ throw new RuntimeException("Not implemented");
|
||||
+ }
|
||||
+
|
||||
+ public long getContentLengthLong() {
|
||||
+ throw new RuntimeException("Not implemented");
|
||||
+ }
|
||||
|
||||
}
|
||||
diff -Nru commons-chain-1.2-src/src/test/org/apache/commons/chain/web/servlet/MockHttpServletResponse.java commons-chain-1.2-src.servlet/src/test/org/apache/commons/chain/web/servlet/MockHttpServletResponse.java
|
||||
--- commons-chain-1.2-src/src/test/org/apache/commons/chain/web/servlet/MockHttpServletResponse.java 2008-05-29 18:43:14.000000000 +0200
|
||||
+++ commons-chain-1.2-src.servlet/src/test/org/apache/commons/chain/web/servlet/MockHttpServletResponse.java 2015-06-17 03:17:13.646842003 +0200
|
||||
@@ -17,11 +17,13 @@
|
||||
package org.apache.commons.chain.web.servlet;
|
||||
|
||||
|
||||
+import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
+import java.util.Collection;
|
||||
import java.util.Locale;
|
||||
|
||||
|
||||
@@ -205,5 +207,33 @@
|
||||
this.locale = locale;
|
||||
}
|
||||
|
||||
+ public Collection<String> getHeaderNames() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public String getHeader(String name) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public Collection<String> getHeaders(String name) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public void logout() throws ServletException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public int getStatus() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public void setContentLengthLong(long arg0) {
|
||||
+ throw new RuntimeException("Not implemented");
|
||||
+ }
|
||||
|
||||
}
|
||||
diff -Nru commons-chain-1.2-src/src/test/org/apache/commons/chain/web/servlet/MockServletContext.java commons-chain-1.2-src.servlet/src/test/org/apache/commons/chain/web/servlet/MockServletContext.java
|
||||
--- commons-chain-1.2-src/src/test/org/apache/commons/chain/web/servlet/MockServletContext.java 2008-05-29 18:43:13.000000000 +0200
|
||||
+++ commons-chain-1.2-src.servlet/src/test/org/apache/commons/chain/web/servlet/MockServletContext.java 2015-06-17 03:16:59.146531770 +0200
|
||||
@@ -17,19 +17,33 @@
|
||||
package org.apache.commons.chain.web.servlet;
|
||||
|
||||
|
||||
+import javax.servlet.Filter;
|
||||
+import javax.servlet.FilterRegistration;
|
||||
+import javax.servlet.FilterRegistration.Dynamic;
|
||||
import javax.servlet.RequestDispatcher;
|
||||
import javax.servlet.Servlet;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
+import javax.servlet.SessionCookieConfig;
|
||||
+import javax.servlet.ServletRegistration;
|
||||
+import javax.servlet.SessionTrackingMode;
|
||||
+import javax.servlet.descriptor.JspConfigDescriptor;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import java.io.InputStream;
|
||||
+import java.lang.Class;
|
||||
+import java.lang.ClassLoader;
|
||||
+import java.lang.IllegalArgumentException;
|
||||
+import java.lang.IllegalStateException;
|
||||
+import java.lang.UnsupportedOperationException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Enumeration;
|
||||
+import java.util.EventListener;
|
||||
import java.util.Hashtable;
|
||||
+import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
@@ -149,5 +163,143 @@
|
||||
attributes.put(name, value);
|
||||
}
|
||||
|
||||
+ public String getContextPath() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public JspConfigDescriptor getJspConfigDescriptor() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public ClassLoader getClassLoader() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public void declareRoles(String... roleNames) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public <T extends EventListener> T createListener(Class<T> c) throws ServletException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public <T extends EventListener> void addListener(T t) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public void addListener(String className) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public void addListener(Class<? extends EventListener> listenerClass) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public Set<SessionTrackingMode> getEffectiveSessionTrackingModes() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public Set<SessionTrackingMode> getDefaultSessionTrackingModes() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public void setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes) throws IllegalStateException, IllegalArgumentException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public SessionCookieConfig getSessionCookieConfig() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public Map<String,? extends FilterRegistration> getFilterRegistrations() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public FilterRegistration getFilterRegistration(String filterName) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public <T extends Filter> T createFilter(Class<T> c) throws ServletException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public FilterRegistration.Dynamic addFilter(String filterName, Class<? extends Filter> filterClass) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public FilterRegistration.Dynamic addFilter(String filterName, Filter filter) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public FilterRegistration.Dynamic addFilter(String filterName, String className) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public Map<String,? extends ServletRegistration> getServletRegistrations() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public ServletRegistration getServletRegistration(String servletName) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public <T extends Servlet> T createServlet(Class<T> c) throws ServletException {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public ServletRegistration.Dynamic addServlet(String servletName, String className) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public boolean setInitParameter(String name, String value) {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public int getEffectiveMinorVersion() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public int getEffectiveMajorVersion() {
|
||||
+ // TODO
|
||||
+ throw new UnsupportedOperationException("Not supported.");
|
||||
+ }
|
||||
+
|
||||
+ public String getVirtualServerName() {
|
||||
+ throw new RuntimeException("Not implemented");
|
||||
+ }
|
||||
|
||||
}
|
4
apache-commons-chain.changes
Normal file
4
apache-commons-chain.changes
Normal file
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 21 16:03:07 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Initial package
|
146
apache-commons-chain.spec
Normal file
146
apache-commons-chain.spec
Normal file
@ -0,0 +1,146 @@
|
||||
#
|
||||
# spec file for package apache-commons-chain
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global base_name chain
|
||||
%global short_name commons-%{base_name}
|
||||
Name: apache-commons-chain
|
||||
Version: 1.2
|
||||
Release: 0
|
||||
Summary: An implementation of the GoF Chain of Responsibility pattern
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: http://commons.apache.org/%{base_name}/
|
||||
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
||||
# javax.servlet 3.1 api support
|
||||
Patch0: %{name}-%{version}-tests-servlet31.patch
|
||||
# javax.portlet 2.0 api support
|
||||
Patch1: %{name}-%{version}-portlet20.patch
|
||||
# Fix build with older jakarta-commons-digester
|
||||
Patch2: commons-chain-1.2-digester.patch
|
||||
# Do not fetch dependencies during the build
|
||||
Patch3: commons-chain-1.2-getdeps.patch
|
||||
# javax.servlet 4.0 api support
|
||||
Patch4: commons-chain-1.2-servlet4.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: ant-junit
|
||||
BuildRequires: apache-commons-collections
|
||||
BuildRequires: apache-commons-parent
|
||||
BuildRequires: commons-beanutils
|
||||
BuildRequires: commons-digester
|
||||
BuildRequires: commons-logging
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: junit
|
||||
BuildRequires: portlet-1.0-api
|
||||
BuildRequires: tomcat-servlet-4.0-api
|
||||
Requires: apache-commons-parent
|
||||
Requires: commons-beanutils
|
||||
Requires: commons-digester
|
||||
Requires: commons-logging
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
A popular technique for organizing the execution of complex
|
||||
processing flows is the "Chain of Responsibility" pattern, as
|
||||
described (among many other places) in the classic "Gang of Four"
|
||||
design patterns book. Although the fundamental API contracts
|
||||
required to implement this design pattern are extremely simple,
|
||||
it is useful to have a base API that facilitates using the pattern,
|
||||
and (more importantly) encouraging composition of command
|
||||
implementations from multiple diverse sources.
|
||||
Towards that end, the Chain API models a computation as a series
|
||||
of "commands" that can be combined into a "chain". The API for a
|
||||
command consists of a single method (execute()), which is passed
|
||||
a "context" parameter containing the dynamic state of the
|
||||
computation, and whose return value is a boolean that determines
|
||||
whether or not processing for the current chain has been completed
|
||||
(true), or whether processing should be delegated to the next
|
||||
command in the chain (false).
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description javadoc
|
||||
This package contains javadoc for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{short_name}-%{version}-src
|
||||
find . -name '*.class' -delete
|
||||
find . -name '*.jar' -delete
|
||||
|
||||
mkdir -p target/lib
|
||||
|
||||
sed -i 's/\r$//g;' *.txt
|
||||
|
||||
%patch0 -p1
|
||||
%patch1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
# Failed tests: testDefaut(org.apache.commons.chain.config.ConfigParserTestCase):
|
||||
# Correct command count expected:<17> but was:<19>
|
||||
rm -r src/test/org/apache/commons/chain/config/ConfigParserTestCase.java
|
||||
|
||||
%pom_remove_dep :myfaces-api
|
||||
rm -rf src/java/org/apache/commons/chain/web/faces
|
||||
|
||||
# Force servlet 3.1 apis
|
||||
%pom_xpath_set "pom:dependency[pom:groupId = 'javax.servlet' ]/pom:artifactId" javax.servlet-api
|
||||
%pom_xpath_set "pom:dependency[pom:groupId = 'javax.servlet' ]/pom:version" 3.1.0
|
||||
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath \
|
||||
commons-logging \
|
||||
commons-digester \
|
||||
commons-beanutils \
|
||||
commons-collections \
|
||||
portlet-1.0-api \
|
||||
tomcat-servlet-4.0-api \
|
||||
junit)
|
||||
|
||||
ant \
|
||||
-Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
|
||||
-Dbuild.sysclasspath=first dist javadoc
|
||||
|
||||
%install
|
||||
# jars
|
||||
install -d -m 0755 %{buildroot}%{_javadir}
|
||||
install -pm 644 dist/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||
ln -s %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
||||
# pom
|
||||
install -d -m 0755 %{buildroot}%{_mavenpomdir}
|
||||
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||||
%add_maven_depmap %{name}.pom %{name}.jar -a org.apache.commons:%{short_name}
|
||||
# javadoc
|
||||
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr dist/docs/api*/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
%fdupes -s %{buildroot}%{_javadocdir}/%{name}/
|
||||
|
||||
%files -f .mfiles
|
||||
%doc RELEASE-NOTES.txt NOTICE.txt
|
||||
%license LICENSE.txt
|
||||
%{_javadir}/%{short_name}.jar
|
||||
|
||||
%files javadoc
|
||||
%doc NOTICE.txt
|
||||
%license LICENSE.txt
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
36
commons-chain-1.2-digester.patch
Normal file
36
commons-chain-1.2-digester.patch
Normal file
@ -0,0 +1,36 @@
|
||||
--- commons-chain-1.2-src/src/java/org/apache/commons/chain/config/ConfigParser.java 2008-05-29 18:43:15.000000000 +0200
|
||||
+++ commons-chain-1.2-src/src/java/org/apache/commons/chain/config/ConfigParser.java 2018-12-21 16:03:07.675014800 +0100
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.apache.commons.chain.config;
|
||||
|
||||
|
||||
+import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import org.apache.commons.chain.Catalog;
|
||||
import org.apache.commons.digester.Digester;
|
||||
@@ -164,7 +164,11 @@
|
||||
digester.push(catalog);
|
||||
|
||||
// Parse the configuration document
|
||||
- digester.parse(url);
|
||||
+ try {
|
||||
+ digester.parse(url.toURI().toString());
|
||||
+ } catch (URISyntaxException e) {
|
||||
+ throw new Exception(e);
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
@@ -187,7 +191,11 @@
|
||||
digester.clear();
|
||||
|
||||
// Parse the configuration document
|
||||
- digester.parse(url);
|
||||
+ try {
|
||||
+ digester.parse(url.toURI().toString());
|
||||
+ } catch (URISyntaxException e) {
|
||||
+ throw new Exception(e);
|
||||
+ }
|
||||
|
||||
}
|
||||
|
57
commons-chain-1.2-getdeps.patch
Normal file
57
commons-chain-1.2-getdeps.patch
Normal file
@ -0,0 +1,57 @@
|
||||
--- commons-chain-1.2-src/build.xml 2018-12-21 16:15:38.510811564 +0100
|
||||
+++ commons-chain-1.2-src/build.xml 2018-12-21 16:16:39.575123664 +0100
|
||||
@@ -40,7 +40,7 @@
|
||||
<available property="Junit.present" classname="junit.framework.Test">
|
||||
</available>
|
||||
</target>
|
||||
- <target name="compile" description="o Compile the code" depends="get-deps">
|
||||
+ <target name="compile" description="o Compile the code">
|
||||
<mkdir dir="${classesdir}">
|
||||
</mkdir>
|
||||
<javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
|
||||
@@ -137,7 +137,7 @@
|
||||
</classpath>
|
||||
</javac>
|
||||
</target>
|
||||
- <target name="javadoc" description="o Generate javadoc" depends="get-deps">
|
||||
+ <target name="javadoc" description="o Generate javadoc">
|
||||
<mkdir dir="${javadocdir}">
|
||||
</mkdir>
|
||||
<tstamp>
|
||||
@@ -155,36 +155,6 @@
|
||||
</classpath>
|
||||
</javadoc>
|
||||
</target>
|
||||
- <target name="get-deps" unless="noget" depends="init">
|
||||
- <!--Proxy settings works only with a JDK 1.2 and higher.-->
|
||||
-
|
||||
- <setproxy>
|
||||
- </setproxy>
|
||||
- <get dest="${libdir}/servlet-api-2.3.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/javax.servlet/jars/servlet-api-2.3.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/portlet-api-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/javax.portlet/jars/portlet-api-1.0.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/myfaces-api-1.1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/myfaces/jars/myfaces-api-1.1.0.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/junit/jars/junit-3.8.1.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/xml-apis-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/xml-apis/jars/xml-apis-2.0.2.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/xercesImpl-2.2.1.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/xerces/jars/xercesImpl-2.2.1.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/commons-beanutils-1.7.0.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/commons-beanutils/jars/commons-beanutils-1.7.0.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/commons-digester-1.8.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/commons-digester/jars/commons-digester-1.8.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/commons-logging-1.1.1.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/commons-logging/jars/commons-logging-1.1.1.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/maven-xdoc-plugin-1.9.2.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/maven/plugins/maven-xdoc-plugin-1.9.2.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/maven-changelog-plugin-1.8.2.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/maven/plugins/maven-changelog-plugin-1.8.2.jar">
|
||||
- </get>
|
||||
- <get dest="${libdir}/maven-changes-plugin-1.6.jar" usetimestamp="true" ignoreerrors="true" src="http://repo1.maven.org/maven/maven/plugins/maven-changes-plugin-1.6.jar">
|
||||
- </get>
|
||||
- </target>
|
||||
<target name="install-maven">
|
||||
<get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar">
|
||||
</get>
|
39
commons-chain-1.2-servlet4.patch
Normal file
39
commons-chain-1.2-servlet4.patch
Normal file
@ -0,0 +1,39 @@
|
||||
--- commons-chain-1.2-src/src/test/org/apache/commons/chain/web/servlet/MockServletContext.java 2018-12-21 16:19:54.260118710 +0100
|
||||
+++ commons-chain-1.2-src/src/test/org/apache/commons/chain/web/servlet/MockServletContext.java 2018-12-21 16:47:39.768669784 +0100
|
||||
@@ -299,7 +299,35 @@
|
||||
}
|
||||
|
||||
public String getVirtualServerName() {
|
||||
- throw new RuntimeException("Not implemented");
|
||||
+ throw new RuntimeException("Not implemented.");
|
||||
+ }
|
||||
+
|
||||
+ public void setRequestCharacterEncoding(String encoding) {
|
||||
+ throw new RuntimeException("Not implemented.");
|
||||
+ }
|
||||
+
|
||||
+ public String getRequestCharacterEncoding() {
|
||||
+ throw new RuntimeException("Not implemented.");
|
||||
+ }
|
||||
+
|
||||
+ public void setResponseCharacterEncoding(String encoding) {
|
||||
+ throw new RuntimeException("Not implemented.");
|
||||
+ }
|
||||
+
|
||||
+ public String getResponseCharacterEncoding() {
|
||||
+ throw new RuntimeException("Not implemented.");
|
||||
+ }
|
||||
+
|
||||
+ public void setSessionTimeout(int sessionTimeout) {
|
||||
+ throw new RuntimeException("Not implemented.");
|
||||
+ }
|
||||
+
|
||||
+ public int getSessionTimeout() {
|
||||
+ throw new RuntimeException("Not implemented.");
|
||||
+ }
|
||||
+
|
||||
+ public ServletRegistration.Dynamic addJspFile(String jspName, String jspFile) {
|
||||
+ throw new RuntimeException("Not implemented.");
|
||||
}
|
||||
|
||||
}
|
3
commons-chain-1.2-src.tar.gz
Normal file
3
commons-chain-1.2-src.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4d67718e922181ed9f4fcabd82cc5e892af7d756ee3e2a15bab7fa79db58f151
|
||||
size 169394
|
Loading…
Reference in New Issue
Block a user