java.lang.Object | |
↳ | org.springframework.scripting.support.ResourceScriptSource |
ScriptSource
implementation
based on Spring's Resource
abstraction. Loads the script text from the underlying Resource's
File
or
InputStream
,
and tracks the last-modified timestamp of the file (if possible).
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
logger | Logger available to subclasses |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new ResourceScriptSource for the given resource.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the
Resource to load the
script from. | |||||||||||
Retrieve the current script source text as String.
| |||||||||||
Indicate whether the underlying script data has been modified since
the last time
getScriptAsString() was called. | |||||||||||
Sets the encoding used for reading the script resource.
| |||||||||||
Determine a class name for the underlying script.
| |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieve the current last-modified timestamp of the underlying resource.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.scripting.ScriptSource
|
Logger available to subclasses
Create a new ResourceScriptSource for the given resource.
resource | the Resource to load the script from |
---|
Indicate whether the underlying script data has been modified since
the last time getScriptAsString()
was called.
Returns true
if the script has not been read yet.
Sets the encoding used for reading the script resource. The default value is "UTF-8". A null value, implies the platform default.
encoding | charset encoding used for reading the script. |
---|
Determine a class name for the underlying script.
null
if none available
Retrieve the current last-modified timestamp of the underlying resource.