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 Details

  • Method Details

    • reportPreviewViewToolbarHook_addLeft

      public boolean reportPreviewViewToolbarHook_addLeft(ToolBar toolbar, ReportDto report, ReportExecutorInformation info, ReportExecutorMainPanel mainPanel)
      Specified by:
      reportPreviewViewToolbarHook_addLeft in interface ReportExecutorViewToolbarHook
    • reportPreviewViewToolbarHook_addRight

      public boolean reportPreviewViewToolbarHook_addRight(ToolBar toolbar, ReportDto report, ReportExecutorInformation info, ReportExecutorMainPanel mainPanel)
      Specified by:
      reportPreviewViewToolbarHook_addRight in interface ReportExecutorViewToolbarHook
    • reportPreviewViewToolbarHook_reportUpdated

      public void reportPreviewViewToolbarHook_reportUpdated(ReportDto report, ReportExecutorInformation info)
      Specified by:
      reportPreviewViewToolbarHook_reportUpdated in interface ReportExecutorViewToolbarHook
    • 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:
      addContextMenuEntries in interface TsFavoriteMenuHook
      Parameters:
      menu - The menu to which context menu entries will be added.
      items - A list of items of type
      invalid reference
      AbstractTsDiskNodeDto
      for which context menu entries should be created.
      itemSelector - An ItemSelector interface instance used to determine selected items and their context.
      mainComponent - The main component of type TsDiskMainComponent used 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:
      configureToolbarButton in interface TsFavoriteMenuHook
      Parameters:
      scheduleBtn - the button that will trigger the scheduling action
      items - the nodes currently selected in the TeamSpace disk
      mainComponent - the main TeamSpace disk component (used for styling)
      Returns:
      true when the button was successfully configured and should be displayed; false when any pre-condition fails and the button must be hidden or disabled
    • createToolbarButton

      public DwTextButton createToolbarButton(ToolbarService toolbarService)
      Creates a toolbar button for scheduling functionality.
      Specified by:
      createToolbarButton in interface TsFavoriteMenuHook
      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:
      removeHandlerRegistration in interface TsFavoriteMenuHook