java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.Container
overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcomeSectionBase
overit.geocallapp.wfm.core.ux.schedule.intervention.outcome.meterreading.ActivityOutcomeMeterReadings
All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Hideable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable, InterventionOutcomeSection

public class ActivityOutcomeMeterReadings extends overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcomeSectionBase
InterventionOutcomeSection to manage the meter readings within an intervention outcome
Since:
9.2
See Also:
GCApi:
controller
  • Field Details

    • HIGHLIGHTCOMPONENTNAME_METERREADINGS

      protected static final String HIGHLIGHTCOMPONENTNAME_METERREADINGS
      See Also:
    • tvActivityOutcomeMeterReadings

      protected TableView tvActivityOutcomeMeterReadings
    • currentInterventionStorableData

      protected InterventionOutcomeSaveInput currentInterventionStorableData
    • currentInterventionReadings

      protected InterventionOutcomeReadings currentInterventionReadings
    • currentReadingType

      protected Long currentReadingType
    • giConfiguration

      protected GIConfiguration giConfiguration
    • daMeterReadings

      protected DABase daMeterReadings
  • Constructor Details

    • ActivityOutcomeMeterReadings

      public ActivityOutcomeMeterReadings()
  • 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 overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcomeSectionBase
      Parameters:
      o - Object received from the caller
    • initForIntervention

      public void initForIntervention(Intervention intervention, InterventionOutcomeSaveInput storableData, WorkOrder workOrder)
      Description copied from interface: InterventionOutcomeSection
      Prepare the section to edit the given intervention
      Specified by:
      initForIntervention in interface InterventionOutcomeSection
      Overrides:
      initForIntervention in class overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcomeSectionBase
      Parameters:
      intervention - the intervention to edit
      storableData - the storable data that holds the already edited data. Can be null.
      workOrder - the intervention's work order
    • loadExistingReadings

      protected void loadExistingReadings()
      Loads existing meter readings into reading section
    • loadWOOperationMeterReadings

      protected List<BOMeterReading> loadWOOperationMeterReadings()
      Loads existing meter readings for the workorder operation
      Returns:
      The list of BOMeterReading
    • loadReadingAdditionalInfo

      protected DBView loadReadingAdditionalInfo(Long readingId)
      Loads existing additional info for a meter reading
      Parameters:
      readingId - the reading id
      Returns:
      The list of additional info
    • setInterventionGroup

      public void setInterventionGroup(BOInterventionGroup interventionGroup) throws DAValidateException
      Description copied from interface: InterventionOutcomeSection
      Set the new intervention group to use for the editing of the section.
      Parameters:
      interventionGroup - the intervention group to use for the editing of the section
      Throws:
      DAValidateException - the DA validate exception
    • getReadingType

      public Long getReadingType(BOInterventionGroup interventionGroup) throws DAValidateException
      Determines the expected reading type for the current intervention basing upon the intervention group settings.
      Parameters:
      interventionGroup - the current intervention group
      Returns:
      the reading type id
      Throws:
      DAValidateException - the DA validate exception
      See Also:
    • isActiveReadingMeterType

      protected boolean isActiveReadingMeterType(GISection giSection)
      Determines if a GISection allows a meter reading
      Parameters:
      giSection - the requested intervention group section
      Returns:
      true if the section allows a meter reading, false otherwise
    • onNewExistingMeterReading

      public boolean onNewExistingMeterReading(UIMessage uim)
      UI event handler to open the new reading page for existing meter
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • onNewInstalledMeterReading

      public boolean onNewInstalledMeterReading(UIMessage uim)
      UI event handler to open the new reading page for installed meter
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • onEditMeterReading

      public boolean onEditMeterReading(UIMessage uim)
      UI event handler to open the edit page for an existing reading
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • prepareMeterReadingContainerInput

      protected MeterReadingContainerInput prepareMeterReadingContainerInput(Long readingMeterType, Long meterId)
    • onRestoreFromNewReading

      public void onRestoreFromNewReading(Object o)
      Adds the inserted reading to intervention outcome
      Parameters:
      o - the object returned from reading edit page
    • onRestoreFromEditReading

      public void onRestoreFromEditReading(Object o)
      Updates the modified reading into intervention outcome
      Parameters:
      o - the object returned from reading edit page
    • updateMeterReadings

      protected void updateMeterReadings(BOMeterReading reading, DBView readingAdditionalInfo)
    • prepareMeterReadingsTableView

      protected void prepareMeterReadingsTableView()
      Displays the current meter readings into the reading section
    • setupSection

      public void setupSection()
      Prepares the readings section basing upon intervention group configurations
    • highlightContainerRegistryNames

      protected String[] highlightContainerRegistryNames()
      Description copied from class: overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcomeSectionBase
      Gets the names of the defined HighlightContainer
      Specified by:
      highlightContainerRegistryNames in class overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcomeSectionBase
      Returns:
      the names of the defined HighlightContainer
    • reset

      public void reset()
      Description copied from interface: InterventionOutcomeSection
      Clear the section editing state
      Specified by:
      reset in interface InterventionOutcomeSection
      Overrides:
      reset in class overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcomeSectionBase
    • validate

      public List<DAValidateException> validate(Intervention intervention, InterventionOutcomeSaveInput storableData)
      Description copied from interface: InterventionOutcomeSection
      Validate the given values collecting the eventually generated exceptions.
      Specified by:
      validate in interface InterventionOutcomeSection
      Overrides:
      validate in class overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcomeSectionBase
      Parameters:
      intervention - the intervention to validate
      storableData - the storable data
      Returns:
      a List of DAValidateException representing the validation errors
    • checkForSave

      public void checkForSave() throws DAValidateException
      Description copied from interface: InterventionOutcomeSection
      Method called before that the whole outcome will be saved. Is used by the section that handle data related to the whole operations set.
      Throws:
      DAValidateException - if the check fails
    • prepareSaveData

      public void prepareSaveData(InterventionOutcomeSaveInput storableData)
      Description copied from interface: InterventionOutcomeSection
      Allows the section to add its information to the storable data that will be saved
      Parameters:
      storableData - the storable data to prepare in which the section can put its information
    • getSectionName

      public String getSectionName()
      Description copied from interface: InterventionOutcomeSection
      Gets the section name
      Returns:
      the section name
    • onInterventionWillBeClosed

      public void onInterventionWillBeClosed()
      Description copied from interface: InterventionOutcomeSection
      This method will be called after the outcome reason selection, for the work orders by orders when all the interventions have an outcome reason with conclusive type
    • onInterventionWillNotBeClosed

      public void onInterventionWillNotBeClosed()
      Description copied from interface: InterventionOutcomeSection
      This method will be called after the outcome reason selection, for the work orders by orders when there is at least one interventions with an outcome reason that is not conclusive
    • refreshMultimediaFilesList

      protected void refreshMultimediaFilesList()