@UsesOrderedConfiguration(value=StackExtension.class) public class ExtensibleJavaScriptStack extends Object implements JavaScriptStack
JavaScriptStack that can be used as the implementation of a service.
The contributions to the service are used to supply the libraries, stylesheets, and initialization for a
JavaScriptStack, allowing the stack to be more dynamically configured. In practice, one will use
ServiceBinder.bind(Class, Class) and ServiceBindingOptions.withMarker(Class...) to construct the
service, then use the marker annotation to inject the service when contributing the service into to the
JavaScriptStackSource.
A limitation of this implementation is that the contributed assets are not localized at all.StackExtension| Constructor and Description |
|---|
ExtensibleJavaScriptStack(AssetSource assetSource,
List<StackExtension> configuration) |
| Modifier and Type | Method and Description |
|---|---|
String |
getInitialization()
Returns static JavaScript initialization for the stack.
|
JavaScriptAggregationStrategy |
getJavaScriptAggregationStrategy()
Identifies how to aggregate JavaScript within the stack.
|
List<Asset> |
getJavaScriptLibraries()
Returns a list of localized assets for JavaScript libraries that form the stack.
|
List<String> |
getModules()
Returns a list of modules to include with the stack, when aggregating the stack's JavaScript.
|
List<String> |
getStacks()
Returns a list of JavaScriptStack names that this stack depends on.
|
List<StylesheetLink> |
getStylesheets()
Returns a list of localized links for stylesheets that form the stack.
|
public ExtensibleJavaScriptStack(AssetSource assetSource, List<StackExtension> configuration)
public List<String> getStacks()
JavaScriptStackgetStacks in interface JavaScriptStackpublic List<Asset> getJavaScriptLibraries()
JavaScriptStackgetJavaScriptLibraries in interface JavaScriptStackpublic List<StylesheetLink> getStylesheets()
JavaScriptStackgetStylesheets in interface JavaScriptStackpublic String getInitialization()
JavaScriptStackgetInitialization in interface JavaScriptStackpublic List<String> getModules()
JavaScriptStackgetModules in interface JavaScriptStackModuleManager,
SymbolConstants.COMBINE_SCRIPTSpublic JavaScriptAggregationStrategy getJavaScriptAggregationStrategy()
JavaScriptStackJavaScriptAggregationStrategy.COMBINE_AND_MINIMIZE.getJavaScriptAggregationStrategy in interface JavaScriptStack5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.