private boolean canProcessRequest ( TimeRestrictedAccessConfig config , String destination ) { if ( destination == null || destination . trim ( ) . length ( ) == 0 ) { destination = "/" ; //$NON-NLS-1$ } List < TimeRestrictedAccess > rulesEnabledForPath = getRulesMatchingPath ( config , destination ) ; if ( rulesEnabledForPath . size ( ) != 0 ) { DateTime currentTime = new DateTime ( DateTimeZone . UTC ) ; for ( TimeRestrictedAccess rule : rulesEnabledForPath ) { boolean matchesDay = matchesDay ( currentTime , rule ) ; if ( matchesDay ) { boolean matchesTime = matchesTime ( rule ) ; if ( matchesTime ) { return true ; } } } return false ; } return true ; }
Evaluates whether the destination provided matches any of the configured pathsToIgnore and matches specified time range .