summaryrefslogtreecommitdiffstats
path: root/models-tosca/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'models-tosca/src/main')
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraint.java5
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataType.java12
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicy.java11
3 files changed, 9 insertions, 19 deletions
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraint.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraint.java
index 6369f7996..7c236e031 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraint.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraint.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Model
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -52,9 +52,6 @@ public abstract class JpaToscaConstraint
this.fromAuthorative(authorativeConcept);
}
- @Override
- public abstract int compareTo(JpaToscaConstraint otherConstraint);
-
/**
* Create instances of constraints of various types.
*
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataType.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataType.java
index a44d7654c..23411ad5e 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataType.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataType.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Model
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -196,7 +196,7 @@ public class JpaToscaDataType extends JpaToscaEntityType<ToscaDataType> implemen
PfValidationResult result = super.validate(resultIn);
if (constraints != null) {
- result = validateConstraints(result);
+ validateConstraints(result);
}
if (properties != null) {
@@ -209,19 +209,15 @@ public class JpaToscaDataType extends JpaToscaEntityType<ToscaDataType> implemen
/**
* Validate the constraints.
*
- * @param result The result of validations up to now
- * @return the validation result
+ * @param result where to put the validation results
*/
- private PfValidationResult validateConstraints(@NonNull final PfValidationResult resultIn) {
- PfValidationResult result = resultIn;
-
+ private void validateConstraints(@NonNull final PfValidationResult result) {
for (JpaToscaConstraint constraint : constraints) {
if (constraint == null) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
"data type constraint may not be null "));
}
}
- return result;
}
/**
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicy.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicy.java
index cebf63d36..1f5c76e59 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicy.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicy.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP Policy Model
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -274,7 +274,7 @@ public class JpaToscaPolicy extends JpaToscaEntityType<ToscaPolicy> implements P
}
if (properties != null) {
- result = validateProperties(result);
+ validateProperties(result);
}
if (targets != null) {
@@ -287,11 +287,9 @@ public class JpaToscaPolicy extends JpaToscaEntityType<ToscaPolicy> implements P
/**
* Validate the policy properties.
*
- * @param result The result of validations up to now
- * @return the validation result
+ * @param result where to put the validation results
*/
- private PfValidationResult validateProperties(final PfValidationResult resultIn) {
- PfValidationResult result = resultIn;
+ private void validateProperties(final PfValidationResult result) {
for (Entry<String, String> propertyEntry : properties.entrySet()) {
if (!ParameterValidationUtils.validateStringParameter(propertyEntry.getKey())) {
@@ -302,7 +300,6 @@ public class JpaToscaPolicy extends JpaToscaEntityType<ToscaPolicy> implements P
"policy property value may not be null "));
}
}
- return result;
}
/**