@Test public void testIsMatch() throws Exception { for (Object[] row : data) { String resource = (String)row[0]; String policyValue = (String)row[1]; boolean optWildcard = (boolean)row[2]; boolean isRecursive = (boolean)row[3]; boolean result = (boolean)row[4]; String user = (String) row[5]; Map<String, Object> evalContext = new HashMap<>(); RangerAccessRequestUtil.setCurrentUserInContext(evalContext, user); MatcherWrapper matcher = new MatcherWrapper(policyValue, optWildcard, isRecursive); assertEquals(getMessage(row), result, matcher.isMatch(resource, evalContext)); } }
@Override boolean isMatch(String resourceValue, Map<String, Object> evalContext) { return RangerURLResourceMatcher.isRecursiveWildCardMatch(resourceValue, getExpandedValue(evalContext), levelSeparatorChar, IOCase.SENSITIVE); }
CaseSensitiveURLRecursiveWildcardMatcher extends ResourceMatcher { @Override boolean isMatch(String resourceValue, Map<String, Object> evalContext) { return RangerURLResourceMatcher.isRecursiveWildCardMatch(resourceValue, getExpandedValue(evalContext), levelSeparatorChar, IOCase.SENSITIVE); } }
CaseSensitiveURLRecursiveWildcardMatcher extends ResourceMatcher { @Override boolean isMatch(String resourceValue, Map<String, Object> evalContext) { return RangerURLResourceMatcher.isRecursiveWildCardMatch(resourceValue, getExpandedValue(evalContext), levelSeparatorChar, IOCase.SENSITIVE); } CaseSensitiveURLRecursiveWildcardMatcher(String value, char levelSeparatorChar); }
CaseSensitiveURLRecursiveWildcardMatcher extends ResourceMatcher { @Override boolean isMatch(String resourceValue, Map<String, Object> evalContext) { return RangerURLResourceMatcher.isRecursiveWildCardMatch(resourceValue, getExpandedValue(evalContext), levelSeparatorChar, IOCase.SENSITIVE); } CaseSensitiveURLRecursiveWildcardMatcher(String value, char levelSeparatorChar);  }
CaseSensitiveURLRecursiveWildcardMatcher extends ResourceMatcher { @Override boolean isMatch(String resourceValue, Map<String, Object> evalContext) { return RangerURLResourceMatcher.isRecursiveWildCardMatch(resourceValue, getExpandedValue(evalContext), levelSeparatorChar, IOCase.SENSITIVE); } CaseSensitiveURLRecursiveWildcardMatcher(String value, char levelSeparatorChar);   }