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 the EffectiveTemplatePathsBuildItem instead.
See Also:
  • Field Details

    • ROOT_ARCHIVE_PRIORITY

      public static final int ROOT_ARCHIVE_PRIORITY
      The priority used for templates from the root application archive.
      See Also:
    • BUILD_ITEM_PRIORITY

      public static final int BUILD_ITEM_PRIORITY
      The default priority used for templates that are not backed by a file.
      See Also:
    • APP_ARCHIVE_PRIORITY

      public static final int APP_ARCHIVE_PRIORITY
      The priority used for templates from non-root application archives.
      See Also:
  • Method Details

    • builder

      public static TemplatePathBuildItem.Builder builder()
      Returns:
      a new builder instance
    • getPath

      public String 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

      public Path getFullPath()
      The full path of the template which uses the system-dependent path separator.
      Returns:
      the full path, or null for templates that are not backed by a file
    • getSource

      public URI getSource()
      Returns:
      the source, or null if not available
    • getContent

      public String getContent()
      Returns:
      the content of the template
    • getExtensionInfo

      public String 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:
      true if it represents a user tag, false otherwise
    • isRegular

      public boolean isRegular()
      Returns:
      true if it does not represent a tag, false otherwise
    • isFileBased

      public boolean isFileBased()
      Returns:
      true if it's backed by a file
    • getSourceInfo

      public String getSourceInfo()