Class DataCollectionSheetDetail

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 DataCollectionSheetDetail extends Container
Data collection sheet detail page.
Since:
12.0
See Also:
GCApi:
controller
  • Field Details

  • Constructor Details

    • DataCollectionSheetDetail

      public DataCollectionSheetDetail()
  • 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
    • initComponents

      protected void initComponents()
    • loadData

      protected void loadData()
    • isSheetAssociatedToWOOperation

      protected boolean isSheetAssociatedToWOOperation()
    • isSheetAssociatedToSchedulingUser

      protected boolean isSheetAssociatedToSchedulingUser()
    • isSheetAssociatedToAsset

      protected boolean isSheetAssociatedToAsset()
    • isSheetAssociatedToAccount

      protected boolean isSheetAssociatedToAccount()
    • loadWorkorderOperation

      protected BOWorkOrderOperation loadWorkorderOperation(Long woOperationId) throws DAException, DAValidateException
      Throws:
      DAException
      DAValidateException
    • loadWorkorderHeader

      protected BOWorkOrderHeader loadWorkorderHeader(Long workorderId) throws DAException, DAValidateException
      Throws:
      DAException
      DAValidateException
    • loadSchedulingUser

      protected BOSchedulingUser loadSchedulingUser(Long schedulingUserId) throws DAException, DAValidateException
      Throws:
      DAException
      DAValidateException
    • loadDataCollectionType

      protected BODataCollectionType loadDataCollectionType(Long typeId) throws DAException, DAValidateException
      Throws:
      DAException
      DAValidateException
    • initPage

      protected void initPage()
    • initEvaluateExpressions

      protected void initEvaluateExpressions()
      Initializes the evaluation of expressions for the data collection sheet. This method evaluates the expressions for the sheet's tree model and handles any exceptions.
    • initOperationBarItems

      protected void initOperationBarItems()
    • initSheetRecap

      protected void initSheetRecap()
    • initSheetTreeTableView

      protected void initSheetTreeTableView()
    • alignTreePropertiesToNode

      protected void alignTreePropertiesToNode(UXTreeModel<DataCollectionNode,DataCollectionTreeProperties> uxRootNode)
    • refreshChildExpressionsNodes

      protected void refreshChildExpressionsNodes(UXTreeModel<DataCollectionNode,DataCollectionTreeProperties> uxRootNode)
    • updateDataCollectionValuesContainer

      protected void updateDataCollectionValuesContainer()
    • onExpandTree

      public boolean onExpandTree(UIMessage uim)
      UI event handler to expand the tree.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onCollapseTree

      public boolean onCollapseTree(UIMessage uim)
      UI event handler to collapse the tree.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onExpandAll

      public boolean onExpandAll(UIMessage uim)
      UI event handler to expand all.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onCollapseAll

      public boolean onCollapseAll(UIMessage uim)
      UI event handler to collapse all.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onToggleNodeSelection

      public boolean onToggleNodeSelection(UIMessage uim)
      UI event handler to toggle the node selection.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onViewRawModel

      public boolean onViewRawModel(UIMessage uim)
      UI event handler to view the raw model.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • downloadSheetModel

      public WebResource downloadSheetModel(Void v)
      Download the sheet model.
      Parameters:
      v - the Void
      Returns:
      the web resource
    • onViewTemplate

      public boolean onViewTemplate(UIMessage uim)
      UI event handler to view the template.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • loadDataCollectionTemplate

      protected DataCollectionTemplate loadDataCollectionTemplate(Long templateStructure) throws DAValidateException, DAException
      Throws:
      DAValidateException
      DAException
    • onApplyNodeChanges

      public boolean onApplyNodeChanges(UIMessage uim)
      UI event handler to apply the changes to the node.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • getEvaluator

      protected DataCollectionNodeExpressionsEvaluator getEvaluator()
    • onClosePage

      public boolean onClosePage(UIMessage uim)
      UI event handler to close the page.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onConfirmClosePage

      public boolean onConfirmClosePage(UIMessage uim)
      UI event handler to confirm the closing of the page.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onSaveSheet

      public boolean onSaveSheet(UIMessage uim)
      UI event handler to save the sheet.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onCheckResultUserConfirmInstanceUpdate

      protected void onCheckResultUserConfirmInstanceUpdate(UIMessage uim)
      UI event handler called when the user confirms the check result warnings during instance update.

      This method is invoked as a callback from the PanelCheckResult when the user clicks the "Proceed" button after reviewing threshold constraint warnings. It performs the actual save operation by launching a DataCollectionSheetInstanceSaveEvent with the current sheet instance data.

      Parameters:
      uim - the UIMessage containing the UI event data
      See Also:
    • onCalculatedNodesTab

      public boolean onCalculatedNodesTab(UIMessage uim)
      UI event handler to show the calculated nodes recap tab.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • initCalculatedNodesOnPanelTab

      protected void initCalculatedNodesOnPanelTab()
      Initializes the calculated nodes to be displayed in the lateral panel tab. Filters nodes based on visibility, showOnSummary flag, and excludes section type nodes. Sets up the table view if calculated nodes are available, otherwise hides the panel.
    • updateCalculatedNodesOnPanelRecap

      protected void updateCalculatedNodesOnPanelRecap()
      Updates the calculated nodes recap in the lateral panel. Populates the table view with description, code, and value for each calculated node that has the showOnSummary flag set to true.
    • getInitCalculatedNodesDbView

      protected DBView getInitCalculatedNodesDbView()
      Creates and initializes a DBView for the calculated nodes table.
      Returns:
      A DBView with columns for description and value of calculated nodes
    • onUnlockSheet

      public boolean onUnlockSheet(UIMessage uim)
      UI event handler to unlock a data collection sheet. Launches the unlock event and displays errors if validation fails.
      Parameters:
      uim - the UI message
      Returns:
      true to break the responsibility chain
    • onSaveLockSheet

      public boolean onSaveLockSheet(UIMessage uim)
      UI event handler to save and lock a data collection sheet. Saves the sheet first, then launches the lock event.
      Parameters:
      uim - the UI message
      Returns:
      true to break the responsibility chain
    • onRequestUnlockSheet

      public boolean onRequestUnlockSheet(UIMessage uim)
      UI event handler to request unlocking of a locked sheet. Sets the unlock request flag and updates the sheet.
      Parameters:
      uim - the UI message
      Returns:
      true to break the responsibility chain
    • isPossibleToRequestUnlock

      protected boolean isPossibleToRequestUnlock()
      Checks if it's possible to request unlocking the sheet. Temporarily sets the unlock flag to test validation.
      Returns:
      true if unlock request is possible, false otherwise
    • isPossibleToUnLock

      protected boolean isPossibleToUnLock()
      Checks if the sheet can be unlocked by validating unlock requirements.
      Returns:
      true if unlock is possible, false otherwise
    • checkUnlock

      protected boolean checkUnlock(Long sheetId)
      Validates if the sheet can be unlocked by launching an unlock check event.
      Parameters:
      sheetId - the unlock check input containing the sheet to validate
      Returns:
      true if unlock is possible, false if validation fails or an error occurs
    • isPossibleToSaveLock

      protected boolean isPossibleToSaveLock()
      Checks if the sheet can be saved and locked. Requires sheet lock to be enabled, sheet not already fixed, and association with a work order operation.
      Returns:
      true if save and lock is possible, false otherwise