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 Summary
Modifier and Type Method Description void
check(CheckingSelection components, ResultFactory resultFactory)
Called to implement the check phase.default List<CheckingNode>
getChildren()
Returns the children of this node.default String
getName()
Returns the name of this checking node.default UIContainer
getParametersUIDefinition()
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 void
postCheck()
This is called once after the checking of components.PreCheckResult
preCheck(ComponentSelector components)
This method is called once before the actual checking of the components.
-
Method Details
-
preCheck
This 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 theComponentSelector
parameter. Additionally, aPreCheckResult
must 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
- theCheckingSelection
to mark components as checked- Returns:
- a pre-check result
- Since:
- 9.10.2
-
check
Called to implement the check phase. All the components selected during the pre check phase must be reported as checked through theCheckingSelection
instance received as parameter, during the check phase.- Parameters:
components
- theCheckingSelection
to mark components as checkedresultFactory
- the result factory used to create results for this rule- Since:
- 9.10.2
-
postCheck
default 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
-
getParametersUIDefinition
Returns 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
-
getParent
Description copied from interface:CheckingNode
Returns 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:
getParent
in interfaceCheckingNode
- Returns:
- the parent node
-
getChildren
Description copied from interface:CheckingNode
Returns the children of this node.- Specified by:
getChildren
in interfaceCheckingNode
- Returns:
- the child nodes
-
getName
Description copied from interface:CheckingNode
Returns 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:
getName
in interfaceCheckingNode
- Returns:
- the name
-