Package io.jmix.ui.sys
Class WebJarResourceResolver
java.lang.Object
io.jmix.ui.sys.WebJarResourceResolver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterPathIndexByPrefix(SortedMap<String, String> pathIndex, String prefix) protected StringgetFullPath(String partialPath) protected StringgetFullPath(String webjar, String partialPath) protected StringgetFullPath(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 voidinit(org.springframework.context.event.ContextRefreshedEvent event) protected voidprintNotFoundTraceInfo(SortedMap<String, String> pathIndex, String partialPath) protected StringreversePath(String assetPath) protected voidscanResources(org.springframework.context.ApplicationContext applicationContext) protected voidthrowNotFoundException(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
-