Browse Source

Added @Override annotations to web-portlet module

pull/23217/head
Arjen Poutsma 18 years ago
parent
commit
b0f24da5ca
  1. 3
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java
  2. 5
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java
  3. 3
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java
  4. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/ModelAndView.java
  5. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/bind/MissingPortletRequestParameterException.java
  6. 12
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestUtils.java
  7. 5
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/AbstractRefreshablePortletApplicationContext.java
  8. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java
  9. 7
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java
  10. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourceLoader.java
  11. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java
  12. 2
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java
  13. 3
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestHandledEvent.java
  14. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java
  15. 4
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java
  16. 2
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/XmlPortletApplicationContext.java
  17. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java
  18. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/AbstractMapBasedHandlerMapping.java
  19. 3
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/ParameterHandlerMapping.java
  20. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java
  21. 3
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeHandlerMapping.java
  22. 6
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMapping.java
  23. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/UserRoleAuthorizationInterceptor.java
  24. 2
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java
  25. 4
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java
  26. 2
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractCommandController.java
  27. 3
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java
  28. 8
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java
  29. 1
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java
  30. 2
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java
  31. 3
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/PortletWrappingController.java
  32. 5
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleFormController.java
  33. 2
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java
  34. 3
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java

3
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java

@ -346,6 +346,7 @@ public class DispatcherPortlet extends FrameworkPortlet { @@ -346,6 +346,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
/**
* This implementation calls {@link #initStrategies}.
*/
@Override
public void onRefresh(ApplicationContext context) {
initStrategies(context);
}
@ -644,6 +645,7 @@ public class DispatcherPortlet extends FrameworkPortlet { @@ -644,6 +645,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
* @param response current portlet Action response
* @throws Exception in case of any kind of processing failure
*/
@Override
protected void doActionService(ActionRequest request, ActionResponse response) throws Exception {
if (logger.isDebugEnabled()) {
logger.debug("DispatcherPortlet with name '" + getPortletName() + "' received action request");
@ -746,6 +748,7 @@ public class DispatcherPortlet extends FrameworkPortlet { @@ -746,6 +748,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
* @param response current portlet render response
* @throws Exception in case of any kind of processing failure
*/
@Override
protected void doRenderService(RenderRequest request, RenderResponse response) throws Exception {
if (logger.isDebugEnabled()) {
logger.debug("DispatcherPortlet with name '" + getPortletName() + "' received render request");

5
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java

@ -253,6 +253,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App @@ -253,6 +253,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App
* Overridden method of GenericPortletBean, invoked after any bean properties
* have been set. Creates this portlet's ApplicationContext.
*/
@Override
protected final void initPortletBean() throws PortletException, BeansException {
getPortletContext().log("Initializing Spring FrameworkPortlet '" + getPortletName() + "'");
if (logger.isInfoEnabled()) {
@ -435,6 +436,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App @@ -435,6 +436,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App
/**
* Overridden for friendlier behavior in unit tests.
*/
@Override
protected String getTitle(RenderRequest renderRequest) {
try {
return super.getTitle(renderRequest);
@ -447,6 +449,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App @@ -447,6 +449,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App
/**
* Delegate render requests to processRequest/doRenderService.
*/
@Override
protected final void doDispatch(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
@ -456,6 +459,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App @@ -456,6 +459,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App
/**
* Delegate action requests to processRequest/doActionService.
*/
@Override
public final void processAction(ActionRequest request, ActionResponse response)
throws PortletException, IOException {
@ -589,6 +593,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App @@ -589,6 +593,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App
* Close the ApplicationContext of this portlet.
* @see org.springframework.context.ConfigurableApplicationContext#close()
*/
@Override
public void destroy() {
getPortletContext().log("Destroying Spring FrameworkPortlet '" + getPortletName() + "'");
if (this.portletApplicationContext instanceof ConfigurableApplicationContext) {

3
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java

@ -92,6 +92,7 @@ public abstract class GenericPortletBean extends GenericPortlet { @@ -92,6 +92,7 @@ public abstract class GenericPortletBean extends GenericPortlet {
* @throws PortletException if bean properties are invalid (or required
* properties are missing), or if subclass initialization fails.
*/
@Override
public final void init() throws PortletException {
if (logger.isInfoEnabled()) {
logger.info("Initializing portlet '" + getPortletName() + "'");
@ -135,6 +136,7 @@ public abstract class GenericPortletBean extends GenericPortlet { @@ -135,6 +136,7 @@ public abstract class GenericPortletBean extends GenericPortlet {
* PortletConfig set yet.
* @see #getPortletConfig()
*/
@Override
public final String getPortletName() {
return (getPortletConfig() != null ? getPortletConfig().getPortletName() : null);
}
@ -144,6 +146,7 @@ public abstract class GenericPortletBean extends GenericPortlet { @@ -144,6 +146,7 @@ public abstract class GenericPortletBean extends GenericPortlet {
* PortletConfig set yet.
* @see #getPortletConfig()
*/
@Override
public final PortletContext getPortletContext() {
return (getPortletConfig() != null ? getPortletConfig().getPortletContext() : null);
}

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/ModelAndView.java

@ -288,6 +288,7 @@ public class ModelAndView { @@ -288,6 +288,7 @@ public class ModelAndView {
/**
* Return diagnostic information about this model and view.
*/
@Override
public String toString() {
StringBuffer buf = new StringBuffer("ModelAndView: ");
if (isReference()) {

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/bind/MissingPortletRequestParameterException.java

@ -41,6 +41,7 @@ public class MissingPortletRequestParameterException extends PortletRequestBindi @@ -41,6 +41,7 @@ public class MissingPortletRequestParameterException extends PortletRequestBindi
}
@Override
public String getMessage() {
return "Required " + this.parameterType + " parameter '" + parameterName + "' is not present";
}

12
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestUtils.java

@ -548,10 +548,12 @@ public abstract class PortletRequestUtils { @@ -548,10 +548,12 @@ public abstract class PortletRequestUtils {
private static class IntParser extends ParameterParser {
@Override
protected String getType() {
return "int";
}
@Override
protected Object doParse(String s) throws NumberFormatException {
return Integer.valueOf(s);
}
@ -573,10 +575,12 @@ public abstract class PortletRequestUtils { @@ -573,10 +575,12 @@ public abstract class PortletRequestUtils {
private static class LongParser extends ParameterParser {
@Override
protected String getType() {
return "long";
}
@Override
protected Object doParse(String parameter) throws NumberFormatException {
return Long.valueOf(parameter);
}
@ -598,10 +602,12 @@ public abstract class PortletRequestUtils { @@ -598,10 +602,12 @@ public abstract class PortletRequestUtils {
private static class FloatParser extends ParameterParser {
@Override
protected String getType() {
return "float";
}
@Override
protected Object doParse(String parameter) throws NumberFormatException {
return Float.valueOf(parameter);
}
@ -623,10 +629,12 @@ public abstract class PortletRequestUtils { @@ -623,10 +629,12 @@ public abstract class PortletRequestUtils {
private static class DoubleParser extends ParameterParser {
@Override
protected String getType() {
return "double";
}
@Override
protected Object doParse(String parameter) throws NumberFormatException {
return Double.valueOf(parameter);
}
@ -648,10 +656,12 @@ public abstract class PortletRequestUtils { @@ -648,10 +656,12 @@ public abstract class PortletRequestUtils {
private static class BooleanParser extends ParameterParser {
@Override
protected String getType() {
return "boolean";
}
@Override
protected Object doParse(String parameter) throws NumberFormatException {
return (parameter.equalsIgnoreCase("true") || parameter.equalsIgnoreCase("on") ||
parameter.equalsIgnoreCase("yes") || parameter.equals("1") ? Boolean.TRUE : Boolean.FALSE);
@ -674,10 +684,12 @@ public abstract class PortletRequestUtils { @@ -674,10 +684,12 @@ public abstract class PortletRequestUtils {
private static class StringParser extends ParameterParser {
@Override
protected String getType() {
return "string";
}
@Override
protected Object doParse(String parameter) throws NumberFormatException {
return parameter;
}

5
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/AbstractRefreshablePortletApplicationContext.java

@ -85,6 +85,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr @@ -85,6 +85,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
setDisplayName("Root PortletApplicationContext");
}
@Override
public void setParent(ApplicationContext parent) {
super.setParent(parent);
if (parent instanceof WebApplicationContext) {
@ -126,6 +127,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr @@ -126,6 +127,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
return this.namespace;
}
@Override
public String[] getConfigLocations() {
return super.getConfigLocations();
}
@ -134,6 +136,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr @@ -134,6 +136,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
/**
* Register request/session scopes, a {@link PortletContextAwareProcessor}, etc.
*/
@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext));
beanFactory.addBeanPostProcessor(new PortletContextAwareProcessor(this.portletContext, this.portletConfig));
@ -151,6 +154,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr @@ -151,6 +154,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
* This implementation supports file paths beneath the root of the PortletContext.
* @see PortletContextResource
*/
@Override
protected Resource getResourceByPath(String path) {
return new PortletContextResource(this.portletContext, path);
}
@ -159,6 +163,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr @@ -159,6 +163,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
* This implementation supports pattern matching in unexpanded WARs too.
* @see PortletContextResourcePatternResolver
*/
@Override
protected ResourcePatternResolver getResourcePatternResolver() {
return new PortletContextResourcePatternResolver(this);
}

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java

@ -49,6 +49,7 @@ public abstract class PortletApplicationObjectSupport extends ApplicationObjectS @@ -49,6 +49,7 @@ public abstract class PortletApplicationObjectSupport extends ApplicationObjectS
* @see #getPortletContext()
* @see #getTempDir()
*/
@Override
protected boolean isContextRequired() {
return true;
}

7
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java

@ -96,6 +96,7 @@ public class PortletContextResource extends AbstractResource implements ContextR @@ -96,6 +96,7 @@ public class PortletContextResource extends AbstractResource implements ContextR
* This implementation checks <code>PortletContext.getResource</code>.
* @see javax.portlet.PortletContext#getResource(String)
*/
@Override
public boolean exists() {
try {
URL url = this.portletContext.getResource(this.path);
@ -124,6 +125,7 @@ public class PortletContextResource extends AbstractResource implements ContextR @@ -124,6 +125,7 @@ public class PortletContextResource extends AbstractResource implements ContextR
* but throws a FileNotFoundException if no resource found.
* @see javax.portlet.PortletContext#getResource(String)
*/
@Override
public URL getURL() throws IOException {
URL url = this.portletContext.getResource(this.path);
if (url == null) {
@ -138,16 +140,19 @@ public class PortletContextResource extends AbstractResource implements ContextR @@ -138,16 +140,19 @@ public class PortletContextResource extends AbstractResource implements ContextR
* but throws a FileNotFoundException if not found or not resolvable.
* @see javax.portlet.PortletContext#getRealPath(String)
*/
@Override
public File getFile() throws IOException {
String realPath = PortletUtils.getRealPath(this.portletContext, this.path);
return new File(realPath);
}
@Override
public Resource createRelative(String relativePath) {
String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
return new PortletContextResource(this.portletContext, pathToUse);
}
@Override
public String getFilename() {
return StringUtils.getFilename(this.path);
}
@ -161,6 +166,7 @@ public class PortletContextResource extends AbstractResource implements ContextR @@ -161,6 +166,7 @@ public class PortletContextResource extends AbstractResource implements ContextR
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@ -172,6 +178,7 @@ public class PortletContextResource extends AbstractResource implements ContextR @@ -172,6 +178,7 @@ public class PortletContextResource extends AbstractResource implements ContextR
return false;
}
@Override
public int hashCode() {
return this.path.hashCode();
}

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourceLoader.java

@ -53,6 +53,7 @@ public class PortletContextResourceLoader extends DefaultResourceLoader { @@ -53,6 +53,7 @@ public class PortletContextResourceLoader extends DefaultResourceLoader {
* This implementation supports file paths beneath the root of the web application.
* @see PortletContextResource
*/
@Override
protected Resource getResourceByPath(String path) {
return new PortletContextResource(this.portletContext, path);
}

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java

@ -72,6 +72,7 @@ public class PortletContextResourcePatternResolver extends PathMatchingResourceP @@ -72,6 +72,7 @@ public class PortletContextResourcePatternResolver extends PathMatchingResourceP
* @see org.springframework.web.portlet.context.PortletContextResource
* @see javax.portlet.PortletContext#getResourcePaths
*/
@Override
protected Set doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException {
if (rootDirResource instanceof PortletContextResource) {
PortletContextResource pcResource = (PortletContextResource) rootDirResource;

2
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java

@ -235,6 +235,7 @@ public class PortletRequestAttributes extends AbstractRequestAttributes { @@ -235,6 +235,7 @@ public class PortletRequestAttributes extends AbstractRequestAttributes {
* Update all accessed session attributes through <code>session.setAttribute</code>
* calls, explicitly indicating to the container that they might have been modified.
*/
@Override
protected void updateAccessedSessionAttributes() {
this.session = this.request.getPortletSession(false);
synchronized (this.sessionAttributesToUpdate) {
@ -280,6 +281,7 @@ public class PortletRequestAttributes extends AbstractRequestAttributes { @@ -280,6 +281,7 @@ public class PortletRequestAttributes extends AbstractRequestAttributes {
}
@Override
public String toString() {
return this.request.toString();
}

3
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestHandledEvent.java

@ -106,6 +106,7 @@ public class PortletRequestHandledEvent extends RequestHandledEvent { @@ -106,6 +106,7 @@ public class PortletRequestHandledEvent extends RequestHandledEvent {
}
@Override
public String getShortDescription() {
StringBuffer sb = new StringBuffer();
sb.append("portlet=[").append(this.portletName).append("]; ");
@ -113,6 +114,7 @@ public class PortletRequestHandledEvent extends RequestHandledEvent { @@ -113,6 +114,7 @@ public class PortletRequestHandledEvent extends RequestHandledEvent {
return sb.toString();
}
@Override
public String getDescription() {
StringBuffer sb = new StringBuffer();
sb.append("portlet=[").append(this.portletName).append("]; ");
@ -122,6 +124,7 @@ public class PortletRequestHandledEvent extends RequestHandledEvent { @@ -122,6 +124,7 @@ public class PortletRequestHandledEvent extends RequestHandledEvent {
return sb.toString();
}
@Override
public String toString() {
return "PortletRequestHandledEvent: " + getDescription();
}

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java

@ -136,6 +136,7 @@ public class PortletWebRequest extends PortletRequestAttributes implements Nativ @@ -136,6 +136,7 @@ public class PortletWebRequest extends PortletRequestAttributes implements Nativ
return buffer.toString();
}
@Override
public String toString() {
return "PortletWebRequest: " + getDescription(true);
}

4
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java

@ -63,6 +63,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext @@ -63,6 +63,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
}
@Override
public void setParent(ApplicationContext parent) {
super.setParent(parent);
if (parent instanceof WebApplicationContext) {
@ -132,6 +133,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext @@ -132,6 +133,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
/**
* Register request/session scopes, a {@link PortletContextAwareProcessor}, etc.
*/
@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext));
beanFactory.addBeanPostProcessor(new PortletContextAwareProcessor(this.portletContext, this.portletConfig));
@ -148,6 +150,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext @@ -148,6 +150,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
* This implementation supports file paths beneath the root of the PortletContext.
* @see PortletContextResource
*/
@Override
protected Resource getResourceByPath(String path) {
return new PortletContextResource(this.portletContext, path);
}
@ -156,6 +159,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext @@ -156,6 +159,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
* This implementation supports pattern matching in unexpanded WARs too.
* @see PortletContextResourcePatternResolver
*/
@Override
protected ResourcePatternResolver getResourcePatternResolver() {
return new PortletContextResourcePatternResolver(this);
}

2
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/XmlPortletApplicationContext.java

@ -76,6 +76,7 @@ public class XmlPortletApplicationContext extends AbstractRefreshablePortletAppl @@ -76,6 +76,7 @@ public class XmlPortletApplicationContext extends AbstractRefreshablePortletAppl
* @see #initBeanDefinitionReader
* @see #loadBeanDefinitions
*/
@Override
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException {
// Create a new XmlBeanDefinitionReader for the given BeanFactory.
XmlBeanDefinitionReader beanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);
@ -130,6 +131,7 @@ public class XmlPortletApplicationContext extends AbstractRefreshablePortletAppl @@ -130,6 +131,7 @@ public class XmlPortletApplicationContext extends AbstractRefreshablePortletAppl
* and "/WEB-INF/test-portlet.xml" for a context with the namespace "test-portlet"
* (like for a DispatcherPortlet instance with the portlet-name "test").
*/
@Override
protected String[] getDefaultConfigLocations() {
if (getNamespace() != null) {
return new String[] {DEFAULT_CONFIG_LOCATION_PREFIX + getNamespace() + DEFAULT_CONFIG_LOCATION_SUFFIX};

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java

@ -125,6 +125,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport @@ -125,6 +125,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport
* @see #extendInterceptors(java.util.List)
* @see #initInterceptors()
*/
@Override
protected void initApplicationContext() throws BeansException {
extendInterceptors(this.interceptors);
initInterceptors();

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/AbstractMapBasedHandlerMapping.java

@ -66,6 +66,7 @@ public abstract class AbstractMapBasedHandlerMapping extends AbstractHandlerMapp @@ -66,6 +66,7 @@ public abstract class AbstractMapBasedHandlerMapping extends AbstractHandlerMapp
* Determines a handler for the computed lookup key for the given request.
* @see #getLookupKey
*/
@Override
protected Object getHandlerInternal(PortletRequest request) throws Exception {
Object lookupKey = getLookupKey(request);
Object handler = this.handlerMap.get(lookupKey);

3
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/ParameterHandlerMapping.java

@ -88,6 +88,7 @@ public class ParameterHandlerMapping extends AbstractMapBasedHandlerMapping { @@ -88,6 +88,7 @@ public class ParameterHandlerMapping extends AbstractMapBasedHandlerMapping {
* to the superclass's initialization.
* @see #registerHandlers
*/
@Override
public void initApplicationContext() throws BeansException {
super.initApplicationContext();
registerHandlers(this.parameterMap);
@ -98,6 +99,7 @@ public class ParameterHandlerMapping extends AbstractMapBasedHandlerMapping { @@ -98,6 +99,7 @@ public class ParameterHandlerMapping extends AbstractMapBasedHandlerMapping {
* @param parameterMap Map with parameter names as keys and handler beans or bean names as values
* @throws BeansException if the handler couldn't be registered
*/
@Override
protected void registerHandlers(Map parameterMap) throws BeansException {
if (CollectionUtils.isEmpty(parameterMap)) {
logger.warn("'parameterMap' is empty on ParameterHandlerMapping");
@ -112,6 +114,7 @@ public class ParameterHandlerMapping extends AbstractMapBasedHandlerMapping { @@ -112,6 +114,7 @@ public class ParameterHandlerMapping extends AbstractMapBasedHandlerMapping {
* Uses the value of the specified parameter as lookup key.
* @see #setParameterName
*/
@Override
protected Object getLookupKey(PortletRequest request) throws Exception {
return request.getParameter(this.parameterName);
}

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java

@ -65,6 +65,7 @@ public class ParameterMappingInterceptor extends HandlerInterceptorAdapter { @@ -65,6 +65,7 @@ public class ParameterMappingInterceptor extends HandlerInterceptorAdapter {
* If request is an {@link javax.portlet.ActionRequest ActionRequest},
* get handler mapping parameter and add it to the ActionResponse.
*/
@Override
public boolean preHandleAction(ActionRequest request, ActionResponse response, Object handler) {
String mappingParameter = request.getParameter(this.parameterName);
if (mappingParameter != null) {

3
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeHandlerMapping.java

@ -76,6 +76,7 @@ public class PortletModeHandlerMapping extends AbstractMapBasedHandlerMapping { @@ -76,6 +76,7 @@ public class PortletModeHandlerMapping extends AbstractMapBasedHandlerMapping {
* to the superclass's initialization.
* @see #registerHandlers
*/
@Override
public void initApplicationContext() throws BeansException {
super.initApplicationContext();
registerHandlers(this.portletModeMap);
@ -86,6 +87,7 @@ public class PortletModeHandlerMapping extends AbstractMapBasedHandlerMapping { @@ -86,6 +87,7 @@ public class PortletModeHandlerMapping extends AbstractMapBasedHandlerMapping {
* @param portletModeMap Map with mode names as keys and handler beans or bean names as values
* @throws BeansException if the handler couldn't be registered
*/
@Override
protected void registerHandlers(Map portletModeMap) throws BeansException {
if (CollectionUtils.isEmpty(portletModeMap)) {
logger.warn("Neither 'portletModeMap' nor 'mappings' set on PortletModeHandlerMapping");
@ -105,6 +107,7 @@ public class PortletModeHandlerMapping extends AbstractMapBasedHandlerMapping { @@ -105,6 +107,7 @@ public class PortletModeHandlerMapping extends AbstractMapBasedHandlerMapping {
/**
* Uses the current PortletMode as lookup key.
*/
@Override
protected Object getLookupKey(PortletRequest request) throws Exception {
return request.getPortletMode();
}

6
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMapping.java

@ -137,6 +137,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM @@ -137,6 +137,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
* to the superclass's initialization.
* @see #registerHandlers
*/
@Override
public void initApplicationContext() throws BeansException {
super.initApplicationContext();
registerHandlers(this.portletModeParameterMap);
@ -147,6 +148,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM @@ -147,6 +148,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
* @param portletModeParameterMap Map with mode names as keys and parameter Maps as values
* @throws BeansException if the handler couldn't be registered
*/
@Override
protected void registerHandlers(Map portletModeParameterMap) throws BeansException {
if (CollectionUtils.isEmpty(portletModeParameterMap)) {
logger.warn("'portletModeParameterMap' not set on PortletModeParameterHandlerMapping");
@ -210,6 +212,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM @@ -210,6 +212,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
* @see javax.portlet.PortletRequest#getPortletMode()
* @see #setParameterName
*/
@Override
protected Object getLookupKey(PortletRequest request) throws Exception {
PortletMode mode = request.getPortletMode();
String parameter = request.getParameter(this.parameterName);
@ -231,6 +234,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM @@ -231,6 +234,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
this.parameter = parameter;
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
@ -243,10 +247,12 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM @@ -243,10 +247,12 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
ObjectUtils.nullSafeEquals(this.parameter, otherKey.parameter));
}
@Override
public int hashCode() {
return (this.mode.hashCode() * 29 + ObjectUtils.nullSafeHashCode(this.parameter));
}
@Override
public String toString() {
return "Portlet mode '" + this.mode + "', parameter '" + this.parameter + "'";
}

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/handler/UserRoleAuthorizationInterceptor.java

@ -46,6 +46,7 @@ public class UserRoleAuthorizationInterceptor extends HandlerInterceptorAdapter @@ -46,6 +46,7 @@ public class UserRoleAuthorizationInterceptor extends HandlerInterceptorAdapter
}
@Override
public final boolean preHandle(PortletRequest request, PortletResponse response, Object handler)
throws PortletException, IOException {

2
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java

@ -106,6 +106,7 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport @@ -106,6 +106,7 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport
* instance. Can be overridden to use a custom subclass, e.g. for testing purposes.
* @return the new PortletFileUpload instance
*/
@Override
protected FileUpload newFileUpload(FileItemFactory fileItemFactory) {
return new PortletFileUpload(fileItemFactory);
}
@ -133,6 +134,7 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport @@ -133,6 +134,7 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport
Assert.notNull(request, "Request must not be null");
if (this.resolveLazily) {
return new DefaultMultipartActionRequest(request) {
@Override
protected void initializeMultipart() {
MultipartParsingResult parsingResult = parseRequest(request);
setMultipartFiles(parsingResult.getMultipartFiles());

4
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java

@ -79,6 +79,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen @@ -79,6 +79,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen
}
@Override
public Enumeration getParameterNames() {
Set paramNames = new HashSet();
Enumeration paramEnum = super.getParameterNames();
@ -89,6 +90,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen @@ -89,6 +90,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen
return Collections.enumeration(paramNames);
}
@Override
public String getParameter(String name) {
String[] values = (String[]) getMultipartParameters().get(name);
if (values != null) {
@ -97,6 +99,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen @@ -97,6 +99,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen
return super.getParameter(name);
}
@Override
public String[] getParameterValues(String name) {
String[] values = (String[]) getMultipartParameters().get(name);
if (values != null) {
@ -105,6 +108,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen @@ -105,6 +108,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen
return super.getParameterValues(name);
}
@Override
public Map getParameterMap() {
Map paramMap = new HashMap();
paramMap.putAll(super.getParameterMap());

2
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractCommandController.java

@ -86,6 +86,7 @@ public abstract class AbstractCommandController extends BaseCommandController { @@ -86,6 +86,7 @@ public abstract class AbstractCommandController extends BaseCommandController {
}
@Override
protected final void handleActionRequestInternal(ActionRequest request, ActionResponse response)
throws Exception {
@ -104,6 +105,7 @@ public abstract class AbstractCommandController extends BaseCommandController { @@ -104,6 +105,7 @@ public abstract class AbstractCommandController extends BaseCommandController {
setCommandInSession(response);
}
@Override
protected final ModelAndView handleRenderRequestInternal(
RenderRequest request, RenderResponse response) throws Exception {

3
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java

@ -371,6 +371,7 @@ public abstract class AbstractFormController extends BaseCommandController { @@ -371,6 +371,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* @see #processFormSubmission
* @see #handleRenderRequestInternal
*/
@Override
protected void handleActionRequestInternal(ActionRequest request, ActionResponse response)
throws Exception {
@ -420,6 +421,7 @@ public abstract class AbstractFormController extends BaseCommandController { @@ -420,6 +421,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* @see #processFormSubmission
* @see #handleActionRequestInternal
*/
@Override
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response)
throws Exception {
@ -680,6 +682,7 @@ public abstract class AbstractFormController extends BaseCommandController { @@ -680,6 +682,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* @return object form to bind onto
* @see #formBackingObject
*/
@Override
protected final Object getCommand(PortletRequest request) throws Exception {
// If not in session-form mode, create a new form-backing object.
if (!isSessionForm()) {

8
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java

@ -230,6 +230,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle @@ -230,6 +230,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Calls page-specific onBindAndValidate method.
*/
@Override
protected final void onBindAndValidate(PortletRequest request, Object command, BindException errors)
throws Exception {
@ -261,6 +262,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle @@ -261,6 +262,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* @see #isFinishRequest(PortletRequest)
* @see #isCancelRequest(PortletRequest)
*/
@Override
protected boolean isFormSubmission(PortletRequest request) {
return super.isFormSubmission(request) || isFinishRequest(request) || isCancelRequest(request);
}
@ -268,6 +270,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle @@ -268,6 +270,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Calls page-specific referenceData method.
*/
@Override
protected final Map referenceData(PortletRequest request, Object command, Errors errors)
throws Exception {
@ -315,6 +318,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle @@ -315,6 +318,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* <p>This can be overridden in subclasses, e.g. to prepare wizard-specific
* error views in case of an Exception.
*/
@Override
protected ModelAndView showForm(
RenderRequest request, RenderResponse response, BindException errors) throws Exception {
@ -557,6 +561,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle @@ -557,6 +561,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* @see #setBindOnNewForm
* @see #handleInvalidSubmit
*/
@Override
protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response)
throws Exception {
@ -574,6 +579,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle @@ -574,6 +579,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* @throws Exception in case of errors
* @see #renderInvalidSubmit
*/
@Override
protected void handleInvalidSubmit(ActionRequest request, ActionResponse response) throws Exception {
}
@ -581,6 +587,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle @@ -581,6 +587,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* Apply wizard workflow: finish, cancel, page change.
* @see #processFormSubmission
*/
@Override
protected final ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors)
throws Exception {
@ -626,6 +633,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle @@ -626,6 +633,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* Apply wizard workflow: finish, cancel, page change.
* @see #renderFormSubmission
*/
@Override
protected final void processFormSubmission(
ActionRequest request, ActionResponse response, Object command, BindException errors)
throws Exception {

1
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java

@ -349,6 +349,7 @@ public abstract class BaseCommandController extends AbstractController { @@ -349,6 +349,7 @@ public abstract class BaseCommandController extends AbstractController {
}
@Override
protected void initApplicationContext() {
if (this.validators != null) {
for (int i = 0; i < this.validators.length; i++) {

2
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java

@ -81,6 +81,7 @@ public class ParameterizableViewController extends AbstractController { @@ -81,6 +81,7 @@ public class ParameterizableViewController extends AbstractController {
return this.viewName;
}
@Override
protected void initApplicationContext() {
if (this.viewName == null) {
throw new IllegalArgumentException("Property 'viewName' is required");
@ -91,6 +92,7 @@ public class ParameterizableViewController extends AbstractController { @@ -91,6 +92,7 @@ public class ParameterizableViewController extends AbstractController {
/**
* Return a ModelAndView object with the specified view name.
*/
@Override
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response)
throws Exception {

3
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/PortletWrappingController.java

@ -98,6 +98,7 @@ public class PortletWrappingController extends AbstractController @@ -98,6 +98,7 @@ public class PortletWrappingController extends AbstractController
this.useSharedPortletConfig = useSharedPortletConfig;
}
@Override
public void setPortletContext(PortletContext portletContext) {
this.portletContext = portletContext;
}
@ -156,12 +157,14 @@ public class PortletWrappingController extends AbstractController @@ -156,12 +157,14 @@ public class PortletWrappingController extends AbstractController
}
@Override
protected void handleActionRequestInternal(
ActionRequest request, ActionResponse response) throws Exception {
this.portletInstance.processAction(request, response);
}
@Override
protected ModelAndView handleRenderRequestInternal(
RenderRequest request, RenderResponse response) throws Exception {

5
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleFormController.java

@ -200,6 +200,7 @@ public class SimpleFormController extends AbstractFormController { @@ -200,6 +200,7 @@ public class SimpleFormController extends AbstractFormController {
* @see #setFormView
* @see #showForm(RenderRequest, RenderResponse, BindException, Map)
*/
@Override
protected ModelAndView showForm(RenderRequest request, RenderResponse response, BindException errors)
throws Exception {
@ -238,6 +239,7 @@ public class SimpleFormController extends AbstractFormController { @@ -238,6 +239,7 @@ public class SimpleFormController extends AbstractFormController {
* @throws Exception in case of invalid state or arguments
* @see ModelAndView
*/
@Override
protected Map referenceData(PortletRequest request, Object command, Errors errors) throws Exception {
return referenceData(request);
}
@ -271,6 +273,7 @@ public class SimpleFormController extends AbstractFormController { @@ -271,6 +273,7 @@ public class SimpleFormController extends AbstractFormController {
* @see #onSubmitRender(Object)
* @see #processFormSubmission(ActionRequest, ActionResponse, Object, BindException)
*/
@Override
protected ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors)
throws Exception {
@ -296,6 +299,7 @@ public class SimpleFormController extends AbstractFormController { @@ -296,6 +299,7 @@ public class SimpleFormController extends AbstractFormController {
* @see #doSubmitAction(Object)
* @see #renderFormSubmission(RenderRequest, RenderResponse, Object, BindException)
*/
@Override
protected void processFormSubmission(
ActionRequest request, ActionResponse response, Object command, BindException errors)
throws Exception {
@ -329,6 +333,7 @@ public class SimpleFormController extends AbstractFormController { @@ -329,6 +333,7 @@ public class SimpleFormController extends AbstractFormController {
* and should not get validated but just show the new form.
* @see #isFormChangeRequest
*/
@Override
protected boolean suppressValidation(PortletRequest request) {
return isFormChangeRequest(request);
}

2
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java

@ -592,12 +592,14 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator impl @@ -592,12 +592,14 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator impl
private boolean render = false;
@Override
public boolean equals(Object obj) {
RequestMappingInfo other = (RequestMappingInfo) obj;
return (this.action == other.action && this.render == other.render &&
Arrays.equals(this.modes, other.modes) && Arrays.equals(this.params, other.params));
}
@Override
public int hashCode() {
return (Arrays.hashCode(this.modes) * 29 + Arrays.hashCode(this.params));
}

3
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java

@ -84,6 +84,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp @@ -84,6 +84,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp
* to the superclass's initialization.
* @see #detectHandlers
*/
@Override
public void initApplicationContext() throws BeansException {
super.initApplicationContext();
detectHandlers();
@ -165,6 +166,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp @@ -165,6 +166,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp
/**
* Uses the current PortletMode as lookup key.
*/
@Override
protected Object getLookupKey(PortletRequest request) throws Exception {
return request.getPortletMode();
}
@ -194,6 +196,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp @@ -194,6 +196,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp
}
}
@Override
public String toString() {
return StringUtils.arrayToCommaDelimitedString(this.params);
}

Loading…
Cancel
Save