Class RuleType

java.lang.Object
com.aquima.interactions.rule.RuleType
All Implemented Interfaces:
Serializable

public final class RuleType extends Object implements Serializable
This class holds the static definitions of the supported business rule types.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    This interface holds the numeric id's of the business rule types.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final RuleType
    The static definition of the constraint business rule type.
    static final RuleType
    The static definition of the value-source business rule type.
    static final RuleType
    The static definition of the validation business rule type.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    This method returns the numeric id of the business rule type.
    This method returns the unique name of the business rule type.
    static String
    This method return the detailed rule type name of a business rule.
    int
     
     
    static RuleType
    This method returns the rule type for the specified name.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • CONSTRAINT

      public static final RuleType CONSTRAINT
      The static definition of the constraint business rule type.
    • SOURCE

      public static final RuleType SOURCE
      The static definition of the value-source business rule type.
    • VALIDATION

      public static final RuleType VALIDATION
      The static definition of the validation business rule type.
  • Method Details

    • getTypeNameOf

      public static String getTypeNameOf(IBusinessRule rule)
      This method return the detailed rule type name of a business rule. The type name is mainly used by the error-code to provide a detailed specification of what type of rule the error or warning originated from.

      NOTE: The type name returned by this method is not identical to the name used in the RuleType class.

      Parameters:
      rule - The rule of which the type name should be determined.
      Returns:
      The type name of the rule.
    • valueOf

      public static RuleType valueOf(String name)
      This method returns the rule type for the specified name.
      Parameters:
      name - The name of the requested rule type, valid values are "Constraint", "ValueSource" or "Validation"
      Returns:
      The rule type for the specified name.
    • getId

      public int getId()
      This method returns the numeric id of the business rule type.
      Returns:
      the numeric id of the business rule type.
    • getName

      public String getName()
      This method returns the unique name of the business rule type.
      Returns:
      the unique name of the business rule type.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object