public.javadoc.org.spincast.plugins.routing.StaticResource.html Maven / Gradle / Ivy
                 Go to download
                
        
                    Show more of this group  Show more artifacts with this name
Show all versions of spincast-website Show documentation
                Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
                
            
StaticResource (org.spincast:spincast-framework 0.9.21 API) 
org.spincast.plugins.routing
Class StaticResource<R extends IRequestContext<?>>
- java.lang.Object
 
- 
- org.spincast.plugins.routing.StaticResource<R>
 
 
- 
- All Implemented Interfaces:
 
- IStaticResource<R>
 
public class StaticResource<R extends IRequestContext<?>>
extends Object
implements IStaticResource<R>
Represents a static resource.
 
- 
- 
Constructor Summary
Constructors  
Constructor and Description 
 
StaticResource(StaticResourceType staticResourceType,
              String urlPath,
              String resourcePath,
              IHandler<R> generator,
              IStaticResourceCorsConfig corsConfig)  
 
 
- 
Method Summary
All Methods Instance Methods Concrete Methods  
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?
 
 
 
 
- 
- 
Constructor Detail
- 
StaticResource
public StaticResource(StaticResourceType staticResourceType,
                      String urlPath,
                      String resourcePath,
                      @Nullable
                      IHandler<R> generator,
                      @Nullable
                      IStaticResourceCorsConfig corsConfig)
 
 
- 
Method Detail
- 
getStaticResourceType
public StaticResourceType getStaticResourceType()
Description copied from interface: IStaticResource
The type of static resource.
- Specified by:
 
getStaticResourceType in interface IStaticResource<R extends IRequestContext<?>> 
 
- 
getUrlPath
public String getUrlPath()
Description copied from interface: IStaticResource
The URL to reach this static resource.
- Specified by:
 
getUrlPath in interface IStaticResource<R extends IRequestContext<?>> 
 
- 
getResourcePath
public String getResourcePath()
Description copied from interface: IStaticResource
The path of the resource on the classpath or on the
 file system.
- Specified by:
 
getResourcePath in interface IStaticResource<R extends IRequestContext<?>> 
 
- 
isCanBeGenerated
public boolean isCanBeGenerated()
Description copied from interface: IStaticResource
Can this resource be generated?
- Specified by:
 
isCanBeGenerated in interface IStaticResource<R extends IRequestContext<?>> 
 
- 
getGenerator
public IHandler<R> getGenerator()
Description copied from interface: IStaticResource
The generator to call to generate this resource if it
 doesn't exist yet.
- Specified by:
 
getGenerator in interface IStaticResource<R extends IRequestContext<?>> 
- Returns:
 
- the generator or 
null if there are none. 
 
- 
getCorsConfig
public IStaticResourceCorsConfig getCorsConfig()
Description copied from interface: IStaticResource
The cors configurations for the static resource.
 
 If null, cors won't be enabled for that
 resource.
- Specified by:
 
getCorsConfig in interface IStaticResource<R extends IRequestContext<?>> 
 
- 
isFileResource
public boolean isFileResource()
Description copied from interface: IStaticResource
Is the resource a file?
- Specified by:
 
isFileResource in interface IStaticResource<R extends IRequestContext<?>> 
 
- 
isDirResource
public boolean isDirResource()
Description copied from interface: IStaticResource
Is the resource a directory?
- Specified by:
 
isDirResource in interface IStaticResource<R extends IRequestContext<?>> 
 
- 
isClasspath
public boolean isClasspath()
Description copied from interface: IStaticResource
Is the resource on the classpath?
- Specified by:
 
isClasspath in interface IStaticResource<R extends IRequestContext<?>> 
 
- 
isFileSytem
public boolean isFileSytem()
Description copied from interface: IStaticResource
Is the resource on the file system?
- Specified by:
 
isFileSytem in interface IStaticResource<R extends IRequestContext<?>> 
 
 
 
Copyright © 2016. All rights reserved.
    © 2015 - 2025 Weber Informatics LLC | Privacy Policy