Interface ItemResolver


@PublicApi public interface ItemResolver
  • Method Details

    • resolveItem

      @Nullable <T> T resolveItem(@Nullable ItemIdentity itemId, @NotNull Class<T> itemClass)
    • resolveUnchecked

      @Internal @Nullable Object resolveUnchecked(@Nullable ItemIdentity itemId)
    • resolveItems

      <T> void resolveItems(@NotNull Collection<ItemIdentity> itemIds, @NotNull Class<T> itemClass, @NotNull BiConsumer<ItemIdentity,T> consumer)
      Resolves all the items from the given id collection and passes them to consumer. Item retrieving is done with a permission check. Bulk resolve is used when available. If an item is unresolved for any reason, including that the item is unavailable for the current user, null is passed to the consumer. Thus, all the items are passed to the consumer together with the corresponding item id.
      Type Parameters:
      T - type of expected item class
      Parameters:
      itemIds - id collection of items to retrieve
      itemClass - expected item class
      consumer - handler for (item id, item) pairs
    • resolveItemsUnchecked

      void resolveItemsUnchecked(@NotNull Collection<ItemIdentity> itemIds, @NotNull BiConsumer<ItemIdentity,Object> consumer)
      Resolves all the items from the given id collection and passes them to consumer. No permission check is performed here. Bulk resolve is used when available. If an item is unresolved for any reason, null is passed to the consumer. Thus, all the items are passed to the consumer together with the corresponding item id.
      Parameters:
      itemIds - id collection of items to retrieve
      consumer - handler for (item id, item) pairs