org.labkey.remoteapi.security
Class CreateUserCommand
java.lang.Object
org.labkey.remoteapi.Command<ResponseType>
org.labkey.remoteapi.PostCommand<CreateUserResponse>
org.labkey.remoteapi.security.CreateUserCommand
public class CreateUserCommand
- extends PostCommand<CreateUserResponse>
Create a new user account on the server.
|
Method Summary |
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 and the HTTP status code. |
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. |
| Methods inherited from class org.labkey.remoteapi.Command |
execute, getActionName, getActionUrl, getControllerName, getHttpMethod, getParameters, getParamValueAsString, getQueryString, getRequiredVersion, getTimeout, setParameters, setRequiredVersion, setTimeout |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreateUserCommand
public CreateUserCommand(java.lang.String email)
CreateUserCommand
public CreateUserCommand(CreateUserCommand source)
getEmail
public java.lang.String getEmail()
setEmail
public void setEmail(java.lang.String email)
- Set the email address for the new user.
- Parameters:
email - The user's email address
isSendEmail
public boolean isSendEmail()
setSendEmail
public void setSendEmail(boolean sendEmail)
- Set to true to send email to the user with login instructions, false to skip email.
- Parameters:
sendEmail - True to send email, false to skip.
createResponse
protected CreateUserResponse createResponse(java.lang.String text,
int status,
java.lang.String contentType,
org.json.simple.JSONObject json)
- Description copied from class:
Command
- Creates an instance of the response class, initialized with
the response text and the HTTP status code.
Override this method
to create an instance of a different class that extends CommandResponse
- Overrides:
createResponse in class Command<CreateUserResponse>
- Parameters:
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).
- Returns:
- An instance of the response object.
getJsonObject
public org.json.simple.JSONObject getJsonObject()
- Description copied from class:
PostCommand
- Returns the JSON object to post, or null if the JSON object
has not yet been set. Override this method to provide the
JSON object dynamically.
- Overrides:
getJsonObject in class PostCommand<CreateUserResponse>
- Returns:
- The JSON object to post.
copy
public PostCommand copy()
- Description copied from class:
Command
- Returns a copy of this object. Derived classes should override this
to copy their own data members
- Overrides:
copy in class PostCommand<CreateUserResponse>
- Returns:
- A copy of this object