Package org.knime.core.webui.page
Interface Resource
- All Known Implementing Classes:
Page
public interface Resource
Represents a web resource used in ui-extensions (such as node view, port view and node dialog).
- Since:
- 4.5
- Author:
- Martin Horn, KNIME GmbH, Konstanz, Germany
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanisStatic()A static resource will never change at runtime and thus potentially be 're-used' between, e.g., multiple node instances.
-
Method Details
-
getRelativePath
String getRelativePath()- Returns:
- the resource's relative path (including the resource name itself, too)
-
getInputStream
- Returns:
- the actual resource content as
InputStream - Throws:
IOException
-
isStatic
boolean isStatic()A static resource will never change at runtime and thus potentially be 're-used' between, e.g., multiple node instances. I.e. multiple node instances access a static resource at the very same URL which is independent from a specific node instance.- Returns:
trueif the resource is static and won't ever change at runtime, otherwisefalse
-
getContentType
Resource.ContentType getContentType()- Returns:
- the content type of the resource
-
getCharset
- Returns:
- the charset the resource uses; an empty optional if it's not a text-based resource or if it's using the
default charset (i.e.
Charset.defaultCharset()).
-