示例#1
0
 @Override
 public String getUrl(
     String path, Map<String, ?> parameters, Parameters frameworkParameters, boolean escapeAmps)
     throws FrameworkException {
   Url link = urlConverter.getUrl(path, parameters, frameworkParameters, escapeAmps);
   log.debug("got " + link + " from " + urlConverter);
   if (link == Url.NOT) {
     return fallbackConverter.getUrl(path, parameters, frameworkParameters, escapeAmps).getUrl();
   } else {
     return link.getUrl();
   }
 }
示例#2
0
 @Override
 public String getProcessUrl(
     String path, Map<String, ?> parameters, Parameters frameworkParameters, boolean escapeAmps)
     throws FrameworkException {
   HttpServletRequest request =
       BasicUrlConverter.getUserRequest(frameworkParameters.get(Parameter.REQUEST));
   State state = State.getState(request);
   frameworkParameters.set(ACTION, state.getId());
   Url url = urlConverter.getProcessUrl(path, parameters, frameworkParameters, escapeAmps);
   if (url == Url.NOT) {
     log.debug("Fall back url");
     return fallbackConverter
         .getProcessUrl(path, parameters, frameworkParameters, escapeAmps)
         .getUrl();
   } else {
     log.debug("Url converter url " + url);
     return url.getUrl();
   }
 }