public interface IStaticResource<R extends IRequestContext<?>>
A static resource is served directly
by the HTTP server. But if the resource is not found
and a generator exists, then the server will call
the framework instead of returning 404.
| Modifier and Type | Method and Description |
|---|---|
IStaticResourceCacheConfig |
getCacheConfig()
The cache configurations for the static resource.
|
IStaticResourceCorsConfig |
getCorsConfig()
The cors configurations for the static resource.
|
IHandler<R> |
getGenerator()
The generator to call to generate this resource if it
doesn't exist yet.
|
String |
getResourcePath()
The path of the resource on the classpath or on the
file system.
|
StaticResourceType |
getStaticResourceType()
The type of static resource.
|
String |
getUrlPath()
The URL to reach this static resource.
|
boolean |
isCanBeGenerated()
Can this resource be generated?
|
boolean |
isClasspath()
Is the resource on the classpath?
|
boolean |
isDirResource()
Is the resource a directory?
|
boolean |
isFileResource()
Is the resource a file?
|
boolean |
isFileSytem()
Is the resource on the file system?
|
StaticResourceType getStaticResourceType()
String getUrlPath()
String getResourcePath()
IHandler<R> getGenerator()
null if there are none.IStaticResourceCorsConfig getCorsConfig()
null, cors won't be enabled for that
resource.IStaticResourceCacheConfig getCacheConfig()
null, no caching headers will be sent,
but the last modification-date of the resource will be
validated and 304 - Not modified will be
returned if applicable.boolean isClasspath()
boolean isFileSytem()
boolean isFileResource()
boolean isDirResource()
boolean isCanBeGenerated()
Copyright © 2016. All rights reserved.