class RangerValidator {

	Map<String, String> getValidationRegExes(RangerServiceDef serviceDef) {
		if (serviceDef == null || CollectionUtils.isEmpty(serviceDef.getResources())) {
			return new HashMap<String, String>();
		} else {
			Map<String, String> result = new HashMap<String, String>();
			for (RangerResourceDef resourceDef : serviceDef.getResources()) {
				if (resourceDef == null) {
					LOG.warn("A resource def in resource def collection is null");
				} else {
					String name = resourceDef.getName();
					String regEx = resourceDef.getValidationRegEx();
					if (StringUtils.isBlank(name)) {
						LOG.warn("resource name is null/empty/blank");
					} else if (StringUtils.isBlank(regEx)) {
						LOG.debug("validation regex is null/empty/blank");
					} else {
						result.put(name, regEx);
					}
				}
			}
			return result;
		}
	}

	protected  RangerValidator(ServiceStore store);

}