|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.handler.dataimport.Context
org.apache.solr.handler.dataimport.ContextImpl
public class ContextImpl
An implementation for the Context
This API is experimental and subject to change
Field Summary |
---|
Fields inherited from class org.apache.solr.handler.dataimport.Context |
---|
DELTA_DUMP, FIND_DELTA, FULL_DUMP, SCOPE_DOC, SCOPE_ENTITY, SCOPE_GLOBAL |
Constructor Summary | |
---|---|
ContextImpl(DataConfig.Entity entity,
VariableResolverImpl resolver,
DataSource ds,
int currProcess,
Map<String,Object> requestParams,
Map<String,Object> global,
ContextImpl p,
DataImporter di)
|
Method Summary | |
---|---|
int |
currentProcess()
Returns the current process FULL_DUMP =1, DELTA_DUMP=2, FIND_DELTA=3 |
List<Map<String,String>> |
getAllEntityFields()
Returns all the fields put into an entity. |
DataSource |
getDataSource()
Gets the datasource instance defined for this entity. |
DataSource |
getDataSource(String name)
Gets a new DataSource instance with a name. |
Map<String,Object> |
getDocSession()
|
String |
getEntityAttribute(String name)
Get the value of any attribute put into this entity |
EntityProcessor |
getEntityProcessor()
Returns the instance of EntityProcessor used for this entity |
Context |
getParentContext()
Get the context instance for the parent entity. |
Map<String,Object> |
getRequestParameters()
The request parameters passed over HTTP for this command the values in the map are either String(for single valued parameters) or List |
Object |
getSessionAttribute(String name,
String scope)
get a value by name in the given scope (entity, document,global) |
org.apache.solr.core.SolrCore |
getSolrCore()
Exposing the actual SolrCore to the components |
VariableResolver |
getVariableResolver()
Returns the VariableResolver used in this entity which can be used to resolve the tokens in ${ |
boolean |
isRootEntity()
Returns if the current entity is the root entity |
void |
setDocSession(Map<String,Object> docSession)
|
void |
setSessionAttribute(String name,
Object val,
String scope)
Store values in a certain name and scope (entity, document,global) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContextImpl(DataConfig.Entity entity, VariableResolverImpl resolver, DataSource ds, int currProcess, Map<String,Object> requestParams, Map<String,Object> global, ContextImpl p, DataImporter di)
Method Detail |
---|
public String getEntityAttribute(String name)
Context
getEntityAttribute
in class Context
name
- name of the attribute eg: 'name'
public List<Map<String,String>> getAllEntityFields()
Context
getAllEntityFields
in class Context
public VariableResolver getVariableResolver()
Context
getVariableResolver
in class Context
VariableResolver
public DataSource getDataSource()
Context
getDataSource
in class Context
DataSource
,
Context.getDataSource(String)
public DataSource getDataSource(String name)
Context
getDataSource
in class Context
name
- Name of the dataSource as defined in the dataSource tag
DataSource
public boolean isRootEntity()
Context
isRootEntity
in class Context
public int currentProcess()
Context
currentProcess
in class Context
public Map<String,Object> getRequestParameters()
Context
getRequestParameters
in class Context
public EntityProcessor getEntityProcessor()
Context
getEntityProcessor
in class Context
EntityProcessor
public void setSessionAttribute(String name, Object val, String scope)
Context
setSessionAttribute
in class Context
name
- the keyval
- the valuescope
- the scope in which the given key, value pair is to be storedpublic Object getSessionAttribute(String name, String scope)
Context
getSessionAttribute
in class Context
name
- the keyscope
- the scope from which the value is to be retreived
public Context getParentContext()
Context
getParentContext
in class Context
public Map<String,Object> getDocSession()
public void setDocSession(Map<String,Object> docSession)
public org.apache.solr.core.SolrCore getSolrCore()
Context
getSolrCore
in class Context
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |