Package org.opencms.security
Class CmsDefaultValidationHandler
java.lang.Object
org.opencms.security.CmsDefaultValidationHandler
- All Implemented Interfaces:
I_CmsValidationHandler
Default implementation for the validation handler.
- Since:
- 6.3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckEmail(String email) The email should only be composed by digits and standard english letters, points, underscores and exact one "At" symbol.voidcheckFirstname(String firstname) Checks if the provided first name is valid.voidcheckGroupName(String name) Checks if the provided group name is a valid group name.voidcheckLastname(String lastname) Checks if the provided last name is valid.voidcheckUserName(String userName) A user name can only be composed of digits, standard ASCII letters and the symbols defined inUSERNAME_CONSTRAINTS.voidcheckZipCode(String zipcode) That means, the parameter should only be composed by digits and standard english letters.
-
Field Details
-
EMAIL_REGEX
The email regular expression.- See Also:
-
USERNAME_CONSTRAINTS
The user name constraints.- See Also:
-
ZIPCODE_REGEX
The zipcode regular expression.- See Also:
-
-
Constructor Details
-
CmsDefaultValidationHandler
public CmsDefaultValidationHandler()
-
-
Method Details
-
checkEmail
The email should only be composed by digits and standard english letters, points, underscores and exact one "At" symbol.- Specified by:
checkEmailin interfaceI_CmsValidationHandler- Parameters:
email- the email address to validate- Throws:
CmsIllegalArgumentException- if the given email address is not valid- See Also:
-
checkFirstname
Description copied from interface:I_CmsValidationHandlerChecks if the provided first name is valid.- Specified by:
checkFirstnamein interfaceI_CmsValidationHandler- Parameters:
firstname- the first name to validate- Throws:
CmsIllegalArgumentException- if the given email address is not valid- See Also:
-
checkGroupName
Description copied from interface:I_CmsValidationHandlerChecks if the provided group name is a valid group name.- Specified by:
checkGroupNamein interfaceI_CmsValidationHandler- Parameters:
name- the group name to check- Throws:
CmsIllegalArgumentException- if the given group name is not valid- See Also:
-
checkLastname
Description copied from interface:I_CmsValidationHandlerChecks if the provided last name is valid.- Specified by:
checkLastnamein interfaceI_CmsValidationHandler- Parameters:
lastname- the last name to validate- Throws:
CmsIllegalArgumentException- if the given email address is not valid- See Also:
-
checkUserName
A user name can only be composed of digits, standard ASCII letters and the symbols defined inUSERNAME_CONSTRAINTS.- Specified by:
checkUserNamein interfaceI_CmsValidationHandler- Parameters:
userName- the user name to check- Throws:
CmsIllegalArgumentException- if the given user name is not valid- See Also:
-
checkZipCode
That means, the parameter should only be composed by digits and standard english letters.- Specified by:
checkZipCodein interfaceI_CmsValidationHandler- Parameters:
zipcode- the zip code to validate- Throws:
CmsIllegalArgumentException- if the given zip code is not valid- See Also:
-