/** * The mapping to use for this uri. */ public URI2RepositoryMapping getMapping(String uri) { for (URI2RepositoryMapping mapping : mappings) { if (mapping.matches(uri)) { return mapping; } } return this.getDefaultMapping(); }
/** * When no resource filter is defined in {@link ResourcesModule} or when given URI is white listed in filter it will * delegate to {@link URI2RepositoryMapping#matches(String)}. Otherwise it considers given URI as no match (given * URI is <em>not</em> white listed by resource filter). */ @Override public boolean matches(String uri) { if (resourcesModule.getResourceFilter() == null || resourcesModule.getResourceFilter().vote(uri) > 0) { return super.matches(uri); } // If the URI is not white listed by the resourceFilter we consider it no match return false; }