public class ThreadedContext extends ContextImpl
entityDELTA_DUMP, FIND_DELTA, FULL_DUMP, SCOPE_DOC, SCOPE_ENTITY, SCOPE_GLOBAL, SCOPE_SOLR_CORE| Constructor and Description |
|---|
ThreadedContext(org.apache.solr.handler.dataimport.DocBuilder.EntityRunner entityRunner,
DocBuilder docBuilder,
VariableResolverImpl resolver) |
| Modifier and Type | Method and Description |
|---|---|
String |
currentProcess()
Returns the current process FULL_DUMP, DELTA_DUMP, FIND_DELTA
|
DataSource |
getDataSource()
Gets the datasource instance defined for this entity.
|
EntityProcessor |
getEntityProcessor()
Returns the instance of EntityProcessor used for this entity
|
Context |
getParentContext()
Get the context instance for the parent entity. works only in the full dump
If the current entity is rootmost a null is returned
|
String |
getResolvedEntityAttribute(String name)
Get the value of any attribute put into this entity after resolving all variables found in the attribute value
|
VariableResolver |
getVariableResolver()
Returns the VariableResolver used in this entity which can be used to
resolve the tokens in ${
|
String |
replaceTokens(String template)
Resolve variables in a template
|
Object |
resolve(String var)
Use this directly to resolve variable
|
void |
setSessionAttribute(String name,
Object val,
String scope)
Store values in a certain name and scope (entity, document,global)
|
deleteDoc, deleteDocByQuery, getAllEntityFields, getDataSource, getEntityAttribute, getRequestParameters, getScript, getScriptLanguage, getSessionAttribute, getSolrCore, getStats, isRootEntity, setDocpublic ThreadedContext(org.apache.solr.handler.dataimport.DocBuilder.EntityRunner entityRunner,
DocBuilder docBuilder,
VariableResolverImpl resolver)
public VariableResolver getVariableResolver()
ContextgetVariableResolver in class ContextImplVariableResolverpublic Context getParentContext()
ContextgetParentContext in class ContextImplpublic String currentProcess()
ContextcurrentProcess in class ContextImplpublic EntityProcessor getEntityProcessor()
ContextgetEntityProcessor in class ContextImplEntityProcessorpublic DataSource getDataSource()
ContextgetDataSource in class ContextImplDataSource,
Context.getDataSource(String)public String getResolvedEntityAttribute(String name)
ContextgetResolvedEntityAttribute in class ContextImplname - name of the attributepublic void setSessionAttribute(String name, Object val, String scope)
ContextsetSessionAttribute in class ContextImplname - the keyval - the valuescope - the scope in which the given key, value pair is to be storedpublic Object resolve(String var)
Contextresolve in class ContextImplvar - the variable nemepublic String replaceTokens(String template)
ContextreplaceTokens in class ContextImpl