Interface CockpitResourceLoader
-
- All Superinterfaces:
ResourceLoader
- All Known Implementing Classes:
AbstractCockpitResourceReader,DefaultCockpitResourceLoader,DefaultWidgetResourceReader,WidgetClasspathResourceReader,WidgetJarResourceReader
public interface CockpitResourceLoader extends ResourceLoader
Used by some classes to load resources other than byClassLoader.getResourceAsStream(String).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.io.InputStreamgetResourceAsStream(WidgetJarLibInfo jarLibInfo, java.lang.String widgetFilename)Returns a resource file for the given path andWidgetJarLibInfoas aInputStreamdefault java.io.InputStreamgetResourceAsStream(java.io.File moduleJar, java.lang.String path)java.io.InputStreamgetViewResourceAsStream(java.lang.String path)Returns a view file (e.g.java.lang.StringgetViewResourceAsString(WidgetJarLibInfo jarLibInfo, java.lang.String widgetFilename)Returns a view file (e.g.default booleanhasResource(WidgetJarLibInfo jarLibInfo, java.lang.String path)Checks whether a resource exists and may be readdefault booleanhasResource(java.io.File moduleJar, java.lang.String path)default booleanhasResource(java.lang.String path)Checks whether this loader can load resource identified by path.-
Methods inherited from interface com.hybris.cockpitng.core.persistence.packaging.ResourceLoader
getResourceAsStream
-
-
-
-
Method Detail
-
getViewResourceAsStream
java.io.InputStream getViewResourceAsStream(java.lang.String path)
Returns a view file (e.g. .zul) for the given path asInputStream.
-
getViewResourceAsString
java.lang.String getViewResourceAsString(WidgetJarLibInfo jarLibInfo, java.lang.String widgetFilename)
Returns a view file (e.g. .zul) for the given path andWidgetJarLibInfoas aString
-
hasResource
default boolean hasResource(java.lang.String path)
Description copied from interface:ResourceLoaderChecks whether this loader can load resource identified by path.- Specified by:
hasResourcein interfaceResourceLoader- Parameters:
path- the path identifying resource.- Returns:
truewhether this loader can load resource, otherwisefalse.
-
getResourceAsStream
java.io.InputStream getResourceAsStream(WidgetJarLibInfo jarLibInfo, java.lang.String widgetFilename)
Returns a resource file for the given path andWidgetJarLibInfoas aInputStream
-
getResourceAsStream
default java.io.InputStream getResourceAsStream(java.io.File moduleJar, java.lang.String path)
-
hasResource
default boolean hasResource(WidgetJarLibInfo jarLibInfo, java.lang.String path)
Checks whether a resource exists and may be read- Parameters:
path- path to resourcejarLibInfo- widget, which resource is searched- Returns:
trueif resource is available
-
hasResource
default boolean hasResource(java.io.File moduleJar, java.lang.String path)
-
-