private boolean doesPublicanCfgsContainValue ( final ContentSpec contentSpec , final String value ) { final Pattern pattern = Pattern . compile ( "^(.*\\n)?( |\\t)*" + value + ":.*" , java . util . regex . Pattern . DOTALL ) ; if ( ! isNullOrEmpty ( contentSpec . getPublicanCfg ( ) ) && pattern . matcher ( contentSpec . getPublicanCfg ( ) ) . matches ( ) ) { return true ; } else if ( ! contentSpec . getAllAdditionalPublicanCfgs ( ) . isEmpty ( ) ) { for ( final Entry < String , String > entry : contentSpec . getAllAdditionalPublicanCfgs ( ) . entrySet ( ) ) { if ( ! isNullOrEmpty ( entry . getValue ( ) ) && pattern . matcher ( entry . getValue ( ) ) . matches ( ) ) { return true ; } } } return false ; }
Check if the default or additional publican cfg files have a specified value