Package com.iizix.user
Enum Class UserLocaleString
- All Implemented Interfaces:
Serializable
,Comparable<UserLocaleString>
,Constable
Locale strings for operations dealing with a user. These locale strings are typically used to localize the text.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Enum Constant Summary
Enum ConstantDescriptionDatabase error.Email not found.User cannot change password.Hashed password mismatch.Password policy is not met.Sign in requires a change of password.Changed password must be specified to sign in but is empty or blank.Password must be specified but is empty or blank.System error.User name not found.Field Summary
Method Summary
Modifier and TypeMethodDescriptionGets the ID of this locale string with the appended string parameter.static UserLocaleString
Parses the ID string to find a matching ID.static UserLocaleString
fromNonNull
(String id) Parses the ID string to find a matching ID.static UserLocaleString
Returns the enum constant of this class with the specified name.static UserLocaleString[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
UserNameNotFound
User name not found. It is up to the application to decide if this information should be presented to the user or if it should just stay silent about the error.English: "User name not found".
EmailNotFound
Email not found. This error is generated because a user was not found when looking her/him up using an email address. It is up to the application to decide if this information should be presented to the user or if it should just stay silent about the error.English: "Email not found".
FixedPassword
User cannot change password. An administrator has configured the password to be fixed.English: "You cannot change your password, it is set to fixed password by administrator's action".
SpecifyPassword
Password must be specified but is empty or blank.English: "Password must be specified".
SpecifyNewPassword
Changed password must be specified to sign in but is empty or blank.English: "New password must be specified".
PasswordChangeRequired
Sign in requires a change of password.English "Password change is required to sign in".
PassordPolicyMismatch
Password policy is not met. This error generally contains an additional string parameter with more information. This parameter string is generally localized using the current thread's locale for a user session.English "Password does not meet minimum requirements".
HashedPasswordMismatch
Hashed password mismatch.English: "Your old password does not match".
DatabaseError
Database error. The server event log contains more information.English: "A database error occurred".
SystemError
System error. The server event log contains more information.English: "A system error occurred".
Field Details
PREFIX
The prefix for all text IDs: "ci.user_"."ci."
stands for the shortened package name"com.iizix."
.- See Also:
id
The text ID of the string, starting with thePREFIX
"ci.user_" and theEnum.name()
appended to it."ci."
stands for the shortened package name"com.iizix."
.english
The English default text.
Method Details
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
asID
Gets the ID of this locale string with the appended string parameter.- Parameters:
param
- The string parameter to append.- Returns:
- The UserLocaleString formatted as
id + ':' + param
.
from
Parses the ID string to find a matching ID. If none is found, aNotFoundException
is thrown.- Parameters:
id
- The ID to parse. An ID may contain an additional string appended to thisid
prefixed with ':', typically for error messages. When looking for the ID, the part of the ID from a potential colon ':' is removed.- Returns:
- A non-null
UserLocaleString
instance. - Throws:
NotFoundException
- If theid
is not found.NullPointerException
- Ifid
isnull
.
fromNonNull
Parses the ID string to find a matching ID. If none is found,SystemError
is returned but before returning it, the event is logged in the server with and exception to provide a stack trace.- Parameters:
id
- The ID to parse. An ID may contain an additional string appended to thisid
prefixed with ':', typically for error messages. When looking for the ID, the part of the ID from a potential colon ':' is removed.- Returns:
- A non-null
UserLocaleString
instance matching theid
, orSystemError
if not found. - Throws:
NullPointerException
- Ifid
isnull
.