public List < ActiveRule > getActiveRulesByRepository ( String repositoryKey ) { List < ActiveRule > result = new ArrayList <> ( ) ; for ( ActiveRule activeRule : activeRules ) { if ( repositoryKey . equals ( activeRule . getRepositoryKey ( ) ) && activeRule . isEnabled ( ) ) { result . add ( activeRule ) ; } } return result ; }
Get the active rules of a specific repository . Only enabled rules are selected . Disabled rules are excluded .