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 {
/** /**
* This implementation calls {@link #initStrategies}. * This implementation calls {@link #initStrategies}.
*/ */
@Override
public void onRefresh(ApplicationContext context) { public void onRefresh(ApplicationContext context) {
initStrategies(context); initStrategies(context);
} }
@ -644,6 +645,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
* @param response current portlet Action response * @param response current portlet Action response
* @throws Exception in case of any kind of processing failure * @throws Exception in case of any kind of processing failure
*/ */
@Override
protected void doActionService(ActionRequest request, ActionResponse response) throws Exception { protected void doActionService(ActionRequest request, ActionResponse response) throws Exception {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("DispatcherPortlet with name '" + getPortletName() + "' received action request"); logger.debug("DispatcherPortlet with name '" + getPortletName() + "' received action request");
@ -746,6 +748,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
* @param response current portlet render response * @param response current portlet render response
* @throws Exception in case of any kind of processing failure * @throws Exception in case of any kind of processing failure
*/ */
@Override
protected void doRenderService(RenderRequest request, RenderResponse response) throws Exception { protected void doRenderService(RenderRequest request, RenderResponse response) throws Exception {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("DispatcherPortlet with name '" + getPortletName() + "' received render request"); 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
* Overridden method of GenericPortletBean, invoked after any bean properties * Overridden method of GenericPortletBean, invoked after any bean properties
* have been set. Creates this portlet's ApplicationContext. * have been set. Creates this portlet's ApplicationContext.
*/ */
@Override
protected final void initPortletBean() throws PortletException, BeansException { protected final void initPortletBean() throws PortletException, BeansException {
getPortletContext().log("Initializing Spring FrameworkPortlet '" + getPortletName() + "'"); getPortletContext().log("Initializing Spring FrameworkPortlet '" + getPortletName() + "'");
if (logger.isInfoEnabled()) { if (logger.isInfoEnabled()) {
@ -435,6 +436,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App
/** /**
* Overridden for friendlier behavior in unit tests. * Overridden for friendlier behavior in unit tests.
*/ */
@Override
protected String getTitle(RenderRequest renderRequest) { protected String getTitle(RenderRequest renderRequest) {
try { try {
return super.getTitle(renderRequest); return super.getTitle(renderRequest);
@ -447,6 +449,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App
/** /**
* Delegate render requests to processRequest/doRenderService. * Delegate render requests to processRequest/doRenderService.
*/ */
@Override
protected final void doDispatch(RenderRequest request, RenderResponse response) protected final void doDispatch(RenderRequest request, RenderResponse response)
throws PortletException, IOException { throws PortletException, IOException {
@ -456,6 +459,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App
/** /**
* Delegate action requests to processRequest/doActionService. * Delegate action requests to processRequest/doActionService.
*/ */
@Override
public final void processAction(ActionRequest request, ActionResponse response) public final void processAction(ActionRequest request, ActionResponse response)
throws PortletException, IOException { throws PortletException, IOException {
@ -589,6 +593,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean implements App
* Close the ApplicationContext of this portlet. * Close the ApplicationContext of this portlet.
* @see org.springframework.context.ConfigurableApplicationContext#close() * @see org.springframework.context.ConfigurableApplicationContext#close()
*/ */
@Override
public void destroy() { public void destroy() {
getPortletContext().log("Destroying Spring FrameworkPortlet '" + getPortletName() + "'"); getPortletContext().log("Destroying Spring FrameworkPortlet '" + getPortletName() + "'");
if (this.portletApplicationContext instanceof ConfigurableApplicationContext) { 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 {
* @throws PortletException if bean properties are invalid (or required * @throws PortletException if bean properties are invalid (or required
* properties are missing), or if subclass initialization fails. * properties are missing), or if subclass initialization fails.
*/ */
@Override
public final void init() throws PortletException { public final void init() throws PortletException {
if (logger.isInfoEnabled()) { if (logger.isInfoEnabled()) {
logger.info("Initializing portlet '" + getPortletName() + "'"); logger.info("Initializing portlet '" + getPortletName() + "'");
@ -135,6 +136,7 @@ public abstract class GenericPortletBean extends GenericPortlet {
* PortletConfig set yet. * PortletConfig set yet.
* @see #getPortletConfig() * @see #getPortletConfig()
*/ */
@Override
public final String getPortletName() { public final String getPortletName() {
return (getPortletConfig() != null ? getPortletConfig().getPortletName() : null); return (getPortletConfig() != null ? getPortletConfig().getPortletName() : null);
} }
@ -144,6 +146,7 @@ public abstract class GenericPortletBean extends GenericPortlet {
* PortletConfig set yet. * PortletConfig set yet.
* @see #getPortletConfig() * @see #getPortletConfig()
*/ */
@Override
public final PortletContext getPortletContext() { public final PortletContext getPortletContext() {
return (getPortletConfig() != null ? getPortletConfig().getPortletContext() : null); 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 {
/** /**
* Return diagnostic information about this model and view. * Return diagnostic information about this model and view.
*/ */
@Override
public String toString() { public String toString() {
StringBuffer buf = new StringBuffer("ModelAndView: "); StringBuffer buf = new StringBuffer("ModelAndView: ");
if (isReference()) { 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
} }
@Override
public String getMessage() { public String getMessage() {
return "Required " + this.parameterType + " parameter '" + parameterName + "' is not present"; 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 {
private static class IntParser extends ParameterParser { private static class IntParser extends ParameterParser {
@Override
protected String getType() { protected String getType() {
return "int"; return "int";
} }
@Override
protected Object doParse(String s) throws NumberFormatException { protected Object doParse(String s) throws NumberFormatException {
return Integer.valueOf(s); return Integer.valueOf(s);
} }
@ -573,10 +575,12 @@ public abstract class PortletRequestUtils {
private static class LongParser extends ParameterParser { private static class LongParser extends ParameterParser {
@Override
protected String getType() { protected String getType() {
return "long"; return "long";
} }
@Override
protected Object doParse(String parameter) throws NumberFormatException { protected Object doParse(String parameter) throws NumberFormatException {
return Long.valueOf(parameter); return Long.valueOf(parameter);
} }
@ -598,10 +602,12 @@ public abstract class PortletRequestUtils {
private static class FloatParser extends ParameterParser { private static class FloatParser extends ParameterParser {
@Override
protected String getType() { protected String getType() {
return "float"; return "float";
} }
@Override
protected Object doParse(String parameter) throws NumberFormatException { protected Object doParse(String parameter) throws NumberFormatException {
return Float.valueOf(parameter); return Float.valueOf(parameter);
} }
@ -623,10 +629,12 @@ public abstract class PortletRequestUtils {
private static class DoubleParser extends ParameterParser { private static class DoubleParser extends ParameterParser {
@Override
protected String getType() { protected String getType() {
return "double"; return "double";
} }
@Override
protected Object doParse(String parameter) throws NumberFormatException { protected Object doParse(String parameter) throws NumberFormatException {
return Double.valueOf(parameter); return Double.valueOf(parameter);
} }
@ -648,10 +656,12 @@ public abstract class PortletRequestUtils {
private static class BooleanParser extends ParameterParser { private static class BooleanParser extends ParameterParser {
@Override
protected String getType() { protected String getType() {
return "boolean"; return "boolean";
} }
@Override
protected Object doParse(String parameter) throws NumberFormatException { protected Object doParse(String parameter) throws NumberFormatException {
return (parameter.equalsIgnoreCase("true") || parameter.equalsIgnoreCase("on") || return (parameter.equalsIgnoreCase("true") || parameter.equalsIgnoreCase("on") ||
parameter.equalsIgnoreCase("yes") || parameter.equals("1") ? Boolean.TRUE : Boolean.FALSE); parameter.equalsIgnoreCase("yes") || parameter.equals("1") ? Boolean.TRUE : Boolean.FALSE);
@ -674,10 +684,12 @@ public abstract class PortletRequestUtils {
private static class StringParser extends ParameterParser { private static class StringParser extends ParameterParser {
@Override
protected String getType() { protected String getType() {
return "string"; return "string";
} }
@Override
protected Object doParse(String parameter) throws NumberFormatException { protected Object doParse(String parameter) throws NumberFormatException {
return parameter; 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
setDisplayName("Root PortletApplicationContext"); setDisplayName("Root PortletApplicationContext");
} }
@Override
public void setParent(ApplicationContext parent) { public void setParent(ApplicationContext parent) {
super.setParent(parent); super.setParent(parent);
if (parent instanceof WebApplicationContext) { if (parent instanceof WebApplicationContext) {
@ -126,6 +127,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
return this.namespace; return this.namespace;
} }
@Override
public String[] getConfigLocations() { public String[] getConfigLocations() {
return super.getConfigLocations(); return super.getConfigLocations();
} }
@ -134,6 +136,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
/** /**
* Register request/session scopes, a {@link PortletContextAwareProcessor}, etc. * Register request/session scopes, a {@link PortletContextAwareProcessor}, etc.
*/ */
@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext)); beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext));
beanFactory.addBeanPostProcessor(new PortletContextAwareProcessor(this.portletContext, this.portletConfig)); beanFactory.addBeanPostProcessor(new PortletContextAwareProcessor(this.portletContext, this.portletConfig));
@ -151,6 +154,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
* This implementation supports file paths beneath the root of the PortletContext. * This implementation supports file paths beneath the root of the PortletContext.
* @see PortletContextResource * @see PortletContextResource
*/ */
@Override
protected Resource getResourceByPath(String path) { protected Resource getResourceByPath(String path) {
return new PortletContextResource(this.portletContext, path); return new PortletContextResource(this.portletContext, path);
} }
@ -159,6 +163,7 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
* This implementation supports pattern matching in unexpanded WARs too. * This implementation supports pattern matching in unexpanded WARs too.
* @see PortletContextResourcePatternResolver * @see PortletContextResourcePatternResolver
*/ */
@Override
protected ResourcePatternResolver getResourcePatternResolver() { protected ResourcePatternResolver getResourcePatternResolver() {
return new PortletContextResourcePatternResolver(this); 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
* @see #getPortletContext() * @see #getPortletContext()
* @see #getTempDir() * @see #getTempDir()
*/ */
@Override
protected boolean isContextRequired() { protected boolean isContextRequired() {
return true; 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
* This implementation checks <code>PortletContext.getResource</code>. * This implementation checks <code>PortletContext.getResource</code>.
* @see javax.portlet.PortletContext#getResource(String) * @see javax.portlet.PortletContext#getResource(String)
*/ */
@Override
public boolean exists() { public boolean exists() {
try { try {
URL url = this.portletContext.getResource(this.path); URL url = this.portletContext.getResource(this.path);
@ -124,6 +125,7 @@ public class PortletContextResource extends AbstractResource implements ContextR
* but throws a FileNotFoundException if no resource found. * but throws a FileNotFoundException if no resource found.
* @see javax.portlet.PortletContext#getResource(String) * @see javax.portlet.PortletContext#getResource(String)
*/ */
@Override
public URL getURL() throws IOException { public URL getURL() throws IOException {
URL url = this.portletContext.getResource(this.path); URL url = this.portletContext.getResource(this.path);
if (url == null) { if (url == null) {
@ -138,16 +140,19 @@ public class PortletContextResource extends AbstractResource implements ContextR
* but throws a FileNotFoundException if not found or not resolvable. * but throws a FileNotFoundException if not found or not resolvable.
* @see javax.portlet.PortletContext#getRealPath(String) * @see javax.portlet.PortletContext#getRealPath(String)
*/ */
@Override
public File getFile() throws IOException { public File getFile() throws IOException {
String realPath = PortletUtils.getRealPath(this.portletContext, this.path); String realPath = PortletUtils.getRealPath(this.portletContext, this.path);
return new File(realPath); return new File(realPath);
} }
@Override
public Resource createRelative(String relativePath) { public Resource createRelative(String relativePath) {
String pathToUse = StringUtils.applyRelativePath(this.path, relativePath); String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
return new PortletContextResource(this.portletContext, pathToUse); return new PortletContextResource(this.portletContext, pathToUse);
} }
@Override
public String getFilename() { public String getFilename() {
return StringUtils.getFilename(this.path); return StringUtils.getFilename(this.path);
} }
@ -161,6 +166,7 @@ public class PortletContextResource extends AbstractResource implements ContextR
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj == this) { if (obj == this) {
return true; return true;
@ -172,6 +178,7 @@ public class PortletContextResource extends AbstractResource implements ContextR
return false; return false;
} }
@Override
public int hashCode() { public int hashCode() {
return this.path.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 {
* This implementation supports file paths beneath the root of the web application. * This implementation supports file paths beneath the root of the web application.
* @see PortletContextResource * @see PortletContextResource
*/ */
@Override
protected Resource getResourceByPath(String path) { protected Resource getResourceByPath(String path) {
return new PortletContextResource(this.portletContext, 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
* @see org.springframework.web.portlet.context.PortletContextResource * @see org.springframework.web.portlet.context.PortletContextResource
* @see javax.portlet.PortletContext#getResourcePaths * @see javax.portlet.PortletContext#getResourcePaths
*/ */
@Override
protected Set doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException { protected Set doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException {
if (rootDirResource instanceof PortletContextResource) { if (rootDirResource instanceof PortletContextResource) {
PortletContextResource pcResource = (PortletContextResource) rootDirResource; 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 {
* Update all accessed session attributes through <code>session.setAttribute</code> * Update all accessed session attributes through <code>session.setAttribute</code>
* calls, explicitly indicating to the container that they might have been modified. * calls, explicitly indicating to the container that they might have been modified.
*/ */
@Override
protected void updateAccessedSessionAttributes() { protected void updateAccessedSessionAttributes() {
this.session = this.request.getPortletSession(false); this.session = this.request.getPortletSession(false);
synchronized (this.sessionAttributesToUpdate) { synchronized (this.sessionAttributesToUpdate) {
@ -280,6 +281,7 @@ public class PortletRequestAttributes extends AbstractRequestAttributes {
} }
@Override
public String toString() { public String toString() {
return this.request.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 {
} }
@Override
public String getShortDescription() { public String getShortDescription() {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
sb.append("portlet=[").append(this.portletName).append("]; "); sb.append("portlet=[").append(this.portletName).append("]; ");
@ -113,6 +114,7 @@ public class PortletRequestHandledEvent extends RequestHandledEvent {
return sb.toString(); return sb.toString();
} }
@Override
public String getDescription() { public String getDescription() {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
sb.append("portlet=[").append(this.portletName).append("]; "); sb.append("portlet=[").append(this.portletName).append("]; ");
@ -122,6 +124,7 @@ public class PortletRequestHandledEvent extends RequestHandledEvent {
return sb.toString(); return sb.toString();
} }
@Override
public String toString() { public String toString() {
return "PortletRequestHandledEvent: " + getDescription(); 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
return buffer.toString(); return buffer.toString();
} }
@Override
public String toString() { public String toString() {
return "PortletWebRequest: " + getDescription(true); 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
} }
@Override
public void setParent(ApplicationContext parent) { public void setParent(ApplicationContext parent) {
super.setParent(parent); super.setParent(parent);
if (parent instanceof WebApplicationContext) { if (parent instanceof WebApplicationContext) {
@ -132,6 +133,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
/** /**
* Register request/session scopes, a {@link PortletContextAwareProcessor}, etc. * Register request/session scopes, a {@link PortletContextAwareProcessor}, etc.
*/ */
@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext)); beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext));
beanFactory.addBeanPostProcessor(new PortletContextAwareProcessor(this.portletContext, this.portletConfig)); beanFactory.addBeanPostProcessor(new PortletContextAwareProcessor(this.portletContext, this.portletConfig));
@ -148,6 +150,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
* This implementation supports file paths beneath the root of the PortletContext. * This implementation supports file paths beneath the root of the PortletContext.
* @see PortletContextResource * @see PortletContextResource
*/ */
@Override
protected Resource getResourceByPath(String path) { protected Resource getResourceByPath(String path) {
return new PortletContextResource(this.portletContext, path); return new PortletContextResource(this.portletContext, path);
} }
@ -156,6 +159,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
* This implementation supports pattern matching in unexpanded WARs too. * This implementation supports pattern matching in unexpanded WARs too.
* @see PortletContextResourcePatternResolver * @see PortletContextResourcePatternResolver
*/ */
@Override
protected ResourcePatternResolver getResourcePatternResolver() { protected ResourcePatternResolver getResourcePatternResolver() {
return new PortletContextResourcePatternResolver(this); 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
* @see #initBeanDefinitionReader * @see #initBeanDefinitionReader
* @see #loadBeanDefinitions * @see #loadBeanDefinitions
*/ */
@Override
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException { protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException {
// Create a new XmlBeanDefinitionReader for the given BeanFactory. // Create a new XmlBeanDefinitionReader for the given BeanFactory.
XmlBeanDefinitionReader beanDefinitionReader = new XmlBeanDefinitionReader(beanFactory); XmlBeanDefinitionReader beanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);
@ -130,6 +131,7 @@ public class XmlPortletApplicationContext extends AbstractRefreshablePortletAppl
* and "/WEB-INF/test-portlet.xml" for a context with the namespace "test-portlet" * and "/WEB-INF/test-portlet.xml" for a context with the namespace "test-portlet"
* (like for a DispatcherPortlet instance with the portlet-name "test"). * (like for a DispatcherPortlet instance with the portlet-name "test").
*/ */
@Override
protected String[] getDefaultConfigLocations() { protected String[] getDefaultConfigLocations() {
if (getNamespace() != null) { if (getNamespace() != null) {
return new String[] {DEFAULT_CONFIG_LOCATION_PREFIX + getNamespace() + DEFAULT_CONFIG_LOCATION_SUFFIX}; 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
* @see #extendInterceptors(java.util.List) * @see #extendInterceptors(java.util.List)
* @see #initInterceptors() * @see #initInterceptors()
*/ */
@Override
protected void initApplicationContext() throws BeansException { protected void initApplicationContext() throws BeansException {
extendInterceptors(this.interceptors); extendInterceptors(this.interceptors);
initInterceptors(); 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
* Determines a handler for the computed lookup key for the given request. * Determines a handler for the computed lookup key for the given request.
* @see #getLookupKey * @see #getLookupKey
*/ */
@Override
protected Object getHandlerInternal(PortletRequest request) throws Exception { protected Object getHandlerInternal(PortletRequest request) throws Exception {
Object lookupKey = getLookupKey(request); Object lookupKey = getLookupKey(request);
Object handler = this.handlerMap.get(lookupKey); 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 {
* to the superclass's initialization. * to the superclass's initialization.
* @see #registerHandlers * @see #registerHandlers
*/ */
@Override
public void initApplicationContext() throws BeansException { public void initApplicationContext() throws BeansException {
super.initApplicationContext(); super.initApplicationContext();
registerHandlers(this.parameterMap); registerHandlers(this.parameterMap);
@ -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 * @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 * @throws BeansException if the handler couldn't be registered
*/ */
@Override
protected void registerHandlers(Map parameterMap) throws BeansException { protected void registerHandlers(Map parameterMap) throws BeansException {
if (CollectionUtils.isEmpty(parameterMap)) { if (CollectionUtils.isEmpty(parameterMap)) {
logger.warn("'parameterMap' is empty on ParameterHandlerMapping"); logger.warn("'parameterMap' is empty on ParameterHandlerMapping");
@ -112,6 +114,7 @@ public class ParameterHandlerMapping extends AbstractMapBasedHandlerMapping {
* Uses the value of the specified parameter as lookup key. * Uses the value of the specified parameter as lookup key.
* @see #setParameterName * @see #setParameterName
*/ */
@Override
protected Object getLookupKey(PortletRequest request) throws Exception { protected Object getLookupKey(PortletRequest request) throws Exception {
return request.getParameter(this.parameterName); 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 {
* If request is an {@link javax.portlet.ActionRequest ActionRequest}, * If request is an {@link javax.portlet.ActionRequest ActionRequest},
* get handler mapping parameter and add it to the ActionResponse. * get handler mapping parameter and add it to the ActionResponse.
*/ */
@Override
public boolean preHandleAction(ActionRequest request, ActionResponse response, Object handler) { public boolean preHandleAction(ActionRequest request, ActionResponse response, Object handler) {
String mappingParameter = request.getParameter(this.parameterName); String mappingParameter = request.getParameter(this.parameterName);
if (mappingParameter != null) { 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 {
* to the superclass's initialization. * to the superclass's initialization.
* @see #registerHandlers * @see #registerHandlers
*/ */
@Override
public void initApplicationContext() throws BeansException { public void initApplicationContext() throws BeansException {
super.initApplicationContext(); super.initApplicationContext();
registerHandlers(this.portletModeMap); registerHandlers(this.portletModeMap);
@ -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 * @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 * @throws BeansException if the handler couldn't be registered
*/ */
@Override
protected void registerHandlers(Map portletModeMap) throws BeansException { protected void registerHandlers(Map portletModeMap) throws BeansException {
if (CollectionUtils.isEmpty(portletModeMap)) { if (CollectionUtils.isEmpty(portletModeMap)) {
logger.warn("Neither 'portletModeMap' nor 'mappings' set on PortletModeHandlerMapping"); logger.warn("Neither 'portletModeMap' nor 'mappings' set on PortletModeHandlerMapping");
@ -105,6 +107,7 @@ public class PortletModeHandlerMapping extends AbstractMapBasedHandlerMapping {
/** /**
* Uses the current PortletMode as lookup key. * Uses the current PortletMode as lookup key.
*/ */
@Override
protected Object getLookupKey(PortletRequest request) throws Exception { protected Object getLookupKey(PortletRequest request) throws Exception {
return request.getPortletMode(); 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
* to the superclass's initialization. * to the superclass's initialization.
* @see #registerHandlers * @see #registerHandlers
*/ */
@Override
public void initApplicationContext() throws BeansException { public void initApplicationContext() throws BeansException {
super.initApplicationContext(); super.initApplicationContext();
registerHandlers(this.portletModeParameterMap); registerHandlers(this.portletModeParameterMap);
@ -147,6 +148,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
* @param portletModeParameterMap Map with mode names as keys and parameter Maps as values * @param portletModeParameterMap Map with mode names as keys and parameter Maps as values
* @throws BeansException if the handler couldn't be registered * @throws BeansException if the handler couldn't be registered
*/ */
@Override
protected void registerHandlers(Map portletModeParameterMap) throws BeansException { protected void registerHandlers(Map portletModeParameterMap) throws BeansException {
if (CollectionUtils.isEmpty(portletModeParameterMap)) { if (CollectionUtils.isEmpty(portletModeParameterMap)) {
logger.warn("'portletModeParameterMap' not set on PortletModeParameterHandlerMapping"); logger.warn("'portletModeParameterMap' not set on PortletModeParameterHandlerMapping");
@ -210,6 +212,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
* @see javax.portlet.PortletRequest#getPortletMode() * @see javax.portlet.PortletRequest#getPortletMode()
* @see #setParameterName * @see #setParameterName
*/ */
@Override
protected Object getLookupKey(PortletRequest request) throws Exception { protected Object getLookupKey(PortletRequest request) throws Exception {
PortletMode mode = request.getPortletMode(); PortletMode mode = request.getPortletMode();
String parameter = request.getParameter(this.parameterName); String parameter = request.getParameter(this.parameterName);
@ -231,6 +234,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
this.parameter = parameter; this.parameter = parameter;
} }
@Override
public boolean equals(Object other) { public boolean equals(Object other) {
if (this == other) { if (this == other) {
return true; return true;
@ -243,10 +247,12 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
ObjectUtils.nullSafeEquals(this.parameter, otherKey.parameter)); ObjectUtils.nullSafeEquals(this.parameter, otherKey.parameter));
} }
@Override
public int hashCode() { public int hashCode() {
return (this.mode.hashCode() * 29 + ObjectUtils.nullSafeHashCode(this.parameter)); return (this.mode.hashCode() * 29 + ObjectUtils.nullSafeHashCode(this.parameter));
} }
@Override
public String toString() { public String toString() {
return "Portlet mode '" + this.mode + "', parameter '" + this.parameter + "'"; 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
} }
@Override
public final boolean preHandle(PortletRequest request, PortletResponse response, Object handler) public final boolean preHandle(PortletRequest request, PortletResponse response, Object handler)
throws PortletException, IOException { 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
* instance. Can be overridden to use a custom subclass, e.g. for testing purposes. * instance. Can be overridden to use a custom subclass, e.g. for testing purposes.
* @return the new PortletFileUpload instance * @return the new PortletFileUpload instance
*/ */
@Override
protected FileUpload newFileUpload(FileItemFactory fileItemFactory) { protected FileUpload newFileUpload(FileItemFactory fileItemFactory) {
return new PortletFileUpload(fileItemFactory); return new PortletFileUpload(fileItemFactory);
} }
@ -133,6 +134,7 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport
Assert.notNull(request, "Request must not be null"); Assert.notNull(request, "Request must not be null");
if (this.resolveLazily) { if (this.resolveLazily) {
return new DefaultMultipartActionRequest(request) { return new DefaultMultipartActionRequest(request) {
@Override
protected void initializeMultipart() { protected void initializeMultipart() {
MultipartParsingResult parsingResult = parseRequest(request); MultipartParsingResult parsingResult = parseRequest(request);
setMultipartFiles(parsingResult.getMultipartFiles()); 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
} }
@Override
public Enumeration getParameterNames() { public Enumeration getParameterNames() {
Set paramNames = new HashSet(); Set paramNames = new HashSet();
Enumeration paramEnum = super.getParameterNames(); Enumeration paramEnum = super.getParameterNames();
@ -89,6 +90,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen
return Collections.enumeration(paramNames); return Collections.enumeration(paramNames);
} }
@Override
public String getParameter(String name) { public String getParameter(String name) {
String[] values = (String[]) getMultipartParameters().get(name); String[] values = (String[]) getMultipartParameters().get(name);
if (values != null) { if (values != null) {
@ -97,6 +99,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen
return super.getParameter(name); return super.getParameter(name);
} }
@Override
public String[] getParameterValues(String name) { public String[] getParameterValues(String name) {
String[] values = (String[]) getMultipartParameters().get(name); String[] values = (String[]) getMultipartParameters().get(name);
if (values != null) { if (values != null) {
@ -105,6 +108,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen
return super.getParameterValues(name); return super.getParameterValues(name);
} }
@Override
public Map getParameterMap() { public Map getParameterMap() {
Map paramMap = new HashMap(); Map paramMap = new HashMap();
paramMap.putAll(super.getParameterMap()); 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 {
} }
@Override
protected final void handleActionRequestInternal(ActionRequest request, ActionResponse response) protected final void handleActionRequestInternal(ActionRequest request, ActionResponse response)
throws Exception { throws Exception {
@ -104,6 +105,7 @@ public abstract class AbstractCommandController extends BaseCommandController {
setCommandInSession(response); setCommandInSession(response);
} }
@Override
protected final ModelAndView handleRenderRequestInternal( protected final ModelAndView handleRenderRequestInternal(
RenderRequest request, RenderResponse response) throws Exception { 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 {
* @see #processFormSubmission * @see #processFormSubmission
* @see #handleRenderRequestInternal * @see #handleRenderRequestInternal
*/ */
@Override
protected void handleActionRequestInternal(ActionRequest request, ActionResponse response) protected void handleActionRequestInternal(ActionRequest request, ActionResponse response)
throws Exception { throws Exception {
@ -420,6 +421,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* @see #processFormSubmission * @see #processFormSubmission
* @see #handleActionRequestInternal * @see #handleActionRequestInternal
*/ */
@Override
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response)
throws Exception { throws Exception {
@ -680,6 +682,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* @return object form to bind onto * @return object form to bind onto
* @see #formBackingObject * @see #formBackingObject
*/ */
@Override
protected final Object getCommand(PortletRequest request) throws Exception { protected final Object getCommand(PortletRequest request) throws Exception {
// If not in session-form mode, create a new form-backing object. // If not in session-form mode, create a new form-backing object.
if (!isSessionForm()) { 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
/** /**
* Calls page-specific onBindAndValidate method. * Calls page-specific onBindAndValidate method.
*/ */
@Override
protected final void onBindAndValidate(PortletRequest request, Object command, BindException errors) protected final void onBindAndValidate(PortletRequest request, Object command, BindException errors)
throws Exception { throws Exception {
@ -261,6 +262,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* @see #isFinishRequest(PortletRequest) * @see #isFinishRequest(PortletRequest)
* @see #isCancelRequest(PortletRequest) * @see #isCancelRequest(PortletRequest)
*/ */
@Override
protected boolean isFormSubmission(PortletRequest request) { protected boolean isFormSubmission(PortletRequest request) {
return super.isFormSubmission(request) || isFinishRequest(request) || isCancelRequest(request); return super.isFormSubmission(request) || isFinishRequest(request) || isCancelRequest(request);
} }
@ -268,6 +270,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/** /**
* Calls page-specific referenceData method. * Calls page-specific referenceData method.
*/ */
@Override
protected final Map referenceData(PortletRequest request, Object command, Errors errors) protected final Map referenceData(PortletRequest request, Object command, Errors errors)
throws Exception { throws Exception {
@ -315,6 +318,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* <p>This can be overridden in subclasses, e.g. to prepare wizard-specific * <p>This can be overridden in subclasses, e.g. to prepare wizard-specific
* error views in case of an Exception. * error views in case of an Exception.
*/ */
@Override
protected ModelAndView showForm( protected ModelAndView showForm(
RenderRequest request, RenderResponse response, BindException errors) throws Exception { RenderRequest request, RenderResponse response, BindException errors) throws Exception {
@ -557,6 +561,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* @see #setBindOnNewForm * @see #setBindOnNewForm
* @see #handleInvalidSubmit * @see #handleInvalidSubmit
*/ */
@Override
protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response) protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response)
throws Exception { throws Exception {
@ -574,6 +579,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* @throws Exception in case of errors * @throws Exception in case of errors
* @see #renderInvalidSubmit * @see #renderInvalidSubmit
*/ */
@Override
protected void handleInvalidSubmit(ActionRequest request, ActionResponse response) throws Exception { protected void handleInvalidSubmit(ActionRequest request, ActionResponse response) throws Exception {
} }
@ -581,6 +587,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* Apply wizard workflow: finish, cancel, page change. * Apply wizard workflow: finish, cancel, page change.
* @see #processFormSubmission * @see #processFormSubmission
*/ */
@Override
protected final ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors) protected final ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors)
throws Exception { throws Exception {
@ -626,6 +633,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* Apply wizard workflow: finish, cancel, page change. * Apply wizard workflow: finish, cancel, page change.
* @see #renderFormSubmission * @see #renderFormSubmission
*/ */
@Override
protected final void processFormSubmission( protected final void processFormSubmission(
ActionRequest request, ActionResponse response, Object command, BindException errors) ActionRequest request, ActionResponse response, Object command, BindException errors)
throws Exception { 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 {
} }
@Override
protected void initApplicationContext() { protected void initApplicationContext() {
if (this.validators != null) { if (this.validators != null) {
for (int i = 0; i < this.validators.length; i++) { 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 {
return this.viewName; return this.viewName;
} }
@Override
protected void initApplicationContext() { protected void initApplicationContext() {
if (this.viewName == null) { if (this.viewName == null) {
throw new IllegalArgumentException("Property 'viewName' is required"); throw new IllegalArgumentException("Property 'viewName' is required");
@ -91,6 +92,7 @@ public class ParameterizableViewController extends AbstractController {
/** /**
* Return a ModelAndView object with the specified view name. * Return a ModelAndView object with the specified view name.
*/ */
@Override
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response)
throws Exception { 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
this.useSharedPortletConfig = useSharedPortletConfig; this.useSharedPortletConfig = useSharedPortletConfig;
} }
@Override
public void setPortletContext(PortletContext portletContext) { public void setPortletContext(PortletContext portletContext) {
this.portletContext = portletContext; this.portletContext = portletContext;
} }
@ -156,12 +157,14 @@ public class PortletWrappingController extends AbstractController
} }
@Override
protected void handleActionRequestInternal( protected void handleActionRequestInternal(
ActionRequest request, ActionResponse response) throws Exception { ActionRequest request, ActionResponse response) throws Exception {
this.portletInstance.processAction(request, response); this.portletInstance.processAction(request, response);
} }
@Override
protected ModelAndView handleRenderRequestInternal( protected ModelAndView handleRenderRequestInternal(
RenderRequest request, RenderResponse response) throws Exception { 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 {
* @see #setFormView * @see #setFormView
* @see #showForm(RenderRequest, RenderResponse, BindException, Map) * @see #showForm(RenderRequest, RenderResponse, BindException, Map)
*/ */
@Override
protected ModelAndView showForm(RenderRequest request, RenderResponse response, BindException errors) protected ModelAndView showForm(RenderRequest request, RenderResponse response, BindException errors)
throws Exception { throws Exception {
@ -238,6 +239,7 @@ public class SimpleFormController extends AbstractFormController {
* @throws Exception in case of invalid state or arguments * @throws Exception in case of invalid state or arguments
* @see ModelAndView * @see ModelAndView
*/ */
@Override
protected Map referenceData(PortletRequest request, Object command, Errors errors) throws Exception { protected Map referenceData(PortletRequest request, Object command, Errors errors) throws Exception {
return referenceData(request); return referenceData(request);
} }
@ -271,6 +273,7 @@ public class SimpleFormController extends AbstractFormController {
* @see #onSubmitRender(Object) * @see #onSubmitRender(Object)
* @see #processFormSubmission(ActionRequest, ActionResponse, Object, BindException) * @see #processFormSubmission(ActionRequest, ActionResponse, Object, BindException)
*/ */
@Override
protected ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors) protected ModelAndView renderFormSubmission(RenderRequest request, RenderResponse response, Object command, BindException errors)
throws Exception { throws Exception {
@ -296,6 +299,7 @@ public class SimpleFormController extends AbstractFormController {
* @see #doSubmitAction(Object) * @see #doSubmitAction(Object)
* @see #renderFormSubmission(RenderRequest, RenderResponse, Object, BindException) * @see #renderFormSubmission(RenderRequest, RenderResponse, Object, BindException)
*/ */
@Override
protected void processFormSubmission( protected void processFormSubmission(
ActionRequest request, ActionResponse response, Object command, BindException errors) ActionRequest request, ActionResponse response, Object command, BindException errors)
throws Exception { throws Exception {
@ -329,6 +333,7 @@ public class SimpleFormController extends AbstractFormController {
* and should not get validated but just show the new form. * and should not get validated but just show the new form.
* @see #isFormChangeRequest * @see #isFormChangeRequest
*/ */
@Override
protected boolean suppressValidation(PortletRequest request) { protected boolean suppressValidation(PortletRequest request) {
return isFormChangeRequest(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
private boolean render = false; private boolean render = false;
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
RequestMappingInfo other = (RequestMappingInfo) obj; RequestMappingInfo other = (RequestMappingInfo) obj;
return (this.action == other.action && this.render == other.render && return (this.action == other.action && this.render == other.render &&
Arrays.equals(this.modes, other.modes) && Arrays.equals(this.params, other.params)); Arrays.equals(this.modes, other.modes) && Arrays.equals(this.params, other.params));
} }
@Override
public int hashCode() { public int hashCode() {
return (Arrays.hashCode(this.modes) * 29 + Arrays.hashCode(this.params)); 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
* to the superclass's initialization. * to the superclass's initialization.
* @see #detectHandlers * @see #detectHandlers
*/ */
@Override
public void initApplicationContext() throws BeansException { public void initApplicationContext() throws BeansException {
super.initApplicationContext(); super.initApplicationContext();
detectHandlers(); detectHandlers();
@ -165,6 +166,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp
/** /**
* Uses the current PortletMode as lookup key. * Uses the current PortletMode as lookup key.
*/ */
@Override
protected Object getLookupKey(PortletRequest request) throws Exception { protected Object getLookupKey(PortletRequest request) throws Exception {
return request.getPortletMode(); return request.getPortletMode();
} }
@ -194,6 +196,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp
} }
} }
@Override
public String toString() { public String toString() {
return StringUtils.arrayToCommaDelimitedString(this.params); return StringUtils.arrayToCommaDelimitedString(this.params);
} }

Loading…
Cancel
Save