Class AvailableEntityService

java.lang.Object
io.jmix.aitools.dataload.introspection.AvailableEntityService

@Component("aitls_AvailableEntityService") public class AvailableEntityService extends Object
Provides the subset of introspected domain-model entities that is currently available to the user.

Availability is resolved through an AvailableEntityFilter. By default, the filter checks read access for entities using Jmix security constraints. Applications may replace that behavior by registering a custom AvailableEntityFilter bean.

This service is intended for LLM-facing metadata discovery. It hides entities that are not available to the current user before they are exposed through tool calls.

  • Field Details

  • Constructor Details

    • AvailableEntityService

      public AvailableEntityService()
  • Method Details

    • getEntitySummaries

      public List<EntitySummary> getEntitySummaries()
      Returns compact summaries for all entities available to the current user.

      The result is filtered through the active AvailableEntityFilter and sorted by entity name.

      Returns:
      immutable list of available entity summaries, or an empty list if no entities are available
    • findEntityDescriptorsByNames

      public List<EntityDescriptor> findEntityDescriptorsByNames(@Nullable Collection<String> entityNames)
      Returns detailed descriptors for the requested entity names that are both known to the introspector and available to the current user.

      Unknown entity names are ignored. If all requested entities are unknown or filtered out by the active AvailableEntityFilter, the method returns an empty list.

      Parameters:
      entityNames - entity names to resolve
      Returns:
      immutable list of available entity descriptors for the requested names
    • getAvailableEntityDescriptors

      protected List<EntityDescriptor> getAvailableEntityDescriptors()
    • toEntitySummary

      protected EntitySummary toEntitySummary(EntityDescriptor entityDescriptor)