@Test public void testGetScripts_prod() throws Exception { List<URI> uris = underTest.getScripts(); assertThat(uris, is(asList(new URI("http: new URI("http: new URI("http: new URI("http: new URI("http: new URI("http: new URI("http: new URI("http: new URI("http: new URI("http: new URI("http: new URI("http: new URI("http: }
@VisibleForTesting List<URI> getScripts() { boolean debug = isDebug(); List<URI> scripts = Lists.newArrayList(); scripts.add(uri(mode("baseapp-{mode}.js"))); scripts.add(uri(mode("extdirect-{mode}.js"))); scripts.add(uri("bootstrap.js")); scripts.add(uri("d3.v4.min.js")); scripts.addAll( extJsPluginDescriptors.stream().map(descriptor -> descriptor.getScripts(debug)).flatMap(Collection::stream) .map(this::relativeToAbsoluteUri).collect(toList())); List<URI> resources = pluginDescriptors.stream() .map(descriptor -> descriptor.getScripts(debug)) .flatMap(Collection::stream) .map(this::relativeToAbsoluteUri) .collect(toList()); scripts.addAll(resources); if (!debug) { scripts.addAll(getExtJsScripts()); } scripts.add(uri("app.js")); return scripts; }
RaptureWebResourceBundle extends ComponentSupport implements WebResourceBundle { @VisibleForTesting List<URI> getScripts() { boolean debug = isDebug(); List<URI> scripts = Lists.newArrayList(); scripts.add(uri(mode("baseapp-{mode}.js"))); scripts.add(uri(mode("extdirect-{mode}.js"))); scripts.add(uri("bootstrap.js")); scripts.add(uri("d3.v4.min.js")); scripts.addAll( extJsPluginDescriptors.stream().map(descriptor -> descriptor.getScripts(debug)).flatMap(Collection::stream) .map(this::relativeToAbsoluteUri).collect(toList())); List<URI> resources = pluginDescriptors.stream() .map(descriptor -> descriptor.getScripts(debug)) .flatMap(Collection::stream) .map(this::relativeToAbsoluteUri) .collect(toList()); scripts.addAll(resources); if (!debug) { scripts.addAll(getExtJsScripts()); } scripts.add(uri("app.js")); return scripts; } }
RaptureWebResourceBundle extends ComponentSupport implements WebResourceBundle { @VisibleForTesting List<URI> getScripts() { boolean debug = isDebug(); List<URI> scripts = Lists.newArrayList(); scripts.add(uri(mode("baseapp-{mode}.js"))); scripts.add(uri(mode("extdirect-{mode}.js"))); scripts.add(uri("bootstrap.js")); scripts.add(uri("d3.v4.min.js")); scripts.addAll( extJsPluginDescriptors.stream().map(descriptor -> descriptor.getScripts(debug)).flatMap(Collection::stream) .map(this::relativeToAbsoluteUri).collect(toList())); List<URI> resources = pluginDescriptors.stream() .map(descriptor -> descriptor.getScripts(debug)) .flatMap(Collection::stream) .map(this::relativeToAbsoluteUri) .collect(toList()); scripts.addAll(resources); if (!debug) { scripts.addAll(getExtJsScripts()); } scripts.add(uri("app.js")); return scripts; } @Inject  RaptureWebResourceBundle(final ApplicationVersion applicationVersion,
                                  final Provider<HttpServletRequest> servletRequestProvider,
                                  final Provider<StateComponent> stateComponentProvider,
                                  final TemplateHelper templateHelper,
                                  final List<UiPluginDescriptor> pluginDescriptors,
                                  final List<org.sonatype.nexus.rapture.UiPluginDescriptor> extJsPluginDescriptors); }
RaptureWebResourceBundle extends ComponentSupport implements WebResourceBundle { @VisibleForTesting List<URI> getScripts() { boolean debug = isDebug(); List<URI> scripts = Lists.newArrayList(); scripts.add(uri(mode("baseapp-{mode}.js"))); scripts.add(uri(mode("extdirect-{mode}.js"))); scripts.add(uri("bootstrap.js")); scripts.add(uri("d3.v4.min.js")); scripts.addAll( extJsPluginDescriptors.stream().map(descriptor -> descriptor.getScripts(debug)).flatMap(Collection::stream) .map(this::relativeToAbsoluteUri).collect(toList())); List<URI> resources = pluginDescriptors.stream() .map(descriptor -> descriptor.getScripts(debug)) .flatMap(Collection::stream) .map(this::relativeToAbsoluteUri) .collect(toList()); scripts.addAll(resources); if (!debug) { scripts.addAll(getExtJsScripts()); } scripts.add(uri("app.js")); return scripts; } @Inject  RaptureWebResourceBundle(final ApplicationVersion applicationVersion,
                                  final Provider<HttpServletRequest> servletRequestProvider,
                                  final Provider<StateComponent> stateComponentProvider,
                                  final TemplateHelper templateHelper,
                                  final List<UiPluginDescriptor> pluginDescriptors,
                                  final List<org.sonatype.nexus.rapture.UiPluginDescriptor> extJsPluginDescriptors); @Override List<WebResource> getResources(); }
RaptureWebResourceBundle extends ComponentSupport implements WebResourceBundle { @VisibleForTesting List<URI> getScripts() { boolean debug = isDebug(); List<URI> scripts = Lists.newArrayList(); scripts.add(uri(mode("baseapp-{mode}.js"))); scripts.add(uri(mode("extdirect-{mode}.js"))); scripts.add(uri("bootstrap.js")); scripts.add(uri("d3.v4.min.js")); scripts.addAll( extJsPluginDescriptors.stream().map(descriptor -> descriptor.getScripts(debug)).flatMap(Collection::stream) .map(this::relativeToAbsoluteUri).collect(toList())); List<URI> resources = pluginDescriptors.stream() .map(descriptor -> descriptor.getScripts(debug)) .flatMap(Collection::stream) .map(this::relativeToAbsoluteUri) .collect(toList()); scripts.addAll(resources); if (!debug) { scripts.addAll(getExtJsScripts()); } scripts.add(uri("app.js")); return scripts; } @Inject  RaptureWebResourceBundle(final ApplicationVersion applicationVersion,
                                  final Provider<HttpServletRequest> servletRequestProvider,
                                  final Provider<StateComponent> stateComponentProvider,
                                  final TemplateHelper templateHelper,
                                  final List<UiPluginDescriptor> pluginDescriptors,
                                  final List<org.sonatype.nexus.rapture.UiPluginDescriptor> extJsPluginDescriptors); @Override List<WebResource> getResources();  }