Class IgnoreList

java.lang.Object
org.pgcodekeeper.core.model.difftree.IgnoreList
All Implemented Interfaces:
IIgnoreList

public class IgnoreList extends Object implements IIgnoreList
Implementation of ignore list for managing database object filtering rules. Provides functionality to add, merge, and evaluate ignore rules for database objects with support for hierarchical rule precedence and content-based filtering.
  • Constructor Details

    • IgnoreList

      public IgnoreList()
  • Method Details

    • isShow

      public boolean isShow()
      Description copied from interface: IIgnoreList
      Gets the default show behavior.
      Specified by:
      isShow in interface IIgnoreList
      Returns:
      true if default is to show objects, false if default is to hide
    • setShow

      public void setShow(boolean isShow)
      Description copied from interface: IIgnoreList
      Sets the default show behavior for this ignore list.
      Specified by:
      setShow in interface IIgnoreList
      Parameters:
      isShow - true for show-all (blacklist), false for hide-all (whitelist)
    • getList

      public List<IgnoredObject> getList()
      Description copied from interface: IIgnoreList
      Gets the list of ignore rules.
      Specified by:
      getList in interface IIgnoreList
      Returns:
      list of ignored objects
    • clearList

      public void clearList()
      Clears all ignore rules from the list.
    • add

      public void add(IgnoredObject rule)
      Description copied from interface: IIgnoreList
      Adds an ignore rule to the list.
      Specified by:
      add in interface IIgnoreList
      Parameters:
      rule - the ignore rule to add
    • addAll

      public void addAll(Collection<IgnoredObject> collection)
      Adds all ignore rules from the collection to this list. Each rule is processed through the standard add logic to handle merging.
      Parameters:
      collection - collection of ignore rules to add
    • getNameStatus

      public IgnoredObject.AddStatus getNameStatus(TreeElement el, boolean inAddSubtree, String... dbNames)
      Determines the add status for a tree element based on ignore rules. Evaluates all matching rules and applies precedence logic.
      Parameters:
      el - the tree element to evaluate
      inAddSubtree - whether currently in an add subtree context
      dbNames - optional database names for rule matching
      Returns:
      the final add status for the element
    • getListCode

      public String getListCode()
      Generates string representation of the ignore list configuration.
      Returns:
      formatted string showing all rules and default behavior