Class AvailableEntityService
java.lang.Object
io.jmix.aitools.dataload.introspection.AvailableEntityService
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 Summary
FieldsModifier and TypeFieldDescriptionprotected AvailableEntityFilterprotected JpaDomainModelIntrospector -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindEntityDescriptorsByNames(@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.protected List<EntityDescriptor> Returns compact summaries for all entities available to the current user.protected EntitySummarytoEntitySummary(EntityDescriptor entityDescriptor)
-
Field Details
-
modelIntrospector
-
availableEntityFilter
-
-
Constructor Details
-
AvailableEntityService
public AvailableEntityService()
-
-
Method Details
-
getEntitySummaries
Returns compact summaries for all entities available to the current user.The result is filtered through the active
AvailableEntityFilterand 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
-
toEntitySummary
-