Enum Class EnumEvalResult

java.lang.Object
java.lang.Enum<EnumEvalResult>
org.opends.server.authorization.dseecompat.EnumEvalResult
All Implemented Interfaces:
Serializable, Comparable<EnumEvalResult>, java.lang.constant.Constable

public enum EnumEvalResult extends Enum<EnumEvalResult>
This class provides an enumeration of evaluation results returned by the bind rule evaluation methods.
  • Enum Constant Details

    • TRUE

      public static final EnumEvalResult TRUE
      This enumeration is returned when the result of the evaluation is TRUE.
    • FALSE

      public static final EnumEvalResult FALSE
      This enumeration is returned when the result of the evaluation is FALSE.
    • FAIL

      public static final EnumEvalResult FAIL
      This enumeration is returned when the result of the evaluation is FAIL. This should only be returned when a system failure occurred.
    • ERR

      public static final EnumEvalResult ERR
      This is an internal enumeration used during evaluation of bind rule when internal processing of the evaluation is undefined. It is never returned back as a result of the evaluation.
  • Method Details

    • values

      public static EnumEvalResult[] 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 EnumEvalResult 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
    • getRet

      The method tries to determine if the result was undefined, and if so it returns an FAIL enumeration. If the result was not undefined (the common case for all of the bind rule evaluations), then the bind rule type is examined to see if the result needs to be flipped (type equals NOT_EQUAL_BINDRULE_TYPE).
      Parameters:
      type - The bind rule type enumeration of the bind rule.
      Returns:
      An enumeration containing the correct result after processing the undefined field and the bind rule type enumeration.
    • negateIfNeeded

      public EnumEvalResult negateIfNeeded(boolean negate)
      This method is used to possibly negate the result of a simple bind rule evaluation. If the boolean is true than the result is negated.
      Parameters:
      negate - If true the result should be negated (true->false, false->true).
      Returns:
      A possibly negated enumeration result.
    • valueOf

      public static EnumEvalResult valueOf(boolean b)
      Returns the EnumEvalResult corresponding to the provided boolean.
      Parameters:
      b - the bolean to evaluate
      Returns:
      the EnumEvalResult corresponding to the provided boolean