Class ReportDetailView
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,com.vaadin.flow.router.AfterNavigationObserver,com.vaadin.flow.router.BeforeEnterObserver,com.vaadin.flow.router.BeforeLeaveObserver,com.vaadin.flow.router.HasDynamicTitle,com.vaadin.flow.router.internal.AfterNavigationHandler,com.vaadin.flow.router.internal.BeforeEnterHandler,com.vaadin.flow.router.internal.BeforeLeaveHandler,FacetOwner,FragmentOwner,ChangeTracker,DetailView<Report>,HasEditedEntity<Report>,ReadOnlyAwareView,ReadOnlyTracker,SupportEntityLock<Report>,Serializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classClass wraps ComboBox value change listener and manages its registration.protected static final recordNested classes/interfaces inherited from class io.jmix.flowui.view.StandardDetailView
StandardDetailView.AfterSaveEvent, StandardDetailView.BeforeSaveEvent, StandardDetailView.InitEntityEvent<E>, StandardDetailView.ValidationEventNested classes/interfaces inherited from class io.jmix.flowui.view.View
View.AfterCloseEvent, View.BeforeCloseEvent, View.BeforeShowEvent, View.InitEvent, View.PostReadyEvent, View.QueryParametersChangeEvent, View.ReadyEvent, View.RestoreComponentsStateEventNested classes/interfaces inherited from interface io.jmix.flowui.view.ReadOnlyTracker
ReadOnlyTracker.ReadOnlyChangeEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CollectionContainer<BandDefinition> protected TypedTextField<String> protected CollectionPropertyContainer<BandDefinition> protected TreeDataGrid<BandDefinition> protected com.vaadin.flow.component.html.NativeLabelprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected CorePropertiesprotected DataContextprotected CrossTabDataGridSupportprotected DataManagerprotected com.vaadin.flow.component.html.Divprotected DataSetFactoryprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected CodeEditorprotected JmixButtonprotected JmixButtonprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected CollectionPropertyContainer<DataSet> protected com.vaadin.flow.component.html.Divprotected List<DataSetType> The data set types the designer offers, computed once: they do not change while the view is open, and the inline selector of a multi-data-set band would otherwise rebuild them for every rendered row.protected JmixSelect<String> protected Dialogsprotected DialogWindowsprotected JmixComboBox<String> protected ReportDetailView.JmixComboBoxBinder<String> protected com.vaadin.flow.component.orderedlayout.HorizontalLayoutprotected JmixComboBox<String> protected ReportDetailView.JmixComboBoxBinder<String> protected com.vaadin.flow.component.orderedlayout.HorizontalLayoutprotected EntityStatesprotected JmixButtonprotected JmixComboBox<String> protected ReportDetailView.JmixComboBoxBinder<String> protected FetchPlanRepositoryprotected FetchPlansprotected Iconsprotected DataGrid<ReportInputParameter> protected JmixCheckboxprotected JmixCheckboxprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected CodeEditorprotected com.vaadin.flow.component.html.Divprotected JmixButtonprotected JmixTextAreaprotected EntityComboBox<ReportInputParameter> protected JmixComboBox<JsonSourceType> protected JmixTextAreaThe last generation token issued for a data set.protected static final StringKey of the only column of the LLM query column list, asreport-detail-view.xmldeclares it.protected static final intHow much of a generation failure is shown.protected JmixButtonprotected @Nullable com.vaadin.flow.data.renderer.Renderer<LlmQueryColumn> protected com.vaadin.flow.component.orderedlayout.HorizontalLayoutprotected com.vaadin.flow.component.badge.Badgeprotected LlmDataSetGenerationSupportprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected DataSetprotected JmixButtonprotected JmixButtonprotected DataGrid<LlmQueryColumn> protected com.vaadin.flow.component.html.Spanprotected CodeEditorprotected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected com.vaadin.flow.component.badge.Badgeprotected longprotected JmixTextAreaprotected CollectionContainer<LlmQueryColumn> protected booleanprotected JmixButtonprotected com.vaadin.flow.component.badge.Badgeprotected JmixTextAreaprotected JmixTabSheetprotected com.vaadin.flow.component.tabs.Tabprotected MessageBundleprotected Metadataprotected MetadataToolsprotected JmixCheckboxprotected com.vaadin.flow.component.orderedlayout.FlexLayoutprotected Notificationsprotected JmixSelect<Orientation> protected OutputTypeHelperprotected CollectionPropertyContainer<ReportInputParameter> protected EntityComboBox<BandDefinition> protected PolicyStoreprotected InstanceContainer<Report> protected ReportGroupRepositoryprotected ReportRepositoryprotected CollectionPropertyContainer<ReportRole> protected ReportsClientPropertiesprotected CollectionPropertyContainer<ReportScreen> protected ReportScriptEditorprotected ReportsPersistenceprotected ReportsPropertiesprotected ReportsSerializationprotected ReportWizardprotected ResourceRoleRepositoryprotected JmixComboBox<BaseRole> static final Stringprotected JmixComboBox<String> protected SecureOperationsprotected com.vaadin.flow.component.orderedlayout.FlexLayoutprotected JmixSelect<DataSetType> protected Storesprotected JmixCheckboxprotected StreamingReportValidationSupportprotected DataGrid<ReportTemplate> protected CollectionPropertyContainer<ReportTemplate> protected UiComponentsprotected UiPropertiesprotected CodeEditorprotected JmixButtonprotected ViewRegistryprotected ViewValidationFields inherited from class io.jmix.flowui.view.StandardDetailView
DEFAULT_ROUTE_PARAM, LOCKED_BEFORE_REFRESH_ATTR_NAME, MODE_PARAM, MODE_READONLY, NEW_ENTITY_ID, READ_ONLY_BEFORE_REFRESH_ATTR_NAME, reloadSaved -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyLlmGeneratedQuery(ReportDetailView.LlmGenerationAttempt attempt, LlmDataQuery generatedQuery) Stores the query a finished generation produced and brings the panel up to date with it.protected voidapplyVisibilityRules(DataSet item) protected voidprotected voidapplyVisibilityRulesForType(DataSet dataSet) protected voidprotected booleanprotected booleanprotected booleanprotected booleanprotected List<DataSetType> protected voidcheckForNameDuplication(ValidationErrors errors, com.google.common.collect.Multimap<String, BandDefinition> names) protected voidprotected voidclearLlmPropertiesIfNotLlm(DataSet dataSet) Drops what only an LLM data set is described by when the data set becomes one of another type.protected com.vaadin.flow.component.checkbox.CheckboxcreateCheckbox(Boolean value) protected com.vaadin.flow.component.Componentprotected com.vaadin.flow.data.renderer.Renderer<LlmQueryColumn> Renders a column name as a field that survives its own edit.protected BackgroundTask<Integer, LlmDataQuery> createLlmGenerationTask(LlmQueryGenerationRequest request, DataSet dataSet) Creates the task that generates a query for the data set, and issues the token that makes it the current attempt for that data set: a task created later supersedes whatever was created before it.protected LlmQueryColumncreateLlmQueryColumn(String name) protected BandDefinitioncreateRootBandDefinition(Report report) protected com.vaadin.flow.component.orderedlayout.HorizontalLayoutcreateTemplateOutputTypeBadge(ReportTemplate template) protected booleanprotected booleanprotected @Nullable ReportRegiondataSetToReportRegion(DataSet dataSet, EntityTree entityTree) protected com.vaadin.flow.component.Componentprotected StringdescribeLlmGenerationFailure(Exception exception) Describes a failed generation in the words of what actually went wrong.protected voidEnds an attempt whose result cannot be applied any more and says why nothing changed, so that a finished generation is never dropped silently.protected voidfillLlmQueryColumns(@Nullable LlmDataQuery storedQuery) protected @Nullable MetaClassfindMetaClassByAlias(DataSet dataSet) @Nullable MetaClassfindMetaClassByDataSetEntityAlias(String alias, DataSetType dataSetType, List<ReportInputParameter> reportInputParameters) protected @Nullable ReportInputParameterfindParameterByAlias(String alias) @Nullable FetchPlanfindSubFetchPlanByCollectionPropertyName(@Nullable FetchPlan fetchPlan, String propertyName) protected voidEnds the editing of the query the panel was unlocked for, whichever way it ends: the check button, moving to another data set, or successfully saving the report.protected voidDrops what is remembered about data sets the report no longer holds.protected voidprotected CodeEditorModegetCodeEditorMode(DataSet dataSet) protected List<DataSetType> Returns the data set types the designer offers.protected Stringprotected longgetLlmQueryDraftRevision(DataSet dataSet) protected @Nullable StringgetNameForEntityParameter(DataSet dataSet) protected Stringprotected booleanhasDuplicates(List<String> names) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidinitJsonDataSetOptions(DataSet dataSet) protected voidprotected voidprotected voidprotected voidinitLlmDataSetOptions(DataSet dataSet) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidinputParametersDataGridCreateInitializer(ReportInputParameter reportInputParameter) protected booleanprotected com.vaadin.flow.data.renderer.Renderer<ReportInputParameter> protected booleanprotected com.vaadin.flow.data.renderer.Renderer<ReportInputParameter> protected booleanisChildOrEqual(BandDefinition definition, @Nullable BandDefinition child) protected booleanprotected booleanisGroovyDataSetLocked(@Nullable DataSet dataSet) protected booleanisJsonGroovyEditorLocked(@Nullable DataSet dataSet) protected booleanprotected booleanprotected booleanprotected booleanprotected booleanStreaming reads rows from a database cursor, so it applies only to a single SQL or JPQL dataset.protected booleanprotected booleanprotected @Nullable com.vaadin.flow.component.grid.Grid.Column<LlmQueryColumn> Returns the column the names of an LLM data set's query columns are shown in, ornullwhen the grid has none.protected voidmarkFieldAndPreventSave(TypedTextField<?> field, String messageBundleKey, StandardDetailView.BeforeSaveEvent event) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidonDataSetScriptCodeEditorHelpBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected voidprotected voidonDataSetScriptFullScreenBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected voidprotected voidprotected voidprotected voidprotected voidonEntitiesParamFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixComboBox<String>, String> event) protected voidonEntitiesParamFieldHelperButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) protected voidonEntityParamFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixComboBox<String>, String> event) protected voidonEntityParamFieldHelperButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) protected voidonFetchPlanEditButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected voidonFetchPlanNameFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixComboBox<String>, String> event) voidonInit(View.InitEvent event) protected voidprotected voidprotected voidvoidonJsonGroovyCodeEditorFullScreenBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected voidonJsonGroovyCodeEditorHelpBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected voidprotected voidonJsonPathQueryTextAreaFieldHelpIconClick(com.vaadin.flow.component.ClickEvent<?> event) voidonLlmAddColumnBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) voidonLlmEditQueryBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) voidonLlmGenerateBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) voidonLlmGeneratedQueryHelpBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) voidonLlmQueryColumnsDcCollectionChange(CollectionContainer.CollectionChangeEvent<LlmQueryColumn> event) voidonLlmQueryColumnsDcItemPropertyChange(InstanceContainer.ItemPropertyChangeEvent<LlmQueryColumn> event) voidonLlmRemoveColumnBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected voidonLocaleHelpIconClick(com.vaadin.flow.component.ClickEvent<?> event) protected voidonMultiDataSetFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox, Boolean> event) protected voidonOrientationFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixSelect<Orientation>, Orientation> event) protected voidonParametersDcCollectionChange(CollectionContainer.CollectionChangeEvent<ReportInputParameter> event) voidprotected voidonReady(View.ReadyEvent event) voidprotected voidonRunAction(ActionPerformedEvent event) voidprotected voidonStreamingFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox, Boolean> event) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidonValidationScriptCodeEditorHelpBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) voidonValidationScriptFullScreenBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) protected voidorderBandDefinitions(BandDefinition parent) protected voidprotected voidprotected voidprotected voidrefreshLlmPanelIfShown(DataSet dataSet) protected voidDrops the rows left without a name when the author finishes editing — a row added and never filled in.protected voidreplaceParameters(boolean up) protected FetchPlanreportRegionToFetchPlan(EntityTree entityTree, ReportRegion reportRegion) protected booleanprotected booleansaveDelegate(SaveContext saveContext) protected voidprotected voidsetCommonEntityGridVisibility(boolean visibleEntityGrid, boolean visibleEntitiesGrid) protected voidsetJsonDataSetFieldsVisibility(boolean visible) protected voidsetLlmQueryEditing(boolean editing) protected voidsetupEntitiesParamFieldValue(DataSet dataSet) protected voidsetupEntityParamFieldValue(DataSet dataSet) protected voidprotected voidshowEditedQueryProblems(@Nullable LlmDataQuery query) Says what would make a hand-edited query fail a report run.protected voidshowGeneratedQueryProblems(@Nullable LlmDataQuery query) Says what would make a freshly generated query fail a report run.protected voidshowLlmColumnsChangedNotice(List<String> previousColumns, List<String> generatedColumns) protected voidshowLlmGenerationFailure(Exception exception) Says that generation failed, and why.protected voidSays that generation ran out of the time it was given.protected voidshowLlmQueryProblems(@Nullable LlmDataQuery query, String messageKey) Says what would make the stored query fail a report run, right after it is stored.protected voidshowNotificationIfAnotherTab(com.vaadin.flow.component.tabs.Tab tab, ValidationErrors errors, com.vaadin.flow.component.Component component, String messageBundleKey) voidprotected Stringprotected booleansuitableByDataSetType(DataSetType dataSetType, boolean isCollectionAlias, ParameterType type) protected com.vaadin.flow.data.renderer.Renderer<ReportTemplate> protected booleanprotected voidtemplatesDataGridCreateAfterSaveHandler(DialogWindow.AfterCloseEvent<ReportTemplateDetailView> event) protected booleanprotected com.vaadin.flow.data.renderer.Renderer<ReportTemplate> protected voidtouchLlmQueryDraft(@Nullable DataSet dataSet) protected voidupdateBandFieldRequiredIndicators(@Nullable BandDefinition item) protected voidupdateBandFieldsAvailability(@Nullable BandDefinition item) protected voidupdateDataSetsLayout(boolean isMultiDataSet) protected voidupdateFetchPlanNameFieldItems(@Nullable ReportInputParameter reportInputParameter) protected voidupdateGroovyEditorsState(@Nullable DataSet dataSet) protected voidKeeps the panel read-only when either the application cannot serve the type or the report itself was opened without editing rights.protected voidprotected voidupdateLlmStaleQueryNotice(DataSet dataSet) Says whether the stored query of the data set on screen answers a prompt that has since been edited.protected voidThe streaming flag and multiple datasets are mutually exclusive, and streaming applies only to first-level bands.protected voidvalidateBand(ValidationErrors errors, BandDefinition band, com.google.common.collect.Multimap<String, BandDefinition> names) protected voidvalidateBands(ValidationErrors validationErrors) protected booleanprotected voidvalidateLlmDataSet(ValidationErrors errors, DataSet dataSet) Refuses an LLM data set a run could not use: one without a prompt, and one without a usable query.protected voidvalidateLlmStoredQuery(ValidationErrors errors, DataSet dataSet) Refuses a query the data set could not run: a missing one, one whose document is unreadable, and one left without columns — the band rows are keyed by those, so a query that names none returns nothing a template could print.protected voidvalidateTemplate(ValidationErrors validationErrors) protected voidvaluesFormatsDataGridCreateInitializer(ReportValueFormat reportValueFormat) protected voidSays which optional report parameters the stored queries of this report compare without a guard — the one way this data set type prints wrong data instead of failing.Methods inherited from class io.jmix.flowui.view.StandardDetailView
addAfterSaveListener, addBeforeSaveListener, addInitEntityListener, addReadOnlyStateChangeListener, addValidationEventListener, beforeEnter, clearChanges, close, closeWithDiscard, closeWithSave, doNotReloadEditedEntity, findEntityId, getEditedEntity, getEditedEntityContainer, getEditedEntityLoader, getEditedEntityOrNull, getLockStatus, getRouteParamName, getSaveNotificationText, hasUnsavedChanges, initExistingEntity, initNewEntity, isCrossFieldValidationEnabled, isReadOnly, isReloadEdited, isReloadSaved, isSaveActionPerformed, isShowSaveNotification, isShowValidationErrors, onDetachInternal, preventUnsavedChanges, processBeforeEnterInternal, resolveEntityClass, save, setCrossFieldValidationEnabled, setEntityToEdit, setReadOnly, setReloadEdited, setReloadSaved, setShowSaveNotification, setShowValidationErrors, setupEntityToEdit, setupEntityToEdit, setupEntityToEdit, validateViewMethods inherited from class io.jmix.flowui.view.View
addAfterCloseListener, addApplicationListeners, addBeforeCloseListener, addBeforeShowListener, addInitListener, addQueryParametersChangeListener, addReadyListener, addRestoreComponentsStateEventListener, afterNavigation, beforeLeave, close, closeWithDefaultAction, configureDialogWindowFooter, configureDialogWindowHeader, getApplicationContext, getEventBus, getId, getPageTitle, getReturnParameters, getViewActions, getViewAttributes, getViewData, getViewFacets, getViewSupport, isPreventBrowserTabClosing, onAttach, onAttachInternal, onDetach, removeApplicationListeners, removeViewAttributes, setAfterNavigationHandler, setApplicationContext, setId, setPageTitle, setPreventBrowserTabClosing, setViewActions, setViewData, setViewFacets, unregisterBackNavigationMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement, initContentMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setTestId, setVisible, whenAttachedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
ROOT_BAND
- See Also:
-
LLM_COLUMN_NAME_KEY
Key of the only column of the LLM query column list, asreport-detail-view.xmldeclares it.- See Also:
-
LLM_FAILURE_MESSAGE_LIMIT
protected static final int LLM_FAILURE_MESSAGE_LIMITHow much of a generation failure is shown. A model's answer quoted back by a parsing failure is unbounded, and a notification is not a log.- See Also:
-
dataContext
-
reportDc
-
availableParentBandsDc
-
bandsDc
-
templatesDc
-
dataSetsDc
-
parametersDc
-
llmQueryColumnsDc
-
bandsTreeDataGrid
-
bandNameField
-
orientationField
-
parentBandField
-
multiDataSetField
-
streamingField
-
multiDataSetLayout
-
singleDataSetLayout
-
dataSetDetailsLayout
-
dataSetTypeLayout
-
dataSetsDataGridLayout
@ViewComponent protected com.vaadin.flow.component.orderedlayout.VerticalLayout dataSetsDataGridLayout -
dataSetsDataGrid
-
singleDataSetTypeField
-
dataSetScriptCodeEditor
-
dataSetScriptCodeEditorHelpBtn
-
dataSetScriptFullScreenBtn
-
dataStoreField
-
isProcessTemplateField
-
commonEntityGrid
-
jsonDataSetTypeVBox
-
llmDataSetTypeBox
-
llmPromptField
-
llmGenerateBtn
-
llmEditQueryBtn
-
llmGeneratedQueryCodeEditor
-
llmStaleQueryNotice
-
llmColumnsChangedNotice
-
llmGeneratedColumnsDataGrid
-
llmColumnsButtonsLayout
@ViewComponent protected com.vaadin.flow.component.orderedlayout.HorizontalLayout llmColumnsButtonsLayout -
llmAddColumnBtn
-
llmRemoveColumnBtn
-
llmGeneratedQueryNotesBox
@ViewComponent protected com.vaadin.flow.component.orderedlayout.VerticalLayout llmGeneratedQueryNotesBox -
llmGeneratedExplanationSpan
-
llmGeneratedWarningsBadge
-
dataSetScriptBox
-
entitiesParamField
-
entitiesParamLayout
@ViewComponent protected com.vaadin.flow.component.orderedlayout.HorizontalLayout entitiesParamLayout -
entityParamField
-
entityParamLayout
-
fetchPlanNameField
-
fetchPlanEditButton
-
jsonGroovyCodeEditorBox
-
isUseExistingFetchPlanField
-
jsonSourceTypeField
-
jsonPathQueryTextAreaField
-
jsonSourceURLTextArea
-
jsonQueryParameterField
-
jsonGroovyCodeEditor
-
jsonGroovyCodeEditorFullScreenBtn
-
templatesDataGrid
-
localeTextField
-
screenIdField
-
reportScreensDc
-
rolesField
-
reportRolesDc
-
inputParametersDataGrid
-
mainTabSheet
-
mainTabSheetDetailsTab
@ViewComponent("mainTabSheet.detailsTab") protected com.vaadin.flow.component.tabs.Tab mainTabSheetDetailsTab -
messageBundle
-
codeEditorLabel
-
validationScriptCodeEditor
-
validationScriptFullScreenBtn
-
reportsPersistence
-
notifications
-
viewValidation
-
reportsSerialization
-
uiComponents
-
metadata
-
dialogWindows
-
secureOperations
-
policyStore
-
uiProperties
-
coreProperties
-
reportsProperties
-
entityStates
-
dataSetFactory
-
fetchPlanRepository
-
stores
-
reportScriptEditor
-
dataGridDecorator
-
reportsClientProperties
-
metadataTools
-
dialogs
-
resourceRoleRepository
-
viewRegistry
-
reportWizard
-
fetchPlans
-
dataManager
-
reportGroupRepository
-
reportRepository
-
outputTypeHelper
-
streamingReportValidationSupport
-
llmDataSetGenerationSupport
-
icons
-
entityParamFieldBinder
-
entitiesParamFieldBinder
-
fetchPlanNameFieldBinder
-
llmQueryEditing
protected boolean llmQueryEditing -
llmColumnNameRenderer
-
llmEditedDataSet
-
llmGenerationSequence
protected long llmGenerationSequence -
latestLlmGeneration
The last generation token issued for a data set. It outlives the attempt that carried it, so a response arriving after a newer generation already finished is still recognized as the older one. -
llmQueryDraftRevisions
-
dataSetTypeOptions
The data set types the designer offers, computed once: they do not change while the view is open, and the inline selector of a multi-data-set band would otherwise rebuild them for every rendered row.
-
-
Constructor Details
-
ReportDetailView
public ReportDetailView()
-
-
Method Details
-
onInit
-
initTemplatesOutputTypeColumn
protected void initTemplatesOutputTypeColumn() -
createTemplateOutputTypeBadge
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout createTemplateOutputTypeBadge(ReportTemplate template) -
templatesDataGridAlterableRenderer
@Supply(to="templatesDataGrid.alterable", subject="renderer") protected com.vaadin.flow.data.renderer.Renderer<ReportTemplate> templatesDataGridAlterableRenderer() -
templatesDataGridDefaultRenderer
@Supply(to="templatesDataGrid.default", subject="renderer") protected com.vaadin.flow.data.renderer.Renderer<ReportTemplate> templatesDataGridDefaultRenderer() -
inputParametersDataGridRequiredRenderer
@Supply(to="inputParametersDataGrid.required", subject="renderer") protected com.vaadin.flow.data.renderer.Renderer<ReportInputParameter> inputParametersDataGridRequiredRenderer() -
inputParametersDataGridValidationOnRenderer
@Supply(to="inputParametersDataGrid.validationOn", subject="renderer") protected com.vaadin.flow.data.renderer.Renderer<ReportInputParameter> inputParametersDataGridValidationOnRenderer() -
createCheckbox
-
onInitEntity
-
onReady
-
onBandsTreeDataGridCreate
@Subscribe("bandsTreeDataGrid.create") protected void onBandsTreeDataGridCreate(ActionPerformedEvent event) -
bandsTreeDataGridCreateEnabledRule
-
onBandsTreeDataGridRemove
@Subscribe("bandsTreeDataGrid.remove") protected void onBandsTreeDataGridRemove(ActionPerformedEvent event) -
bandsTreeDataGridRemoveEnabledRule
-
onBandsTreeDataGridUpBand
@Subscribe("bandsTreeDataGrid.upBand") protected void onBandsTreeDataGridUpBand(ActionPerformedEvent event) -
bandsTreeDataGridUpBandEnabledRule
-
onBandsTreeDataGridDownBand
@Subscribe("bandsTreeDataGrid.downBand") protected void onBandsTreeDataGridDownBand(ActionPerformedEvent event) -
bandsTreeDataGridDownBandEnabledRule
-
onDataSetsDataGridCreate
@Subscribe("dataSetsDataGrid.create") protected void onDataSetsDataGridCreate(ActionPerformedEvent event) -
dataSetsDataGridCreateEnabledRule
-
dataSetsDataGridRemoveEnabledRule
-
onBandsDcItemChange
@Subscribe(id="bandsDc", target=DATA_CONTAINER) protected void onBandsDcItemChange(InstanceContainer.ItemChangeEvent<BandDefinition> event) -
onBandsDcItemPropertyChange
@Subscribe(id="bandsDc", target=DATA_CONTAINER) protected void onBandsDcItemPropertyChange(InstanceContainer.ItemPropertyChangeEvent<BandDefinition> event) -
onBandsDcCollectionChange
@Subscribe(id="bandsDc", target=DATA_CONTAINER) protected void onBandsDcCollectionChange(CollectionContainer.CollectionChangeEvent<BandDefinition> event) -
onDataSetsDcItemChange
@Subscribe(id="dataSetsDc", target=DATA_CONTAINER) protected void onDataSetsDcItemChange(InstanceContainer.ItemChangeEvent<DataSet> event) -
onDataSetsDcItemPropertyChange
@Subscribe(id="dataSetsDc", target=DATA_CONTAINER) protected void onDataSetsDcItemPropertyChange(InstanceContainer.ItemPropertyChangeEvent<DataSet> event) -
onDataSetsDcCollectionChange
@Subscribe(id="dataSetsDc", target=DATA_CONTAINER) protected void onDataSetsDcCollectionChange(CollectionContainer.CollectionChangeEvent<DataSet> event) -
forgetDataSetsOutsideTheReport
protected void forgetDataSetsOutsideTheReport()Drops what is remembered about data sets the report no longer holds. Removing a data set, removing the band that owned it and switching to another band all reach the view differently, so the maps are pruned against the report itself rather than against one collection event. -
onLlmQueryColumnsDcItemPropertyChange
@Subscribe(id="llmQueryColumnsDc", target=DATA_CONTAINER) public void onLlmQueryColumnsDcItemPropertyChange(InstanceContainer.ItemPropertyChangeEvent<LlmQueryColumn> event) -
onLlmQueryColumnsDcCollectionChange
@Subscribe(id="llmQueryColumnsDc", target=DATA_CONTAINER) public void onLlmQueryColumnsDcCollectionChange(CollectionContainer.CollectionChangeEvent<LlmQueryColumn> event) -
onTemplatesDcCollectionChange
@Subscribe(id="templatesDc", target=DATA_CONTAINER) protected void onTemplatesDcCollectionChange(CollectionContainer.CollectionChangeEvent<ReportTemplate> event) -
onParametersDcCollectionChange
@Subscribe(id="parametersDc", target=DATA_CONTAINER) protected void onParametersDcCollectionChange(CollectionContainer.CollectionChangeEvent<ReportInputParameter> event) -
onValidation
-
markFieldAndPreventSave
protected void markFieldAndPreventSave(TypedTextField<?> field, String messageBundleKey, StandardDetailView.BeforeSaveEvent event) -
showNotificationIfAnotherTab
protected void showNotificationIfAnotherTab(com.vaadin.flow.component.tabs.Tab tab, ValidationErrors errors, com.vaadin.flow.component.Component component, String messageBundleKey) -
checkReportCode
-
onBeforeSave
-
onMultiDataSetFieldComponentValueChange
@Subscribe("multiDataSetField") protected void onMultiDataSetFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox, Boolean> event) -
onStreamingFieldComponentValueChange
@Subscribe("streamingField") protected void onStreamingFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.checkbox.Checkbox, Boolean> event) -
updateStreamingRelatedFields
protected void updateStreamingRelatedFields()The streaming flag and multiple datasets are mutually exclusive, and streaming applies only to first-level bands. This method owns the enablement of both checkboxes so that toggling either one recomputes the full state. Detailed structural rules are checked on save invalidateBand. -
isStreamingCapableDataSet
protected boolean isStreamingCapableDataSet()Streaming reads rows from a database cursor, so it applies only to a single SQL or JPQL dataset. A band with no dataset, several datasets, or a groovy/json/entity dataset cannot stream. -
onOrientationFieldComponentValueChange
@Subscribe("orientationField") protected void onOrientationFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixSelect<Orientation>, Orientation> event) -
onFetchPlanNameFieldComponentValueChange
protected void onFetchPlanNameFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixComboBox<String>, String> event) -
onEntityParamFieldComponentValueChange
protected void onEntityParamFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixComboBox<String>, String> event) -
onEntitiesParamFieldComponentValueChange
protected void onEntitiesParamFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<JmixComboBox<String>, String> event) -
onFetchPlanEditButtonClick
@Subscribe("fetchPlanEditButton") protected void onFetchPlanEditButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
findMetaClassByAlias
-
findMetaClassByDataSetEntityAlias
public @Nullable MetaClass findMetaClassByDataSetEntityAlias(String alias, DataSetType dataSetType, List<ReportInputParameter> reportInputParameters) -
suitableByDataSetType
protected boolean suitableByDataSetType(DataSetType dataSetType, boolean isCollectionAlias, ParameterType type) -
dataSetToReportRegion
-
reportRegionToFetchPlan
-
findSubFetchPlanByCollectionPropertyName
-
getNameForEntityParameter
-
setupReportXml
protected void setupReportXml() -
saveDelegate
-
onRunAction
-
validateTemplate
-
validateBands
-
streamingViolationMessage
-
checkForNameDuplication
protected void checkForNameDuplication(ValidationErrors errors, com.google.common.collect.Multimap<String, BandDefinition> names) -
validateLlmDataSet
Refuses an LLM data set a run could not use: one without a prompt, and one without a usable query. The query is required because a run executes that very query and generates nothing — like the script of a JPQL data set, which the designer requires for the same reason. The prompt is required because it is what the query can be generated from again. -
validateLlmStoredQuery
Refuses a query the data set could not run: a missing one, one whose document is unreadable, and one left without columns — the band rows are keyed by those, so a query that names none returns nothing a template could print. -
hasDuplicates
-
validateBand
protected void validateBand(ValidationErrors errors, BandDefinition band, com.google.common.collect.Multimap<String, BandDefinition> names) -
validateInputOutputFormats
protected boolean validateInputOutputFormats() -
createRootBandDefinition
-
getDefaultDataSetName
-
isUpdatePermitted
protected boolean isUpdatePermitted() -
orderBandDefinitions
-
sortBandDefinitionsByPosition
public void sortBandDefinitionsByPosition() -
isUpBandButtonEnabled
protected boolean isUpBandButtonEnabled() -
isDownBandButtonEnabled
protected boolean isDownBandButtonEnabled() -
refreshBandActionStates
protected void refreshBandActionStates() -
refreshDataSetsActionStates
protected void refreshDataSetsActionStates() -
updateBandFieldRequiredIndicators
-
updateBandFieldsAvailability
-
selectFirstDataSet
protected void selectFirstDataSet() -
initDataSetsDataGrid
protected void initDataSetsDataGrid() -
initBandsTreeDataGrid
protected void initBandsTreeDataGrid() -
dataSetTypeColumnValueProvider
-
getDataSetTypeOptions
Returns the data set types the designer offers. The list is fixed for the lifetime of the view: replacing or refreshing the items of a boundSelectclears its value, and that null would be written back to the data set. -
buildDataSetTypeOptions
-
updateDataSetsLayout
protected void updateDataSetsLayout(boolean isMultiDataSet) -
isChildOrEqual
-
applyVisibilityRules
-
applyVisibilityRulesForType
-
updateFetchPlanNameFieldItems
-
findParameterByAlias
-
hideAllDataSetEditComponents
protected void hideAllDataSetEditComponents() -
initLlmDataSetComponents
protected void initLlmDataSetComponents() -
createLlmColumnNameField
-
llmColumnNameColumn
protected @Nullable com.vaadin.flow.component.grid.Grid.Column<LlmQueryColumn> llmColumnNameColumn()Returns the column the names of an LLM data set's query columns are shown in, ornullwhen the grid has none. FlowUI removes a column whose attribute the current user may not read, andLlmQueryColumnis an entity like any other: a role written by hand, without a policy for it, leaves this grid without its only column. The panel is then read-only for the columns rather than broken — a missing policy must not take the report designer down with it. -
createLlmColumnNameRenderer
Renders a column name as a field that survives its own edit. A name typed into it renames the column, which refreshes the row it is in; a renderer that can only create would answer that refresh with a new field, and the one being typed into would leave the grid, taking the focus and the caret with it.Keeping the field as it is shows the current name all the same: while the panel is unlocked, that field is the only thing that renames its column, and every other change to the list — filling it, dropping the nameless rows, locking the panel again — replaces the items or the renderer and re-renders the grid.
-
setLlmQueryEditing
protected void setLlmQueryEditing(boolean editing) -
updateLlmQueryEditingControls
protected void updateLlmQueryEditingControls() -
isLlmQueryEditorEditable
protected boolean isLlmQueryEditorEditable() -
assembleEditedQuery
protected void assembleEditedQuery() -
touchLlmQueryDraft
-
getLlmQueryDraftRevision
-
editedLlmQueryColumns
-
finishLlmQueryEditing
protected void finishLlmQueryEditing()Ends the editing of the query the panel was unlocked for, whichever way it ends: the check button, moving to another data set, or successfully saving the report. Only here do the rows left without a name go away and a query left blank clear the stored document. -
showGeneratedQueryProblems
Says what would make a freshly generated query fail a report run. Generation already gave it one chance to be corrected, so what is left is what the model could not fix and the author now can. -
showEditedQueryProblems
Says what would make a hand-edited query fail a report run. Nothing corrects such a query — it is the author's — so this is only ever a report of what is wrong with it. -
showLlmQueryProblems
Says what would make the stored query fail a report run, right after it is stored. A query is checked without running it and without asking the model anything, so an author learns of a broken query while the panel that produced it is still open, instead of on the next run of the report. -
warnAboutUnguardedOptionalParametersInReport
protected void warnAboutUnguardedOptionalParametersInReport()Says which optional report parameters the stored queries of this report compare without a guard — the one way this data set type prints wrong data instead of failing.A run binds an empty optional parameter as
null, and an unguarded comparison againstnullmatches nothing: the band comes out empty with no error anywhere. Generation is told to write(:name is null or …), but a model can ignore the rule, a hand edit can miss it, and — the case nothing else would catch — making a parameter optional turns a comparison written for a required one into exactly this. Every query is therefore read on save, which is where the whole report is in its stored form. -
updateLlmStaleQueryNotice
Says whether the stored query of the data set on screen answers a prompt that has since been edited.Only that data set: the container reports a property change of every data set of the band, while the notice belongs to the panel, so a prompt edited elsewhere must leave it as it is — the same reason the type branch refreshes the panel only for the data set it shows.
-
clearLlmPropertiesIfNotLlm
Drops what only an LLM data set is described by when the data set becomes one of another type. Kept otherwise, a stored query would be saved and exported with a data set nothing reads it for, and would come back as the current query if the type were switched back. -
fillLlmQueryColumns
-
refreshLlmPanelIfShown
-
initLlmDataSetOptions
-
updateLlmPanelAvailability
protected void updateLlmPanelAvailability()Keeps the panel read-only when either the application cannot serve the type or the report itself was opened without editing rights. -
isLlmPanelEditable
protected boolean isLlmPanelEditable() -
onReadOnlyChangeEvent
-
showLlmColumnsChangedNotice
-
createLlmQueryColumn
-
applyVisibilityRulesForEntityType
-
initJsonDataSetOptions
-
setJsonDataSetFieldsVisibility
protected void setJsonDataSetFieldsVisibility(boolean visible) -
initDataStoreField
protected void initDataStoreField() -
initEntitiesParamField
protected void initEntitiesParamField() -
onEntitiesParamFieldHelperButtonClick
@Subscribe("entitiesParamFieldHelperButton") protected void onEntitiesParamFieldHelperButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
initEntityParamField
protected void initEntityParamField() -
onEntityParamFieldHelperButtonClick
@Subscribe("entityParamFieldHelperButton") protected void onEntityParamFieldHelperButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
initFetchPlanNameField
protected void initFetchPlanNameField() -
onDataSetScriptFullScreenBtnClick
@Subscribe("dataSetScriptFullScreenBtn") protected void onDataSetScriptFullScreenBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
onLlmAddColumnBtnClick
@Subscribe("llmAddColumnBtn") public void onLlmAddColumnBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
onLlmRemoveColumnBtnClick
@Subscribe("llmRemoveColumnBtn") public void onLlmRemoveColumnBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
onLlmGeneratedQueryHelpBtnClick
@Subscribe("llmGeneratedQueryHelpBtn") public void onLlmGeneratedQueryHelpBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
onLlmGenerateBtnClick
@Subscribe("llmGenerateBtn") public void onLlmGenerateBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
createLlmGenerationTask
protected BackgroundTask<Integer,LlmDataQuery> createLlmGenerationTask(LlmQueryGenerationRequest request, DataSet dataSet) Creates the task that generates a query for the data set, and issues the token that makes it the current attempt for that data set: a task created later supersedes whatever was created before it. -
showLlmGenerationTimeout
protected void showLlmGenerationTimeout()Says that generation ran out of the time it was given. Left unhandled it would be said to no one, as a failure would. -
showLlmGenerationFailure
Says that generation failed, and why. Nothing in the platform reports an unhandled failure of a background task to the person who started it, so without this a failed generation would leave the author with a closed dialog and no query. -
describeLlmGenerationFailure
Describes a failed generation in the words of what actually went wrong. The innermost cause carries that: the layers above it say no more than the notice already does. Overly long text — a model's answer quoted back in a parsing failure, say — is cut, and the log keeps all of it. -
applyLlmGeneratedQuery
protected void applyLlmGeneratedQuery(ReportDetailView.LlmGenerationAttempt attempt, LlmDataQuery generatedQuery) Stores the query a finished generation produced and brings the panel up to date with it. An attempt the data set has moved on from is discarded instead. -
isLlmGenerationAttemptCurrent
-
forgetLlmGenerationAttempt
-
discardLlmGenerationAttempt
Ends an attempt whose result cannot be applied any more and says why nothing changed, so that a finished generation is never dropped silently. An attempt whose data set has since been generated again stays silent: the author is already waiting for, or already has, that newer result. -
onLlmEditQueryBtnClick
@Subscribe("llmEditQueryBtn") public void onLlmEditQueryBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
removeBlankLlmQueryColumns
protected void removeBlankLlmQueryColumns()Drops the rows left without a name when the author finishes editing — a row added and never filled in. A nameless column is of no use to a template and would only take a position in the list the add-on names the selected values by.Only on finishing, not on every change: while editing, an empty row is a row about to be typed into.
-
onDataSetScriptCodeEditorHelpBtnClick
@Subscribe("dataSetScriptCodeEditorHelpBtn") protected void onDataSetScriptCodeEditorHelpBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
onJsonGroovyCodeEditorHelpBtnClick
@Subscribe("jsonGroovyCodeEditorHelpBtn") protected void onJsonGroovyCodeEditorHelpBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
onDataSetScriptFieldExpandIconClick
protected void onDataSetScriptFieldExpandIconClick() -
initJsonPathQueryTextAreaField
protected void initJsonPathQueryTextAreaField() -
onJsonPathQueryTextAreaFieldHelpIconClick
protected void onJsonPathQueryTextAreaFieldHelpIconClick(com.vaadin.flow.component.ClickEvent<?> event) -
onJsonGroovyCodeEditorFullScreenBtnClick
@Subscribe("jsonGroovyCodeEditorFullScreenBtn") public void onJsonGroovyCodeEditorFullScreenBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
getScriptEditorDialogCaption
-
onJsonGroovyCodeEditorHelpIconClick
protected void onJsonGroovyCodeEditorHelpIconClick() -
setCommonEntityGridVisibility
protected void setCommonEntityGridVisibility(boolean visibleEntityGrid, boolean visibleEntitiesGrid) -
inputParametersDataGridUpEnabledRule
-
oninputParametersDataGridUp
@Subscribe("inputParametersDataGrid.up") protected void oninputParametersDataGridUp(ActionPerformedEvent event) -
inputParametersDataGridDownEnabledRule
-
oninputParametersDataGridDown
@Subscribe("inputParametersDataGrid.down") protected void oninputParametersDataGridDown(ActionPerformedEvent event) -
inputParametersDataGridCreateInitializer
@Install(to="inputParametersDataGrid.createParameter", subject="initializer") protected void inputParametersDataGridCreateInitializer(ReportInputParameter reportInputParameter) -
orderParameters
protected void orderParameters() -
replaceParameters
protected void replaceParameters(boolean up) -
valuesFormatsDataGridCreateInitializer
@Install(to="valuesFormatsDataGrid.createValueFormat", subject="initializer") protected void valuesFormatsDataGridCreateInitializer(ReportValueFormat reportValueFormat) -
initLocaleDetailReportTextField
protected void initLocaleDetailReportTextField() -
onLocaleHelpIconClick
protected void onLocaleHelpIconClick(com.vaadin.flow.component.ClickEvent<?> event) -
onValidationScriptFullScreenBtnClick
@Subscribe("validationScriptFullScreenBtn") public void onValidationScriptFullScreenBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
onValidationScriptCodeEditorHelpBtnClick
@Subscribe("validationScriptCodeEditorHelpBtn") protected void onValidationScriptCodeEditorHelpBtnClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event) -
onValidationScriptCodeEditorHelpBtnClick
protected void onValidationScriptCodeEditorHelpBtnClick() -
initScreenIdField
protected void initScreenIdField() -
initRoleField
protected void initRoleField() -
initSingleDataSetTypeField
protected void initSingleDataSetTypeField() -
initJsonSourceTypeField
protected void initJsonSourceTypeField() -
isReportsGroovyEnabled
protected boolean isReportsGroovyEnabled() -
updateGroovyEditorsState
-
isGroovyDataSetLocked
-
isJsonGroovyEditorLocked
-
rolesDataGridExcludeEnabledRule
-
rolesDataGridAddEnabledRule
-
onrolesDataGridAdd
-
onscreenDataGridAdd
-
ontemplatesDataGridCreate
@Subscribe("templatesDataGrid.create") protected void ontemplatesDataGridCreate(ActionPerformedEvent event) -
templatesDataGridCreateAfterSaveHandler
protected void templatesDataGridCreateAfterSaveHandler(DialogWindow.AfterCloseEvent<ReportTemplateDetailView> event) -
onTemplatesDataGridEdit
@Subscribe("templatesDataGrid.edit") protected void onTemplatesDataGridEdit(ActionPerformedEvent event) -
templatesDataGridCopyEnabledRule
-
ontemplatesDataGridCopy
@Subscribe("templatesDataGrid.copy") protected void ontemplatesDataGridCopy(ActionPerformedEvent event) -
templatesDataGridDefaultEnabledRule
-
ontemplatesDataGridDefault
@Subscribe("templatesDataGrid.defaultAction") protected void ontemplatesDataGridDefault(ActionPerformedEvent event) -
getCodeEditorMode
-
setupEntityParamFieldValue
-
setupEntitiesParamFieldValue
-