Class ViewTemplateDescriptorRegistry

java.lang.Object
io.jmix.flowui.view.template.impl.ViewTemplateDescriptorRegistry

@Component("flowui_ViewTemplateDescriptorRegistry") public class ViewTemplateDescriptorRegistry extends Object
Stores XML descriptors rendered for template-generated views.
  • Field Details

  • Constructor Details

    • ViewTemplateDescriptorRegistry

      public ViewTemplateDescriptorRegistry()
  • Method Details

    • createPath

      public String createPath(String viewId)
      Creates a synthetic descriptor path for the given view id.
      Parameters:
      viewId - generated view id
      Returns:
      synthetic descriptor path
    • put

      public void put(String path, String descriptor)
      Stores a rendered descriptor under the given synthetic path.
      Parameters:
      path - synthetic descriptor path
      descriptor - rendered XML descriptor
    • remove

      public boolean remove(String path)
      Removes a descriptor previously stored under the given synthetic path.
      Parameters:
      path - synthetic descriptor path
      Returns:
      true if a descriptor was stored under the path
    • getDescriptor

      public Optional<String> getDescriptor(String path)
      Returns a rendered descriptor by its synthetic path.
      Parameters:
      path - synthetic descriptor path
      Returns:
      descriptor if present
    • isTemplatePath

      public boolean isTemplatePath(String path)
      Checks whether the given path belongs to this registry.
      Parameters:
      path - descriptor path
      Returns:
      true if the path uses PATH_PREFIX