Package com.solibri.smc.api.checking
Interface Rule
- All Superinterfaces:
- CheckingNode
- All Known Implementing Classes:
- ConcurrentRule,- OneByOneRule
public interface Rule extends CheckingNode
The interface for rules.
- Since:
- 9.10.2
- 
Method SummaryModifier and Type Method Description voidcheck(CheckingSelection components, ResultFactory resultFactory)Called to implement the check phase.default List<CheckingNode>getChildren()Returns the children of this node.default StringgetName()Returns the name of this checking node.default UIContainergetParametersUIDefinition()Returns the container that defines the UI for the parameters view of this rule.default Optional<CheckingNode>getParent()Returns the parent of this node, if one exists.default voidpostCheck()This is called once after the checking of components.PreCheckResultpreCheck(ComponentSelector components)This method is called once before the actual checking of the components.
- 
Method Details- 
preCheckThis method is called once before the actual checking of the components. The job of the pre check method is to select the components to be checked through theComponentSelectorparameter. Additionally, aPreCheckResultmust be returned, reporting if the checking of this rule should continue to the next phase (withPreCheckResult.createRelevant()) or skipped (withPreCheckResult.createIrrelevant()). In both cases, a message can be added to document the result.- Parameters:
- components- the- CheckingSelectionto mark components as checked
- Returns:
- a pre-check result
- Since:
- 9.10.2
 
- 
checkCalled to implement the check phase. All the components selected during the pre check phase must be reported as checked through theCheckingSelectioninstance received as parameter, during the check phase.- Parameters:
- components- the- CheckingSelectionto mark components as checked
- resultFactory- the result factory used to create results for this rule
- Since:
- 9.10.2
 
- 
postCheckdefault void postCheck()This is called once after the checking of components. Use cases: - post calculation for the checking - analysis of the results- Since:
- 9.10.2
 
- 
getParametersUIDefinitionReturns the container that defines the UI for the parameters view of this rule.- Returns:
- the container that defines the parameters view of this rule
- Since:
- 9.10.2
 
- 
getParentDescription copied from interface:CheckingNodeReturns the parent of this node, if one exists. Root nodes of a ruleset hierarchy do not have a parent, but all others do have a parent ruleset, or a parent rule.- Specified by:
- getParentin interface- CheckingNode
- Returns:
- the parent node
 
- 
getChildrenDescription copied from interface:CheckingNodeReturns the children of this node.- Specified by:
- getChildrenin interface- CheckingNode
- Returns:
- the child nodes
 
- 
getNameDescription copied from interface:CheckingNodeReturns the name of this checking node. Note that the name might be translated into different languages and should not be used as an identifier as multiple rulesets or rules with the same name might exist.- Specified by:
- getNamein interface- CheckingNode
- Returns:
- the name
 
 
-