@Test public void trueWhenAddressesSpecificPortletMaximized() { when(this.syntaxProvider.getPortalRequestInfo(mockRequest)) .thenReturn(this.portalRequestInfo); when(this.portalRequestInfo.getUrlState()).thenReturn(UrlState.MAX); assertTrue(predicate.test(this.mockRequest)); }
@Override public boolean test(final HttpServletRequest request) { final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request); if (null == portalRequestInfo) { logger.warn( "Portal request info was not available for this request, " + "so assuming that it does not represent focus on one portlet."); return false; } final UrlState urlState = portalRequestInfo.getUrlState(); final boolean doesRequestFocusOnOnePortlet = (!(UrlState.NORMAL.equals(urlState))); logger.debug( "Determined request with UrlState {} {} focus on one portlet.", urlState, doesRequestFocusOnOnePortlet ? "does" : "does not"); return doesRequestFocusOnOnePortlet; }
FocusedOnOnePortletPredicate implements Predicate<HttpServletRequest> { @Override public boolean test(final HttpServletRequest request) { final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request); if (null == portalRequestInfo) { logger.warn( "Portal request info was not available for this request, " + "so assuming that it does not represent focus on one portlet."); return false; } final UrlState urlState = portalRequestInfo.getUrlState(); final boolean doesRequestFocusOnOnePortlet = (!(UrlState.NORMAL.equals(urlState))); logger.debug( "Determined request with UrlState {} {} focus on one portlet.", urlState, doesRequestFocusOnOnePortlet ? "does" : "does not"); return doesRequestFocusOnOnePortlet; } }
FocusedOnOnePortletPredicate implements Predicate<HttpServletRequest> { @Override public boolean test(final HttpServletRequest request) { final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request); if (null == portalRequestInfo) { logger.warn( "Portal request info was not available for this request, " + "so assuming that it does not represent focus on one portlet."); return false; } final UrlState urlState = portalRequestInfo.getUrlState(); final boolean doesRequestFocusOnOnePortlet = (!(UrlState.NORMAL.equals(urlState))); logger.debug( "Determined request with UrlState {} {} focus on one portlet.", urlState, doesRequestFocusOnOnePortlet ? "does" : "does not"); return doesRequestFocusOnOnePortlet; }  }
FocusedOnOnePortletPredicate implements Predicate<HttpServletRequest> { @Override public boolean test(final HttpServletRequest request) { final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request); if (null == portalRequestInfo) { logger.warn( "Portal request info was not available for this request, " + "so assuming that it does not represent focus on one portlet."); return false; } final UrlState urlState = portalRequestInfo.getUrlState(); final boolean doesRequestFocusOnOnePortlet = (!(UrlState.NORMAL.equals(urlState))); logger.debug( "Determined request with UrlState {} {} focus on one portlet.", urlState, doesRequestFocusOnOnePortlet ? "does" : "does not"); return doesRequestFocusOnOnePortlet; }  @Override boolean test(final HttpServletRequest request); @Autowired void setUrlSyntaxProvider(IUrlSyntaxProvider urlSyntaxProvider); @Override String toString(); }
FocusedOnOnePortletPredicate implements Predicate<HttpServletRequest> { @Override public boolean test(final HttpServletRequest request) { final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request); if (null == portalRequestInfo) { logger.warn( "Portal request info was not available for this request, " + "so assuming that it does not represent focus on one portlet."); return false; } final UrlState urlState = portalRequestInfo.getUrlState(); final boolean doesRequestFocusOnOnePortlet = (!(UrlState.NORMAL.equals(urlState))); logger.debug( "Determined request with UrlState {} {} focus on one portlet.", urlState, doesRequestFocusOnOnePortlet ? "does" : "does not"); return doesRequestFocusOnOnePortlet; }  @Override boolean test(final HttpServletRequest request); @Autowired void setUrlSyntaxProvider(IUrlSyntaxProvider urlSyntaxProvider); @Override String toString();  }