Class IgnoreList
java.lang.Object
org.pgcodekeeper.core.model.difftree.IgnoreList
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(IgnoredObject rule) Adds an ignore rule to the list.voidaddAll(Collection<IgnoredObject> collection) Adds all ignore rules from the collection to this list.voidClears all ignore rules from the list.getList()Gets the list of ignore rules.Generates string representation of the ignore list configuration.getNameStatus(TreeElement el, boolean inAddSubtree, String... dbNames) Determines the add status for a tree element based on ignore rules.booleanisShow()Gets the default show behavior.voidsetShow(boolean isShow) Sets the default show behavior for this ignore list.
-
Constructor Details
-
IgnoreList
public IgnoreList()
-
-
Method Details
-
isShow
public boolean isShow()Description copied from interface:IIgnoreListGets the default show behavior.- Specified by:
isShowin interfaceIIgnoreList- Returns:
- true if default is to show objects, false if default is to hide
-
setShow
public void setShow(boolean isShow) Description copied from interface:IIgnoreListSets the default show behavior for this ignore list.- Specified by:
setShowin interfaceIIgnoreList- Parameters:
isShow- true for show-all (blacklist), false for hide-all (whitelist)
-
getList
Description copied from interface:IIgnoreListGets the list of ignore rules.- Specified by:
getListin interfaceIIgnoreList- Returns:
- list of ignored objects
-
clearList
public void clearList()Clears all ignore rules from the list. -
add
Description copied from interface:IIgnoreListAdds an ignore rule to the list.- Specified by:
addin interfaceIIgnoreList- Parameters:
rule- the ignore rule to add
-
addAll
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 evaluateinAddSubtree- whether currently in an add subtree contextdbNames- optional database names for rule matching- Returns:
- the final add status for the element
-
getListCode
Generates string representation of the ignore list configuration.- Returns:
- formatted string showing all rules and default behavior
-