OSDN Git Service

* delete java directory.
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Fri, 4 Apr 2008 11:41:20 +0000 (11:41 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Fri, 4 Apr 2008 11:41:20 +0000 (11:41 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_11_0@1988 1a406e8e-add9-4483-a2c8-d8cac5b7c224

java/.cvsignore [deleted file]
java/build.properties [deleted file]
java/build.xml [deleted file]
java/src/com/qsdn/filter/CHXJFilter.java [deleted file]
java/src/com/qsdn/filter/CHXJRequestWrapper.java [deleted file]

diff --git a/java/.cvsignore b/java/.cvsignore
deleted file mode 100644 (file)
index 1b823a2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-dist
-build
diff --git a/java/build.properties b/java/build.properties
deleted file mode 100644 (file)
index 8f88b53..0000000
+++ /dev/null
@@ -1 +0,0 @@
-catalina.home=/usr/local/tomcat5
diff --git a/java/build.xml b/java/build.xml
deleted file mode 100644 (file)
index 216fab8..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<project name="" default="build" basedir=".">
-
-    <property file="build.properties"/>
-    <property file="${user.home}/build.properties"/>
-
-    <property name="app.name" value="chxjfilter" />
-    <property name="app.version" value="0.0.1" />
-
-    <property name="catalina.home" value="/usr/local/tomcat" /> <!-- UPDATE THIS! -->
-
-    <property name="src.home" value="src" />
-    <property name="lib.home" value="lib" />
-
-    <property name="build.home" value="build" />
-    <property name="dist.home" value="dist" />
-
-    <property name="encoding" value="Shift_JIS" />
-
-    <path id="compile.classpath">
-        <!-- Include all elements that Tomcat exposes to applications -->
-       <pathelement location="${catalina.home}/common/classes" />
-        <fileset dir="${catalina.home}/common/endorsed">
-            <include name="*.jar" />
-        </fileset>
-        <fileset dir="${catalina.home}/common/lib">
-            <include name="*.jar" />
-        </fileset>
-        <pathelement location="${catalina.home}/shared/classes" />
-        <fileset dir="${catalina.home}/shared/lib">
-            <include name="*.jar" />
-        </fileset>
-    </path>
-
-    <target name="build">
-        <mkdir dir="${build.home}" />
-        <javac srcdir="${src.home}"
-            destdir="${build.home}"
-            encoding="${encoding}"
-            debug="on">
-            <classpath refid="compile.classpath" />
-        </javac>
-    </target>
-
-    <target name="dist" depends="build">
-        <mkdir dir="${dist.home}" />
-        <jar jarfile="${dist.home}/${app.name}-${app.version}.jar"
-            basedir="${build.home}" />
-    </target>
-
-    <target name="clean">
-        <delete dir="${dist.home}" />
-        <delete dir="${build.home}" />
-    </target>
-
-</project>
diff --git a/java/src/com/qsdn/filter/CHXJFilter.java b/java/src/com/qsdn/filter/CHXJFilter.java
deleted file mode 100644 (file)
index 3187306..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2005 QSDN,Inc. All rights reserved.
- * Copyright (C) 2005 Atsushi Konno All rights reserved.
- *
- * 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.qsdn.filter;
-
-
-import java.io.IOException;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * CHXJFilter for mod_chxj
- *
- * converter for _chxj_c_ or _chxj_r_ prefix parameter.
- *
- * @author Atsushi Konno <konno@qsdn.co.jp>
- */
-public class CHXJFilter
-  implements Filter 
-{
-  private String enc;
-  private boolean ignore = false;
-  private boolean decodeHttpGetParameter = true;
-
-  public void destroy() 
-  {
-  }
-
-  public void doFilter(
-    ServletRequest request,
-    ServletResponse response,
-    FilterChain chain)
-    throws IOException, ServletException 
-  {
-    CHXJRequestWrapper chxjRequest = new CHXJRequestWrapper((HttpServletRequest)request);
-    chain.doFilter(chxjRequest, response);
-  }
-
-  public void init(FilterConfig config)
-    throws ServletException 
-  {
-    enc = config.getInitParameter("encoding");
-  }
-}
-/*
- * vim:ts=2 et
- */
diff --git a/java/src/com/qsdn/filter/CHXJRequestWrapper.java b/java/src/com/qsdn/filter/CHXJRequestWrapper.java
deleted file mode 100644 (file)
index 1589a13..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Copyright (C) 2005 QSDN,Inc. All rights reserved.
- * Copyright (C) 2005 Atsushi Konno All rights reserved.
- *
- * 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.qsdn.filter;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.Iterator;
-import java.util.Enumeration;
-import java.util.StringTokenizer;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-
-public class CHXJRequestWrapper 
-  extends HttpServletRequestWrapper 
-{
-  private class ParamNameEnumeration 
-    implements Enumeration 
-  {
-    private Iterator iterator;
-
-    private ParamNameEnumeration(Map map) 
-    {
-      if (map == null)
-      {
-        iterator = new LinkedList().iterator();
-      }
-      else
-      {
-        iterator = map.keySet().iterator();
-      }
-    }
-
-    public boolean hasMoreElements() 
-    {
-      return iterator.hasNext();
-    }
-
-    public Object nextElement() 
-    {
-      return iterator.next();
-    }
-  }
-
-
-  public CHXJRequestWrapper(HttpServletRequest request) 
-  {
-    super(request);
-  }
-
-  public String getQueryString() 
-  {
-    String queryString = super.getQueryString();
-    if (queryString == null)
-    {
-      return null;
-    }
-    StringBuffer newQueryString = new StringBuffer();
-
-    StringTokenizer st = new StringTokenizer(queryString, "&");
-
-    for(int ii=0; st.hasMoreTokens(); ii++) 
-    {
-      String token = st.nextToken();
-      int p = token.indexOf("=");
-      if (p == -1)
-      {
-        continue;
-      }
-
-      String key = token.substring(0, p);
-      String val = token.substring(p + 1);
-      if (key.startsWith("_chxj_c_")
-      ||  key.startsWith("_chxj_r_")
-      ||  key.startsWith("_chxj_s_")) 
-      {
-        key = key.substring(8);
-        if (key.length() == 0 ||  val.length() == 0)
-        {
-          continue;
-        }
-      }
-      if (ii != 0) 
-      {
-        newQueryString.append("&");
-      }
-      newQueryString.append(key);
-      newQueryString.append("=");
-      try {
-        newQueryString.append(URLDecoder.decode(val, "Windows-31J"));
-      }
-      catch (java.io.UnsupportedEncodingException ee)
-      {
-        throw new RuntimeException(ee);
-      }
-    }
-
-    String resultQueryString = newQueryString.toString();
-    if (resultQueryString.length() == 0)
-    {
-       return null;
-    }
-    return new String(resultQueryString);
-  }
-
-  public String getParameter(String name) 
-  {
-    Map pmap = getParameterMap();
-    if (pmap == null)
-    {
-      return null;
-    }
-
-    String[] vals = (String[])pmap.get(name);
-    if (vals == null)
-    {
-      return null;
-    }
-
-    return vals[0];
-  }
-
-  public Map getParameterMap() 
-  {
-    Map pmap = super.getParameterMap();
-    if (pmap == null)
-    {
-      return null;
-    }
-
-    Map newpmap = new TreeMap();
-
-    if ("get".equalsIgnoreCase(super.getMethod())) 
-    {
-      String queryString = this.getQueryString();
-      if (queryString != null) 
-      {
-        StringTokenizer st = new StringTokenizer(queryString, "&");
-        while (st.hasMoreTokens()) 
-        {
-          String token = st.nextToken();
-          int pos = token.indexOf("=");
-          if (pos == -1)
-          {
-            continue;
-          }
-          String key = token.substring(0, pos);
-          String val = token.substring(pos+1);
-          if (val != null) 
-          {
-            ArrayList list = (ArrayList)newpmap.get(key);
-            if (list == null) 
-            {
-              list = new ArrayList();
-              newpmap.put(key, list);
-            }
-            list.add(val);
-          }
-        }
-      }
-      Iterator it = newpmap.keySet().iterator();
-      while (it.hasNext()) 
-      {
-        String key = (String)it.next();
-        ArrayList list = (ArrayList)newpmap.get(key);
-        String[] newvals = new String[list.size()];
-        for (int ii = 0; ii < list.size(); ii++)
-        {
-          try {
-            newvals[ii] = URLDecoder.decode((String)list.get(ii), "Windows-31J");
-          }
-          catch (java.io.UnsupportedEncodingException ee)
-          {
-            throw new RuntimeException(ee);
-          }
-        }
-        newpmap.put(key, newvals);
-      }
-    }
-    else 
-    {
-      Iterator it = pmap.keySet().iterator();
-      while (it.hasNext()) 
-      {
-        String key = (String)it.next();
-        if (key.startsWith("_chxj_dmy"))
-        {
-          continue;
-        }
-
-        if (key.startsWith("_chxj_c_")
-        ||  key.startsWith("_chxj_r_")
-        ||  key.startsWith("_chxj_s_"))
-        {
-          if (key.substring(8).length() == 0)
-          {
-            continue;
-          }
-          String[] vals = (String[])pmap.get(key);
-          ArrayList list = new ArrayList();
-          for (int ii = 0; ii < vals.length; ii++)
-          {
-            if (vals[ii].length() > 0)
-            {
-              list.add(vals[ii]);
-            }
-          }
-          if (list.size() == 0)
-          {
-            continue;
-          }
-          String[] newvals = new String[list.size()];
-          for (int ii = 0; ii < list.size(); ii++)
-          {
-            try {
-              newvals[ii] = URLDecoder.decode((String)list.get(ii), "Windows-31J");
-            }
-            catch (java.io.UnsupportedEncodingException ee)
-            {
-              throw new RuntimeException(ee);
-            }
-          }
-          newpmap.put(key.substring(8), newvals);
-        }
-        else
-        {
-          String[] vals = (String[])pmap.get(key);
-          ArrayList list = new ArrayList();
-          for (int ii = 0; ii < vals.length; ii++)
-          {
-            if (vals[ii].length() > 0)
-            {
-              list.add(vals[ii]);
-            }
-          }
-          if (list.size() == 0)
-          {
-            continue;
-          }
-          String[] newvals = new String[list.size()];
-          for (int ii = 0; ii < list.size(); ii++)
-          {
-            try {
-              newvals[ii] = URLDecoder.decode((String)list.get(ii), "Windows-31J");
-            }
-            catch (java.io.UnsupportedEncodingException ee)
-            {
-              throw new RuntimeException(ee);
-            }
-          }
-          newpmap.put(key, newvals);
-        }
-      }
-    }
-
-    return newpmap;
-  }
-
-  public Enumeration getParameterNames() 
-  {
-    Map map = getParameterMap();
-    return new ParamNameEnumeration(map);
-  }
-
-  public String[] getParameterValues(String name) 
-  {
-    if (name == null)
-    {
-      throw new NullPointerException();
-    }
-
-    Map pmap = getParameterMap();
-    if (pmap == null)
-    {
-      return null;
-    }
-
-    return (String[])pmap.get(name);
-  }
-}
-/*
- * vim:ts=2 et
- */