io.searchbox
Class AbstractAction

java.lang.Object
  extended by io.searchbox.AbstractAction
All Implemented Interfaces:
Action
Direct Known Subclasses:
Bulk, Count, CreateIndex, Delete, DeleteByQuery, DeleteIndex, Explain, Get, Index, MoreLikeThis, MultiGet, MultiSearch, Percolate, Search, Update, Validate

public abstract class AbstractAction
extends Object
implements Action

Author:
Dogukan Sonmez

Field Summary
protected  String id
           
protected  String indexName
           
protected  String typeName
           
 
Constructor Summary
AbstractAction()
           
 
Method Summary
 void addParameter(String parameter, Object value)
           
protected  String buildQueryString()
           
protected  String buildURI(Doc doc)
           
protected  String buildURI(String index, String type, String id)
           
 Object getData()
           
 String getId()
           
 String getIdFromSource(Object source)
           
 String getIndexName()
           
 String getName()
           
 Object getParameter(String parameter)
           
 String getPathToResult()
           
 String getRestMethodName()
           
 String getTypeName()
           
 String getURI()
           
 boolean isBulkOperation()
           
 boolean isParameterExist(String parameter)
           
protected  boolean isValid(Doc doc)
           
protected  boolean isValid(String index, String type, String id)
           
 void removeParameter(String parameter)
           
 void setBulkOperation(boolean bulkOperation)
           
 void setData(Object data)
           
 void setPathToResult(String pathToResult)
           
 void setRestMethodName(String restMethodName)
           
 void setURI(String URI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface io.searchbox.Action
createByteResult
 

Field Detail

indexName

protected String indexName

typeName

protected String typeName

id

protected String id
Constructor Detail

AbstractAction

public AbstractAction()
Method Detail

getIndexName

public String getIndexName()

getTypeName

public String getTypeName()

getId

public String getId()

setRestMethodName

public void setRestMethodName(String restMethodName)

addParameter

public void addParameter(String parameter,
                         Object value)

removeParameter

public void removeParameter(String parameter)

isParameterExist

public boolean isParameterExist(String parameter)

getParameter

public Object getParameter(String parameter)

setURI

public void setURI(String URI)

setData

public void setData(Object data)

getURI

public String getURI()
Specified by:
getURI in interface Action

getRestMethodName

public String getRestMethodName()
Specified by:
getRestMethodName in interface Action

getData

public Object getData()
Specified by:
getData in interface Action

getName

public String getName()
Specified by:
getName in interface Action

getPathToResult

public String getPathToResult()
Specified by:
getPathToResult in interface Action

getIdFromSource

public String getIdFromSource(Object source)

buildURI

protected String buildURI(Doc doc)

buildURI

protected String buildURI(String index,
                          String type,
                          String id)

buildQueryString

protected String buildQueryString()

isValid

protected boolean isValid(String index,
                          String type,
                          String id)

isValid

protected boolean isValid(Doc doc)

isBulkOperation

public boolean isBulkOperation()

setBulkOperation

public void setBulkOperation(boolean bulkOperation)

setPathToResult

public void setPathToResult(String pathToResult)


Copyright © 2012. All Rights Reserved.