@Test(expected = IllegalStateException.class) public void throwsIllegalStateExceptionWhenRedirectToNotSet() throws ServletException, IOException { final RedirectRenderingPipelineTerminator unconfiguredTerminator = new RedirectRenderingPipelineTerminator(); unconfiguredTerminator.renderState(mockRequest, mockResponse); }
@Override public void renderState(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { if (null == this.redirectTo) { throw new IllegalStateException( "RedirectRenderingPipelineTerminator must be configured " + "with path to which to redirect."); } logger.trace("Redirecting to {} .", this.redirectTo); response.sendRedirect(this.redirectTo); }
RedirectRenderingPipelineTerminator implements IPortalRenderingPipeline { @Override public void renderState(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { if (null == this.redirectTo) { throw new IllegalStateException( "RedirectRenderingPipelineTerminator must be configured " + "with path to which to redirect."); } logger.trace("Redirecting to {} .", this.redirectTo); response.sendRedirect(this.redirectTo); } }
RedirectRenderingPipelineTerminator implements IPortalRenderingPipeline { @Override public void renderState(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { if (null == this.redirectTo) { throw new IllegalStateException( "RedirectRenderingPipelineTerminator must be configured " + "with path to which to redirect."); } logger.trace("Redirecting to {} .", this.redirectTo); response.sendRedirect(this.redirectTo); }  }
RedirectRenderingPipelineTerminator implements IPortalRenderingPipeline { @Override public void renderState(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { if (null == this.redirectTo) { throw new IllegalStateException( "RedirectRenderingPipelineTerminator must be configured " + "with path to which to redirect."); } logger.trace("Redirecting to {} .", this.redirectTo); response.sendRedirect(this.redirectTo); }  @Override void renderState(final HttpServletRequest request, final HttpServletResponse response); @Required void setRedirectTo(final String targetPath); }
RedirectRenderingPipelineTerminator implements IPortalRenderingPipeline { @Override public void renderState(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { if (null == this.redirectTo) { throw new IllegalStateException( "RedirectRenderingPipelineTerminator must be configured " + "with path to which to redirect."); } logger.trace("Redirecting to {} .", this.redirectTo); response.sendRedirect(this.redirectTo); }  @Override void renderState(final HttpServletRequest request, final HttpServletResponse response); @Required void setRedirectTo(final String targetPath);  }