Author: anil.saldhana(a)jboss.com
Date: 2012-02-07 17:59:55 -0500 (Tue, 07 Feb 2012)
New Revision: 1385
Modified:
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaContext.java
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletConfig.java
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletContext.java
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletRequest.java
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletResponse.java
Log:
changes due to servlet3 api
Modified:
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaContext.java
===================================================================
---
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaContext.java 2012-02-07
22:59:33 UTC (rev 1384)
+++
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/mock/MockCatalinaContext.java 2012-02-07
22:59:55 UTC (rev 1385)
@@ -35,12 +35,19 @@
import java.util.Set;
import javax.naming.directory.DirContext;
+import javax.servlet.Filter;
+import javax.servlet.FilterRegistration;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
+import javax.servlet.ServletRegistration.Dynamic;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
+import javax.servlet.SessionCookieConfig;
+import javax.servlet.SessionTrackingMode;
+import javax.servlet.descriptor.JspConfigDescriptor;
import org.apache.catalina.Authenticator;
import org.apache.catalina.Cluster;
@@ -1111,4 +1118,161 @@
public void setThreadBindingListener(ThreadBindingListener threadBindingListener)
{
}
+
+ @Override
+ public int getEffectiveMajorVersion()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getEffectiveMinorVersion()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean setInitParameter(String name, String value)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public Dynamic addServlet(String servletName, String className)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Dynamic addServlet(String servletName, Servlet servlet)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Dynamic addServlet(String servletName, Class<? extends Servlet>
servletClass)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T extends Servlet> T createServlet(Class<T> clazz) throws
ServletException
+ {
+ return null;
+ }
+
+ @Override
+ public ServletRegistration getServletRegistration(String servletName)
+ {
+ return null;
+ }
+
+ @Override
+ public Map<String, ? extends ServletRegistration> getServletRegistrations()
+ {
+ return null;
+ }
+
+ @Override
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, String
className)
+ {
+ return null;
+ }
+
+ @Override
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Filter
filter)
+ {
+ return null;
+ }
+
+ @Override
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName,
Class<? extends Filter> filterClass)
+ {
+ return null;
+ }
+
+ @Override
+ public <T extends Filter> T createFilter(Class<T> clazz) throws
ServletException
+ {
+ return null;
+ }
+
+ @Override
+ public FilterRegistration getFilterRegistration(String filterName)
+ {
+ return null;
+ }
+
+ @Override
+ public Map<String, ? extends FilterRegistration> getFilterRegistrations()
+ {
+ return null;
+ }
+
+ @Override
+ public SessionCookieConfig getSessionCookieConfig()
+ {
+ return null;
+ }
+
+ @Override
+ public void setSessionTrackingModes(Set<SessionTrackingMode>
sessionTrackingModes)
+ {
+ }
+
+ @Override
+ public Set<SessionTrackingMode> getDefaultSessionTrackingModes()
+ {
+ return null;
+ }
+
+ @Override
+ public Set<SessionTrackingMode> getEffectiveSessionTrackingModes()
+ {
+ return null;
+ }
+
+ @Override
+ public void addListener(String className)
+ {
+ }
+
+ @Override
+ public <T extends EventListener> void addListener(T t)
+ {
+ }
+
+ @Override
+ public void addListener(Class<? extends EventListener> listenerClass)
+ {
+ }
+
+ @Override
+ public <T extends EventListener> T createListener(Class<T> clazz) throws
ServletException
+ {
+ return null;
+ }
+
+ @Override
+ public JspConfigDescriptor getJspConfigDescriptor()
+ {
+ return null;
+ }
+
+ @Override
+ public ClassLoader getClassLoader()
+ {
+ return null;
+ }
+
+ @Override
+ public void declareRoles(String... roleNames)
+ {
+ }
}
\ No newline at end of file
Modified:
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletConfig.java
===================================================================
---
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletConfig.java 2012-02-07
22:59:33 UTC (rev 1384)
+++
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletConfig.java 2012-02-07
22:59:55 UTC (rev 1385)
@@ -31,7 +31,7 @@
* @author Anil.Saldhana(a)redhat.com
* @since Jan 28, 2009
*/
-@SuppressWarnings({"rawtypes"})
+@SuppressWarnings({"rawtypes","unchecked"})
public class TestServletConfig implements ServletConfig
{
private ServletContext sc;
Modified:
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletContext.java
===================================================================
---
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletContext.java 2012-02-07
22:59:33 UTC (rev 1384)
+++
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletContext.java 2012-02-07
22:59:55 UTC (rev 1385)
@@ -25,20 +25,29 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Enumeration;
+import java.util.EventListener;
import java.util.HashMap;
+import java.util.Map;
import java.util.Set;
+import javax.servlet.Filter;
+import javax.servlet.FilterRegistration;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
+import javax.servlet.ServletRegistration.Dynamic;
+import javax.servlet.SessionCookieConfig;
+import javax.servlet.SessionTrackingMode;
+import javax.servlet.descriptor.JspConfigDescriptor;
/**
* @author Anil.Saldhana(a)redhat.com
* @since Jan 28, 2009
*/
-@SuppressWarnings({ "rawtypes"})
+@SuppressWarnings({ "rawtypes","unchecked"})
public class TestServletContext implements ServletContext
{
private HashMap<String,String> params = new HashMap<String,String>();
@@ -167,4 +176,185 @@
public void setAttribute(String name, Object object)
{
}
+
+ @Override
+ public int getEffectiveMajorVersion()
+ {
+
+ return 0;
+ }
+
+ @Override
+ public int getEffectiveMinorVersion()
+ {
+
+ return 0;
+ }
+
+ @Override
+ public boolean setInitParameter(String name, String value)
+ {
+
+ return false;
+ }
+
+ @Override
+ public Dynamic addServlet(String servletName, String className)
+ {
+
+ return null;
+ }
+
+ @Override
+ public Dynamic addServlet(String servletName, Servlet servlet)
+ {
+
+ return null;
+ }
+
+ @Override
+ public Dynamic addServlet(String servletName, Class<? extends Servlet>
servletClass)
+ {
+
+ return null;
+ }
+
+ @Override
+ public <T extends Servlet> T createServlet(Class<T> clazz) throws
ServletException
+ {
+
+ return null;
+ }
+
+ @Override
+ public ServletRegistration getServletRegistration(String servletName)
+ {
+
+ return null;
+ }
+
+ @Override
+ public Map<String, ? extends ServletRegistration> getServletRegistrations()
+ {
+
+ return null;
+ }
+
+ @Override
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, String
className)
+ {
+
+ return null;
+ }
+
+ @Override
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Filter
filter)
+ {
+
+ return null;
+ }
+
+ @Override
+ public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName,
Class<? extends Filter> filterClass)
+ {
+
+ return null;
+ }
+
+ @Override
+ public <T extends Filter> T createFilter(Class<T> clazz) throws
ServletException
+ {
+
+ return null;
+ }
+
+ @Override
+ public FilterRegistration getFilterRegistration(String filterName)
+ {
+
+ return null;
+ }
+
+ @Override
+ public Map<String, ? extends FilterRegistration> getFilterRegistrations()
+ {
+
+ return null;
+ }
+
+ @Override
+ public SessionCookieConfig getSessionCookieConfig()
+ {
+
+ return null;
+ }
+
+ @Override
+ public void setSessionTrackingModes(Set<SessionTrackingMode>
sessionTrackingModes)
+ {
+
+
+ }
+
+ @Override
+ public Set<SessionTrackingMode> getDefaultSessionTrackingModes()
+ {
+
+ return null;
+ }
+
+ @Override
+ public Set<SessionTrackingMode> getEffectiveSessionTrackingModes()
+ {
+
+ return null;
+ }
+
+ @Override
+ public void addListener(String className)
+ {
+
+
+ }
+
+ @Override
+ public <T extends EventListener> void addListener(T t)
+ {
+
+
+ }
+
+ @Override
+ public void addListener(Class<? extends EventListener> listenerClass)
+ {
+
+
+ }
+
+ @Override
+ public <T extends EventListener> T createListener(Class<T> clazz) throws
ServletException
+ {
+
+ return null;
+ }
+
+ @Override
+ public JspConfigDescriptor getJspConfigDescriptor()
+ {
+
+ return null;
+ }
+
+ @Override
+ public ClassLoader getClassLoader()
+ {
+
+ return null;
+ }
+
+ @Override
+ public void declareRoles(String... roleNames)
+ {
+
+ }
}
\ No newline at end of file
Modified:
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletRequest.java
===================================================================
---
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletRequest.java 2012-02-07
22:59:33 UTC (rev 1384)
+++
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletRequest.java 2012-02-07
22:59:55 UTC (rev 1385)
@@ -27,22 +27,31 @@
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.security.Principal;
+import java.util.Collection;
import java.util.Enumeration;
import java.util.Locale;
import java.util.Map;
+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;
/**
* @author Anil.Saldhana(a)redhat.com
* @since Jan 28, 2009
*/
-@SuppressWarnings({ "rawtypes"})
+@SuppressWarnings({ "rawtypes","unchecked"})
public class TestServletRequest implements HttpServletRequest
{
private BufferedInputStream is = null;
@@ -325,5 +334,90 @@
public void setCharacterEncoding(String env) throws UnsupportedEncodingException
{
+ }
+
+ @Override
+ public ServletContext getServletContext()
+ {
+
+ return null;
+ }
+
+ @Override
+ public AsyncContext startAsync() throws IllegalStateException
+ {
+
+ return null;
+ }
+
+ @Override
+ public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse
servletResponse)
+ throws IllegalStateException
+ {
+
+ return null;
+ }
+
+ @Override
+ public boolean isAsyncStarted()
+ {
+
+ return false;
+ }
+
+ @Override
+ public boolean isAsyncSupported()
+ {
+
+ return false;
+ }
+
+ @Override
+ public AsyncContext getAsyncContext()
+ {
+
+ return null;
+ }
+
+ @Override
+ public DispatcherType getDispatcherType()
+ {
+
+ return null;
+ }
+
+ @Override
+ public boolean authenticate(HttpServletResponse response) throws IOException,
ServletException
+ {
+
+ return false;
+ }
+
+ @Override
+ public void login(String username, String password) throws ServletException
+ {
+
+
+ }
+
+ @Override
+ public void logout() throws ServletException
+ {
+
+
+ }
+
+ @Override
+ public Collection<Part> getParts() throws IOException, ServletException
+ {
+
+ return null;
+ }
+
+ @Override
+ public Part getPart(String name) throws IOException, ServletException
+ {
+
+ return null;
}
}
\ No newline at end of file
Modified:
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletResponse.java
===================================================================
---
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletResponse.java 2012-02-07
22:59:33 UTC (rev 1384)
+++
product/branches/Branch_6_plus/picketlink-core/src/test/java/org/picketlink/test/identity/federation/bindings/servlets/TestServletResponse.java 2012-02-07
22:59:55 UTC (rev 1385)
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.util.Collection;
import java.util.Locale;
import javax.servlet.ServletOutputStream;
@@ -192,5 +193,33 @@
public void setLocale(Locale loc)
{
+ }
+
+ @Override
+ public int getStatus()
+ {
+
+ return 0;
+ }
+
+ @Override
+ public String getHeader(String name)
+ {
+
+ return null;
+ }
+
+ @Override
+ public Collection<String> getHeaders(String name)
+ {
+
+ return null;
+ }
+
+ @Override
+ public Collection<String> getHeaderNames()
+ {
+
+ return null;
}
}