public class ClasspathScriptsRepository extends AbstractScriptsRepository implements CacheableScriptsRepository
The format of URI for script:
classpath://path/to/script.groovy classpath://path/to/file.bsh classpath://path/to/file.js
Any scripts which are intended to be used by this repository must have proper file extension according to the Script Type.
| Constructor and Description |
|---|
ClasspathScriptsRepository() |
| Modifier and Type | Method and Description |
|---|---|
CacheKey |
createCacheKey(String protocol,
String path)
Creates cache key based on given protocol and script path.
|
void |
init() |
ScriptContent |
lookupScript(CacheKey cacheKey)
Lookup for ScriptContent based on the information provided by the CacheKey object.
|
ScriptContent |
lookupScript(String protocol,
String path)
Lookup script in the repository by protocol and path.
|
getSupportedProtocols, setSupportedProtocolsprotected String tenantId
@PostConstruct public void init()
public ScriptContent lookupScript(String protocol, String path)
ScriptsRepositorylookupScript in interface ScriptsRepositoryprotocol - native protocol for the given repository.path - path of the Script in the given repository.public ScriptContent lookupScript(CacheKey cacheKey)
CacheableScriptsRepositorylookupScript in interface CacheableScriptsRepositorypublic CacheKey createCacheKey(String protocol, String path)
CacheableScriptsRepositorycreateCacheKey in interface CacheableScriptsRepositoryCopyright © 2017 SAP SE. All Rights Reserved.