/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* 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
*/
/**
- *
+ *
*/
package com.vaadin.server;
import javax.servlet.ServletContext;
/**
- *
- * @since
+ * Mock servlet configuration for tests.
+ *
* @author Vaadin Ltd
*/
public class MockServletConfig implements ServletConfig {
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletConfig#getServletName()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletConfig#getServletContext()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletConfig#getInitParameter(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletConfig#getInitParameterNames()
*/
@Override
/*
* Copyright 2000-2014 Vaadin Ltd.
- *
+ *
* 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
*/
/**
- *
+ *
*/
package com.vaadin.server;
import javax.servlet.descriptor.JspConfigDescriptor;
/**
- *
- * @since
+ * Mock servlet context for tests.
+ *
* @author Vaadin Ltd
*/
public class MockServletContext implements ServletContext {
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getContext(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getMajorVersion()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getMinorVersion()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getMimeType(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getResourcePaths(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getResource(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getResourceAsStream(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getRequestDispatcher(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getNamedDispatcher(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getServlet(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getServlets()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getServletNames()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#log(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#log(java.lang.Exception,
* java.lang.String)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#log(java.lang.String,
* java.lang.Throwable)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getRealPath(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getServerInfo()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getInitParameter(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getInitParameterNames()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getAttribute(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getAttributeNames()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#setAttribute(java.lang.String,
* java.lang.Object)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#removeAttribute(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getServletContextName()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getContextPath()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getEffectiveMajorVersion()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getEffectiveMinorVersion()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#setInitParameter(java.lang.String,
* java.lang.String)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#addServlet(java.lang.String,
* java.lang.String)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#addServlet(java.lang.String,
* javax.servlet.Servlet)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#addServlet(java.lang.String,
* java.lang.Class)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#createServlet(java.lang.Class)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see
* javax.servlet.ServletContext#getServletRegistration(java.lang.String)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getServletRegistrations()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#addFilter(java.lang.String,
* java.lang.String)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#addFilter(java.lang.String,
* javax.servlet.Filter)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#addFilter(java.lang.String,
* java.lang.Class)
*/
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#createFilter(java.lang.Class)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getFilterRegistration(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getFilterRegistrations()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getSessionCookieConfig()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#setSessionTrackingModes(java.util.Set)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getDefaultSessionTrackingModes()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getEffectiveSessionTrackingModes()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#addListener(java.lang.String)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#addListener(java.util.EventListener)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#addListener(java.lang.Class)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#createListener(java.lang.Class)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getJspConfigDescriptor()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#getClassLoader()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see javax.servlet.ServletContext#declareRoles(java.lang.String[])
*/
@Override