Package io.jmix.ui.sys
Class WebJarResourceResolver
java.lang.Object
io.jmix.ui.sys.WebJarResourceResolver
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
protected static final class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfilterPathIndexByPrefix
(SortedMap<String, String> pathIndex, String prefix) protected String
getFullPath
(String partialPath) protected String
getFullPath
(String webjar, String partialPath) protected String
getFullPath
(SortedMap<String, String> pathIndex, String partialPath) getFullPathIndex
(Set<String> assetPaths) getResource
(String classpathPath) getWebJarPath
(String partialPath) Get WebJAR path by resource name.getWebJarPath
(String webjar, String partialPath) Get WebJAR path by resource name and JAR name.protected void
init
(org.springframework.context.event.ContextRefreshedEvent event) protected void
printNotFoundTraceInfo
(SortedMap<String, String> pathIndex, String partialPath) protected String
reversePath
(String assetPath) protected void
scanResources
(org.springframework.context.ApplicationContext applicationContext) protected void
throwNotFoundException
(String partialPath) translateToWebJarPath
(String fullVaadinPath) Converts /webjars/...translateToWebPath
(String fullWebJarPath) Converts WebJAR path webjar/version/resource to Vaadin path.
-
Field Details
-
VAADIN_PREFIX
- See Also:
-
WEBJAR_PREFIX
- See Also:
-
CLASSPATH_WEBJAR_PREFIX
- See Also:
-
fullPathIndex
-
mapping
-
-
Constructor Details
-
WebJarResourceResolver
public WebJarResourceResolver()
-
-
Method Details
-
getWebJarPath
Get WebJAR path by resource name and JAR name.- Parameters:
partialPath
- partial WebJAR pathwebjar
- jar name- Returns:
- full WebJAR path
-
getWebJarPath
Get WebJAR path by resource name.- Parameters:
partialPath
- partial WebJAR path- Returns:
- full WebJAR path
-
translateToWebPath
Converts WebJAR path webjar/version/resource to Vaadin path.- Parameters:
fullWebJarPath
- WebJAR path- Returns:
- Vaadin path starting with "VAADIN/"
-
translateToWebJarPath
Converts /webjars/... path to WebJAR path.- Parameters:
fullVaadinPath
- Vaadin path- Returns:
- WebJAR path
-
getResource
-
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
-
getFullPath
-
getFullPath
-
filterPathIndexByPrefix
-
getFullPath
-
throwNotFoundException
-
printNotFoundTraceInfo
-
reversePath
-