public interface IAsset extends org.apache.hivemind.Locatable
IComponent
.
Assets may be completely external (i.e., on some other web site), contained by the
ServletContext
, or stored somewhere in the classpath.
In the latter two cases, the resource may be localized.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buildURL()
Returns a URL for the asset, ready to be inserted into the output HTML.
|
java.io.InputStream |
getResourceAsStream()
Accesses the localized version of the resource (if possible) and returns it as an input
stream.
|
org.apache.hivemind.Resource |
getResourceLocation()
Returns the underlying location of the asset.
|
java.lang.String buildURL()
Locale
of the current
page
) is returned.ApplicationRuntimeException
- if the asset does not exist.java.io.InputStream getResourceAsStream()
page
is returned.ApplicationRuntimeException
- if the asset does not exist, or can't be read.org.apache.hivemind.Resource getResourceLocation()