public class ModelScriptsRepository extends AbstractScriptsRepository implements CacheableScriptsRepository
The format of URI for script:
model://codeOfScriptItem model://codeOfScriptItem/revisionNumber
| Modifier and Type | Field and Description |
|---|---|
static String |
PROTOCOL |
static String |
REVISION_SEPARATOR |
| Constructor and Description |
|---|
ModelScriptsRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
CacheKey |
createCacheKey(String protocol,
String path)
Creates cache key based on given protocol and script path.
|
ScriptModel |
findActiveScript(String code) |
List<ScriptModel> |
findAllActiveScriptsForType(ScriptType scriptType) |
List<ScriptModel> |
findAllRevisionsForCode(String code) |
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.
|
boolean |
scriptExists(String code) |
void |
setCacheService(ScriptExecutablesCacheService cacheService) |
void |
setModelService(ModelService modelService) |
void |
setSessionService(SessionService sessionService) |
getSupportedProtocols, setSupportedProtocolspublic static final String REVISION_SEPARATOR
public static final String PROTOCOL
@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 ScriptModel findActiveScript(String code)
public boolean scriptExists(String code)
public ScriptContent lookupScript(CacheKey cacheKey)
CacheableScriptsRepositorylookupScript in interface CacheableScriptsRepositorypublic CacheKey createCacheKey(String protocol, String path)
CacheableScriptsRepositorycreateCacheKey in interface CacheableScriptsRepositorypublic List<ScriptModel> findAllActiveScriptsForType(ScriptType scriptType)
public void setModelService(ModelService modelService)
public void setCacheService(ScriptExecutablesCacheService cacheService)
public void setSessionService(SessionService sessionService)
public List<ScriptModel> findAllRevisionsForCode(String code)
Copyright © 2017 SAP SE. All Rights Reserved.