Modifier and Type | Field and Description |
---|---|
static sirius.kernel.health.Log |
LOG
Logger used by the resource discovery framework
|
Constructor and Description |
---|
Resources() |
Modifier and Type | Method and Description |
---|---|
void |
flushCache(String scopeId,
String uri)
Deletes the cached resource for the given scope and uri.
|
Optional<Resource> |
resolve(String uri)
Tries to resolve a template or content-file into a
Resource |
Optional<Resource> |
resolve(String scopeId,
String uri)
Tries to resolve a template or content-file into a
Resource |
public static final sirius.kernel.health.Log LOG
@Nonnull public Optional<Resource> resolve(@Nonnull String uri)
Resource
uri
- the local name of the uri to loadResource
(wrapped as resource) pointing to the requested content
or an empty optional if no resource was found@Nonnull public Optional<Resource> resolve(@Nonnull String scopeId, @Nonnull String uri)
Resource
scopeId
- the scope to use. Use resolve(String)
to pick the currently active scopeuri
- the local name of the uri to loadResource
(wrapped as resource) pointing to the requested content
or an empty optional if no resource was foundpublic void flushCache(@Nonnull String scopeId, @Nonnull String uri)
If one knows that an underlying template was created or deleted and therefore the cached lookup URL has to be removed, this method can be invoked to remove the entry from the cache.
scopeId
- the scope to useuri
- the local name of the uri to flushCopyright © 2018. All rights reserved.