@Test public void testGetURLWithoutWorkspaceId() { when(request.getRequestURL()).thenReturn(new StringBuffer(URL_WITHOUT_WORKSPACE_ID)); assertTrue(StringUtils.equals(URL_WITHOUT_WORKSPACE_ID, underTest.getRequestURL())); }
@Override public StringBuffer getRequestURL() { StringBuffer requestURL = super.getRequestURL(); Matcher apiResourceMatcher = API_RESOURCE_PATTERN.matcher(requestURL); if (apiResourceMatcher.find()) { return requestURL.replace(apiResourceMatcher.start(), apiResourceMatcher.end(), replaceString); } return requestURL; }
WorkspaceIdModifiedRequest extends HttpServletRequestWrapper { @Override public StringBuffer getRequestURL() { StringBuffer requestURL = super.getRequestURL(); Matcher apiResourceMatcher = API_RESOURCE_PATTERN.matcher(requestURL); if (apiResourceMatcher.find()) { return requestURL.replace(apiResourceMatcher.start(), apiResourceMatcher.end(), replaceString); } return requestURL; } }
WorkspaceIdModifiedRequest extends HttpServletRequestWrapper { @Override public StringBuffer getRequestURL() { StringBuffer requestURL = super.getRequestURL(); Matcher apiResourceMatcher = API_RESOURCE_PATTERN.matcher(requestURL); if (apiResourceMatcher.find()) { return requestURL.replace(apiResourceMatcher.start(), apiResourceMatcher.end(), replaceString); } return requestURL; } WorkspaceIdModifiedRequest(HttpServletRequest request, Long workspaceId); }
WorkspaceIdModifiedRequest extends HttpServletRequestWrapper { @Override public StringBuffer getRequestURL() { StringBuffer requestURL = super.getRequestURL(); Matcher apiResourceMatcher = API_RESOURCE_PATTERN.matcher(requestURL); if (apiResourceMatcher.find()) { return requestURL.replace(apiResourceMatcher.start(), apiResourceMatcher.end(), replaceString); } return requestURL; } WorkspaceIdModifiedRequest(HttpServletRequest request, Long workspaceId); @Override String getRequestURI(); @Override StringBuffer getRequestURL(); }
WorkspaceIdModifiedRequest extends HttpServletRequestWrapper { @Override public StringBuffer getRequestURL() { StringBuffer requestURL = super.getRequestURL(); Matcher apiResourceMatcher = API_RESOURCE_PATTERN.matcher(requestURL); if (apiResourceMatcher.find()) { return requestURL.replace(apiResourceMatcher.start(), apiResourceMatcher.end(), replaceString); } return requestURL; } WorkspaceIdModifiedRequest(HttpServletRequest request, Long workspaceId); @Override String getRequestURI(); @Override StringBuffer getRequestURL();  }