Package com.solibri.smc.api.checking
Interface Rule
- All Superinterfaces:
CheckingNode
- All Known Implementing Classes:
ConcurrentRule
,OneByOneRule
The interface for rules.
- Since:
- 9.10.2
-
Method Summary
Modifier and TypeMethodDescriptionvoid
check
(CheckingSelection components, ResultFactory resultFactory) Called to implement the check phase.default List<CheckingNode>
Returns the children of this node.default String
getName()
Returns the name of this checking node.default UIContainer
Returns the container that defines the UI for the parameters view of this rule.Returns a map of template keys to parameter IDs.default Optional<CheckingNode>
Returns the parent of this node, if one exists.default UIContainer
Returns the container that defines the UI for the report view of this rule.default boolean
Returns whether this rule has a report view.default void
This is called once after the checking of components.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
-
getReportUIDefinition
Returns the container that defines the UI for the report view of this rule.- Returns:
- the container that defines the report view of this rule
- Since:
- 24.5.0
-
hasReportView
default boolean hasReportView()Returns whether this rule has a report view.- Returns:
- true if this rule has a report view, false otherwise
- Since:
- 24.5.0
-
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
-
getParameterTemplateKeyToIdMap
Returns a map of template keys to parameter IDs.- Returns:
- a map of template keys to parameter IDs
- Since:
- 24.5.0
-