public class CreateUserCommand extends PostCommand<CreateUserResponse>
Command.CommonParameters, Command.ResponseCONTENT_TYPE_JSON| Constructor and Description |
|---|
CreateUserCommand(CreateUserCommand source) |
CreateUserCommand(java.lang.String email) |
| Modifier and Type | Method and Description |
|---|---|
PostCommand |
copy()
Returns a copy of this object.
|
protected CreateUserResponse |
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.lang.String |
getEmail() |
org.json.simple.JSONObject |
getJsonObject()
Returns the JSON object to post, or null if the JSON object
has not yet been set.
|
boolean |
isSendEmail() |
void |
setEmail(java.lang.String email)
Set the email address for the new user.
|
void |
setSendEmail(boolean sendEmail)
Set to true to send email to the user with login instructions, false to skip email.
|
createRequest, setJsonObject_execute, execute, getActionName, getActionUrl, getControllerName, getHttpRequest, getParameters, getParamValueAsString, getQueryString, getRequiredVersion, getTimeout, setParameters, setRequiredVersion, setTimeoutpublic CreateUserCommand(java.lang.String email)
public CreateUserCommand(CreateUserCommand source)
public java.lang.String getEmail()
public void setEmail(java.lang.String email)
email - The user's email addresspublic boolean isSendEmail()
public void setSendEmail(boolean sendEmail)
sendEmail - True to send email, false to skip.protected CreateUserResponse 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<CreateUserResponse>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 org.json.simple.JSONObject getJsonObject()
PostCommandgetJsonObject in class PostCommand<CreateUserResponse>public PostCommand copy()
Commandcopy in class PostCommand<CreateUserResponse>