Class ReportViewScheduleButtonHooker
java.lang.Object
net.datenwerke.rs.scheduler.client.scheduler.hookers.ReportViewScheduleButtonHooker
- All Implemented Interfaces:
Hook,ReportExecutorViewToolbarHook,TsFavoriteMenuHook
public class ReportViewScheduleButtonHooker
extends Object
implements ReportExecutorViewToolbarHook, TsFavoriteMenuHook
-
Constructor Summary
ConstructorsConstructorDescriptionReportViewScheduleButtonHooker(<any> multiDialogProvider, SchedulerDao schedulerDao, SecurityUIService securityService, ReportExporterUIService reportExporterService, SendToDao sendToDao) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddContextMenuEntries(Menu menu, List<AbstractTsDiskNodeDto> items, ItemSelector itemSelector, TsDiskMainComponent mainComponent) Adds context menu entries to the provided menu based on the specified items and configuration.booleanconfigureToolbarButton(DwTextButton scheduleBtn, List<AbstractTsDiskNodeDto> items, TsDiskMainComponent mainComponent) Configures the “Schedule” toolbar button so it is only visible and enabled when exactly one report reference is selected and the current user is allowed to schedule it.createToolbarButton(ToolbarService toolbarService) Creates a toolbar button for scheduling functionality.voidRemoves the handler registration if it exists.booleanreportPreviewViewToolbarHook_addLeft(ToolBar toolbar, ReportDto report, ReportExecutorInformation info, ReportExecutorMainPanel mainPanel) booleanreportPreviewViewToolbarHook_addRight(ToolBar toolbar, ReportDto report, ReportExecutorInformation info, ReportExecutorMainPanel mainPanel) voidreportPreviewViewToolbarHook_reportUpdated(ReportDto report, ReportExecutorInformation info)
-
Constructor Details
-
ReportViewScheduleButtonHooker
public ReportViewScheduleButtonHooker(<any> multiDialogProvider, SchedulerDao schedulerDao, SecurityUIService securityService, ReportExporterUIService reportExporterService, SendToDao sendToDao)
-
-
Method Details
-
reportPreviewViewToolbarHook_addLeft
public boolean reportPreviewViewToolbarHook_addLeft(ToolBar toolbar, ReportDto report, ReportExecutorInformation info, ReportExecutorMainPanel mainPanel) - Specified by:
reportPreviewViewToolbarHook_addLeftin interfaceReportExecutorViewToolbarHook
-
reportPreviewViewToolbarHook_addRight
public boolean reportPreviewViewToolbarHook_addRight(ToolBar toolbar, ReportDto report, ReportExecutorInformation info, ReportExecutorMainPanel mainPanel) - Specified by:
reportPreviewViewToolbarHook_addRightin interfaceReportExecutorViewToolbarHook
-
reportPreviewViewToolbarHook_reportUpdated
public void reportPreviewViewToolbarHook_reportUpdated(ReportDto report, ReportExecutorInformation info) - Specified by:
reportPreviewViewToolbarHook_reportUpdatedin interfaceReportExecutorViewToolbarHook
-
addContextMenuEntries
public boolean addContextMenuEntries(Menu menu, List<AbstractTsDiskNodeDto> items, ItemSelector itemSelector, TsDiskMainComponent mainComponent) Adds context menu entries to the provided menu based on the specified items and configuration.- Specified by:
addContextMenuEntriesin interfaceTsFavoriteMenuHook- Parameters:
menu- The menu to which context menu entries will be added.items- A list of items of typefor which context menu entries should be created.invalid reference
AbstractTsDiskNodeDtoitemSelector- AnItemSelectorinterface instance used to determine selected items and their context.mainComponent- The main component of typeTsDiskMainComponentused for additional context or operations.- Returns:
- A boolean indicating whether any context menu entries were successfully added.
-
configureToolbarButton
public boolean configureToolbarButton(DwTextButton scheduleBtn, List<AbstractTsDiskNodeDto> items, TsDiskMainComponent mainComponent) Configures the “Schedule” toolbar button so it is only visible and enabled when exactly one report reference is selected and the current user is allowed to schedule it. The button is wired to open the scheduling dialog after the list of available “send-to” clients is loaded asynchronously.- Specified by:
configureToolbarButtonin interfaceTsFavoriteMenuHook- Parameters:
scheduleBtn- the button that will trigger the scheduling actionitems- the nodes currently selected in the TeamSpace diskmainComponent- the main TeamSpace disk component (used for styling)- Returns:
truewhen the button was successfully configured and should be displayed;falsewhen any pre-condition fails and the button must be hidden or disabled
-
createToolbarButton
Creates a toolbar button for scheduling functionality.- Specified by:
createToolbarButtonin interfaceTsFavoriteMenuHook- Parameters:
toolbarService- The toolbar service used to create the button- Returns:
- A configured text button with calendar icon and appropriate styling
-
removeHandlerRegistration
public void removeHandlerRegistration()Removes the handler registration if it exists. This method safely checks for null before attempting to remove the handler.- Specified by:
removeHandlerRegistrationin interfaceTsFavoriteMenuHook
-