Class WidgetJarResourceReader
- java.lang.Object
-
- com.hybris.cockpitng.core.persistence.packaging.impl.AbstractCockpitResourceReader
-
- com.hybris.cockpitng.core.persistence.packaging.impl.WidgetJarResourceReader
-
- All Implemented Interfaces:
CockpitResourceLoader,ResourceLoader
public class WidgetJarResourceReader extends AbstractCockpitResourceReader
Widget resource reader that looks-up in widget's jar files for searched resources
-
-
Field Summary
-
Fields inherited from class com.hybris.cockpitng.core.persistence.packaging.impl.AbstractCockpitResourceReader
LOG
-
-
Constructor Summary
Constructors Constructor Description WidgetJarResourceReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetResourceAsStream(WidgetJarLibInfo widgetJarLibInfo, java.lang.String resourceName)Returns a resource file for the given path andWidgetJarLibInfoas aInputStreamjava.io.InputStreamgetResourceAsStream(java.io.File moduleJar, java.lang.String path)java.io.InputStreamgetResourceAsStream(java.lang.String path)Returns resource identified by path asInputStreamornullif resource does not exist.protected java.io.InputStreamgetResourceAsStream(java.util.jar.JarFile jarfile, java.lang.String path)protected WidgetLibUtilsgetWidgetLibUtils()booleanhasResource(WidgetJarLibInfo jarLibInfo, java.lang.String path)Checks whether a resource exists and may be readbooleanhasResource(java.io.File moduleJar, java.lang.String path)booleanhasResource(java.lang.String path)Checks whether this loader can load resource identified by path.voidsetWidgetLibUtils(WidgetLibUtils widgetLibUtils)-
Methods inherited from class com.hybris.cockpitng.core.persistence.packaging.impl.AbstractCockpitResourceReader
adaptResourceName, getFullResourceName, getFullResourceName, getViewResourceAsStream, getViewResourceAsString
-
-
-
-
Method Detail
-
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String path)
Description copied from interface:ResourceLoaderReturns resource identified by path asInputStreamornullif resource does not exist.- Parameters:
path- the path identifying resource.- Returns:
- Resource as
InputStreamornull.
-
hasResource
public boolean hasResource(java.lang.String path)
Description copied from interface:ResourceLoaderChecks whether this loader can load resource identified by path.- Parameters:
path- the path identifying resource.- Returns:
truewhether this loader can load resource, otherwisefalse.
-
getResourceAsStream
public java.io.InputStream getResourceAsStream(WidgetJarLibInfo widgetJarLibInfo, java.lang.String resourceName)
Description copied from interface:CockpitResourceLoaderReturns a resource file for the given path andWidgetJarLibInfoas aInputStream
-
hasResource
public boolean hasResource(WidgetJarLibInfo jarLibInfo, java.lang.String path)
Description copied from interface:CockpitResourceLoaderChecks whether a resource exists and may be read- Parameters:
jarLibInfo- widget, which resource is searchedpath- path to resource- Returns:
trueif resource is available
-
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.io.File moduleJar, java.lang.String path)
-
getResourceAsStream
protected java.io.InputStream getResourceAsStream(java.util.jar.JarFile jarfile, java.lang.String path)
-
hasResource
public boolean hasResource(java.io.File moduleJar, java.lang.String path)
-
getWidgetLibUtils
protected WidgetLibUtils getWidgetLibUtils()
-
setWidgetLibUtils
public void setWidgetLibUtils(WidgetLibUtils widgetLibUtils)
-
-