Package com.solibri.smc.api.info
Interface Information<T>
- Type Parameters:
T
- the type of the return value
- All Known Subinterfaces:
ParametricInformation<T>
public interface Information<T>
Implement this interface to have your own custom information calculated for a component. This can be used as ITO
column, as Classification rules column, and as a field in Info view .
- Since:
- 9.10.6
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
getCustomInformation
(Component component) getInformation
(Component component) Calculates the information for given component.default String
getInformationAsString
(Component component) Show the information as aString
.default String
getName()
The internationalized name of the information.default PropertyType
getType()
Returns the output type of this piece of information.The unique ID of the information.
-
Method Details
-
getUniqueId
String getUniqueId()The unique ID of the information.- Returns:
- the ID of the information
- Since:
- 9.10.6
-
getName
The internationalized name of the information. The default implementation returns value based on properties files value with key "NAME". Returns the ID of the information if no property is found.- Returns:
- the name of the view
- Since:
- 9.10.6
-
getInformation
Calculates the information for given component. The implementation is allowed to cache values, but it also needs to be thread-safe.- Parameters:
component
- the component- Returns:
- the information
- Since:
- 9.10.6
-
getInformationAsString
Show the information as aString
. The default implementation just calls String.valueOf with the return value ofgetInformation(com.solibri.smc.api.model.Component)
as the parameter. You can implement translations in this method if needed.- Parameters:
component
- the component- Returns:
- the information as a string
- Since:
- 9.10.6
-
getCustomInformation
-
getType
Returns the output type of this piece of information. The default implementation returnsPropertyType.STRING
and the developer needs to override this method if they for example want to return numeric values. For example for area calculations this would returnPropertyType.AREA
.- Returns:
- the type
- Since:
- 9.10.6
-