Class EmailAddressForm
java.lang.Object
com.iizix.user.EmailAddressForm
The form of an e-mail address the server and the SignIn module accept (CC-ACCOUNT-EMAIL-PASSWORD): one "@" with something before it, a domain with a dot after it, no whitespace, at most
MAXIMUM_LENGTH characters - the check the SignIn module's sign-up has made since L-10a, in one place for every caller that takes an address (the sign-up, the change of address, ServerAdmin's Edit user). Only the form: the verification mail proves the address, and a list of top-level domains would refuse the reserved and the new ones.- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe most characters an address may have: the size of the columnIZS.USERS.email.static final StringThe domain of the e-mail address a server's database gives its administrator when the server is installed (createBaseTables.sql:default@iizi.server.administrator): "iizi.server.administrator".Method Summary
Modifier and TypeMethodDescriptionstatic booleanisRealEmail(String email) Checks if an address is a real one a mail can reach: well formed (isWellFormed(String)) and not in the seeded domain (isSeededEmail(String)).static booleanisSeededEmail(String email) Checks if an address is in the domain a server's database was created with (SEEDED_DOMAIN, or a subdomain of it), compared without regard to case: the placeholder of the administrator the server was installed with.static booleanisWellFormed(String email) Checks the form of an address.static StringMasks an address for a log line: the first character of the local part, three asterisks and the domain (c***@example.com); a string without "@" is masked whole.
Field Details
MAXIMUM_LENGTH
public static final int MAXIMUM_LENGTHThe most characters an address may have: the size of the columnIZS.USERS.email.- See Also:
SEEDED_DOMAIN
The domain of the e-mail address a server's database gives its administrator when the server is installed (createBaseTables.sql:default@iizi.server.administrator): "iizi.server.administrator". No mailbox is there: a mail to it is undeliverable (MDV-D-34).- See Also:
Method Details
isWellFormed
Checks the form of an address.- Parameters:
email- The address, as typed; null and blank are not addresses.- Returns:
- true when it has the form of an address and is at most
MAXIMUM_LENGTHcharacters long.
masked
Masks an address for a log line: the first character of the local part, three asterisks and the domain (c***@example.com); a string without "@" is masked whole. The log of a server never carries a full address of a user (CC-ACCOUNT-EMAIL-PASSWORD, AE-5).- Parameters:
email- The address, null for none.- Returns:
- The masked address, "-" for null or empty.
isSeededEmail
Checks if an address is in the domain a server's database was created with (SEEDED_DOMAIN, or a subdomain of it), compared without regard to case: the placeholder of the administrator the server was installed with.- Parameters:
email- The address, null for none.- Returns:
- true for an address in that domain, false otherwise and for none.
isRealEmail
Checks if an address is a real one a mail can reach: well formed (isWellFormed(String)) and not in the seeded domain (isSeededEmail(String)).- Parameters:
email- The address as typed, null for none.- Returns:
- true for a real address.