Package io.quarkus.qute
Class InsertSectionHelper.Factory
java.lang.Object
io.quarkus.qute.InsertSectionHelper.Factory
- All Implemented Interfaces:
SectionHelperFactory<InsertSectionHelper>
- Enclosing class:
- InsertSectionHelper
public static class InsertSectionHelper.Factory
extends Object
implements SectionHelperFactory<InsertSectionHelper>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkus.qute.SectionHelperFactory
SectionHelperFactory.BlockInfo, SectionHelperFactory.MissingEndTagStrategy, SectionHelperFactory.ParametersInfo, SectionHelperFactory.ParserDelegate, SectionHelperFactory.SectionInitContext -
Field Summary
Fields inherited from interface io.quarkus.qute.SectionHelperFactory
HINT_METADATA, MAIN_BLOCK_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA factory may definefactory parametersfor the start tag of any section block.Initialize a new helper instance for a specific section node in a template.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.qute.SectionHelperFactory
cacheFactoryConfig, getBlockLabels, initializeBlock, missingEndTagStrategy, treatUnknownSectionsAsBlocks
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
getDefaultAliases
- Specified by:
getDefaultAliasesin interfaceSectionHelperFactory<InsertSectionHelper>- Returns:
- the list of default aliases used to match the helper
- See Also:
-
getParameters
Description copied from interface:SectionHelperFactoryA factory may definefactory parametersfor the start tag of any section block. A factoryParameterhas a name and optional default value. The default value is automatically assigned if no other value is set by a parser. A parameter may be optional. A non-optional parameter that has no value assigned results in a parser error.A section block in a template defines the
actual parameters:{! The value is "item.isActive". The name is not defined. !} {#if item.isActive}{/} {! The name is "age" and the value is "10". !} {#let age=10}{/}The actual parameters are parsed taking the factory parameters into account:- Named actual params are processed first and the relevant values are assigned, e.g. the param with name
agehas the value10, - Then, if the number of actual params is greater or equals to the number of factory params the values are set according to position of factory params,
- Otherwise, the values are set according to position but params with no default value take precedence.
- Finally, all unset parameters that define a default value are initialized with the default value.
- Specified by:
getParametersin interfaceSectionHelperFactory<InsertSectionHelper>- Returns:
- the factory parameters
- See Also:
- Named actual params are processed first and the relevant values are assigned, e.g. the param with name
-
initialize
Description copied from interface:SectionHelperFactoryInitialize a new helper instance for a specific section node in a template.- Specified by:
initializein interfaceSectionHelperFactory<InsertSectionHelper>- Returns:
- a new helper instance
-