class CreateAccountCmd extends BaseCmd {

    @Override
    public void execute() {
        validateParams();
        CallContext.current().setEventDetails("Account Name: " + getAccountName() + ", Domain Id:" + getDomainId());
        UserAccount userAccount =
            _accountService.createUserAccount(getUsername(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimeZone(), getAccountName(), getAccountType(),
                getDomainId(), getNetworkDomain(), getDetails(), getAccountUUID(), getUserUUID());
        if (userAccount != null) {
            AccountResponse response = _responseGenerator.createUserAccountResponse(ResponseView.Full, userAccount);
            response.setResponseName(getCommandName());
            setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create a user account");
        }
    }

}