Enum Class NamingError

java.lang.Object
java.lang.Enum<NamingError>
org.moera.lib.naming.NamingError
All Implemented Interfaces:
Serializable, Comparable<NamingError>, Constable

public enum NamingError extends Enum<NamingError>
The NamingError enum represents a collection of error codes related to Moera Naming API operations. Each error includes a unique RPC code, an error code string, and a descriptive message to provide details about the nature of the error.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Represents an exception related to cryptographic configurations or operations.
    Represents an error where a specified service endpoint is incorrect or unreachable.
    Represents an error indicating that the generation provided in the operation does not match the current generation.
    Represents an error indicating that the specified generation of a name is reserved and cannot be used for registrations.
    Represents an error indicating that the provided name is empty.
    Represents a rule violation where a name contains forbidden characters.
    Represents an error where the provided name exceeds the allowed length.
    Represents an error indicating that the length of the provided node URI exceeds the allowed maximum limit.
    Represents an error where the specified page number in a paginated query is incorrect.
    Represents an error indicating that the provided page size is incorrect.
    Represents an error indicating that the requested page size exceeds the allowed limit.
    Indicates that the previous digest provided in the request does not match the current digest associated with the entity.
    Represents an error indicating that the provided previousDigest has an incorrect length.
    Represents an error indicating failed signature verification.
    Represents an error indicating that the provided signature exceeds the maximum allowable length.
    Represents an error indicating that the provided signing key has an incorrect length.
    Represents an error indicating that the updatingKey parameter is empty or null when it is required for a specific operation.
    Represents an error indicating that the provided updating key has an incorrect length.
    Represents a validation error indicating that the validFrom timestamp precedes the creation of a name in the naming service.
    Represents a validation error indicating that the validFrom field is empty.
    Represents an error indicating that the validFrom timestamp is considered too far in the past.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves a NamingError based on the provided error code.
    Retrieves the error code associated with the error.
    Retrieves the message associated with the error.
    int
    Retrieves the RPC code.
    Returns the enum constant of this class with the specified name.
    static NamingError[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NAME_EMPTY

      public static final NamingError NAME_EMPTY
      Represents an error indicating that the provided name is empty.
    • NAME_TOO_LONG

      public static final NamingError NAME_TOO_LONG
      Represents an error where the provided name exceeds the allowed length.
    • NAME_FORBIDDEN_CHARS

      public static final NamingError NAME_FORBIDDEN_CHARS
      Represents a rule violation where a name contains forbidden characters.
    • NODE_URI_TOO_LONG

      public static final NamingError NODE_URI_TOO_LONG
      Represents an error indicating that the length of the provided node URI exceeds the allowed maximum limit.
    • UPDATING_KEY_EMPTY

      public static final NamingError UPDATING_KEY_EMPTY
      Represents an error indicating that the updatingKey parameter is empty or null when it is required for a specific operation.
    • UPDATING_KEY_WRONG_LENGTH

      public static final NamingError UPDATING_KEY_WRONG_LENGTH
      Represents an error indicating that the provided updating key has an incorrect length.
    • SIGNING_KEY_WRONG_LENGTH

      public static final NamingError SIGNING_KEY_WRONG_LENGTH
      Represents an error indicating that the provided signing key has an incorrect length.
    • VALID_FROM_EMPTY

      public static final NamingError VALID_FROM_EMPTY
      Represents a validation error indicating that the validFrom field is empty.
    • VALID_FROM_BEFORE_CREATED

      public static final NamingError VALID_FROM_BEFORE_CREATED
      Represents a validation error indicating that the validFrom timestamp precedes the creation of a name in the naming service.
    • VALID_FROM_TOO_FAR_IN_PAST

      public static final NamingError VALID_FROM_TOO_FAR_IN_PAST
      Represents an error indicating that the validFrom timestamp is considered too far in the past. The maximum allowed distance in the past is defined in Rules.VALID_FROM_IN_PAST
    • SIGNATURE_TOO_LONG

      public static final NamingError SIGNATURE_TOO_LONG
      Represents an error indicating that the provided signature exceeds the maximum allowable length.
    • SIGNATURE_INVALID

      public static final NamingError SIGNATURE_INVALID
      Represents an error indicating failed signature verification.
    • CRYPTO_EXCEPTION

      public static final NamingError CRYPTO_EXCEPTION
      Represents an exception related to cryptographic configurations or operations.
    • PREVIOUS_DIGEST_WRONG_LENGTH

      public static final NamingError PREVIOUS_DIGEST_WRONG_LENGTH
      Represents an error indicating that the provided previousDigest has an incorrect length.
    • PREVIOUS_DIGEST_INCORRECT

      public static final NamingError PREVIOUS_DIGEST_INCORRECT
      Indicates that the previous digest provided in the request does not match the current digest associated with the entity. This status may be returned when a modification to the entity has occurred since the initial data was retrieved, potentially indicating a conflict or concurrent modification.
    • GENERATION_NOT_SAME

      public static final NamingError GENERATION_NOT_SAME
      Represents an error indicating that the generation provided in the operation does not match the current generation.
    • PAGE_INCORRECT

      public static final NamingError PAGE_INCORRECT
      Represents an error where the specified page number in a paginated query is incorrect.
    • PAGE_SIZE_INCORRECT

      public static final NamingError PAGE_SIZE_INCORRECT
      Represents an error indicating that the provided page size is incorrect.
    • PAGE_SIZE_TOO_LARGE

      public static final NamingError PAGE_SIZE_TOO_LARGE
      Represents an error indicating that the requested page size exceeds the allowed limit.
    • ENDPOINT_WRONG

      public static final NamingError ENDPOINT_WRONG
      Represents an error where a specified service endpoint is incorrect or unreachable.
    • GENERATION_RESERVED

      public static final NamingError GENERATION_RESERVED
      Represents an error indicating that the specified generation of a name is reserved and cannot be used for registrations.
  • Method Details

    • values

      public static NamingError[] 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

      public static NamingError valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getRpcCode

      public int getRpcCode()
      Retrieves the RPC code.
      Returns:
      the integer value representing the RPC code
    • getErrorCode

      public String getErrorCode()
      Retrieves the error code associated with the error.
      Returns:
      a string representing the error code
    • getMessage

      public String getMessage()
      Retrieves the message associated with the error.
      Returns:
      the message as a string
    • forCode

      public static NamingError forCode(String code)
      Retrieves a NamingError based on the provided error code.
      Parameters:
      code - the error code for which the corresponding NamingError is to be retrieved
      Returns:
      the NamingError that matches the provided error code, or null if no match is found or the input is null.