public class ImportDataCommand extends PostCommand<ImportDataResponse>
Command.CommonParameters, Command.Response
Modifier and Type | Field and Description |
---|---|
boolean |
_importIdentity |
boolean |
_importLookupByAlternateKey |
CONTENT_TYPE_JSON
Constructor and Description |
---|
ImportDataCommand(ImportDataCommand source) |
ImportDataCommand(java.lang.String schemaName,
java.lang.String queryName)
Constructs an ImportDataCommand for the given schemaName and queryName.
|
Modifier and Type | Method and Description |
---|---|
ImportDataCommand |
copy()
Returns a copy of this object.
|
protected org.apache.http.client.methods.HttpUriRequest |
createRequest(java.net.URI uri)
Overrides
Command.createRequest(URI) to create an
HttpPost object. |
protected ImportDataResponse |
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.
|
org.json.simple.JSONObject |
getJsonObject()
Returns the JSON object to post, or null if the JSON object
has not yet been set.
|
java.lang.String |
getQueryName()
Returns the query name
|
java.lang.String |
getSchemaName()
Returns the schema name.
|
boolean |
isImportIdentity() |
boolean |
isImportLookupByAlternateKey() |
void |
setFile(java.io.File file) |
void |
setImportIdentity(boolean importIdentity) |
void |
setImportLookupByAlternateKey(boolean importLookupByAlternateKey) |
void |
setModuleResource(java.lang.String module,
java.lang.String moduleResource) |
void |
setPath(java.lang.String path) |
void |
setText(java.lang.String text) |
setJsonObject
_execute, checkThrowError, execute, getActionName, getActionUrl, getControllerName, getHttpRequest, getParameters, getParamValueAsString, getQueryString, getRequiredVersion, getTimeout, setParameters, setRequiredVersion, setTimeout
public boolean _importIdentity
public boolean _importLookupByAlternateKey
public ImportDataCommand(java.lang.String schemaName, java.lang.String queryName)
schemaName
- The schemaNamequeryName
- The queryName.public ImportDataCommand(ImportDataCommand source)
public java.lang.String getSchemaName()
public java.lang.String getQueryName()
public void setText(java.lang.String text)
public void setPath(java.lang.String path)
public void setModuleResource(java.lang.String module, java.lang.String moduleResource)
public void setFile(java.io.File file)
public boolean isImportIdentity()
public void setImportIdentity(boolean importIdentity)
public boolean isImportLookupByAlternateKey()
public void setImportLookupByAlternateKey(boolean importLookupByAlternateKey)
public org.json.simple.JSONObject getJsonObject()
PostCommand
getJsonObject
in class PostCommand<ImportDataResponse>
protected org.apache.http.client.methods.HttpUriRequest createRequest(java.net.URI uri)
PostCommand
Command.createRequest(URI)
to create an
HttpPost
object.
Override this method if your post command sends something other than JSON in the post body. In your override, create the PostMethod and set the RequestEntity appropriately.
createRequest
in class PostCommand<ImportDataResponse>
uri
- the uri to convertprotected ImportDataResponse createResponse(java.lang.String text, int status, java.lang.String contentType, org.json.simple.JSONObject json)
Command
Override this method to create an instance of a different class that extends CommandResponse
createResponse
in class Command<ImportDataResponse>
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).public ImportDataCommand copy()
Command
copy
in class PostCommand<ImportDataResponse>