@Test public void no_dot_or_colon_in_path() throws Exception { Request request = mockRequest(); Response response = mockResponse(); LocalizationSetter ls = mockLocalizationSetter(); expect(ls.isSupportedLocaleName("foo")).andReturn(false); train_getPath(request, "/foo/bar/baz"); replay(); Dispatcher dispatcher = new ComponentEventDispatcher(null, new ComponentEventLinkEncoderImpl(null, contextPathEncoder, ls, response, null, null, null, true, null, "", null, null)); assertFalse(dispatcher.dispatch(request, response)); verify(); }
public boolean dispatch(Request request, Response response) throws IOException { ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request); if (parameters == null) return false; componentRequestHandler.handleComponentEvent(parameters); if (request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null) { return false; } return true; }
ComponentEventDispatcher implements Dispatcher { public boolean dispatch(Request request, Response response) throws IOException { ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request); if (parameters == null) return false; componentRequestHandler.handleComponentEvent(parameters); if (request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null) { return false; } return true; } }
ComponentEventDispatcher implements Dispatcher { public boolean dispatch(Request request, Response response) throws IOException { ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request); if (parameters == null) return false; componentRequestHandler.handleComponentEvent(parameters); if (request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null) { return false; } return true; } ComponentEventDispatcher(ComponentRequestHandler componentRequestHandler,
                                    ComponentEventLinkEncoder linkEncoder); }
ComponentEventDispatcher implements Dispatcher { public boolean dispatch(Request request, Response response) throws IOException { ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request); if (parameters == null) return false; componentRequestHandler.handleComponentEvent(parameters); if (request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null) { return false; } return true; } ComponentEventDispatcher(ComponentRequestHandler componentRequestHandler,
                                    ComponentEventLinkEncoder linkEncoder); boolean dispatch(Request request, Response response); }
ComponentEventDispatcher implements Dispatcher { public boolean dispatch(Request request, Response response) throws IOException { ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request); if (parameters == null) return false; componentRequestHandler.handleComponentEvent(parameters); if (request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null) { return false; } return true; } ComponentEventDispatcher(ComponentRequestHandler componentRequestHandler,
                                    ComponentEventLinkEncoder linkEncoder); boolean dispatch(Request request, Response response);  }