Class PanelDataCollectionTemplateVisibilityRules

java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.Container
overit.geocall.basic.ui.container.Panel
overit.geocallapp.wfm.core.ux.datacollection.template.visibilityrules.PanelDataCollectionTemplateVisibilityRules
All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, AjaxableComponent, Badgeable, Hideable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable

public class PanelDataCollectionTemplateVisibilityRules extends Panel
Panel for managing Data Collection Template Visibility Rules.
Since:
22.0
See Also:
GCApi:
controller
  • Field Details

    • STATIC_VIEW_USER_TYPES

      protected static final String STATIC_VIEW_USER_TYPES
      See Also:
    • STATIC_VIEW_OPERATION_CENTERS

      protected static final String STATIC_VIEW_OPERATION_CENTERS
      See Also:
    • STATIC_VIEW_STRUCTURES

      protected static final String STATIC_VIEW_STRUCTURES
      See Also:
    • STATIC_VIEW_AREAS

      protected static final String STATIC_VIEW_AREAS
      See Also:
    • ruleForm

      protected Form ruleForm
    • templateForm

      protected Form templateForm
    • iVisibilityRuleCode

      protected Input iVisibilityRuleCode
    • userTypesTable

      protected TableView userTypesTable
    • operationCentersTable

      protected TableView operationCentersTable
    • structuresTable

      protected TableView structuresTable
    • areasTable

      protected TableView areasTable
    • ebAddVisibilityRule

      protected PlainButton ebAddVisibilityRule
    • deleteButton

      protected PlainButton deleteButton
    • cancelButton

      protected ExitButton cancelButton
    • sbSave

      protected SubmitButton sbSave
    • templateHeader

      protected BODataCollectionTemplateHeader templateHeader
    • visibilitySettings

      protected overit.geocallapp.wfm.users.UserVisibilitySettings visibilitySettings
  • Constructor Details

    • PanelDataCollectionTemplateVisibilityRules

      public PanelDataCollectionTemplateVisibilityRules()
  • 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
    • initializeComponents

      protected void initializeComponents()
      Initialize the panel components.
    • show

      public void show(BODataCollectionTemplateHeader templateHeader)
      Show the panel for the given template.
      Parameters:
      templateHeader - the BODataCollectionTemplateHeader
    • loadTemplateDetails

      protected void loadTemplateDetails()
      Load the template details.
    • loadVisibilityRulesHeader

      protected void loadVisibilityRulesHeader() throws DAException, DAValidateException
      Load the visibility rules for the given template.
      Throws:
      DAException
      DAValidateException
    • manageComponentsEditability

      protected void manageComponentsEditability(boolean isRO)
      Manage the components read-only state.
      Parameters:
      isRO - true to set components to read-only, false to make them editable
    • loadEntitiesData

      protected void loadEntitiesData()
      Load the entities data for the tables based on current user visibility.
    • loadUserTypesTable

      protected void loadUserTypesTable()
      Loads the user types table.
    • loadOperationCentersTable

      protected void loadOperationCentersTable()
      Loads the operation centers table .
    • loadStructuresTable

      protected void loadStructuresTable()
      Loads the structures table.
    • loadAreasTable

      protected void loadAreasTable()
      Loads the areas table.
    • onAddVisibilityRule

      public boolean onAddVisibilityRule(UIMessage uim)
      Handle add visibility rule button click.
      Parameters:
      uim - the UIMessage
    • onChangedVisibilityRuleHeader

      public boolean onChangedVisibilityRuleHeader(UIMessage uim)
      Handle visibility rule header selection change.
      Parameters:
      uim - the UIMessage
    • loadRuleConfiguration

      protected void loadRuleConfiguration(Long ruleHeaderId) throws DAException, DAValidateException
      Load the configuration for the selected rule.
      Parameters:
      ruleHeaderId - the id of the BODCTemplateVisibilityRuleHeader
      Throws:
      DAException
      DAValidateException
    • selectTableRows

      protected void selectTableRows(TableView table, Set<Long> ids)
      Select rows in a table based on the given ids.
      Parameters:
      table - the TableView to use
      ids - the Set of ids to select
    • onSaveVisibilityRule

      public boolean onSaveVisibilityRule(UIMessage uim)
      Handle save button click.
      Parameters:
      uim - the UIMessage
    • validateSave

      protected boolean validateSave()
      Validate save operation.
    • hasAnySelection

      protected boolean hasAnySelection()
      Check if at least one item is selected in any table.
    • buildSaveInput

      Build the save input from the current form state.
    • addRowsFromTable

      protected void addRowsFromTable(List<BODCTemplateVisibilityRuleRow> rows, TableView table)
      Add rows from a table selection to the rows list.
      Parameters:
      rows - the list of rows to add to
      table - the table to get the selection from
    • onDeleteVisibilityRule

      public boolean onDeleteVisibilityRule(UIMessage uim)
      Handle delete button click.
      Parameters:
      uim - the UIMessage
    • onConfirmDeleteVisibilityRule

      public boolean onConfirmDeleteVisibilityRule(UIMessage uim)
      Handle delete confirmation.
      Parameters:
      uim - the UIMessage
    • onCancel

      public boolean onCancel(UIMessage uim)
      Handle cancel button click.
      Parameters:
      uim - the UIMessage
    • resetLayout

      protected void resetLayout()
      Reset the layout to initial state.
    • onSelectOperationCenter

      public boolean onSelectOperationCenter(UIMessage uim)
      Manage the selection of an operation center
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onSelectOperationCenters

      public boolean onSelectOperationCenters(UIMessage uim)
      Manage the selection of all the operation center
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onSelectStructure

      public boolean onSelectStructure(UIMessage uim)
      Manage the selection of a structure
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onSelectStructures

      public boolean onSelectStructures(UIMessage uim)
      Manage the selection of all the structures
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onSelectArea

      public boolean onSelectArea(UIMessage uim)
      Manage the selection of an area
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • onSelectAreas

      public boolean onSelectAreas(UIMessage uim)
      Manage the selection of all areas
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • evaluateSelections

      protected void evaluateSelections(UIMessage uim, TableView changedTable, boolean selectAll)