Interface RuleParameters


  • public interface RuleParameters
    Allow to handle the creation of checking parameters for a Rule.
    Since:
    9.10.2
    • Method Detail

      • of

        static RuleParameters of​(Rule rule)
        Return the parameter creation handler for a specific rule.
        Parameters:
        rule - the rule
        Returns:
        the parameter creation handler
        Since:
        9.10.2
      • freeze

        void freeze()
        Make the rule parameters immutable, so no new parameters can be added after a call to this method. The RuleParameters will always be automatically frozen after the creation of the rule class is complete, so new parameters can be added during rule creation but not during checking. A IllegalStateException will be thrown if an attempt is made to create a parameter on a frozen RuleParameters object.
        Since:
        9.10.2
      • asList

        List<RuleParameter<?>> asList()
        Get the parameters of the rule as a List of RuleParameter object.
        Returns:
        the parameters
        Since:
        9.10.2
      • createBoolean

        BooleanParameter createBoolean​(String id)
        Create a boolean parameter and return its reference.
        Parameters:
        id - a unique id for the parameter
        Returns:
        a reference to the newly created parameter
        Since:
        9.10.2
      • createClassification

        ClassificationParameter createClassification​(String id)
        Create a classification parameter and return its reference.
        Parameters:
        id - a unique id for the parameter
        Returns:
        a reference to the newly created parameter
        Since:
        9.10.2
      • createDouble

        DoubleParameter createDouble​(String id,
                                     PropertyType propertyType)
        Create a double parameter and return its reference.
        Parameters:
        id - a unique id for the parameter
        propertyType - the type of the quantity this double represents
        Returns:
        a reference to the newly created parameter
        Since:
        9.10.2
      • createEnumeration

        EnumerationParameter createEnumeration​(String id,
                                               List<String> options)
        Create an enumeration parameter and return its reference.
        Parameters:
        id - a unique id for the parameter
        options - the options for the enumeration
        Returns:
        a reference to the newly created parameter
        Since:
        9.10.2
      • createFilter

        FilterParameter createFilter​(String id)
        Create a filter parameter and return its reference.
        Parameters:
        id - a unique id for the parameter
        Returns:
        a reference to the newly created parameter
        Since:
        9.10.2
      • createInt

        IntParameter createInt​(String id)
        Create an int parameter and return its reference.
        Parameters:
        id - a unique id for the parameter
        Returns:
        a reference to the newly created parameter
        Since:
        9.10.2
      • createPropertyReference

        PropertyReferenceParameter createPropertyReference​(String id)
        Create a property reference parameter and return its reference.
        Parameters:
        id - a unique id for the parameter
        Returns:
        a reference to the newly created parameter
        Since:
        9.10.2
      • createString

        StringParameter createString​(String id)
        Create a string parameter and return its reference.
        Parameters:
        id - a unique id for the parameter
        Returns:
        a reference to the newly created parameter
        Since:
        9.10.2
      • createTable

        TableParameter createTable​(String id,
                                   List<String> columnIDs,
                                   List<PropertyType> columnPropertyTypes)
        Create a table parameter and return its reference.
        Parameters:
        id - a unique id for the parameter
        columnIDs - the IDs of the columns
        columnPropertyTypes - the types of the quantities stored in the columns
        Returns:
        a reference to the newly created parameter
        Since:
        9.10.2