Process NCube template cells. A template cell contains a String that may have both NCube references to other NCubes within the <% %> or ${ } sections, AND, the template may also contain Groovy template variables. This class uses the Groovy StandardTemplate which supports ${variable} and <% %> replaceable tags. The 'variable' is the name of an NCube input coordinate key.
Modifiers | Name | Description |
---|---|---|
private groovy.text.Template |
resolvedTemplate |
Fields inherited from class | Fields |
---|---|
class ContentCmdCell |
LOG, extToMimeType |
class UrlCommandCell |
EXTENSION_SEPARATOR, LOG, cache, cacheable, cmd, errorMsg, hasBeenCached, hash, ncubeRuntimeClient, url |
Constructor and description |
---|
private GroovyTemplate
() |
GroovyTemplate
(java.lang.String cmd, java.lang.String url, boolean cache) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected java.lang.Object |
executeInternal(java.lang.Object data, java.util.Map ctx) |
|
void |
getCubeNamesFromCommandText(java.util.Set<java.lang.String> cubeNames) |
|
void |
getScopeKeys(java.util.Set<java.lang.String> scopeKeys) Go through all <% %> and ${ }. |
|
private static java.lang.String |
replaceScriptletNCubeRefs(java.lang.String template, java.util.regex.Pattern pattern, java.lang.String prefix, java.lang.String suffix) |
Methods inherited from class | Name |
---|---|
class ContentCmdCell |
addFileHeader, executeInternal, fetchContentFromUrl, fetchResult, getExtension, grab, proxyFetch, setupRequestHeaders, simpleFetch, transferFromServer, transferResponseHeaders |
class UrlCommandCell |
clearClassLoaderCache, compareTo, equals, execute, failOnErrors, fetchResult, getActualUrl, getCmd, getCubeNamesFromCommandText, getErrorMessage, getInput, getLock, getNCube, getOutput, getScopeKeys, getUrl, hashCode, isCacheable, setErrorMessage, toString |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Go through all <% %> and ${ }. For each one of these sections, find all 'input.variableName' occurrences and add 'variableName' to the passed in Set.
scopeKeys
- Set to add required scope (key) elements to.