@Test public void relative_asset() { AssetFactory factory = mockAssetFactory(); ThreadLocale threadLocale = mockThreadLocale(); Asset asset = mockAsset(); Resource expectedResource = baseResource.forFile("SimpleComponent_en_GB.properties"); train_getRootResource(factory, rootResource); train_createAsset(factory, expectedResource, asset); Map<String, AssetFactory> configuration = Collections.singletonMap("classpath", factory); replay(); AssetSource source = new AssetSourceImpl(threadLocale, configuration, null, null, tracker); assertSame(source.getAsset(baseResource, "SimpleComponent.properties", Locale.UK), asset); assertSame(source.getAsset(baseResource, "SimpleComponent.properties", Locale.UK), asset); verify(); }
public Asset getAsset(Resource baseResource, String path, Locale locale) { return getAssetInLocale(baseResource, path, defaulted(locale)); }
AssetSourceImpl extends LockSupport implements AssetSource { public Asset getAsset(Resource baseResource, String path, Locale locale) { return getAssetInLocale(baseResource, path, defaulted(locale)); } }
AssetSourceImpl extends LockSupport implements AssetSource { public Asset getAsset(Resource baseResource, String path, Locale locale) { return getAssetInLocale(baseResource, path, defaulted(locale)); } AssetSourceImpl(ThreadLocale threadLocale,

                           Map<String, AssetFactory> configuration, SymbolSource symbolSource, Logger logger, OperationTracker tracker);  AssetSourceImpl(ThreadLocale threadLocale,

                           Map<String, AssetFactory> configuration, SymbolSource symbolSource, Logger logger, OperationTracker tracker, Request request); }
AssetSourceImpl extends LockSupport implements AssetSource { public Asset getAsset(Resource baseResource, String path, Locale locale) { return getAssetInLocale(baseResource, path, defaulted(locale)); } AssetSourceImpl(ThreadLocale threadLocale,

                           Map<String, AssetFactory> configuration, SymbolSource symbolSource, Logger logger, OperationTracker tracker);  AssetSourceImpl(ThreadLocale threadLocale,

                           Map<String, AssetFactory> configuration, SymbolSource symbolSource, Logger logger, OperationTracker tracker, Request request); @PostInjection void clearCacheWhenResourcesChange(ResourceChangeTracker tracker); Asset getClasspathAsset(String path); Asset getClasspathAsset(String path, Locale locale); Asset getContextAsset(String path, Locale locale); Asset getAsset(Resource baseResource, String path, Locale locale); Resource resourceForPath(String path); Asset getExpandedAsset(String path); Asset getComponentAsset(final ComponentResources resources, final String path, final String libraryName); Asset getUnlocalizedAsset(String path); }
AssetSourceImpl extends LockSupport implements AssetSource { public Asset getAsset(Resource baseResource, String path, Locale locale) { return getAssetInLocale(baseResource, path, defaulted(locale)); } AssetSourceImpl(ThreadLocale threadLocale,

                           Map<String, AssetFactory> configuration, SymbolSource symbolSource, Logger logger, OperationTracker tracker);  AssetSourceImpl(ThreadLocale threadLocale,

                           Map<String, AssetFactory> configuration, SymbolSource symbolSource, Logger logger, OperationTracker tracker, Request request); @PostInjection void clearCacheWhenResourcesChange(ResourceChangeTracker tracker); Asset getClasspathAsset(String path); Asset getClasspathAsset(String path, Locale locale); Asset getContextAsset(String path, Locale locale); Asset getAsset(Resource baseResource, String path, Locale locale); Resource resourceForPath(String path); Asset getExpandedAsset(String path); Asset getComponentAsset(final ComponentResources resources, final String path, final String libraryName); Asset getUnlocalizedAsset(String path);  }