RepositoryResourceLoader implements ResourceLoader { public boolean isSupportedKey( final ResourceKey key ) { if ( key.getSchema().equals( getSchema() ) ) { return true; } return false; } RepositoryResourceLoader(); void setResourceManager( final ResourceManager manager ); ResourceManager getManager(); String getSchema(); ResourceData load( final ResourceKey key ); boolean isSupportedKey( final ResourceKey key ); ResourceKey createKey( final Object value, final Map factoryKeys ); ResourceKey deriveKey( final ResourceKey parent, String path, final Map data ); ResourceKey deserialize( final ResourceKey bundleKey, final String stringKey ); String serialize( final ResourceKey bundleKey, final ResourceKey key ); URL toURL( final ResourceKey key ); boolean isSupportedDeserializer( final String data ); static final String SOLUTION_SCHEMA_NAME; static final String SCHEMA_SEPARATOR; static final String PATH_SEPARATOR; static final String WIN_PATH_SEPARATOR; }
@Test public void testIsSupportedKey() throws Exception { ResourceKey key = new ResourceKey( "", "", null ); rrl.load( key ); assertFalse( rrl.isSupportedKey( key ) ); key = new ResourceKey( rrl.SOLUTION_SCHEMA_NAME, "", null ); rrl.load( key ); assertTrue( rrl.isSupportedKey( key ) ); }