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 Details

    • getUniqueId

      String getUniqueId()
      The unique ID of the information.
      Returns:
      the ID of the information
      Since:
      9.10.6
    • getName

      default String 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

      Optional<T> getInformation(Component component)
      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

      default String getInformationAsString(Component component)
      Show the information as a String. The default implementation just calls String.valueOf with the return value of getInformation(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
    • getType

      default PropertyType getType()
      Returns the output type of this piece of information. The default implementation returns PropertyType.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 return PropertyType.AREA.
      Returns:
      the type
      Since:
      9.10.6