|
|
af188cb |
From 62fd3a0b49b6943089403c3c3fe7ec4b3b20672f Mon Sep 17 00:00:00 2001
|
|
|
af188cb |
From: Michal Srb <msrb@redhat.com>
|
|
|
af188cb |
Date: Mon, 24 Mar 2014 13:12:06 +0100
|
|
|
af188cb |
Subject: [PATCH] Stubs for Spring Framework 2
|
|
|
af188cb |
|
|
|
af188cb |
---
|
|
|
af188cb |
.../org/springframework/metadata/Attributes.java | 20 ++++++
|
|
|
af188cb |
.../org/springframework/web/bind/RequestUtils.java | 71 ++++++++++++++++++++++
|
|
|
af188cb |
2 files changed, 91 insertions(+)
|
|
|
af188cb |
create mode 100644 src/main/java/org/springframework/metadata/Attributes.java
|
|
|
af188cb |
create mode 100644 src/main/java/org/springframework/web/bind/RequestUtils.java
|
|
|
af188cb |
|
|
|
af188cb |
diff --git a/src/main/java/org/springframework/metadata/Attributes.java b/src/main/java/org/springframework/metadata/Attributes.java
|
|
|
af188cb |
new file mode 100644
|
|
|
af188cb |
index 0000000..de5c38e
|
|
|
af188cb |
--- /dev/null
|
|
|
af188cb |
+++ b/src/main/java/org/springframework/metadata/Attributes.java
|
|
|
af188cb |
@@ -0,0 +1,20 @@
|
|
|
af188cb |
+package org.springframework.metadata;
|
|
|
af188cb |
+
|
|
|
af188cb |
+import java.lang.reflect.Field;
|
|
|
af188cb |
+import java.lang.reflect.Method;
|
|
|
af188cb |
+import java.util.Collection;
|
|
|
af188cb |
+
|
|
|
af188cb |
+public interface Attributes {
|
|
|
af188cb |
+
|
|
|
af188cb |
+ Collection getAttributes(Class targetClass);
|
|
|
af188cb |
+
|
|
|
af188cb |
+ Collection getAttributes(Class targetClass, Class filter);
|
|
|
af188cb |
+
|
|
|
af188cb |
+ Collection getAttributes(Method targetMethod);
|
|
|
af188cb |
+
|
|
|
af188cb |
+ Collection getAttributes(Method targetMethod, Class filter);
|
|
|
af188cb |
+
|
|
|
af188cb |
+ Collection getAttributes(Field targetField);
|
|
|
af188cb |
+
|
|
|
af188cb |
+ Collection getAttributes(Field targetField, Class filter);
|
|
|
af188cb |
+}
|
|
|
af188cb |
diff --git a/src/main/java/org/springframework/web/bind/RequestUtils.java b/src/main/java/org/springframework/web/bind/RequestUtils.java
|
|
|
af188cb |
new file mode 100644
|
|
|
af188cb |
index 0000000..3162e54
|
|
|
af188cb |
--- /dev/null
|
|
|
af188cb |
+++ b/src/main/java/org/springframework/web/bind/RequestUtils.java
|
|
|
af188cb |
@@ -0,0 +1,71 @@
|
|
|
af188cb |
+package org.springframework.web.bind;
|
|
|
af188cb |
+
|
|
|
af188cb |
+import javax.servlet.ServletException;
|
|
|
af188cb |
+import javax.servlet.http.HttpServletRequest;
|
|
|
af188cb |
+
|
|
|
af188cb |
+import org.springframework.web.HttpRequestMethodNotSupportedException;
|
|
|
af188cb |
+
|
|
|
af188cb |
+public abstract class RequestUtils {
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static void rejectRequestMethod(HttpServletRequest request, String method) throws ServletException {}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static Integer getIntParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static int getIntParameter(HttpServletRequest request, String name, int defaultVal) {return 0;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static int[] getIntParameters(HttpServletRequest request, String name) {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static int getRequiredIntParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return 0;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static int[] getRequiredIntParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static Long getLongParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static long getLongParameter(HttpServletRequest request, String name, long defaultVal) {return 0;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static long[] getLongParameters(HttpServletRequest request, String name) {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static long getRequiredLongParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return 0;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static long[] getRequiredLongParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static Float getFloatParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static float getFloatParameter(HttpServletRequest request, String name, float defaultVal) {return 0.0f;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static float[] getFloatParameters(HttpServletRequest request, String name) {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static float getRequiredFloatParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return 0.0f;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static float[] getRequiredFloatParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static Double getDoubleParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static double getDoubleParameter(HttpServletRequest request, String name, double defaultVal) {return 0.0;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static double[] getDoubleParameters(HttpServletRequest request, String name) {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static double getRequiredDoubleParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return 0.0;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static double[] getRequiredDoubleParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static Boolean getBooleanParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static boolean getBooleanParameter(HttpServletRequest request, String name, boolean defaultVal) {return false;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static boolean[] getBooleanParameters(HttpServletRequest request, String name) {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static boolean getRequiredBooleanParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return false;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static boolean[] getRequiredBooleanParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static String getStringParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static String getStringParameter(HttpServletRequest request, String name, String defaultVal) {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static String[] getStringParameters(HttpServletRequest request, String name) {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static String getRequiredStringParameter(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+
|
|
|
af188cb |
+ public static String[] getRequiredStringParameters(HttpServletRequest request, String name) throws ServletRequestBindingException {return null;}
|
|
|
af188cb |
+}
|
|
|
af188cb |
--
|
|
|
af188cb |
1.8.5.3
|
|
|
af188cb |
|