Interface ResultFactory


public interface ResultFactory
Provides a way to create checking results and result categories.
Since:
9.10.2
  • Field Details

    • INSTANCE

      static final ResultFactory INSTANCE
      This instance can be used to create categories that are not related to just a single rule instance. This way the categories are not created in a rule context.
      Since:
      9.10.8
  • Method Details

    • createCategory

      ResultCategory createCategory​(String uniqueName, String displayName)
      Creates a new checking result category. If uniqueName is already used, returns the existing category.
      Parameters:
      uniqueName - the unique name identifying a category
      displayName - the display name of the category
      Returns:
      the newly created category
      Since:
      9.10.2
    • createCategory

      ResultCategory createCategory​(String uniqueName, String displayName, ResultCategory parent)
      Creates a new checking result category. If uniqueName is already used, returns the existing category.
      Parameters:
      uniqueName - the unique name identifying a category
      displayName - the display name of the category
      parent - the parent category, must be non-null
      Returns:
      the newly created category
      Since:
      9.10.8
    • create

      Result create​(String name, String description)
      Returns a result indicating that the component has a problem.
      Parameters:
      name - the name of the result
      description - the description of the result
      Returns:
      the result
      Since:
      9.10.2
    • create

      Result create​(String name, String description, ResultCategory category)
      Returns a result indicating that the component has a problem.
      Parameters:
      name - the name of the result
      description - the description of the result
      category - the category this result will belong to
      Returns:
      the result
      Since:
      9.10.2
    • create

      Result create​(String name, String description, Collection<ResultCategory> categories)
      Returns a result indicating that the component has a problem.
      Parameters:
      name - the name of the result
      description - the description of the result
      categories - the categories this result will belong to
      Returns:
      the result
      Since:
      9.10.2