Class CDashboardBasic

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable
Direct Known Subclasses:
CDashboardFailureDD, CDashboardFailureInvestigation, CDashboardMRel, CDashboardStruggleFailure

public abstract class CDashboardBasic extends Container
See Also:
  • Field Details

    • _fSearch

      protected Form _fSearch
    • _pOptions

      protected Panel _pOptions
    • _chartPrinter

      protected overit.geocallapp.wfm.schedulazione.odl.dashboard.print.ChartPDFPrinter _chartPrinter
    • _dateRangePresets

      protected overit.geocallapp.wfm.util.DateRangePresets _dateRangePresets
    • _datLoadChart

      protected DATask _datLoadChart
    • _hgSearchParams

      protected HashGetter _hgSearchParams
    • SAVED_SEARCH_PAGE

      protected String SAVED_SEARCH_PAGE
    • MAX_NAME_SIZE

      protected int MAX_NAME_SIZE
    • _defaultSearch

      protected Boolean _defaultSearch
    • _const

      protected ConstDashboard _const
    • LOG

      protected static final LogChannel LOG
  • Constructor Details

    • CDashboardBasic

      public CDashboardBasic()
  • Method Details

    • onOpen

      public void onOpen(Object o)
      Description copied from class: Container
      Method called when is executed the WindowManager.push(overit.geocall.basic.ui.Window, java.lang.Object) of the Window that contains the Container. It calls the onOpen(o) method of all the Container's childrens.
      If a page is opened through the process of a route, it is possible that the route was called with params to pass to the page.
      The route params could be passed specifying them like query string's param on the url, using commas or the '=' character, to separate the keys and the values. Valid syntaxs are: "&params=KEY1,VAL1,KEY2,VAL2" or "&params=KEY1=VAL1,KEY2=VAL2"
      In that case it is possible to retrieve those params via the WindowManager.getRouteParams() method that returns an HashGetter with the params passed as parameters.
      For example it's possible to retrieve and use the params in this way: HashGetter hg = getWM().getRouteParams();
      String val1 = hg.getString("key1",null);
      String val2 = hg.getString("key2",null);
      Overrides:
      onOpen in class Container
      Parameters:
      o - Object received from the caller
    • initWindow

      protected void initWindow()
      Get components from xml It must be overrided in subclass
    • setUserOperationCenter

      protected void setUserOperationCenter()
      If the user is associated to a Operation Center, set the corresponding multidecoder to that value and put it readonly
    • setupWindow

      protected void setupWindow()
      Define initial window style It must be overrided in subclass and must contain: - loadSearchConfigs(searchType) - path of saved search page to link (SAVED_SEARCH_PAGE)
    • addCustomFilters

      protected void addCustomFilters()
      Add custom filters on search panel
    • getDateRangesPresets

      protected overit.geocallapp.wfm.util.DateRangePresets getDateRangesPresets()
      Get date fields manager
      Returns:
      DateRangePresets
    • onShowDatePresets

      public boolean onShowDatePresets(UIMessage uim)
      Show menù for date presets
      Parameters:
      uim -
      Returns:
    • onClearDatePresets

      public boolean onClearDatePresets(UIMessage uim)
      Empty date ranges fields
      Parameters:
      uim -
      Returns:
    • onApplyPreset

      public boolean onApplyPreset(UIMessage uim)
      Apply the selected date range
      Parameters:
      uim -
      Returns:
    • loadSearchConfigs

      protected void loadSearchConfigs(Long searchType)
      Load saved searches for this page
    • loadDefaultSearch

      protected void loadDefaultSearch()
      Apply default saved search if exists
    • onGoToNotificationSearchConfigs

      public boolean onGoToNotificationSearchConfigs(HashGetter eventData)
      Open saved searches window
      Parameters:
      eventData -
      Returns:
    • onNotificationSearchConfigChanged

      public boolean onNotificationSearchConfigChanged(HashGetter hg)
      Apply the selected saved searches to the search filter
      Parameters:
      hg -
      Returns:
    • customOperationsOnSavedSearchers

      protected void customOperationsOnSavedSearchers(HashGetter ssValues)
      Extension for custom operation on saved search application
      Parameters:
      ssValues - saved search params
    • clearForm

      protected void clearForm(Form searchForm)
      Clear all filter fields
      Parameters:
      searchForm -
    • onSwitchFilterPanel

      public boolean onSwitchFilterPanel(HashGetter hg)
      Open or close filters panel
      Parameters:
      hg -
      Returns:
    • getLoadTask

      protected abstract DATask getLoadTask()
      Get the task that retrive graph data
    • chartPrinter

      protected overit.geocallapp.wfm.schedulazione.odl.dashboard.print.ChartPDFPrinter chartPrinter()
      Get pdfPrinter to print charts
      Returns:
    • onProcessingGraph

      public boolean onProcessingGraph(HashGetter hg)
      Launch graph elaboration from user click after input check
      Parameters:
      hg -
      Returns:
    • checkInput

      protected Boolean checkInput(HashGetter hg)
      Check dates input
      Parameters:
      hg -
      Returns:
    • checkDatesErrors

      protected String checkDatesErrors(HashGetter hg)
      Check if date fields are semantically correct
      Parameters:
      hg -
      Returns:
    • process

      public void process(HashGetter hg)
      Gets form data on input and display graph
    • prepareData

      public abstract void prepareData(HashGetter hgFilter)
    • loadChart

      public abstract void loadChart(HashGetter hgFilter)
    • castToLongSet

      protected void castToLongSet(String fieldName, HashGetter hg)
      Convert the set with name fieldName of hg to a longset or remove it if is null or empty
      Parameters:
      fieldName -
      hg -
    • alignDateInterval

      protected void alignDateInterval(HashGetter hgFilter, GregorianCalendar startCalendar, GregorianCalendar endCalendar)
      Parameters:
      hgFilter -
      startCalendar -
      endCalendar -
    • getInterval

      protected int getInterval(Long time, GregorianCalendar startCalendar, GregorianCalendar endCalendar)
      Return temporal range for the task as number of unit slot example: user select Year -> return the number of years to search user select Month -> return the number of months to search
      Parameters:
      time -
      startCalendar -
      endCalendar -
      Returns:
    • getTitle

      protected String getTitle(HashGetter oParams, String mainTitle, String dateStart, String dateEnd)
      Get chart title combining custom title with search dates
      Parameters:
      oParams -
      mainTitle -
      dateStart -
      dateEnd -
      Returns:
    • getLabelFromType

      protected String getLabelFromType(String label, Long chartType)
      Transform "oracle style" string in normal style
      Parameters:
      label -
      chartType -
      Returns:
    • calculateDetailInterval

      protected void calculateDetailInterval(String barLabel, HashGetter hg, Boolean dateFromOracle, String startDate, String endDate)
      Set the new filter dates from the label of the bar clicked by the user
      Parameters:
      barLabel -
      hg -
    • prepareDataForExternalSearch

      public HashGetter prepareDataForExternalSearch(String data)
      Convert dashboard filters in values for notification or wo search
      Parameters:
      data - = string form of the data that represents of the column clicked by the user
      Returns:
    • showNotifications

      protected void showNotifications(HashGetter filter)
      Use filter hashgetter to retrive notifications and push research notification window with them
      Parameters:
      filter -
    • showWO

      public boolean showWO(HashGetter filter)
      Use filter hashgetter to retrive wo and push research wo window with them
      Parameters:
      filter -
      Returns:
    • getOffsetLabel

      protected String getOffsetLabel(Double maxValue, double[] serie)
      Common method to generate weighted offset for labels
      Parameters:
      maxValue -
      serie -
      Returns:
    • truncateString

      protected String truncateString(String name)