Class ModelScriptsRepository
java.lang.Object
de.hybris.platform.scripting.engine.repository.impl.AbstractScriptsRepository
de.hybris.platform.scripting.engine.repository.impl.ModelScriptsRepository
- All Implemented Interfaces:
CacheableScriptsRepository,ScriptsRepository,org.springframework.beans.factory.InitializingBean
public class ModelScriptsRepository
extends AbstractScriptsRepository
implements CacheableScriptsRepository, org.springframework.beans.factory.InitializingBean
This repository does lookup for scripts inside of hybris database.
The format of URI for script:
model://codeOfScriptItem model://codeOfScriptItem/revisionNumber
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateCacheKey(String protocol, String path) Creates cache key based on given protocol and script path.findActiveScript(String code) findAllActiveScriptsForType(ScriptType scriptType) 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.booleanscriptExists(String code) voidsetCacheService(ScriptExecutablesCacheService cacheService) voidsetModelService(ModelService modelService) voidsetSessionService(SessionService sessionService) Methods inherited from class de.hybris.platform.scripting.engine.repository.impl.AbstractScriptsRepository
getSupportedProtocols, setSupportedProtocols
-
Field Details
-
REVISION_SEPARATOR
- See Also:
-
PROTOCOL
- See Also:
-
-
Constructor Details
-
ModelScriptsRepository
public ModelScriptsRepository()
-
-
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
-
findActiveScript
-
scriptExists
-
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
-
findAllActiveScriptsForType
-
setModelService
-
setCacheService
-
setSessionService
-
findAllRevisionsForCode
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-