Enum LoginResult

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<LoginResult>

    public enum LoginResult
    extends java.lang.Enum<LoginResult>
    Enum for user login result.
    Author:
    Christopher Mindus
    • Enum Constant Detail

      • SUCCESS

        public static final LoginResult SUCCESS
        Validation succeeded.
      • SUCCESS_CHANGE_PASSWORD

        public static final LoginResult SUCCESS_CHANGE_PASSWORD
        Validation succeeded, but user has to change password.
      • SUCCESS_MUST_REGISTER

        public static final LoginResult SUCCESS_MUST_REGISTER
        Validation succeeded, but user must register with the License System. This result is ONLY used with the License System.
      • INVALID_PASSWORD

        public static final LoginResult INVALID_PASSWORD
        Invalid password.
      • TOO_MANY_INVALID_LOGINS_RETRY_LATER

        public static final LoginResult TOO_MANY_INVALID_LOGINS_RETRY_LATER
        User has too many invalid logins: retry later.
      • TOO_MANY_INVALID_LOGINS_RETRY_LATER_NEXT_TIME_DISABLE

        public static final LoginResult TOO_MANY_INVALID_LOGINS_RETRY_LATER_NEXT_TIME_DISABLE
        User has too many invalid logins: retry later. A failure next time will disable the user.
      • INVALID_PASSWORD_NEXT_ATTEMPT_WILL_DISABLE

        public static final LoginResult INVALID_PASSWORD_NEXT_ATTEMPT_WILL_DISABLE
        User has too many invalid logins: retry later, but next time, the user will be disabled upon a failure.
      • DISABLED

        public static final LoginResult DISABLED
        User is disabled.
      • INVALID_USER

        public static final LoginResult INVALID_USER
        Invalid user.
      • SYSTEM_FAILURE

        public static final LoginResult SYSTEM_FAILURE
        System failure.
    • Field Detail

      • englishMessage

        public final java.lang.String englishMessage
        The English text message.
      • textID

        public final java.lang.String textID
        The text ID for the message, starts with "userauth.".
    • Method Detail

      • values

        public static LoginResult[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LoginResult c : LoginResult.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LoginResult valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isSuccessful

        public boolean isSuccessful()
        Returns if the login is successful, even if e.g. password must be changed.
        Returns:
        true for SUCCESS and SUCCESS_CHANGE_PASSWORD, false otherwise.
      • mustChangePassword

        public boolean mustChangePassword()
        Returns if the user must change password.
        Returns:
        true if user must change password to continue, i.e. SUCCESS_CHANGE_PASSWORD, false otherwise.