Package com.solibri.smc.api.checking
Class OneByOneRule
java.lang.Object
com.solibri.smc.api.checking.OneByOneRule
- All Implemented Interfaces:
- CheckingNode,- Rule
Extend this abstract class to implement a rule in which components passing a main filter are checked one by one.
- Since:
- 9.10.2
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidcheck(CheckingSelection components, ResultFactory resultFactory) Called to implement the check phase.abstract Collection<Result>check(Component component, ResultFactory resultFactory) Called once for each component to be checked.final ComponentFilterReturns the default filter for this rule.final FilterParameterReturns the default filter parameter for this rule.preCheck()This is called once before the checking of components.final PreCheckResultpreCheck(ComponentSelector components) This method is called once before the actual checking of the components.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.solibri.smc.api.checking.RulegetChildren, getName, getParametersUIDefinition, getParent, postCheck
- 
Constructor Details- 
OneByOneRulepublic OneByOneRule()
 
- 
- 
Method Details- 
getDefaultFilterParameterReturns the default filter parameter for this rule.- Returns:
- the default filter parameter for this rule
- Since:
- 9.10.2
 
- 
getDefaultFilterReturns the default filter for this rule.- Returns:
- the default filter for this rule
- Since:
- 9.10.2
 
- 
preCheckThis is called once before the checking of components. Use cases: - pre-calculation for checking - pre-condition check A pre-check result must be able to answer two questions: 1) Is proceeding beyond pre-check to check and post-check relevant with the state of the rule and the model? 2) What comment does it have on its result if the result is irrelevant i.e. checking should not proceed beyond pre-check? (e.g. a comment explaining that checking further is irrelevant because rule parameters are malformed or model does not contain any relevant component) If the default filter does not produce any component to check, the result will always be irrelevant because of absence of components, even if a relevant result would otherwise be produced.- Returns:
- a pre-check result
- Since:
- 9.10.2
 
- 
preCheckDescription copied from interface:RuleThis 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.- Specified by:
- preCheckin interface- Rule
- Parameters:
- components- the- CheckingSelectionto mark components as checked
- Returns:
- a pre-check result
 
- 
checkDescription copied from interface:RuleCalled 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.- Specified by:
- checkin interface- Rule
- Parameters:
- components- the- CheckingSelectionto mark components as checked
- resultFactory- the result factory used to create results for this rule
 
- 
checkCalled once for each component to be checked.- Parameters:
- component- the component to check
- resultFactory- the result factory used to create results for this rule
- Returns:
- a collection of the results for the component currently checked
- Since:
- 9.10.2
 
 
-