use of com.enonic.xp.core.impl.app.resolver.BundleApplicationUrlResolver in project xp by enonic.
the class ApplicationFactoryTest method createUrlResolver_prod.
@Test
public void createUrlResolver_prod() throws Exception {
final Bundle bundle = deploy("app1", true, false);
final ApplicationUrlResolver resolver = new ApplicationFactory(RunMode.PROD).createUrlResolver(bundle);
assertNotNull(resolver);
assertTrue(resolver instanceof BundleApplicationUrlResolver);
}
use of com.enonic.xp.core.impl.app.resolver.BundleApplicationUrlResolver in project xp by enonic.
the class ApplicationFactory method createUrlResolver.
ApplicationUrlResolver createUrlResolver(final Bundle bundle) {
final ApplicationUrlResolver bundleUrlResolver = new BundleApplicationUrlResolver(bundle);
if (this.runMode != RunMode.DEV) {
return bundleUrlResolver;
}
final List<String> sourcePaths = ApplicationHelper.getSourcePaths(bundle);
if (sourcePaths.isEmpty()) {
return bundleUrlResolver;
}
final ApplicationUrlResolver classLoaderUrlResolver = createClassLoaderUrlResolver(sourcePaths);
return new MultiApplicationUrlResolver(classLoaderUrlResolver, bundleUrlResolver);
}
use of com.enonic.xp.core.impl.app.resolver.BundleApplicationUrlResolver in project xp by enonic.
the class ApplicationFactoryTest method createUrlResolver_dev_no_source.
@Test
public void createUrlResolver_dev_no_source() throws Exception {
final Bundle bundle = deploy("app1", true, false);
final ApplicationUrlResolver resolver = new ApplicationFactory(RunMode.DEV).createUrlResolver(bundle);
assertNotNull(resolver);
assertTrue(resolver instanceof BundleApplicationUrlResolver);
}
Aggregations