Package com.solibri.smc.api.checking
Interface RuleParameters
public interface RuleParameters
Allow to handle the creation of checking parameters for a Rule.
- Since:
- 9.10.2
-
Method Summary
Modifier and TypeMethodDescriptionList<RuleParameter<?>>
asList()
Get the parameters of the rule as a List of RuleParameter object.createBoolean
(String id) Create a boolean parameter and return its reference.Create a classification parameter and return its reference.createDouble
(String id, PropertyType propertyType) Create a double parameter and return its reference.createEnumeration
(String id, List<String> options) Create an enumeration parameter and return its reference.createFilter
(String id) Create a filter parameter and return its reference.Create an int parameter and return its reference.Create a property reference parameter and return its reference.createString
(String id) Create a string parameter and return its reference.createTable
(String id, List<String> columnIDs, List<PropertyType> columnPropertyTypes) Create a table parameter and return its reference.void
freeze()
Make the rule parameters immutable, so no new parameters can be added after a call to this method.static RuleParameters
Return the parameter creation handler for a specific rule.
-
Method Details
-
of
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. AIllegalStateException
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
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
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
Create a double parameter and return its reference.- Parameters:
id
- a unique id for the parameterpropertyType
- the type of the quantity this double represents- Returns:
- a reference to the newly created parameter
- Since:
- 9.10.2
-
createEnumeration
Create an enumeration parameter and return its reference.- Parameters:
id
- a unique id for the parameteroptions
- the options for the enumeration- Returns:
- a reference to the newly created parameter
- Since:
- 9.10.2
-
createFilter
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
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
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
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 parametercolumnIDs
- the IDs of the columnscolumnPropertyTypes
- the types of the quantities stored in the columns- Returns:
- a reference to the newly created parameter
- Since:
- 9.10.2
-