Package com.solibri.smc.api.checking
Interface Result
public interface Result
This interface defines a result. This can be created and retrieved through the
ResultFactory
interface.- Since:
- 9.10.2
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.This method is deprecated as only one category may belong to a result.Returns the category this result belongs to.Get decisions related to components in checking results.Get slides related to components in checking results.Returns the decision of the result: ACCEPTED, REJECTED or UNDEFINED.Returns the description of the result.Collection<? extends Component>
Returns the components associated with the result.Returns the descriptive location of the result.getName()
Returns the name of the result.getRule()
Returns theRule
this result was generated from.Returns the severity of the result.getSlide()
Returns theSlide
based on this checking results, if on has been created.Returns the unique key of the result.Returns the visualization creators for this result.boolean
Returns true if this result's unique key has been overridden.boolean
Returns true if this result's visualization is based on the default visualization.void
setDecision(Decision decision)
Sets theDecision
for this result.Sets the relatedSlide
for this result and returns the possible previous related slide.withCategories(Collection<? extends ResultCategory> categories)
Deprecated.This method is deprecated as only one category can be assigned to a result.withCategory(ResultCategory category)
Returns a copy of this result but assigned to the specified category.withCustomUniqueKey(String uniqueKey)
Returns a copy of this result with the unique key identifying it replaced by a custom one.withInvolvedComponent(Component component)
Returns a copy of this result with the specified involved component added.withInvolvedComponents(Collection<? extends Component> component)
Returns a copy of this result with the specified involved component added.withLocation(String location)
Returns a copy of this result with a descriptive location information.withReplacedVisualization(Consumer<Visualization> visualizationCreator)
Returns a copy of this result with the specified visualization creator replacing the default one and any other previously set.withSeverity(Severity severity)
Returns a copy of this result with the specified severity.withVisualization(Consumer<Visualization> visualizationCreator)
Returns a copy of this result with the specified visualization creator added.
-
Method Details
-
withLocation
Returns a copy of this result with a descriptive location information.- Parameters:
location
- the descriptive location information- Returns:
- a copy of this result with a descriptive location information
- Since:
- 9.10.2
-
withSeverity
Returns a copy of this result with the specified severity.- Parameters:
severity
- the specified severity- Returns:
- a copy of this result with the specified severity
- Since:
- 9.10.2
-
withInvolvedComponent
Returns a copy of this result with the specified involved component added. Involved components are not the checked components that generated the result, but other components that relate to the problem, even if not included in the components selected for checking. Components added as involved components are not considered checked (for example they will not appear in the Checked Component view).- Parameters:
component
- the specified involved component- Returns:
- a copy of this result with the specified severity
- Since:
- 9.10.2
-
withInvolvedComponents
Returns a copy of this result with the specified involved component added. Involved components are not the checked components that generated the result, but other components that relate to the problem, even if not included in the components selected for checking. Components added as involved components are not considered checked (for example they will not appear in the Checked Component view).- Parameters:
component
- the specified involved component- Returns:
- a copy of this result with the specified severity
- Since:
- 9.10.2
-
withVisualization
Returns a copy of this result with the specified visualization creator added. A visualization creator is a function that receives a default mutable visualization and modifies it to add the desired items to it.- Parameters:
visualizationCreator
- the specified visualization creator- Returns:
- a copy of this result with the specified visualization creator
- Since:
- 9.10.2
-
withReplacedVisualization
Returns a copy of this result with the specified visualization creator replacing the default one and any other previously set. A visualization creator is a function that receives a default mutable visualization and modifies it to add the desired items to it.- Parameters:
visualizationCreator
- the specified visualization creator- Returns:
- a copy of this result with the specified visualization creator replacing the default one
- Since:
- 9.10.2
-
withCustomUniqueKey
Returns a copy of this result with the unique key identifying it replaced by a custom one. The unique key is computed by default using name, description, categories and other information of a result. This method is used to override the default a unique key, for example in case the name and description of the result might change because of localization. If a result with the same unique key as another is added, the new result will replace the older one, while the involved components will be joined.- Parameters:
uniqueKey
- the custom unique key- Returns:
- a copy of this result with the custom unique key
- Since:
- 9.10.2
-
withCategory
Returns a copy of this result but assigned to the specified category.- Parameters:
category
- the specified category- Returns:
- a copy of this result but assigned to the specified category
- Since:
- 9.10.2
-
withCategories
Deprecated.This method is deprecated as only one category can be assigned to a result.Use
withCategory(ResultCategory)
instead.Returns a copy of this result but assigned to the specified categories.- Parameters:
categories
- the specified categories- Returns:
- a copy of this result but assigned to the specified categories
- Since:
- 9.10.2
-
hasDefaultVisualization
boolean hasDefaultVisualization()Returns true if this result's visualization is based on the default visualization. This will return false ifwithReplacedVisualization(Consumer)
has been called, replacing the default visualization with an empty one as a base for this result's visualization.- Returns:
- true if this result's visualization is based on the default visualization
- Since:
- 9.10.2
-
hasCustomUniqueKey
boolean hasCustomUniqueKey()Returns true if this result's unique key has been overridden.- Returns:
- true if this result's unique key has been overridden
- Since:
- 9.10.2
-
getName
String getName()Returns the name of the result.- Returns:
- the name of the result
- Since:
- 9.10.2
-
getDescription
String getDescription()Returns the description of the result.- Returns:
- the description of the result
- Since:
- 9.10.2
-
getUniqueKey
String getUniqueKey()Returns the unique key of the result.- Returns:
- the unique key of the result
- Since:
- 9.10.2
-
getLocation
Returns the descriptive location of the result.- Returns:
- the descriptive location of the result
- Since:
- 9.10.2
-
getVisualizationCreators
List<Consumer<Visualization>> getVisualizationCreators()Returns the visualization creators for this result. A visualization creator is a function that receives a default mutable visualization and modifies it to add the desired items to it.- Returns:
- a collection of
ResultCategory
- Since:
- 9.10.2
-
getInvolvedComponents
Collection<? extends Component> getInvolvedComponents()Returns the components associated with the result.- Returns:
- the components associated with the result
- Since:
- 9.10.2
-
getSeverity
Severity getSeverity()Returns the severity of the result.- Returns:
- the severity of the result
- Since:
- 9.10.2
-
getDecision
Decision getDecision()Returns the decision of the result: ACCEPTED, REJECTED or UNDEFINED.- Returns:
- the decision of the result
- Since:
- 9.12.3
-
setDecision
Sets theDecision
for this result.- Parameters:
decision
- the new decision- Since:
- 9.12.3
-
getCategory
Optional<ResultCategory> getCategory()Returns the category this result belongs to.- Returns:
- the category this result belongs to
- Since:
- 9.12.1
-
getCategories
Deprecated.This method is deprecated as only one category may belong to a result.Use
getCategory()
instead.Returns the categories this result belongs to.- Returns:
- the categories this result belongs to
- Since:
- 9.10.2
-
getSlide
Returns theSlide
based on this checking results, if on has been created.- Returns:
- the related slide
- Since:
- 9.10.8
-
setSlide
Sets the relatedSlide
for this result and returns the possible previous related slide.- Parameters:
slide
- the new slide- Returns:
- the previous related slide
- Since:
- 9.12.0
-
getRule
Rule getRule()Returns theRule
this result was generated from. The rule will be returned always after checking has finished. This method should not be called before the result has been registered and checking finished.- Returns:
- the source rule
- Since:
- 9.12.0
-
getComponentSlides
Get slides related to components in checking results.- Returns:
- mapping between component and associated slide
- Since:
- 9.12.0
-
getComponentDecisions
Get decisions related to components in checking results.- Returns:
- mapping between components and associated decision for each
- Since:
- 9.12.3
-