java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.Container
overit.geocallapp.wfm.core.ux.schedule.intervention.outcome.meterreading.MeterReading
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

public class MeterReading extends Container
Meter reading edit page
Since:
9.2
See Also:
GCApi:
controller
  • Field Details

    • fMeterReading

      protected Form fMeterReading
    • readingType

      protected Long readingType
    • readingMeterType

      protected Long readingMeterType
    • currentIntervention

      protected Intervention currentIntervention
    • currentInterventionReadings

      protected InterventionOutcomeReadings currentInterventionReadings
    • giConfiguration

      protected GIConfiguration giConfiguration
    • workOrder

      protected WorkOrder workOrder
    • INSERT

      protected static final int INSERT
      See Also:
    • UPDATE

      protected static final int UPDATE
      See Also:
    • VIEW

      protected static final int VIEW
      See Also:
    • mode

      protected int mode
    • gridMeter

      protected Grid gridMeter
    • gridConverter

      protected Grid gridConverter
    • tvAdditionalInfo

      protected TableView tvAdditionalInfo
    • selectionPanelAdditionalInfo

      protected SelectionPanel selectionPanelAdditionalInfo
    • ilMeter

      protected InputLookup ilMeter
    • ioMeter

      protected InputOption ioMeter
    • previousMeterReading

      protected HashGetter previousMeterReading
  • Constructor Details

    • MeterReading

      public MeterReading()
  • 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
    • getDefaultMeter

      protected Long getDefaultMeter()
      Determines the default meter for intervention
      Returns:
      the default meter id
      See Also:
    • loadSelectableMeters

      protected void loadSelectableMeters() throws DAValidateException
      Loads the selectable meters for readings
      Throws:
      DAValidateException - if something went wrong
    • loadWorkOrderMeters

      protected DBView loadWorkOrderMeters()
      Loads the work order related meters
      Returns:
      the work order related meters
    • loadPreviousMeterReadingData

      protected void loadPreviousMeterReadingData() throws DAValidateException
      Loads the latest reading data for the current meter
      Throws:
      DAValidateException
    • applyInterventionGroupRules

      protected void applyInterventionGroupRules(Long readingMeterType)
      Applies the intervention group configurations to controls in the page
      Parameters:
      readingMeterType - the reading type
    • onSelectionPanelAdditionalInfo

      public boolean onSelectionPanelAdditionalInfo(UIMessage uim)
      UI event handler to open selection panel for additional info
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • onOkSelectionPanelInfoAggiuntive

      public boolean onOkSelectionPanelInfoAggiuntive(UIMessage uim)
      UI event handler for additional info selection panel closure
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • onLoadMediaFile

      public boolean onLoadMediaFile(UIMessage uim)
      UI event handler to open the load media file page
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • onViewMediaFile

      public boolean onViewMediaFile(UIMessage uim)
      UI event handler to open the view media file page
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • onSelectMeter

      public boolean onSelectMeter(UIMessage uim)
      UI event handler that manages a meter selection
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • selectMeter

      protected void selectMeter() throws DAValidateException
      Prepares the form after a meter selection
      Throws:
      DAValidateException - if something went wrong
    • onOkMeterReading

      public boolean onOkMeterReading(UIMessage uim)
      UI event handler for reading edit confirmation
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • validate

      protected void validate(HashGetter readingValues) throws DAValidateException
      Performs validations on the reading
      Parameters:
      readingValues - the submitted form values
      Throws:
      DAValidateException - if something went wrong
    • validateAdditionalInfo

      protected void validateAdditionalInfo(GISection section) throws DAValidateException
      Performs validations on the additional infos
      Parameters:
      section - the additional info related GISection
      Throws:
      DAValidateException - if something went wrong
    • mediaFileRequired

      protected boolean mediaFileRequired()
      Determines if a media file is required for the reading basing upon intervention group configuration
      Returns:
      true if a media file is required
    • getMeterGISection

      protected GISection getMeterGISection(GIConfiguration giConfiguration, Long readingMeterType)
      Loads the meter GISection for the current reading type from intervention group configuration
      Parameters:
      giConfiguration - the current intervention group configuration
      readingMeterType - the current meter type
      Returns:
      the intervention group section
      See Also:
    • getConverterGISection

      protected GISection getConverterGISection(GIConfiguration giConfiguration, Long readingMeterType)
      Loads the converter GISection for the current reading type from intervention group configuration
      Parameters:
      giConfiguration - the current intervention group configuration
      readingMeterType - the current meter type
      Returns:
      the intervention group section
      See Also:
    • getReadingAdditionalInfoSection

      protected GISection getReadingAdditionalInfoSection(GISection giSectionMeter)
      Loads the additional info GISection for the current reading type from intervention group configuration
      Parameters:
      giSectionMeter - the meter section
      Returns:
      the intervention group section
    • isExistingCounter

      protected boolean isExistingCounter()
    • hasMediaFiles

      protected boolean hasMediaFiles()