Author: remy.maucherat(a)jboss.com
Date: 2009-03-09 10:22:08 -0400 (Mon, 09 Mar 2009)
New Revision: 946
Modified:
trunk/PATCHES.txt
trunk/java/javax/servlet/FilterRegistration.java
trunk/java/javax/servlet/ServletContext.java
trunk/java/javax/servlet/ServletRegistration.java
trunk/java/javax/servlet/SessionCookieConfig.java
Log:
- Update API (won't build for now).
- Add one to the dropped patch list.
Modified: trunk/PATCHES.txt
===================================================================
--- trunk/PATCHES.txt 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/PATCHES.txt 2009-03-09 14:22:08 UTC (rev 946)
@@ -49,3 +49,8 @@
733771
Deprecate some wrapper methods in Servlet API (not accepted yet)
+
+751502
+Per context validation (incomplete, and looks a bit useless anyway)
+
+
Modified: trunk/java/javax/servlet/FilterRegistration.java
===================================================================
--- trunk/java/javax/servlet/FilterRegistration.java 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/java/javax/servlet/FilterRegistration.java 2009-03-09 14:22:08 UTC (rev 946)
@@ -24,27 +24,20 @@
import java.util.Map;
/**
- * @version $Rev: 743426 $ $Date: 2009-02-11 18:52:39 +0100 (Wed, 11 Feb 2009) $
+ * @version $Rev: 751589 $ $Date: 2009-03-09 06:35:08 +0100 (Mon, 09 Mar 2009) $
* @since 3.0
*/
-public abstract class FilterRegistration {
- protected String description;
- protected boolean isAsyncSupported;
+public interface FilterRegistration {
+ boolean setDescription(String description);
- public void setDescription(String description) {
- this.description = description;
- }
+ void setAsyncSupported(boolean asyncSupported);
- public void setAsyncSupported(boolean asyncSupported) {
- isAsyncSupported = asyncSupported;
- }
+ void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, boolean
isMatchAfter, String ... servletNames);
- public abstract void addMappingForServletNames(EnumSet<DispatcherType>
dispatcherTypes, boolean isMatchAfter, String ... servletNames);
+ void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, boolean
isMatchAfter, String ... urlPatterns);
- public abstract void addMappingForUrlPatterns(EnumSet<DispatcherType>
dispatcherTypes, boolean isMatchAfter, String ... urlPatterns);
+ boolean setInitParameter(String name, String value);
- public abstract void setInitParameter(String name, String value);
+ void setInitParameters(Map<String, String> initParameters);
- public abstract void setInitParameters(Map<String, String> initParameters);
-
}
Modified: trunk/java/javax/servlet/ServletContext.java
===================================================================
--- trunk/java/javax/servlet/ServletContext.java 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/java/javax/servlet/ServletContext.java 2009-03-09 14:22:08 UTC (rev 946)
@@ -661,6 +661,19 @@
String className) throws IllegalArgumentException,
IllegalStateException;
/**
+ * Add the specified servlet to the context
+ * @param servletName servlet's name
+ * @param clazz class of the servlet
+ * @throws IllegalArgumentException duplicate servletName
+ * @throws IllegalStateException this method called after #initialize
+ * @return ServletRegistration allowing configuration of the servlet
+ *
+ * @since 3.0
+ */
+ ServletRegistration addServlet(String servletName,
+ Class<? extends Servlet> clazz) throws
IllegalArgumentException, IllegalStateException;
+
+ /**
* Fish out the servlet registration for a named servlet
* @param servletName name of the servlet you want to configure
* @return ServletRegistration for servlet you want
@@ -731,7 +744,14 @@
*/
EnumSet<SessionTrackingMode> getEffectiveSessionTrackingModes();
-
+ /**
+ *
+ * @param name of the init parameter to set
+ * @param value new value
+ * @return whether it was set??
+ * @since 3.0
+ */
+ boolean setInitParameter(String name, String value);
}
Modified: trunk/java/javax/servlet/ServletRegistration.java
===================================================================
--- trunk/java/javax/servlet/ServletRegistration.java 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/java/javax/servlet/ServletRegistration.java 2009-03-09 14:22:08 UTC (rev 946)
@@ -23,31 +23,21 @@
import java.util.Map;
/**
- * @version $Rev: 743426 $ $Date: 2009-02-11 18:52:39 +0100 (Wed, 11 Feb 2009) $
+ * @version $Rev: 751589 $ $Date: 2009-03-09 06:35:08 +0100 (Mon, 09 Mar 2009) $
* @since 3.0
*/
-public abstract class ServletRegistration {
+public interface ServletRegistration {
- protected String description;
- protected boolean isAsyncSupported;
- protected int loadOnStartup;
+ boolean setDescription(String description);
- public void setDescription(String description) {
- this.description = description;
- }
+ void setAsyncSupported(boolean asyncSupported);
- public void setAsyncSupported(boolean asyncSupported) {
- isAsyncSupported = asyncSupported;
- }
+ void setLoadOnStartup(int loadOnStartup);
- public void setLoadOnStartup(int loadOnStartup) {
- this.loadOnStartup = loadOnStartup;
- }
+ void addMapping(String... urlPatterns);
- public abstract void addMapping(String... urlPatterns);
+ boolean setInitParameter(String name, String value);
- public abstract void setInitParameter(String name, String value);
+ void setInitParameters(Map<String, String> initParameters);
- public abstract void setInitParameters(Map<String, String> initParameters);
-
}
Modified: trunk/java/javax/servlet/SessionCookieConfig.java
===================================================================
--- trunk/java/javax/servlet/SessionCookieConfig.java 2009-02-25 16:53:27 UTC (rev 945)
+++ trunk/java/javax/servlet/SessionCookieConfig.java 2009-03-09 14:22:08 UTC (rev 946)
@@ -21,42 +21,18 @@
package javax.servlet;
/**
- * @version $Rev: 675701 $ $Date: 2008-07-10 21:49:52 +0200 (Thu, 10 Jul 2008) $
+ * @version $Rev: 751589 $ $Date: 2009-03-09 06:35:08 +0100 (Mon, 09 Mar 2009) $
* @since 3.0
*/
-public class SessionCookieConfig {
+public interface SessionCookieConfig {
- private final String domain;
- private final String path;
- private final String comment;
- private final boolean httpOnly;
- private final boolean secure;
+ String getDomain();
- public SessionCookieConfig(String domain, String path, String comment, boolean
httpOnly, boolean secure) {
- this.domain = domain;
- this.path = path;
- this.comment = comment;
- this.httpOnly = httpOnly;
- this.secure = secure;
- }
+ String getPath();
- public String getDomain() {
- return domain;
- }
+ String getComment();
- public String getPath() {
- return path;
- }
+ boolean isHttpOnly();
- public String getComment() {
- return comment;
- }
-
- public boolean isHttpOnly() {
- return httpOnly;
- }
-
- public boolean isSecure() {
- return secure;
- }
+ boolean isSecure();
}
Show replies by date