Class DashboardImpl

java.lang.Object
io.jmix.ui.component.CompositeComponent<VBoxLayout>
io.jmix.dashboardsui.component.impl.DashboardImpl
All Implemented Interfaces:
Dashboard, AttachNotifier, Component, Component.BelongToFrame, Component.HasCaption, Component.HasDescription, Component.HasIcon, CompositeWithCaption, CompositeWithDescription, CompositeWithIcon, HasDebugId, HasHtmlSanitizer

public class DashboardImpl extends CompositeComponent<VBoxLayout> implements Dashboard
  • Field Details

    • canvasBox

      protected VBoxLayout canvasBox
    • dataManager

      @Autowired protected DataManager dataManager
    • jsonConverter

      @Autowired protected JsonConverter jsonConverter
    • resourceLoader

      @Autowired protected org.springframework.core.io.ResourceLoader resourceLoader
    • metadata

      @Autowired protected Metadata metadata
    • accessHelper

      @Autowired protected AccessConstraintsHelper accessHelper
    • componentsFactory

      @Autowired protected UiComponents componentsFactory
    • facets

      @Autowired protected Facets facets
    • notifications

      @Autowired protected Notifications notifications
    • fragments

      @Autowired protected Fragments fragments
    • parameterTransformer

      @Autowired protected ParameterTransformer parameterTransformer
    • dashboardViewAssistant

      protected DashboardViewAssistant dashboardViewAssistant
    • uiEventPublisher

      @Autowired protected UiEventPublisher uiEventPublisher
    • canvasFragment

      protected CanvasFragment canvasFragment
    • messages

      @Autowired protected Messages messages
    • code

      protected String code
    • jsonPath

      protected String jsonPath
    • timerDelay

      protected Integer timerDelay
    • xmlParameters

      protected List<Parameter> xmlParameters
    • assistantBeanName

      protected String assistantBeanName
    • dashboardModel

      protected DashboardModel dashboardModel
  • Constructor Details

    • DashboardImpl

      public DashboardImpl()
  • Method Details

    • init

      public void init(Map<String,Object> params)
      Description copied from interface: Dashboard
      Initialize dashboard with passed parameters, timer and assistant.
      Specified by:
      init in interface Dashboard
      Parameters:
      params - map of dashboard params
    • refresh

      public void refresh()
      Description copied from interface: Dashboard
      Refreshes dashboard. Dashboard will be refreshed . If existed parameter has the same name as one of the param from passed map, it will be overwritten by param from map.
      Specified by:
      refresh in interface Dashboard
    • refresh

      public void refresh(Map<String,Object> params)
      Refreshes widget with passed parameters. Dashboard will be refreshed with merged existed and new parameters. If existed parameter has the same name as one of the param from passed map, it will be overwritten by param from map.
      Specified by:
      refresh in interface Dashboard
      Parameters:
      params - map with new dashboard parameters
    • dashboardEventListener

      @EventListener public void dashboardEventListener(DashboardEvent dashboardEvent) throws InvocationTargetException, IllegalAccessException
      Throws:
      InvocationTargetException
      IllegalAccessException
    • updateDashboard

      protected void updateDashboard(@Nullable DashboardModel dashboardModel)
    • loadDashboardByJson

      protected DashboardModel loadDashboardByJson(String jsonPath)
    • loadDashboardByCode

      @Nullable protected DashboardModel loadDashboardByCode(String code)
    • addXmlParameters

      protected void addXmlParameters(DashboardModel dashboardModel)
    • getDuplicatesParams

      protected List<Parameter> getDuplicatesParams(DashboardModel dashboardModel)
    • updateCanvasFragment

      protected void updateCanvasFragment(DashboardModel dashboardModel)
    • refreshWidgets

      protected void refreshWidgets(DashboardEvent dashboardEvent)
    • findWindow

      @Nullable protected Window findWindow(Component frame)
    • getWidget

      public ScreenFragment getWidget(String widgetId)
      Description copied from interface: Dashboard
      Returns widget by passed id.
      Specified by:
      getWidget in interface Dashboard
      Parameters:
      widgetId - widget identifier
      Returns:
      widget fragment
    • searchWidgetFragment

      @Nullable protected ScreenFragment searchWidgetFragment(Component layout, String widgetId)
    • setCode

      public void setCode(String code)
      Description copied from interface: Dashboard
      Dashboard can be configured by setting code of existing dashboard To apply new changes the Dashboard.init(Map) method required to be invoked
      Specified by:
      setCode in interface Dashboard
      Parameters:
      code - another dashboard code
    • setJsonPath

      public void setJsonPath(String jsonPath)
      Description copied from interface: Dashboard
      Dashboard can be configured from json file
      Specified by:
      setJsonPath in interface Dashboard
      Parameters:
      jsonPath - path to json configuration file
    • setXmlParameters

      public void setXmlParameters(List<Parameter> parameters)
      Description copied from interface: Dashboard
      Sets passed parameters to dashboard component
      Specified by:
      setXmlParameters in interface Dashboard
      Parameters:
      parameters - list of parameters to be set
    • setTimerDelay

      public void setTimerDelay(int delay)
      Description copied from interface: Dashboard
      Set delay for dashboard timer
      Specified by:
      setTimerDelay in interface Dashboard
      Parameters:
      delay - delay time in seconds
    • getTimerDelay

      public int getTimerDelay()
      Description copied from interface: Dashboard
      Returns delay for timer
      Specified by:
      getTimerDelay in interface Dashboard
      Returns:
      delay time in seconds
    • getDashboardModel

      public DashboardModel getDashboardModel()
      Specified by:
      getDashboardModel in interface Dashboard
      Returns:
      dashboard entity
    • getAssistantBeanName

      public String getAssistantBeanName()
      Description copied from interface: Dashboard
      Returns assistant bean name
      Specified by:
      getAssistantBeanName in interface Dashboard
      Returns:
      name of assistant bean
    • setAssistantBeanName

      public void setAssistantBeanName(String assistantBeanName)
      Description copied from interface: Dashboard
      Set assistant bean name
      Specified by:
      setAssistantBeanName in interface Dashboard
      Parameters:
      assistantBeanName - name of the assistant bean