Class ActionCreateBeansFromTable

All Implemented Interfaces:
VetoableChangeListener, Comparable<NamedBean>, EventListener, PropertyChangeProvider, Base, DigitalAction, DigitalActionBean, NamedBean

This action listens on some beans and runs the ConditionalNG on property change.
  • Constructor Details

  • Method Details

    • getDeepCopy

      public Base getDeepCopy(Map<String,String> systemNames, Map<String,String> userNames) throws ParserException
      Description copied from interface: Base
      Create a deep copy of myself and my children The item needs to try to lookup itself in both systemNames and userNames to see if the user has given a new system name and/or a new user name.If no new system name is given, an auto system name is used. If no user name is given, a null user name is used.
      Specified by:
      getDeepCopy in interface Base
      Parameters:
      systemNames - a map of old and new system name
      userNames - a map of old system name and new user name
      Returns:
      a deep copy
      Throws:
      ParserException
    • isOnlyCreatableTypes

      public boolean isOnlyCreatableTypes()
      Get whenever to show only types that can be created with this action.
      Returns:
      true if show only types that can be created, false otherwise
    • setOnlyCreatableTypes

      public void setOnlyCreatableTypes(boolean onlyCreatableTypes)
      Set whenever to show only types that can be created with this action.
      Parameters:
      onlyCreatableTypes - true show only types that can be created, false otherwise
    • getNamedBeanType

      Get the type of the named beans
      Returns:
      the type of named beans
    • setNamedBeanType

      public void setNamedBeanType(@Nonnull NamedBeanType namedBeanType)
      Set the type of the named beans
      Parameters:
      namedBeanType - the type of the named beans
    • getSelectNamedBean

    • getTableRowOrColumn

      Get tableRowOrColumn.
      Returns:
      tableRowOrColumn
    • setTableRowOrColumn

      public void setTableRowOrColumn(@Nonnull TableRowOrColumn tableRowOrColumn)
      Set tableRowOrColumn.
      Parameters:
      tableRowOrColumn - tableRowOrColumn
    • getRowOrColumnSystemName

      Get name of row or column
      Returns:
      name of row or column
    • setRowOrColumnSystemName

      public void setRowOrColumnSystemName(@Nonnull String rowOrColumnName)
      Set name of row or column
      Parameters:
      rowOrColumnName - name of row or column
    • getRowOrColumnUserName

      Get name of row or column
      Returns:
      name of row or column
    • setRowOrColumnUserName

      public void setRowOrColumnUserName(@Nonnull String rowOrColumnName)
      Set name of row or column
      Parameters:
      rowOrColumnName - name of row or column
    • isIncludeCellsWithoutHeader

      public boolean isIncludeCellsWithoutHeader()
      Get whenever to include cells that doesn't have a header. Cells without headers can be used to use some cells in the table as comments.
      Returns:
      true if include cells that doesn't have a header, false otherwise
    • setIncludeCellsWithoutHeader

      public void setIncludeCellsWithoutHeader(boolean includeCellsWithoutHeader)
      Set whenever to include cells that doesn't have a header. Cells without headers can be used to use some cells in the table as comments.
      Parameters:
      includeCellsWithoutHeader - true if include rows/columns that doesn't have a header, false otherwise
    • isMoveUserName

      public boolean isMoveUserName()
      Get whenever to move the user name to the new bean.
      Returns:
      true if username should be moved, false otherwise
    • setMoveUserName

      public void setMoveUserName(boolean isMoveUserName)
      Set whenever to move the user name to the new bean.
      Parameters:
      isMoveUserName - true if username should be moved, false otherwise
    • isUpdateToUserName

      public boolean isUpdateToUserName()
      Get whenever to use the user name for beans that already uses the system name.
      Returns:
      true if update beans to use user name, false otherwise
    • setUpdateToUserName

      public void setUpdateToUserName(boolean updateToUserName)
      Set whenever to use the user name for beans that already uses the system name.
      Parameters:
      updateToUserName - true if update beans to use user name, false otherwise
    • isRemoveOldBean

      public boolean isRemoveOldBean()
      Get whenever to remove the old bean.
      Returns:
      true if remove old bean, false otherwise
    • setRemoveOldBean

      public void setRemoveOldBean(boolean removeOldBean)
      Set whenever to remove the old bean.
      Parameters:
      removeOldBean - true if remove old bean, false otherwise
    • getCategory

      Get the category.
      Specified by:
      getCategory in interface Base
      Overrides:
      getCategory in class AbstractBase
      Returns:
      the category
    • execute

      public void execute() throws JmriException
      Execute this DigitalActionBean.
      Specified by:
      execute in interface DigitalAction
      Throws:
      JmriException - when an exception occurs
    • getChild

      Description copied from class: AbstractBase
      Get a child of this item
      Specified by:
      getChild in interface Base
      Overrides:
      getChild in class AbstractBase
      Parameters:
      index - the index of the child to get
      Returns:
      the child
      Throws:
      IllegalArgumentException - if the index is less than 0 or greater or equal with the value returned by getChildCount()
      UnsupportedOperationException - when needed
    • getChildCount

      public int getChildCount()
      Description copied from class: AbstractBase
      Get the number of children.
      Specified by:
      getChildCount in interface Base
      Overrides:
      getChildCount in class AbstractBase
      Returns:
      the number of children
    • getShortDescription

      Description copied from interface: Base
      Get a short description of this item.
      Specified by:
      getShortDescription in interface Base
      Parameters:
      locale - The locale to be used
      Returns:
      a short description
    • getLongDescription

      public String getLongDescription(Locale locale)
      Description copied from interface: Base
      Get a long description of this item.
      Specified by:
      getLongDescription in interface Base
      Parameters:
      locale - The locale to be used
      Returns:
      a long description
    • setup

      public void setup()
      Setup this object and its children. This method is used to lookup system names for child sockets, turnouts, sensors, and so on.
      Specified by:
      setup in interface Base
    • disposeMe

      public void disposeMe()
      Dispose this class. Listeners do not need to be unregistered by this method since they are unregistered by dispose().
      Overrides:
      disposeMe in class AbstractBase
    • getUsageDetail

      public void getUsageDetail(int level, NamedBean bean, List<NamedBeanUsageReport> report, NamedBean cdl)
      Add a new NamedBeanUsageReport to the report list if there are any matches in this action or expresssion.

      NamedBeanUsageReport Usage keys:

      • LogixNGAction
      • LogixNGExpression
      Specified by:
      getUsageDetail in interface Base
      Overrides:
      getUsageDetail in class AbstractBase
      Parameters:
      level - The current recursion level for debugging.
      bean - The named bean that is the object of the search.
      report - A list of NamedBeanUsageReport usage reports.
      cdl - The current ConditionalNG bean. Null for Module searches since there is no conditional