public class StartSearchCommand extends Command<StartSearchResponse>
| Modifier and Type | Class and Description |
|---|---|
static class |
StartSearchCommand.SearchEngine
The set of supported search engines, which may or may not be available on any given server
|
Command.CommonParameters, Command.ResponseCONTENT_TYPE_JSON| Constructor and Description |
|---|
StartSearchCommand(StartSearchCommand.SearchEngine searchEngine,
java.lang.String protocol,
java.lang.String path,
java.util.List<java.lang.String> files) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.commons.httpclient.HttpMethod |
createMethod()
Creates the appropriate HttpMethod instance.
|
protected StartSearchResponse |
createResponse(java.lang.String text,
int status,
java.lang.String contentType,
org.json.simple.JSONObject json)
Creates an instance of the response class, initialized with
the response text, the HTTP status code, and parsed JSONObject.
|
java.util.List<java.lang.String> |
getFiles() |
java.util.Map<java.lang.String,java.lang.Object> |
getParameters()
Returns the current parameter map, or null if a map has not yet been set.
|
java.lang.String |
getPath() |
java.lang.String |
getProtocol() |
void |
setFiles(java.util.List<java.lang.String> files) |
void |
setPath(java.lang.String path) |
void |
setProtocol(java.lang.String protocol) |
_execute, copy, execute, getActionName, getActionUrl, getControllerName, getHttpMethod, getParamValueAsString, getQueryString, getRequiredVersion, getTimeout, setParameters, setRequiredVersion, setTimeoutpublic StartSearchCommand(StartSearchCommand.SearchEngine searchEngine, java.lang.String protocol, java.lang.String path, java.util.List<java.lang.String> files)
searchEngine - the search engine to be used for the analysisprotocol - the name of the search protocol that has already been defined on the server that should be usedpath - the path relative to the pipeline root for the target container, in which the files will be presentfiles - the list of file names in the path specified that should be part of the searchpublic java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
protocol - the name of the search protocol that has already been defined on the server that should be usedpublic java.lang.String getPath()
public void setPath(java.lang.String path)
path - the path relative to the pipeline root for the target container, in which the files will be presentpublic java.util.List<java.lang.String> getFiles()
public void setFiles(java.util.List<java.lang.String> files)
files - the list of file names in the path specified that should be part of the searchprotected org.apache.commons.httpclient.HttpMethod createMethod()
CommandGetMethod.createMethod in class Command<StartSearchResponse>public java.util.Map<java.lang.String,java.lang.Object> getParameters()
CommandgetParameters in class Command<StartSearchResponse>protected StartSearchResponse createResponse(java.lang.String text, int status, java.lang.String contentType, org.json.simple.JSONObject json)
CommandOverride this method to create an instance of a different class that extends CommandResponse
createResponse in class Command<StartSearchResponse>text - The response text from the server.status - The HTTP status code.contentType - The Content-Type header value.json - The parsed JSONObject (or null if no JSON was returned).