Enum StackExtensionType
- java.lang.Object
-
- java.lang.Enum<StackExtensionType>
-
- org.apache.tapestry5.services.javascript.StackExtensionType
-
- All Implemented Interfaces:
Serializable
,Comparable<StackExtensionType>
public enum StackExtensionType extends Enum<StackExtensionType>
Defines the types of extensions to a JavaScript stack that can be contributed to an extensible JavaScript stack.- Since:
- 5.3
- See Also:
StackExtension
,ExtensibleJavaScriptStack
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AGGREGATION_STRATEGY
Overrides the JavaScript aggregation strategy for the stack.INITIALIZATION
Deprecated.Deprecated in 5.4 with no replacement; initialization may be removed in the future.LIBRARY
A JavaScript library.MODULE
A module to aggregate with the stack.STACK
A dependency on another JavaScriptStack.STYLESHEET
A stylesheet.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StackExtensionType
valueOf(String name)
Returns the enum constant of this type with the specified name.static StackExtensionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LIBRARY
public static final StackExtensionType LIBRARY
A JavaScript library. The extension value will be converted usingAssetSource.getExpandedAsset(String)
, meaning that symbols will be expanded.
-
STACK
public static final StackExtensionType STACK
A dependency on another JavaScriptStack. Note that this is especially useful as, starting in 5.4, there is no automatic dependency on the "core" stack, as there was in earlier versions.- Since:
- 5.4
- See Also:
JavaScriptSupport.importStack(String)
,JavaScriptStack.getStylesheets()
-
STYLESHEET
public static final StackExtensionType STYLESHEET
A stylesheet. The extension value will be converted usingAssetSource.getExpandedAsset(String)
, meaning that symbols will be expanded.
-
MODULE
public static final StackExtensionType MODULE
A module to aggregate with the stack. The module's JavaScript is included after any libraries. In development mode (with aggregation disabled), the library will be included individually. Unlike the RequireJSr.js
tool, this does not process dependencies and is based on a simple regular expression parser. Note that this only loads the module's code and defines the module as available; the module's function will not be invoked unlessJavaScriptSupport.require(String)
is invoked to establish a dependency. Note that at this time, shimmed modules can not be aggregated into stacks properly; the shimmed module will be aggregated, but then will still be loaded via a subsequent HTTP request.- Since:
- 5.4
-
AGGREGATION_STRATEGY
public static final StackExtensionType AGGREGATION_STRATEGY
Overrides the JavaScript aggregation strategy for the stack. The value is string name of anJavaScriptAggregationStrategy
value.- Since:
- 5.4
-
INITIALIZATION
public static final StackExtensionType INITIALIZATION
Deprecated.Deprecated in 5.4 with no replacement; initialization may be removed in the future.Extra JavaScript initialization (rarely used). No symbol expansion takes place.
-
-
Method Detail
-
values
public static StackExtensionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StackExtensionType c : StackExtensionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StackExtensionType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-