Class ClasspathScriptsRepository
java.lang.Object
de.hybris.platform.scripting.engine.repository.impl.AbstractScriptsRepository
de.hybris.platform.scripting.engine.repository.impl.ClasspathScriptsRepository
- All Implemented Interfaces:
CacheableScriptsRepository,ScriptsRepository
- Direct Known Subclasses:
TestClasspathScriptsRepository
public class ClasspathScriptsRepository
extends AbstractScriptsRepository
implements CacheableScriptsRepository
This repository does lookup for scripts in the current classpath.
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCacheKey(String protocol, String path) Creates cache key based on given protocol and script path.voidinit()lookupScript(CacheKey cacheKey) Lookup for ScriptContent based on the information provided by the CacheKey object.lookupScript(String protocol, String path) Lookup script in the repository by protocol and path.Methods inherited from class de.hybris.platform.scripting.engine.repository.impl.AbstractScriptsRepository
getSupportedProtocols, setSupportedProtocols
-
Field Details
-
tenantId
-
-
Constructor Details
-
ClasspathScriptsRepository
public ClasspathScriptsRepository()
-
-
Method Details
-
init
@PostConstruct public void init() -
lookupScript
Description copied from interface:ScriptsRepositoryLookup script in the repository by protocol and path.- Specified by:
lookupScriptin interfaceScriptsRepository- Parameters:
protocol- native protocol for the given repository.path- path of the Script in the given repository.- Returns:
- ScriptContent object
-
lookupScript
Description copied from interface:CacheableScriptsRepositoryLookup for ScriptContent based on the information provided by the CacheKey object.- Specified by:
lookupScriptin interfaceCacheableScriptsRepository
-
createCacheKey
Description copied from interface:CacheableScriptsRepositoryCreates cache key based on given protocol and script path.- Specified by:
createCacheKeyin interfaceCacheableScriptsRepository
-