/** * Build the full view name based on the given view name * as indicated by the URL path. * <p>The default implementation simply applies prefix and suffix. * This can be overridden, for example, to manipulate upper case * / lower case, etc. * @param viewName the original view name, as indicated by the URL path * @return the full view name to use * @see #getPrefix() * @see #getSuffix() */ protected String postProcessViewName(String viewName) { return getPrefix() + viewName + getSuffix(); }
/** * Build the full view name based on the given view name * as indicated by the URL path. * <p>The default implementation simply applies prefix and suffix. * This can be overridden, for example, to manipulate upper case * / lower case, etc. * @param viewName the original view name, as indicated by the URL path * @return the full view name to use * @see #getPrefix() * @see #getSuffix() */ protected String postProcessViewName(String viewName) { return getPrefix() + viewName + getSuffix(); }
@Test public void settingSuffixToNullCausesEmptyStringToBeUsed() throws Exception { UrlFilenameViewController ctrl = new UrlFilenameViewController(); ctrl.setSuffix(null); assertNotNull("For setPrefix(..) with null, the empty string must be used instead.", ctrl.getSuffix()); assertEquals("For setPrefix(..) with null, the empty string must be used instead.", "", ctrl.getSuffix()); }
/** * Build the full view name based on the given view name * as indicated by the URL path. * <p>The default implementation simply applies prefix and suffix. * This can be overridden, for example, to manipulate upper case * / lower case, etc. * @param viewName the original view name, as indicated by the URL path * @return the full view name to use * @see #getPrefix() * @see #getSuffix() */ protected String postProcessViewName(String viewName) { return getPrefix() + viewName + getSuffix(); }