Class ItemCategory

  • Direct Known Subclasses:
    SuggestionCategory

    public class ItemCategory
    extends Object
    Represents type of health status problems.
    Since:
    8.0 author: Evgeniy.Koshkin
    • Field Detail

      • DEFAULT_COMPARATOR

        public static final Comparator<HealthStatusItem> DEFAULT_COMPARATOR
        Comparator that is used for the category if no explicit one was specified. Compares items by severity.
    • Constructor Detail

      • ItemCategory

        public ItemCategory​(@NotNull
                            String categoryId,
                            @NotNull
                            String categoryName,
                            @NotNull
                            ItemSeverity severity)
        Creates new inspection results category.
        Parameters:
        categoryId - Id for this category. Expected to be unique between categories owned by particular report.
        categoryName - brief name of the type of the problem
        severity - severity of the items of this category
      • ItemCategory

        public ItemCategory​(@NotNull
                            String categoryId,
                            @NotNull
                            String categoryName,
                            @NotNull
                            ItemSeverity severity,
                            @Nullable
                            String description,
                            @Nullable
                            String helpUrl)
        Creates new inspection results category.
        Parameters:
        categoryId - Id for this category. Expected to be unique between categories owned by particular report.
        categoryName - brief Name of the type of the problem
        severity - severity of the items of this category
        description - detailed description of of the type of the problem
        helpUrl - link to on-line help for this problem
      • ItemCategory

        public ItemCategory​(@NotNull
                            String categoryId,
                            @NotNull
                            String categoryName,
                            @NotNull
                            ItemSeverity severity,
                            @Nullable
                            String description,
                            @Nullable
                            String helpUrl,
                            @NotNull
                            Comparator<HealthStatusItem> itemsComparator)
        Creates new inspection results category
        Parameters:
        categoryId - Id for this category. Expected to be unique between categories owned by particular report.
        categoryName - brief Name of the type of the problem
        severity - severity of the items of this category
        description - detailed description of of the type of the problem
        helpUrl - link to on-line help for this problem
        itemsComparator - comparator providing order of items in the category. More important items are expected to be first.
        Since:
        10.0
    • Method Detail

      • getId

        @NotNull
        public String getId()
      • getName

        @NotNull
        public String getName()
        Brief name of the type of the problem.
      • getSeverity

        @NotNull
        public ItemSeverity getSeverity()
        Default severity for problems of this type.
      • getDescription

        @Nullable
        public String getDescription()
        Detailed description of of the type of the problem.
      • getHelpUrl

        @Nullable
        public String getHelpUrl()
        Link to on-line help for this problem
      • getItemsComparator

        @NotNull
        public Comparator<HealthStatusItem> getItemsComparator()
        Order the items in the category.
        Since:
        10.0
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object