public void setDomainsAlwaysInScope ( List < DomainAlwaysInScopeMatcher > domainsAlwaysInScope ) { if ( domainsAlwaysInScope == null || domainsAlwaysInScope . isEmpty ( ) ) { ( ( HierarchicalConfiguration ) getConfig ( ) ) . clearTree ( ALL_DOMAINS_ALWAYS_IN_SCOPE_KEY ) ; this . domainsAlwaysInScope = Collections . emptyList ( ) ; this . domainsAlwaysInScopeEnabled = Collections . emptyList ( ) ; return ; } this . domainsAlwaysInScope = new ArrayList <> ( domainsAlwaysInScope ) ; ( ( HierarchicalConfiguration ) getConfig ( ) ) . clearTree ( ALL_DOMAINS_ALWAYS_IN_SCOPE_KEY ) ; int size = domainsAlwaysInScope . size ( ) ; ArrayList < DomainAlwaysInScopeMatcher > enabledExcludedDomains = new ArrayList <> ( size ) ; for ( int i = 0 ; i < size ; ++ i ) { String elementBaseKey = ALL_DOMAINS_ALWAYS_IN_SCOPE_KEY + "(" + i + ")." ; DomainAlwaysInScopeMatcher excludedDomain = domainsAlwaysInScope . get ( i ) ; getConfig ( ) . setProperty ( elementBaseKey + DOMAIN_ALWAYS_IN_SCOPE_VALUE_KEY , excludedDomain . getValue ( ) ) ; getConfig ( ) . setProperty ( elementBaseKey + DOMAIN_ALWAYS_IN_SCOPE_REGEX_KEY , excludedDomain . isRegex ( ) ) ; getConfig ( ) . setProperty ( elementBaseKey + DOMAIN_ALWAYS_IN_SCOPE_ENABLED_KEY , excludedDomain . isEnabled ( ) ) ; if ( excludedDomain . isEnabled ( ) ) { enabledExcludedDomains . add ( excludedDomain ) ; } } enabledExcludedDomains . trimToSize ( ) ; this . domainsAlwaysInScopeEnabled = enabledExcludedDomains ; }
Sets the domains that will be always in scope .