public class ThreadedContext extends ContextImpl
entity
DELTA_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, setDoc
public ThreadedContext(org.apache.solr.handler.dataimport.DocBuilder.EntityRunner entityRunner, DocBuilder docBuilder, VariableResolverImpl resolver)
public VariableResolver getVariableResolver()
Context
getVariableResolver
in class ContextImpl
VariableResolver
public Context getParentContext()
Context
getParentContext
in class ContextImpl
public String currentProcess()
Context
currentProcess
in class ContextImpl
public EntityProcessor getEntityProcessor()
Context
getEntityProcessor
in class ContextImpl
EntityProcessor
public DataSource getDataSource()
Context
getDataSource
in class ContextImpl
DataSource
,
Context.getDataSource(String)
public String getResolvedEntityAttribute(String name)
Context
getResolvedEntityAttribute
in class ContextImpl
name
- name of the attributepublic void setSessionAttribute(String name, Object val, String scope)
Context
setSessionAttribute
in class ContextImpl
name
- the keyval
- the valuescope
- the scope in which the given key, value pair is to be storedpublic Object resolve(String var)
Context
resolve
in class ContextImpl
var
- the variable nemepublic String replaceTokens(String template)
Context
replaceTokens
in class ContextImpl