public interface IStaticResourceBuilder<R extends IRequestContext<?>>
| Modifier and Type | Method and Description |
|---|---|
IStaticResourceBuilder<R> |
classpath(String path)
The path to the resource, on the classpath.
|
IStaticResourceBuilder<R> |
cors()
Enables Cross-Origin Resource Sharing (Cors)
|
IStaticResourceBuilder<R> |
cors(Set<String> allowedOrigins)
Enables Cross-Origin Resource Sharing (Cors)
|
IStaticResourceBuilder<R> |
cors(Set<String> allowedOrigins,
Set<String> extraHeadersAllowedToBeRead)
Enables Cross-Origin Resource Sharing (Cors)
|
IStaticResourceBuilder<R> |
cors(Set<String> allowedOrigins,
Set<String> extraHeadersAllowedToBeRead,
Set<String> extraHeadersAllowedToBeSent)
Enables Cross-Origin Resource Sharing (Cors)
|
IStaticResourceBuilder<R> |
cors(Set<String> allowedOrigins,
Set<String> extraHeadersAllowedToBeRead,
Set<String> extraHeadersAllowedToBeSent,
boolean allowCookies)
Enables Cross-Origin Resource Sharing (Cors)
|
IStaticResourceBuilder<R> |
cors(Set<String> allowedOrigins,
Set<String> extraHeadersAllowedToBeRead,
Set<String> extraHeadersAllowedToBeSent,
boolean allowCookies,
int maxAgeInSeconds)
Enables Cross-Origin Resource Sharing (Cors)
|
IStaticResource<R> |
create()
Creates and returns the static resource without adding it to
the router.
|
IStaticResourceBuilder<R> |
fileSystem(String path)
The path to the resource, on the file system.
|
void |
save()
Saves the static resource route to the router.
|
void |
save(IHandler<R> generator)
Saves the static resource route.
|
IStaticResourceBuilder<R> |
url(String url)
The URL pointing to the resource.
|
IStaticResourceBuilder<R> url(String url)
IStaticResourceBuilder<R> classpath(String path)
IStaticResourceBuilder<R> fileSystem(String path)
IStaticResourceBuilder<R> cors()
ISpincastFilters#cors(R context)IStaticResourceBuilder<R> cors(Set<String> allowedOrigins)
ISpincastFilters#cors(R context,
Set<String> allowedOrigins)IStaticResourceBuilder<R> cors(Set<String> allowedOrigins, Set<String> extraHeadersAllowedToBeRead)
ISpincastFilters#cors(R context,
Set<String> allowedOrigins,
Set<String> extraHeadersAllowedToBeRead)IStaticResourceBuilder<R> cors(Set<String> allowedOrigins, Set<String> extraHeadersAllowedToBeRead, Set<String> extraHeadersAllowedToBeSent)
ISpincastFilters#cors(R context,
Set<String> allowedOrigins,
Set<String> extraHeadersAllowedToBeRead,
Set<String> extraHeadersAllowedToBeSent)IStaticResourceBuilder<R> cors(Set<String> allowedOrigins, Set<String> extraHeadersAllowedToBeRead, Set<String> extraHeadersAllowedToBeSent, boolean allowCookies)
ISpincastFilters#cors(R context,
Set<String> allowedOrigins,
Set<String> extraHeadersAllowedToBeRead,
Set<String> extraHeadersAllowedToBeSent,
boolean allowCookies)IStaticResourceBuilder<R> cors(Set<String> allowedOrigins, Set<String> extraHeadersAllowedToBeRead, Set<String> extraHeadersAllowedToBeSent, boolean allowCookies, int maxAgeInSeconds)
ISpincastFilters#cors(R context,
Set<String> allowedOrigins,
Set<String> extraHeadersAllowedToBeRead,
Set<String> extraHeadersAllowedToBeSent,
boolean allowCookies,
int maxAgeInSeconds
)void save()
IRouter object, an exception will be
thrown.void save(IHandler<R> generator)
IRouter object, an exception will be
thrown.generator - If the resource is not found, the specified
generator will be used to generate it and
the result will be saved.IStaticResource<R> create()
save(...) instead to save the static resource
to the router at the end of the build process!Copyright © 2016. All rights reserved.