/** * Creates a new route for the given URI pattern, target and matching mode. The route will match * the URI query string depending on the result of {@link #getDefaultMatchingQuery()}. * * @param uriPattern The URI pattern that must match the relative part of the resource URI. * @param target The target Restlet to attach. * @param matchingMode The matching mode. * @return The created route. */ protected TemplateRoute createRoute(String uriPattern, Restlet target, int matchingMode) { TemplateRoute result = new TemplateRoute(this, uriPattern, target); result.getTemplate().setMatchingMode(matchingMode); result.setMatchingQuery(getDefaultMatchingQuery()); return result; }