Package org.pgcodekeeper.core.ignorelist
Class IgnoreSchemaList
java.lang.Object
org.pgcodekeeper.core.ignorelist.IgnoreSchemaList
- All Implemented Interfaces:
IIgnoreList
Implementation of ignore list specifically for schema filtering.
Manages rules for showing or hiding database schemas based on pattern matching.
Uses black list approach by default (show all, hide some).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(IgnoredObject rule) Adds an ignore rule to the list.voidClears all ignore rules from the list.getList()Gets the list of ignore rules.Generates string representation of the ignore list configuration.booleangetNameStatus(String schema) Checks if a schema should be shown based on configured rules.booleanisShow()Gets the default show behavior.voidsetShow(boolean isShow) Sets the default show behavior for this ignore list.
-
Constructor Details
-
IgnoreSchemaList
public IgnoreSchemaList()
-
-
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
-
getNameStatus
Checks if a schema should be shown based on configured rules.- Parameters:
schema- the schema name to check- Returns:
- true if schema should be shown, false if it should be hidden
-
getListCode
Generates string representation of the ignore list configuration.- Returns:
- formatted string showing all rules and default behavior
-