Added @Override annotations to web-portlet module

This commit is contained in:
Arjen Poutsma 2008-10-28 10:55:11 +00:00
parent 6a2daf7bf5
commit b0f24da5ca
34 changed files with 103 additions and 0 deletions

View File

@ -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 {
* @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 {
* @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");

View File

@ -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
/**
* 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
/**
* 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
/**
* 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
* 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) {

View File

@ -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 {
* 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 {
* PortletConfig set yet.
* @see #getPortletConfig()
*/
@Override
public final PortletContext getPortletContext() {
return (getPortletConfig() != null ? getPortletConfig().getPortletContext() : null);
}

View File

@ -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()) {

View File

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

View File

@ -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 {
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 {
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 {
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 {
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 {
private static class StringParser extends ParameterParser {
@Override
protected String getType() {
return "string";
}
@Override
protected Object doParse(String parameter) throws NumberFormatException {
return parameter;
}

View File

@ -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
return this.namespace;
}
@Override
public String[] getConfigLocations() {
return super.getConfigLocations();
}
@ -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
* 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
* This implementation supports pattern matching in unexpanded WARs too.
* @see PortletContextResourcePatternResolver
*/
@Override
protected ResourcePatternResolver getResourcePatternResolver() {
return new PortletContextResourcePatternResolver(this);
}

View File

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

View File

@ -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
* 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
* 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
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@ -172,6 +178,7 @@ public class PortletContextResource extends AbstractResource implements ContextR
return false;
}
@Override
public int hashCode() {
return this.path.hashCode();
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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 {
}
@Override
public String toString() {
return this.request.toString();
}

View File

@ -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 {
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 {
return sb.toString();
}
@Override
public String toString() {
return "PortletRequestHandledEvent: " + getDescription();
}

View File

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

View File

@ -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
/**
* 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
* 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
* This implementation supports pattern matching in unexpanded WARs too.
* @see PortletContextResourcePatternResolver
*/
@Override
protected ResourcePatternResolver getResourcePatternResolver() {
return new PortletContextResourcePatternResolver(this);
}

View File

@ -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
* 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};

View File

@ -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();

View File

@ -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);

View File

@ -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 {
* @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 {
* 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);
}

View File

@ -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) {

View File

@ -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 {
* @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 {
/**
* Uses the current PortletMode as lookup key.
*/
@Override
protected Object getLookupKey(PortletRequest request) throws Exception {
return request.getPortletMode();
}

View File

@ -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
* @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
* @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
this.parameter = parameter;
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
@ -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 + "'";
}

View File

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

View File

@ -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
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());

View File

@ -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
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
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
return super.getParameterValues(name);
}
@Override
public Map getParameterMap() {
Map paramMap = new HashMap();
paramMap.putAll(super.getParameterMap());

View File

@ -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 {
setCommandInSession(response);
}
@Override
protected final ModelAndView handleRenderRequestInternal(
RenderRequest request, RenderResponse response) throws Exception {

View File

@ -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 {
* @see #processFormSubmission
* @see #handleActionRequestInternal
*/
@Override
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response)
throws Exception {
@ -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()) {

View File

@ -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
* @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
/**
* 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
* <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
* @see #setBindOnNewForm
* @see #handleInvalidSubmit
*/
@Override
protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response)
throws Exception {
@ -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
* 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
* Apply wizard workflow: finish, cancel, page change.
* @see #renderFormSubmission
*/
@Override
protected final void processFormSubmission(
ActionRequest request, ActionResponse response, Object command, BindException errors)
throws Exception {

View File

@ -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++) {

View File

@ -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 {
/**
* Return a ModelAndView object with the specified view name.
*/
@Override
protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response)
throws Exception {

View File

@ -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
}
@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 {

View File

@ -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 {
* @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 {
* @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 {
* @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 {
* and should not get validated but just show the new form.
* @see #isFormChangeRequest
*/
@Override
protected boolean suppressValidation(PortletRequest request) {
return isFormChangeRequest(request);
}

View File

@ -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));
}

View File

@ -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
/**
* 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
}
}
@Override
public String toString() {
return StringUtils.arrayToCommaDelimitedString(this.params);
}