Class WebJarResourceResolver

java.lang.Object
io.jmix.ui.sys.WebJarResourceResolver

@Component("ui_WebJarResourceResolver") public class WebJarResourceResolver extends Object
  • Field Details

  • Constructor Details

    • WebJarResourceResolver

      public WebJarResourceResolver()
  • Method Details

    • getWebJarPath

      public String getWebJarPath(String webjar, String partialPath)
      Get WebJAR path by resource name and JAR name.
      Parameters:
      partialPath - partial WebJAR path
      webjar - jar name
      Returns:
      full WebJAR path
    • getWebJarPath

      public String getWebJarPath(String partialPath)
      Get WebJAR path by resource name.
      Parameters:
      partialPath - partial WebJAR path
      Returns:
      full WebJAR path
    • translateToWebPath

      public String translateToWebPath(String fullWebJarPath)
      Converts WebJAR path webjar/version/resource to Vaadin path.
      Parameters:
      fullWebJarPath - WebJAR path
      Returns:
      Vaadin path starting with "VAADIN/"
    • translateToWebJarPath

      public String translateToWebJarPath(String fullVaadinPath)
      Converts /webjars/... path to WebJAR path.
      Parameters:
      fullVaadinPath - Vaadin path
      Returns:
      WebJAR path
    • getResource

      @Nullable public URL getResource(String classpathPath)
    • init

      @EventListener @Order(300) protected void init(org.springframework.context.event.ContextRefreshedEvent event)
    • scanResources

      protected void scanResources(org.springframework.context.ApplicationContext applicationContext) throws IOException
      Throws:
      IOException
    • getFullPathIndex

      protected SortedMap<String,String> getFullPathIndex(Set<String> assetPaths)
    • getFullPath

      protected String getFullPath(String partialPath)
    • getFullPath

      protected String getFullPath(String webjar, String partialPath)
    • filterPathIndexByPrefix

      protected SortedMap<String,String> filterPathIndexByPrefix(SortedMap<String,String> pathIndex, String prefix)
    • getFullPath

      protected String getFullPath(SortedMap<String,String> pathIndex, String partialPath)
    • throwNotFoundException

      protected void throwNotFoundException(String partialPath)
    • printNotFoundTraceInfo

      protected void printNotFoundTraceInfo(SortedMap<String,String> pathIndex, String partialPath)
    • reversePath

      protected String reversePath(String assetPath)