def create_domain(self, domain_name, username=None, alphabet=Domain.DEFAULT_ALPHABET,<EOL>length=Domain.DEFAULT_KEY_LENGTH):
<EOL>try:<EOL><INDENT>return self._create_domain(domain_name, username, alphabet, length)<EOL><DEDENT>except Exception as ex:<EOL><INDENT>_logger.warn("<STR_LIT>", ex)<EOL>raise DuplicateDomainException<EOL><DEDENT>
Create a new domain entry in the database.

        :param username: The username to associate with this domain.
        :param alphabet: A character set restriction to impose on keys generated for this domain.
        :param length: The length of the generated key, in case of restrictions on the site.