/** * Tries to find the first resource-bundle-loader that would be able to process the key. * * @param key the resource-key. * @return the resourceloader for that key, or null, if no resource-loader is able to process the key. * @throws ResourceLoadingException if an error occured. */ public synchronized ResourceBundleData loadResourceBundle( final ResourceManager frontEnd, final ResourceKey key ) throws ResourceLoadingException { if ( frontEnd == null ) { throw new NullPointerException(); } if ( key == null ) { throw new NullPointerException(); } for ( int i = 0; i < resourceBundleLoaders.size(); i++ ) { final ResourceBundleLoader loader = resourceBundleLoaders.get( i ); final ResourceBundleData resourceBundle = loader.loadBundle( frontEnd, key ); if ( resourceBundle != null ) { return resourceBundle; } } return null; }
for ( int i = 0; i < resourceBundleLoaders.size(); i++ ) { final ResourceBundleLoader bundleLoader = resourceBundleLoaders.get( i ); if ( bundleLoader.isSupportedKey( parent ) == false ) { continue; final ResourceKey key = bundleLoader.deriveKey( parent, path, parameters ); if ( key != null ) { return key;
public ResourceKey createResourceKey( final String entryName, final Map factoryParameters ) throws ResourceKeyCreationException { if ( entryName == null ) { throw new NullPointerException(); } final ResourceKey bundleKey = getBundleMainKey().getParent(); final ResourceBundleLoader o = (ResourceBundleLoader) bundleKey.getFactoryParameters().get( new FactoryParameterKey( "repository-loader" ) ); if ( o == null ) { throw new ResourceKeyCreationException( "Unable to create a inner-bundle key, no loader available." ); } return o.deriveKey( getBundleMainKey(), entryName, factoryParameters ); }