Package io.quarkus.qute.deployment
Class TemplatePathBuildItem
java.lang.Object
io.quarkus.builder.item.BuildItem
io.quarkus.builder.item.MultiBuildItem
io.quarkus.qute.deployment.TemplatePathBuildItem
public final class TemplatePathBuildItem
extends io.quarkus.builder.item.MultiBuildItem
Discovered template.
Templates backed by files located in a template root are discovered automatically. Furthermore, extensions can produce this build item in order to provide a template that is not backed by a file.
Warning
Extensions should never consume this build item directly. However, they may consume theEffectiveTemplatePathsBuildItem instead.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe priority used for templates from non-root application archives.static final intThe default priority used for templates that are not backed by a file.static final intThe priority used for templates from the root application archive. -
Method Summary
-
Field Details
-
ROOT_ARCHIVE_PRIORITY
public static final int ROOT_ARCHIVE_PRIORITYThe priority used for templates from the root application archive.- See Also:
-
BUILD_ITEM_PRIORITY
public static final int BUILD_ITEM_PRIORITYThe default priority used for templates that are not backed by a file.- See Also:
-
APP_ARCHIVE_PRIORITY
public static final int APP_ARCHIVE_PRIORITYThe priority used for templates from non-root application archives.- See Also:
-
-
Method Details
-
builder
- Returns:
- a new builder instance
-
getPath
The path relative to the template root. The/is used as a path separator.The path must be unique, i.e. if there are multiple templates with the same path then the template analysis fails during build.
- Returns:
- the path relative to the template root
-
getFullPath
The full path of the template which uses the system-dependent path separator.- Returns:
- the full path, or
nullfor templates that are not backed by a file
-
getSource
- Returns:
- the source, or
nullif not available
-
getContent
- Returns:
- the content of the template
-
getExtensionInfo
- Returns:
- the extension info
-
getPriority
public int getPriority()Templates with higher priority take precedence when duplicates are found.- Returns:
- the priority
-
isTag
public boolean isTag()- Returns:
trueif it represents a user tag,falseotherwise
-
isRegular
public boolean isRegular()- Returns:
trueif it does not represent a tag,falseotherwise
-
isFileBased
public boolean isFileBased()- Returns:
trueif it's backed by a file
-
getSourceInfo
-