- /**
- * Validate the policy properties.
- *
- * @param result The result of validations up to now
- * @return the validation result
- */
- private PfValidationResult validateProperties(@NonNull final PfValidationResult resultIn) {
- PfValidationResult result = resultIn;
-
- for (Entry<String, String> propertyEntry : properties.entrySet()) {
- if (!ParameterValidationUtils.validateStringParameter(propertyEntry.getKey())) {
- result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
- "policy property key may not be null "));
- } else if (propertyEntry.getValue() == null) {
- result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
- "policy property value may not be null "));
- }
- }
- return result;
- }
-
- /**
- * Validate the policy targets.
- *
- * @param result The result of validations up to now
- * @return the validation result
- */
- private PfValidationResult validateTargets(final PfValidationResult resultIn) {
- PfValidationResult result = resultIn;
-
- for (PfConceptKey target : targets) {
- if (target == null) {
- result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
- "policy target may not be null "));
- } else {
- result = target.validate(result);
- }
- }
- return result;
- }
-