class RangerValidator {

	List<RangerPolicy> getPolicies(final String serviceName, final String policyName) {
		if(LOG.isDebugEnabled()) {
			LOG.debug("==> RangerValidator.getPolicies(" + serviceName + ", " + policyName + ")");
		}

		List<RangerPolicy> policies = null;
		try {
			SearchFilter filter = new SearchFilter();
			if (StringUtils.isNotBlank(policyName)) {
				filter.setParam(SearchFilter.POLICY_NAME, policyName);
			}
			filter.setParam(SearchFilter.SERVICE_NAME, serviceName);
			
			policies = _store.getPolicies(filter);
		} catch (Exception e) {
			LOG.debug("Encountred exception while retrieving service from service store!", e);
		}
		
		if(LOG.isDebugEnabled()) {
			int count = policies == null ? 0 : policies.size();
			LOG.debug("<== RangerValidator.getPolicies(" + serviceName + ", " + policyName + "): count[" + count + "], " + policies);
		}
		return policies;
	}

	protected  RangerValidator(ServiceStore store);

}