public class StaticResource<R extends IRequestContext<?>> extends Object implements IStaticResource<R>
| Constructor and Description |
|---|
StaticResource(StaticResourceType staticResourceType,
String urlPath,
String resourcePath,
IHandler<R> generator,
IStaticResourceCorsConfig corsConfig) |
| Modifier and Type | Method and Description |
|---|---|
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?
|
public StaticResource(StaticResourceType staticResourceType, String urlPath, String resourcePath, @Nullable IHandler<R> generator, @Nullable IStaticResourceCorsConfig corsConfig)
public StaticResourceType getStaticResourceType()
IStaticResourcegetStaticResourceType in interface IStaticResource<R extends IRequestContext<?>>public String getUrlPath()
IStaticResourcegetUrlPath in interface IStaticResource<R extends IRequestContext<?>>public String getResourcePath()
IStaticResourcegetResourcePath in interface IStaticResource<R extends IRequestContext<?>>public boolean isCanBeGenerated()
IStaticResourceisCanBeGenerated in interface IStaticResource<R extends IRequestContext<?>>public IHandler<R> getGenerator()
IStaticResourcegetGenerator in interface IStaticResource<R extends IRequestContext<?>>null if there are none.public IStaticResourceCorsConfig getCorsConfig()
IStaticResourcenull, cors won't be enabled for that
resource.getCorsConfig in interface IStaticResource<R extends IRequestContext<?>>public boolean isFileResource()
IStaticResourceisFileResource in interface IStaticResource<R extends IRequestContext<?>>public boolean isDirResource()
IStaticResourceisDirResource in interface IStaticResource<R extends IRequestContext<?>>public boolean isClasspath()
IStaticResourceisClasspath in interface IStaticResource<R extends IRequestContext<?>>public boolean isFileSytem()
IStaticResourceisFileSytem in interface IStaticResource<R extends IRequestContext<?>>Copyright © 2016. All rights reserved.