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.CActivityOutcome
overit.geocallapp.wfm.core.ux.schedule.intervention.outcome.InterventionOutcome
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 InterventionOutcome extends overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcome
Main container for Intervention outcome editing
Since:
9.2
See Also:
GCApi:
controller
  • Field Details

    • INPUT_FIELD_ONLY_CURRENT_INTERVENTION

      public static final String INPUT_FIELD_ONLY_CURRENT_INTERVENTION
      See Also:
    • INTERVENTION_STATUS_ICON_FIELD

      protected static final String INTERVENTION_STATUS_ICON_FIELD
      Field in the interventions table that store the editing status for the related intervention
      See Also:
    • STATUS_EDITING_OK

      protected static final Long STATUS_EDITING_OK
      Value for the INTERVENTION_STATUS_ICON_FIELD field in the interventions table that say that editing is OK
    • STATUS_EDITING_KO

      protected static final Long STATUS_EDITING_KO
      Value for the INTERVENTION_STATUS_ICON_FIELD field in the interventions table that say that something went wrong during the intervention editing
      See Also:
    • INTERVENTION_STATUS_PROBLEMS_FIELD

      protected static final String INTERVENTION_STATUS_PROBLEMS_FIELD
      Filed of the interventions table to store the problems collected during the intervention editing
      See Also:
    • RN_EDITING_PANEL

      protected static final String RN_EDITING_PANEL
      See Also:
    • optionalInterventionsTableView

      protected TableView optionalInterventionsTableView
      table view with the optional interventions data. Will be used to generate one of the optional interventions
    • showOnlyCurrentIntervention

      protected boolean showOnlyCurrentIntervention
    • isAlreadySaved

      protected boolean isAlreadySaved
      say if the user have already saved the edited data
  • Constructor Details

    • InterventionOutcome

      public InterventionOutcome()
  • Method Details

    • onOpen

      public void onOpen(Object obj)
      Prepares the container loading the required intervention with the interventions linked to it. Then selects the input agenda's intervention.
      Overrides:
      onOpen in class overit.geocallapp.wfm.schedulazione.consuntivazione.activity.CActivityOutcome
      Parameters:
      obj - Object received from the caller
      Throws:
      overit.geocall.asserts.AssertsException - if the input object is not an HashGetter, and if that HashGetter doesn't have at least one of these values
      • CActivityOutcome.INPUT_FIELD_MASTER_AGENDA
      • CActivityOutcome.INPUT_FIELD_MASTER_SCHEDULING
    • buildPageXml

      protected void buildPageXml(HashGetter openParams)
    • onRestore

      public void onRestore(Object o)
      Description copied from class: Container
      Method called when is executed the WindowManager.pop(java.lang.Object) of the above Window. It calls the onRestore(o) method of all the Container's childrens
      Overrides:
      onRestore in class Container
      Parameters:
      o - Object received from the caller
    • initForIntervention

      protected void initForIntervention(Intervention intervention, InterventionOutcomeSaveInput storableData)
      Prepare the container for the given intervention.
      Parameters:
      intervention - the intervention to edit
      storableData - the storable data eventually associated to the intervention
    • initForWorkOrder

      protected void initForWorkOrder(WorkOrder workOrder)
      Prepare the container for the given work order.
      Parameters:
      workOrder - the work order for which prepare the container
    • manageEditability

      protected void manageEditability()
      Enable or disable the container's controls in order to allow or deny the intervention editing according to the target intervention state
    • loadWorkOrder

      protected WorkOrder loadWorkOrder()
      Load the work order related to the interventions to edit.
      Returns:
      the loaded work order
    • loadInterventions

      protected void loadInterventions()
      Load the list of Intervention to edit
    • updateInterventionTable

      protected void updateInterventionTable(boolean addOnlyNew)
      Synch the interventions table with the List of Interventions in memory
      Parameters:
      addOnlyNew - if true the update is limited to the added operations, so the updated data to the already existing operations still remains
    • reset

      protected void reset()
      Clear the container to be ready to edit a new intervention
    • onSave

      public boolean onSave(UIMessage uim)
      UI event handler to start the outcome save process
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
      See Also:
    • saveOutcomes

      protected void saveOutcomes()
      Prepare the intervention outcome data for the InterventionOutcomeSaveEvent and launch it. Before, does a validation and abort the action if some check will not pass, showing an alert with informations about the problems.
      See Also:
    • onUndoAllChanges

      public boolean onUndoAllChanges(UIMessage uim)
      UI event handler to reset all the user changes to the intervention outcome Will show a confirmation panel before to do the operation
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • onConfirmUndoAllChanges

      public boolean onConfirmUndoAllChanges(UIMessage uim)
      UI event handler to reset all the user changes
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • onOptionalOperationSelect

      public boolean onOptionalOperationSelect(UIMessage uim)
      UI event handler to start the optional operation insert process
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain
    • manageTechnicalObjectForOptionalOperation

      protected boolean manageTechnicalObjectForOptionalOperation(HashGetter optionalOperation)
      Evaluate if the user must select a technical object for the requested optional operation If the sub technical object is required, the user will be automatically forwarder to the technical object selection page.
      Parameters:
      optionalOperation - the raw data of the optional operation for which evaluate if a sub facility is required
      Returns:
      true if the user must select a technical object for the requested optional operation, false otherwise.
      See Also:
    • onRestoreFromTechnicalObjectSelection

      public void onRestoreFromTechnicalObjectSelection(Object o)
      Restore handler from the Facility selection required to generate the selected optional operation
      Parameters:
      o - the restore input
    • askOptionalOperationConfirm

      protected void askOptionalOperationConfirm()
      Build the Alert to ask to the user if he want really generate the selected optional operation
      See Also:
    • onShowOperationsProbles

      public boolean onShowOperationsProbles(UIMessage uim)
      UI event handler to start the outcome save process
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
    • onShowBulkUpdatePanel

      public boolean onShowBulkUpdatePanel(UIMessage uim)
      UI event handler to show a panel that allows the user to edit more than one intervention at a time
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
    • onConfirmBulkUpdate

      public boolean onConfirmBulkUpdate(UIMessage uim)
      UI event handler to confirm the interventions bulk update. So apply the edited data to the selected interventions
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
    • selectIntervention

      protected void selectIntervention(HashGetter interventionsTableRow)
      Do the actual intervention selection starting from the interventions table row
      Parameters:
      interventionsTableRow - the HashGetter with the interventions table row in which find the Intervention to select
    • onInterventionSelection

      public boolean onInterventionSelection(UIMessage uim)
      UI event handler for the intervention selection Apply the user changes to the current intervention before to select the new one
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
    • onShowOptionalOperations

      public boolean onShowOptionalOperations(UIMessage uim)
      UI event handler to show the optional operations panel. The user will select the operation to insert
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
    • onConfirmNewOptionalOperations

      public boolean onConfirmNewOptionalOperations(UIMessage uim)
      UI event handler to manage the new optional operation confirm.
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
    • onAbortNewOptionalOperations

      public boolean onAbortNewOptionalOperations(UIMessage uim)
      UI event handler to manage the new optional operation abort.
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
    • onShowInterventionInfo

      public boolean onShowInterventionInfo(UIMessage uim)
      UI event handler to show the intervention info panel
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
    • outcomeReasonChanged

      protected void outcomeReasonChanged()
      Called when the outcome reason is changed. Evaluate if the new outcome is conclusive or not and notify the sections with this information
      See Also:
    • isConclusiveOutcomeReason

      protected boolean isConclusiveOutcomeReason(Intervention intervention, InterventionOutcomeSaveInput storableData)
      Define if the given intervention has a conclusive outcome.
      Parameters:
      intervention - the intervention for which look if exists a conclusive outcome
      storableData - the user edited data of this intervention. Can be null if the user have not edited the intervention
      Returns:
      true if the intervention has a conclusive outcome, false otherwise.
    • selectOutcomeReason

      protected void selectOutcomeReason()
      Try to select the new outcome reason, but if the intervention group is changing, ask to the user if want really apply this change.
      See Also:
    • confirmOutcomeReasonSelection

      protected void confirmOutcomeReasonSelection() throws DAValidateException
      Do the new outcome selection assuming that the user have confirmed it
      Throws:
      DAValidateException
      See Also:
    • onOutcomeReasonSelected

      public boolean onOutcomeReasonSelected(UIMessage uim)
      UI event handler to intercept the outcome reason selection. If the intervention group will change, the system will ask for confirmation before to actually do the change.
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
    • onConfirmOutcomeReasonSelection

      public boolean onConfirmOutcomeReasonSelection(UIMessage uim)
      UI event handler to intercept the outcome reason selection confirmation.
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise.
      See Also:
    • onClose

      public boolean onClose(UIMessage uim)
      UI event handler to manage the page closing
      Parameters:
      uim - the UI event data such as the form content and control keys
      Returns:
      true to break the responsibility chain, false otherwise. TODO after WOOperation replace FLAG_ROLOAD_ODL with a generic OUTCOME_SAVED for both scheduled and not interventions
    • applyInterventionChanges

      protected void applyInterventionChanges(Intervention intervention)
      Build the InterventionOutcomeSaveInput with the current data inserted by the user for the activity outcome. Then do a first check to identify the errors, and update the main table view with the edited data e and the problem list
      Parameters:
      intervention - the Intervention for which apply the current changes
    • prepareInterventionTable

      protected void prepareInterventionTable() throws DAValidateException
      Fill the interventions TableView starting from the loaded interventions.
      Throws:
      DAValidateException - if something went wrong
    • prepareInterventionTableRow

      protected HashGetter prepareInterventionTableRow(Intervention intervention) throws DAValidateException
      Prepare a single row of the interventions table view
      Parameters:
      intervention - the interventions for which build the table view row
      Returns:
      the intervention's data for the interventions table view
      Throws:
      DAValidateException - if something went wrong
    • checkForSave

      protected void checkForSave() throws DAValidateException
      Execute the some global check, and delegate to each InterventionOutcomeSection the specific checks if needed.
      Throws:
      DAValidateException - if at least one check is failed, to break the save action.
      See Also:
    • init

      protected void init()
    • onSaveMeasureEdit

      public boolean onSaveMeasureEdit(UIMessage uim)
    • onAbortMeasureEdit

      public boolean onAbortMeasureEdit(UIMessage uim)