Blob Blame Raw
From 62fd3a0b49b6943089403c3c3fe7ec4b3b20672f Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb@redhat.com>
Date: Mon, 24 Mar 2014 13:12:06 +0100
Subject: [PATCH] Stubs for Spring Framework 2

---
 .../org/springframework/metadata/Attributes.java   | 20 ++++++
 .../org/springframework/web/bind/RequestUtils.java | 71 ++++++++++++++++++++++
 2 files changed, 91 insertions(+)
 create mode 100644 src/main/java/org/springframework/metadata/Attributes.java
 create mode 100644 src/main/java/org/springframework/web/bind/RequestUtils.java

diff --git a/src/main/java/org/springframework/metadata/Attributes.java b/src/main/java/org/springframework/metadata/Attributes.java
new file mode 100644
index 0000000..de5c38e
--- /dev/null
+++ b/src/main/java/org/springframework/metadata/Attributes.java
@@ -0,0 +1,20 @@
+package org.springframework.metadata;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Collection;
+
+public interface Attributes {
+
+	Collection getAttributes(Class targetClass);
+
+	Collection getAttributes(Class targetClass, Class filter);
+
+	Collection getAttributes(Method targetMethod);
+
+	Collection getAttributes(Method targetMethod, Class filter);
+
+	Collection getAttributes(Field targetField);
+
+	Collection getAttributes(Field targetField, Class filter);
+}
diff --git a/src/main/java/org/springframework/web/bind/RequestUtils.java b/src/main/java/org/springframework/web/bind/RequestUtils.java
new file mode 100644
index 0000000..3162e54
--- /dev/null
+++ b/src/main/java/org/springframework/web/bind/RequestUtils.java
@@ -0,0 +1,71 @@
+package org.springframework.web.bind;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.web.HttpRequestMethodNotSupportedException;
+
+public abstract class RequestUtils {
+
+	public static void rejectRequestMethod(HttpServletRequest request, String method) throws ServletException {}
+
+	public static Integer getIntParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static int getIntParameter(HttpServletRequest request, String name, int defaultVal) {return 0;}
+
+	public static int[] getIntParameters(HttpServletRequest request, String name) {return null;}
+
+	public static int getRequiredIntParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return 0;}
+
+	public static int[] getRequiredIntParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static Long getLongParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static long getLongParameter(HttpServletRequest request, String name, long defaultVal) {return 0;}
+
+	public static long[] getLongParameters(HttpServletRequest request, String name) {return null;}
+
+	public static long getRequiredLongParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return 0;}
+
+	public static long[] getRequiredLongParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static Float getFloatParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static float getFloatParameter(HttpServletRequest request, String name, float defaultVal) {return 0.0f;}
+
+	public static float[] getFloatParameters(HttpServletRequest request, String name) {return null;}
+
+	public static float getRequiredFloatParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return 0.0f;}
+
+	public static float[] getRequiredFloatParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static Double getDoubleParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static double getDoubleParameter(HttpServletRequest request, String name, double defaultVal) {return 0.0;}
+
+	public static double[] getDoubleParameters(HttpServletRequest request, String name) {return null;}
+
+	public static double getRequiredDoubleParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return 0.0;}
+
+	public static double[] getRequiredDoubleParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static Boolean getBooleanParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static boolean getBooleanParameter(HttpServletRequest request, String name, boolean defaultVal) {return false;}
+
+	public static boolean[] getBooleanParameters(HttpServletRequest request, String name) {return null;}
+
+	public static boolean getRequiredBooleanParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return false;}
+
+	public static boolean[] getRequiredBooleanParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static String getStringParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static String getStringParameter(HttpServletRequest request, String name, String defaultVal) {return null;}
+
+	public static String[] getStringParameters(HttpServletRequest request, String name) {return null;}
+
+	public static String getRequiredStringParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+
+	public static String[] getRequiredStringParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
+}
-- 
1.8.5.3